PHPackages                             seoservice2020/phpmorphy - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. seoservice2020/phpmorphy

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

seoservice2020/phpmorphy
========================

phpMorphy - morphological analyzer library for Russian, Ukrainian, English and German languages.

2.2.2(5y ago)024111MITPHPPHP &gt;=7.2 &lt;8.0

Since Jul 7Pushed 5y agoCompare

[ Source](https://github.com/SEOService2020/phpmorphy)[ Packagist](https://packagist.org/packages/seoservice2020/phpmorphy)[ Docs](https://github.com/SEOService2020/phpmorphy)[ RSS](/packages/seoservice2020-phpmorphy/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (5)Dependencies (1)Versions (12)Used By (1)

phpMorphy (reloaded)
====================

[](#phpmorphy-reloaded)

[![Latest Stable Version](https://camo.githubusercontent.com/d59194c6b8939452342e2dcdd9dd72f788bb494535e7d7625781f08ae732b920/68747470733a2f2f706f7365722e707567782e6f72672f73656f73657276696365323032302f7068706d6f727068792f76657273696f6e)](https://packagist.org/packages/seoservice2020/phpmorphy)[![Total Downloads](https://camo.githubusercontent.com/7d4657f1876931d5bae846879f553be7a5bed22ca30c421251f15cd9842256ef/68747470733a2f2f706f7365722e707567782e6f72672f73656f73657276696365323032302f7068706d6f727068792f646f776e6c6f616473)](https://packagist.org/packages/seoservice2020/phpmorphy)[![tests](https://github.com/seoservice2020/phpmorphy/workflows/tests/badge.svg)](https://github.com/seoservice2020/phpmorphy/actions)[![codecov](https://camo.githubusercontent.com/8330b93c2139fb6678da5865ff642b88d7d37b26f618277d674a68682693fe85/68747470733a2f2f636f6465636f762e696f2f67682f73656f73657276696365323032302f7068706d6f727068792f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/seoservice2020/phpmorphy)[![License](https://camo.githubusercontent.com/02879f4c5cd1f6a34e62f9a7d9d70ed7301380e381acb2f5c13cd0cf5a648743/68747470733a2f2f706f7365722e707567782e6f72672f73656f73657276696365323032302f7068706d6f727068792f6c6963656e7365)](https://packagist.org/packages/seoservice2020/phpmorphy)

phpMorphy is morphological analyzer library for Russian, Ukrainian, English and German languages.

**This version supports only PHP 7.2, 7.3 and 7.4.**

- [Website (in Russian)](http://phpmorphy.sourceforge.net/)
- [Sourceforge project](http://sourceforge.net/projects/phpmorphy)

This library allows to retrieve following morph information for any word:

- base (normal) form;
- all forms;
- grammatical (part of speech, grammems) information.

Installation
------------

[](#installation)

Run the following command from your terminal:

```
composer require seoservice2020/phpmorphy
```

Or add this to require section in your `composer.json` file:

```
{
    "require": {
        "seoservice2020/phpmorphy": "~2.2"
    }
}
```

then run `composer update`

Usage
-----

[](#usage)

See examples in [examples](examples) directory.

Building dictionaries
---------------------

[](#building-dictionaries)

To build your dictionary from one of the sources:

1. Create an XML file from dictionary source native format, e.g. for AOT, use `bin/dict-processing/convert-mrd2xml.php` script:

    ```
    php bin/dict-processing/convert-mrd2xml.php path/to/aot/dict/file.mwz path/to/otput/
    ```

    Also for Russian language, you may use `bin/dict-processing/convert-russian-jo.php` to convert XML with Russian dictionary into format without `ё` letter.
2. Build phpMorphy dictionaries files using `bin/dict-build/build-dict.php`:

    At now package has some morphy builder tool for Windows (see `bin/morph-builder/` folder), but you can specify your own morphy builder tool version. **Important! Morphy builder executable should be in `bin/morphy_builder.exe` file.**

    You may need to provide source-specific data for script, e.g. for [AOT](http://aot.ru/) you will need to provide path to [AOT sources](https://github.com/sokirko74/aot) root.

    Both morphy builder path and AOT path arguments are optional. As it was before, you also may provide environment variables:

    - `MORPHY_DIR` - morphy builder tool root path
    - `RML` - AOT sources root path

    Environment variables are checked first for backward compatibility.

    Example:

    ```
    php bin/dict-build/build-dict.php path/to/xml/ru_RU.xml path/to/otput/ utf-8 1 1 path/to/morphy/builder/root/folder/ path/to/aot/root/folder
    ```

Exporting dictionaries
----------------------

[](#exporting-dictionaries)

If you need to use some specific dictionaries with phpMorphy, there are categorized dictionaries in `dicts/categorized/` folder. All dictionaries are uppercase.

Default dictionaries are:

- Russian language: AOT UTF-8 uppercase dictionary with `ё` letter support
- English language: AOT UTF-8 uppercase dictionary
- German language: AOT UTF-8 uppercase dictionary
- Ukrainian language: MySpell UTF-8 uppercase dictionary

Speed (DEPRECATED)
------------------

[](#speed-deprecated)

### Single word mode

[](#single-word-mode)

modebase formall formsall forms with gram. infoFILE1000800600SHM22001100800MEM25001200900### Bulk mode

[](#bulk-mode)

modebase formall formsall forms with gram. infoFILE1700800700SHM3200800700MEM3500800700Note:

> All values are words per second speed. Test platform: PHP 5.2.3, AMD Duron 800 with 512Mb memory, WinXP.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor1

Top contributor holds 58.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~240 days

Recently: every ~10 days

Total

11

Last Release

1934d ago

Major Versions

1.3.0 → 2.0.02020-12-19

PHP version history (2 changes)1.1.0PHP &gt;=5.3

2.0.0PHP &gt;=7.2 &lt;8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/e4c6037739b19ae1486e27da55b25640b62c2e7df61e5d8fd9d50762529e255f?d=identicon)[sergotail](/maintainers/sergotail)

---

Top Contributors

[![sergotail](https://avatars.githubusercontent.com/u/17298627?v=4)](https://github.com/sergotail "sergotail (35 commits)")[![MAXakaWIZARD](https://avatars.githubusercontent.com/u/1138453?v=4)](https://github.com/MAXakaWIZARD "MAXakaWIZARD (19 commits)")[![prusov](https://avatars.githubusercontent.com/u/5647660?v=4)](https://github.com/prusov "prusov (3 commits)")[![heromantor](https://avatars.githubusercontent.com/u/740904?v=4)](https://github.com/heromantor "heromantor (2 commits)")[![yethee](https://avatars.githubusercontent.com/u/559488?v=4)](https://github.com/yethee "yethee (1 commits)")

---

Tags

nlpphpmorphy

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/seoservice2020-phpmorphy/health.svg)

```
[![Health](https://phpackages.com/badges/seoservice2020-phpmorphy/health.svg)](https://phpackages.com/packages/seoservice2020-phpmorphy)
```

###  Alternatives

[rubix/ml

A high-level machine learning and deep learning library for the PHP language.

2.2k1.4M28](/packages/rubix-ml)[nlp-tools/nlp-tools

NlpTools is a set of php 5.3+ classes for beginner to semi advanced natural language processing work.

774645.2k5](/packages/nlp-tools-nlp-tools)[codewithkyrian/transformers

State-of-the-art Machine Learning for PHP. Run Transformers in PHP

749231.8k5](/packages/codewithkyrian-transformers)[yooper/php-text-analysis

PHP Text Analysis is a library for performing Information Retrieval (IR) and Natural Language Processing (NLP) tasks using the PHP language

539393.0k2](/packages/yooper-php-text-analysis)[cijic/phpmorphy

phpMorphy - morphological analyzer library for Russian, English, German and Ukrainian languages.

115339.9k7](/packages/cijic-phpmorphy)[davmixcool/php-sentiment-analyzer

PHP Sentiment Analyzer is a lexicon and rule-based sentiment analysis tool that is used to understand sentiments in a sentence using VADER (Valence Aware Dictionary and sentiment Reasoner).

138151.7k1](/packages/davmixcool-php-sentiment-analyzer)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
