Skip to content

Commit

Permalink
Catalan wip
Browse files Browse the repository at this point in the history
  • Loading branch information
bretttolbert committed Dec 26, 2023
1 parent 6bbb887 commit c0a904c
Show file tree
Hide file tree
Showing 4 changed files with 562 additions and 86 deletions.
5 changes: 2 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# verbecc Changelog

- 1.9.6 [25 December 2023]
- 1.9.6 [26 December 2023]
- Improved Catalan Support
- Added more missing templates (1)
- TODO: Still missing 5 templates for 9 out of 8616 verbs
- Added remaining missing templates for all 8616 verbs
- See `test_inflector_ca.test_all_verbs_have_templates`

- 1.9.5 [24 December 2023]
Expand Down
222 changes: 209 additions & 13 deletions tests/test_inflector_ca.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,11 @@
cg = Conjugator(lang="ca")


# TODO: Fix all of these missing templates
@pytest.mark.skip("known failure")
def test_all_verbs_have_templates():
"""Have not finished adding templates for all verbs, so this should fail"""
verbs = cg.get_verbs()
assert len(verbs) == 8616
template_names = cg.get_template_names()
assert len(template_names) == 63
assert len(template_names) == 66
missing_verbs = []
missing_templates = set()
for verb in verbs:
Expand Down Expand Up @@ -2639,8 +2636,8 @@ def test_find_verb_by_infinitive():
"ella premor",
"nosaltres premorim",
"vosaltres premoriu",
"elles premoren"
]
"elles premoren",
],
),
(
"conviure",
Expand All @@ -2654,8 +2651,8 @@ def test_find_verb_by_infinitive():
"ella conviu",
"nosaltres convivim",
"vosaltres conviviu",
"elles conviuen"
]
"elles conviuen",
],
),
(
"conviure",
Expand All @@ -2669,8 +2666,8 @@ def test_find_verb_by_infinitive():
"ella convivia",
"nosaltres convivíem",
"vosaltres convivíeu",
"elles convivien"
]
"elles convivien",
],
),
(
"conviure",
Expand All @@ -2684,9 +2681,208 @@ def test_find_verb_by_infinitive():
"ella convisqué",
"nosaltres convisquérem",
"vosaltres convisquéreu",
"elles convisqueren"
]
)
"elles convisqueren",
],
),
(
"vèncer",
"indicatiu",
"present",
False,
"f",
[
"jo venço",
"tu vences",
"ella venç",
"nosaltres vencem",
"vosaltres venceu",
"elles vencen",
],
),
(
"vèncer",
"imperatiu",
"imperatiu-present",
False,
"m",
["venç", "venci", "vencem", "venceu", "vencin"],
),
(
"vèncer",
"particip",
"particip",
False,
"f",
["vençut", "vençuda", "vençuts", "vençudes"],
),
(
"vèncer",
"infinitiu",
"infinitiu-present",
False,
"m",
["vèncer"],
),
(
"vèncer",
"gerundi",
"gerundi",
False,
"m",
["vencent"],
),
(
"cerndre",
"indicatiu",
"present",
False,
"f",
[
"jo cerno",
"tu cerns",
"ella cern",
"nosaltres cernem",
"vosaltres cerneu",
"elles cernen",
],
),
(
"oir",
"indicatiu",
"present",
False,
"f",
[
"jo oeixo",
"tu oeixes",
"ella oeix",
"nosaltres oïm",
"vosaltres oïu",
"elles oeixen",
],
),
(
"oir",
"indicatiu",
"imperfet",
False,
"f",
[
"jo oïa",
"tu oïes",
"ella oïa",
"nosaltres oíem",
"vosaltres oíeu",
"elles oïen",
],
),
(
"oir",
"indicatiu",
"passat-simple",
False,
"f",
[
"jo oí",
"tu oïres",
"ella oí",
"nosaltres oírem",
"vosaltres oíreu",
"elles oïren",
],
),
(
"oir",
"indicatiu",
"futur",
False,
"f",
[
"jo oiré",
"tu oiràs",
"ella oirà",
"nosaltres oirem",
"vosaltres oireu",
"elles oiran",
],
),
(
"oir",
"subjuntiu",
"present",
False,
"f",
[
"jo oeixi",
"tu oeixis",
"ella oeixi",
"nosaltres oïm",
"vosaltres oïu",
"elles oeixin",
],
),
(
"oir",
"subjuntiu",
"imperfet",
False,
"f",
[
"jo oís",
"tu oïssis",
"ella oís",
"nosaltres oíssim",
"vosaltres oíssiu",
"elles oïssin",
],
),
(
"oir",
"condicional",
"present",
False,
"f",
[
"jo oiria",
"tu oiries",
"ella oiria",
"nosaltres oiríem",
"vosaltres oiríeu",
"elles oirien",
],
),
(
"oir",
"particip",
"particip",
False,
"f",
["oït", "oïda", "oïts", "oïdes"],
),
(
"oir",
"infinitiu",
"infinitiu-present",
False,
"m",
["oir"],
),
(
"oir",
"gerundi",
"gerundi",
False,
"m",
["oint"],
),
(
"oir",
"imperatiu",
"imperatiu-present",
False,
"m",
["oeix", "oeixi", "oïm", "oïu", "oeixin"],
),
],
)
def test_inflector_ca_conjugate_mood_tense(
Expand Down
Loading

0 comments on commit c0a904c

Please sign in to comment.