vibe.linguistics.languages.fr¶
French language rules for linguistic transformations.
FrenchRules ¶
French grammar rules implementation.
get_gender_hint ¶
get_gender_hint(word: str) -> GrammaticalGender | None
Attempt to determine grammatical gender from word form.
pluralize ¶
pluralize(word: str, context: Linguistic | None = None, overrides: str | None = None) -> str
Convert a French word to its plural form.
| Parameters: |
|
|---|
make_definite ¶
make_definite(word: str, number: str = 'singular', gender: GrammaticalGender | None = None, context: Linguistic | None = None, overrides: str | None = None) -> str
Add French definite article.
French definite articles: - Masculine singular: le (l' before vowel) - Feminine singular: la (l' before vowel) - Plural: les
make_possessive ¶
make_possessive(word: str, subject: str | None = None, context: Linguistic | None = None, overrides: str | None = None) -> str
Convert to French possessive/genitive form.
French uses "de" + article: - du + masc sing noun - de la + fem sing noun - de l' + vowel-starting noun - des + plural noun
Note: The subject parameter is handled by the transforms layer.
make_indefinite ¶
make_indefinite(word: str, gender: GrammaticalGender | None = None, context: Linguistic | None = None, overrides: str | None = None) -> str
Add French indefinite article (un/une) to a word.
French indefinite articles depend on grammatical gender: - MASCULINE: "un" - FEMININE: "une"
format_conjunction ¶
format_conjunction(conjunction_type: str) -> str
Return French conjunction word.