edsnlp
EDS-NLP
conjugator
conjugate_verb(verb, conjugator)
Conjugates the verb using an instance of mlconjug3,
and formats the results in a pandas DataFrame
.
PARAMETER | DESCRIPTION |
---|---|
verb |
Verb to conjugate.
TYPE:
|
conjugator |
mlconjug3 instance for conjugating.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
pd.DataFrame
|
Normalized dataframe containing all conjugated forms for the verb. |
Source code in edsnlp/conjugator.py
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
|
conjugate(verbs, language='fr')
Conjugate a list of verbs.
PARAMETER | DESCRIPTION |
---|---|
verbs |
List of verbs to conjugate
TYPE:
|
language |
Language to conjugate. Defaults to French (
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
pd.DataFrame
|
Dataframe containing the conjugations for the provided verbs.
Columns: |
Source code in edsnlp/conjugator.py
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
|
get_conjugated_verbs(verbs, matches, language='fr')
Get a list of conjugated verbs.
PARAMETER | DESCRIPTION |
---|---|
verbs |
List of verbs to conjugate.
TYPE:
|
matches |
List of dictionary describing the mode/tense/persons to keep.
TYPE:
|
language |
[description], by default "fr" (French)
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
List[str]
|
List of terms to look for. |
Examples:
>>> get_conjugated_verbs(
"aimer",
dict(mode="Indicatif", tense="Présent", person="1p"),
)
['aimons']
Source code in edsnlp/conjugator.py
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 |
|