vibe.linguistics.languages.en¶
English language rules for linguistic transformations.
EnglishRules ¶
English grammar rules implementation.
pluralize ¶
pluralize(word: str, context: Linguistic | None = None, overrides: str | None = None) -> str
Convert a 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 'the' prefix for definite form.
make_possessive ¶
make_possessive(word: str, subject: str | None = None, context: Linguistic | None = None, overrides: str | None = None) -> str
Convert to possessive form.
English has special handling for subject: instead of "contract's end", we rephrase to "the end of the contract".
make_indefinite ¶
make_indefinite(word: str, gender: GrammaticalGender | None = None, context: Linguistic | None = None, overrides: str | None = None) -> str
Add indefinite article (a/an) to a word.
English uses "an" before vowel sounds, "a" before consonant sounds.
format_conjunction ¶
format_conjunction(conjunction_type: str) -> str
Return English conjunction word.