|
MediaWiki master
|
GrammarOs. More...
Inherits Wikimedia\Leximorph\Handler\Overrides\IGrammarTransformer.

Public Member Functions | |
| process (string $word, string $case) | |
| Applies Ossetic-specific grammatical transformations. | |
GrammarOs.
Implements grammar transformations for Ossetic (os).
These rules don't cover the whole grammar of the language. This logic was originally taken from MediaWiki Core. Thanks to all contributors.
Definition at line 25 of file GrammarOs.php.
| Wikimedia\Leximorph\Handler\Overrides\Grammar\GrammarOs::process | ( | string | $word, |
| string | $case ) |
Applies Ossetic-specific grammatical transformations.
Convert from the nominative form of a noun to other cases Invoked with {{grammar:case|word}}
Depending on the word, there are four different ways of converting to other cases. 1) Words consist of not Cyrillic letters or is an abbreviation. Then result word is: word + hyphen + case ending.
2) Word consist of Cyrillic letters. 2.1) Word is in plural. Then result word is: word - last letter + case ending. Ending of the allative case here is 'æм'.
2.2) Word is in singular form. 2.2.1) Word ends on consonant. Then result word is: word + case ending.
2.2.2) Word ends on vowel. The resultant word is: word + 'й' + case ending for cases != allative or comitative and word + case ending for allative or comitative. Ending of the allative case here is 'æ'.
| string | $word | The word to process. |
| string | $case | The grammatical case. |
Implements Wikimedia\Leximorph\Handler\Overrides\IGrammarTransformer.
Definition at line 54 of file GrammarOs.php.