This extension provide a method for the russian nouns inflection.
It is based on the yandex's inflexion service.
It saves already inflected words in a table, on order to minimize the request to the service.
Installation ¶
Add to the database the words' table (definition in schema.sql) Place the folder in extension, and add it to import
'import'=>array(
'application.models.*',
'application.components.*',
'application.extension.russianLanguageSupport.*',
),
Usage ¶
For inflect a word, use:
russianLanguageSupport::declinate('мама', 'rod');
The cases are:
- 'nom': Nominative - Именительный
- 'gen': Genitive - Родительный
- 'dat': Dative - Дательный
- 'acc': Accusative - Винительный
- 'str': Instrumental - Творительный
- 'prep': Prepositional - Предложный
call for help
This extension relies on a yandex's service, which doesn't work for plural cases.
Does anyone know a better service? If you point here I would be pleased to upgrade the extension.
I'd like very much a service based on an open source project and not commercial and, if possible, with plural cases.
link error
NOTE: The link to yandex's inflexion service gives error 403 Forbidden
re: link error
I cannot create a link to an example, anyway now I liked a page of explanation of the project.
phpmorphy
There's also http://phpmorphy.sourceforge.net/dokuwiki/
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.