MediaWiki master
Wikimedia\Leximorph\Handler\Overrides\Grammar\GrammarOs Class Reference

GrammarOs. More...

Inherits Wikimedia\Leximorph\Handler\Overrides\IGrammarTransformer.

Collaboration diagram for Wikimedia\Leximorph\Handler\Overrides\Grammar\GrammarOs:

Public Member Functions

 process (string $word, string $case)
 Applies Ossetic-specific grammatical transformations.
 

Detailed Description

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.

Since
1.45
Author
Soslan Khubulov
Doğu Abaris (abari.nosp@m.s@nu.nosp@m.ll.ne.nosp@m.t)
Note
https://www.gnu.org/copyleft/gpl.html GPL-2.0-or-later

Definition at line 25 of file GrammarOs.php.

Member Function Documentation

◆ process()

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 'æ'.

Parameters
string$wordThe word to process.
string$caseThe grammatical case.
Since
1.45
Returns
string The processed word.

Implements Wikimedia\Leximorph\Handler\Overrides\IGrammarTransformer.

Definition at line 54 of file GrammarOs.php.


The documentation for this class was generated from the following file: