PHPackages                             tinigin/morphos - 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. tinigin/morphos

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

tinigin/morphos
===============

A morphological solution for Russian and English language written completely in PHP. Provides classes to inflect personal names, geographical names, decline and pluralize nouns, generate cardinal and ordinal numerals, spell out money amounts and time.

v1.0.0(1y ago)02.4k↓33.3%MITPHPPHP &gt;=5.4.0

Since Jul 16Pushed 1y agoCompare

[ Source](https://github.com/tinigin/Morphos)[ Packagist](https://packagist.org/packages/tinigin/morphos)[ Docs](https://tinigin.ru)[ RSS](/packages/tinigin-morphos/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Morphos
=======

[](#morphos)

A morphological solution for Russian and English language written completely in PHP and delivered as a PHP library or docker image to integrate in non-PHP stack.

[![Latest Stable Version](https://camo.githubusercontent.com/94ef22192e2b728aeea47db48e87a1d06d27bc943f72862ebc93c3c434f81e2a/68747470733a2f2f706f7365722e707567782e6f72672f7761706d6f7267616e2f6d6f7270686f732f762f737461626c65)](https://packagist.org/packages/wapmorgan/morphos)[![License](https://camo.githubusercontent.com/4f55668126a3e61aaffcff731b96896482b893a916ffbba9a79b045c371d5210/68747470733a2f2f706f7365722e707567782e6f72672f7761706d6f7267616e2f6d6f7270686f732f6c6963656e7365)](https://packagist.org/packages/wapmorgan/morphos)[![Total Downloads](https://camo.githubusercontent.com/9f83cc4995dc5d4e58786ea31e143ac2b085f7869ac35dd78ed3f2aedb60f877/68747470733a2f2f706f7365722e707567782e6f72672f7761706d6f7267616e2f6d6f7270686f732f646f776e6c6f616473)](https://packagist.org/packages/wapmorgan/morphos)[![Daily Downloads](https://camo.githubusercontent.com/8c9029e1314c77c6ec250b93903dbf44cc67497de9432ca020c240211367b7d4/68747470733a2f2f706f7365722e707567782e6f72672f7761706d6f7267616e2f6d6f7270686f732f642f6461696c79)](https://packagist.org/packages/wapmorgan/morphos)[![Latest Unstable Version](https://camo.githubusercontent.com/e7f5eb3a4b9371574f983abe0c550851e23a010e59ea645f3134ca542739e54e/68747470733a2f2f706f7365722e707567782e6f72672f7761706d6f7267616e2f6d6f7270686f732f762f756e737461626c65)](https://packagist.org/packages/wapmorgan/morphos)

Tests &amp; Quality: [![Build Status](https://camo.githubusercontent.com/6aedd4919ffc5902546f791f631d48b26a6e9ec323fdaa0429da93ebb76d561a/68747470733a2f2f6170702e7472617669732d63692e636f6d2f7761706d6f7267616e2f4d6f7270686f732e7376673f6272616e63683d6d6173746572)](https://app.travis-ci.com/github/wapmorgan/Morphos)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/1b93a34ed3dfef93540654ae99ccf322ca4f52a9a81b2b31eecb110ec95a6323/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7761706d6f7267616e2f4d6f7270686f732f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/wapmorgan/Morphos/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/68dce049c66480d10bce93e03bdc50605d4b0c7a44c4e986807a74602194a1b8/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7761706d6f7267616e2f4d6f7270686f732f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/wapmorgan/Morphos/?branch=master)

Features
--------

[](#features)

- \[✓\] Inflection of Personal names (Фамилия, Имя, Отчество) (Russian)
- \[✓\] Inflection of Geographical names (Страны/Города) (Russian)
- \[✓\] Declension/Pluralization of nouns and adjectives (Russian, English)
- \[✓\] Generation numerals of numbers (количественные и порядковые) (Russian, English)
- \[✓\] Spelling out amounts of money (Russian)
- \[✓\] Spelling out time units and intervals (Russian, English)

Table of contents
-----------------

[](#table-of-contents)

1. Installation
2. Quick start
3. Documentation
4. Contributing

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

[](#installation)

### As PHP library

[](#as-php-library)

- Download library through composer:

```
composer require wapmorgan/morphos

```

or install via adapter:

- Adapter for Blade: [wapmorgan/morphos-blade](https://github.com/wapmorgan/Morphos-Blade)
- Adapter for Twig: [wapmorgan/morphos-twig](https://github.com/wapmorgan/Morphos-Twig)
- Adapter for Yii2: [wapmorgan/yii2-inflection](https://github.com/wapmorgan/yii2-inflection)

### As a separate service

[](#as-a-separate-service)

The server starts in a container from [docker image](https://hub.docker.com/r/wapmorgan/morphos) and listens 8080 port for GET-requests.

Integrate service into your stack (for example, docker compose)

```
services:
  morphos:
    image: wapmorgan/morphos:3.2.29
    ports:
      - 8093:8080
```

or standalone container:

```
docker run --env NUM_WORKERS=4 --rm --publish 8093:8080 -v wapmorgan/morphos:3.2.29
```

*Tip*: adjust `NUM_WORKERS` env variable if you will send a lot of load to service. By default, it's 4.

There are **API:** marks in documentation for functions, that exposed as service endpoints. Just pass them the same arguments as to PHP-functions/methods.

Quick Start
-----------

[](#quick-start)

#### Russian

[](#russian)

```
// Inflect russian names:
morphos\Russian\inflectName('Иванов Петр', 'родительный') => 'Иванова Петра'

// Inflect geographical names:
morphos\Russian\GeographicalNamesInflection::getCase('Москва', 'родительный') => 'Москвы'

// Pluralize russian nouns and adjectives:
morphos\Russian\pluralize(10, 'новый дом') => '10 новых домов'

// Generate russian cardinal numerals:
morphos\Russian\CardinalNumeralGenerator::getCase(567, 'именительный') => 'пятьсот шестьдесят семь'

// Generate russian ordinal numerals:
morphos\Russian\OrdinalNumeralGenerator::getCase(961, 'именительный') => 'девятьсот шестьдесят первый'

// Generate russian time difference
morphos\Russian\TimeSpeller::spellDifference(time() + 3600, morphos\TimeSpeller::DIRECTION) => 'через 1 час'

// other functions described in README-ru.md
```

#### English

[](#english)

```
// Pluralize english nouns:
morphos\English\pluralize(10, 'house') => '10 houses'

// Generate english cardinal numerals:
morphos\English\CardinalNumeralGenerator::generate(567) => 'five hundred sixty-seven'

// Generate english ordinal numerals:
morphos\English\OrdinalNumeralGenerator::generate(961) => 'nine hundred sixty-first'

// Generate english time difference
morphos\English\TimeSpeller::spellDifference(time() + 3600, morphos\TimeSpeller::DIRECTION) => 'in 1 hour'
```

Documentation
=============

[](#documentation)

- [Русская морфология](README-ru.md) в файле README-ru.md
- [English morphology](README-en.md) in file README-en.md

Contributing
============

[](#contributing)

See [CONTRIBUTING.md](CONTRIBUTING.md) for this.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 Bus Factor1

Top contributor holds 93.7% 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

Unknown

Total

1

Last Release

672d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5e9922ffdab79093121ac97b91617caa3c3c393f290807e8ac96bb322b3b631d?d=identicon)[tinigin](/maintainers/tinigin)

---

Top Contributors

[![wapmorgan](https://avatars.githubusercontent.com/u/6000618?v=4)](https://github.com/wapmorgan "wapmorgan (463 commits)")[![iGusev](https://avatars.githubusercontent.com/u/1555767?v=4)](https://github.com/iGusev "iGusev (3 commits)")[![denysdesign](https://avatars.githubusercontent.com/u/1041797?v=4)](https://github.com/denysdesign "denysdesign (3 commits)")[![alexlcdee](https://avatars.githubusercontent.com/u/9890043?v=4)](https://github.com/alexlcdee "alexlcdee (2 commits)")[![altapo](https://avatars.githubusercontent.com/u/837355?v=4)](https://github.com/altapo "altapo (2 commits)")[![b1rdex](https://avatars.githubusercontent.com/u/312855?v=4)](https://github.com/b1rdex "b1rdex (2 commits)")[![dixstonz3](https://avatars.githubusercontent.com/u/24312986?v=4)](https://github.com/dixstonz3 "dixstonz3 (2 commits)")[![DocentBF](https://avatars.githubusercontent.com/u/14574432?v=4)](https://github.com/DocentBF "DocentBF (2 commits)")[![leshakhov](https://avatars.githubusercontent.com/u/10301330?v=4)](https://github.com/leshakhov "leshakhov (2 commits)")[![prgrant](https://avatars.githubusercontent.com/u/11554708?v=4)](https://github.com/prgrant "prgrant (2 commits)")[![tinigin](https://avatars.githubusercontent.com/u/927083?v=4)](https://github.com/tinigin "tinigin (2 commits)")[![Nalorokk](https://avatars.githubusercontent.com/u/1678815?v=4)](https://github.com/Nalorokk "Nalorokk (1 commits)")[![Nappsel](https://avatars.githubusercontent.com/u/26490317?v=4)](https://github.com/Nappsel "Nappsel (1 commits)")[![p1997d](https://avatars.githubusercontent.com/u/144550997?v=4)](https://github.com/p1997d "p1997d (1 commits)")[![bsv-hub](https://avatars.githubusercontent.com/u/43187016?v=4)](https://github.com/bsv-hub "bsv-hub (1 commits)")[![detrenasama](https://avatars.githubusercontent.com/u/60028336?v=4)](https://github.com/detrenasama "detrenasama (1 commits)")[![prokhorovSimbirsoft](https://avatars.githubusercontent.com/u/38657086?v=4)](https://github.com/prokhorovSimbirsoft "prokhorovSimbirsoft (1 commits)")[![ssboev](https://avatars.githubusercontent.com/u/30308067?v=4)](https://github.com/ssboev "ssboev (1 commits)")[![dastanaron](https://avatars.githubusercontent.com/u/25330618?v=4)](https://github.com/dastanaron "dastanaron (1 commits)")[![Zuzest](https://avatars.githubusercontent.com/u/5245836?v=4)](https://github.com/Zuzest "Zuzest (1 commits)")

---

Tags

moneylanguageinflectiontimespellingenglishrussianpluralizationcardinalordinalnounsmorphologydeclensionhuman-friendlyNumeralsadjectivespersonal namesgeographical names

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/tinigin-morphos/health.svg)

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

###  Alternatives

[wapmorgan/morphos

A morphological solution for Russian and English language written completely in PHP. Provides classes to inflect personal names, geographical names, decline and pluralize nouns, generate cardinal and ordinal numerals, spell out money amounts and time.

8351.3M7](/packages/wapmorgan-morphos)[doctrine/inflector

PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowercase and singular/plural forms of words.

11.4k855.8M711](/packages/doctrine-inflector)[phpoption/phpoption

Option Type for PHP

2.7k541.2M159](/packages/phpoption-phpoption)[moneyphp/money

PHP implementation of Fowler's Money pattern

4.8k82.5M422](/packages/moneyphp-money)[brick/money

Money and currency library

1.9k37.9M102](/packages/brick-money)[symfony/clock

Decouples applications from the system clock

431168.9M205](/packages/symfony-clock)

PHPackages © 2026

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