cijic / phpmorphy
phpMorphy - morphological analyzer library for Russian, English, German and Ukrainian languages.
Installs: 211 549
Dependents: 8
Suggesters: 0
Security: 0
Stars: 108
Watchers: 9
Forks: 37
Open Issues: 0
Requires
- php: >=8.0
README
phpMorphy --- morphological analyzer library for Russian, English, German and Ukrainian languages.
cijic/phpMorphy
is Laravel wrapper for phpMorphy library with PHP7 support.
Source website (in russian): http://phpmorphy.sourceforge.net/
SF project: http://sourceforge.net/projects/phpmorphy
Wrapper on Github: https://github.com/cijic/phpmorphy
This library allow retireve follow morph information for any word:
- Base (normal) form
- All forms
- Grammatical (part of speech, grammems) information
Install
Via Composer
$ composer require cijic/phpmorphy
Usage
$morphy = new cijic\phpMorphy\Morphy('en'); print_r($morphy->getPseudoRoot('FIGHTY'));
result
Array
(
[0] => FIGHTY
[1] => FIGHT
)
Laravel support
Facade
Morphy::getPseudoRoot('БОЙЦОВЫЙ')
Add russian facade support
Add to config/app.php:
Section providers
cijic\phpMorphy\MorphyServiceProvider::class,
Section aliases
'Morphy' => cijic\phpMorphy\Facade\Morphy::class,
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email altcode@ya.ru instead of using the issue tracker.
License
The MIT License (MIT). Please see License File for more information.