PHPackages                             aotd/mystem - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. aotd/mystem

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

aotd/mystem
===========

Yandex Mystem wrapper

3.0.2(7y ago)1813.7k↑180%4MITPHP

Since Sep 1Pushed 7y ago5 watchersCompare

[ Source](https://github.com/aotd1/mystem)[ Packagist](https://packagist.org/packages/aotd/mystem)[ RSS](/packages/aotd-mystem/feed)WikiDiscussions master Synced yesterday

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

[![Latest Stable Version](https://camo.githubusercontent.com/cd8504c314f72eef2931d31472290449476f713f136e5a5c6e2f92fc7118aad3/68747470733a2f2f706f7365722e707567782e6f72672f616f74642f6d797374656d2f762f737461626c652e706e67)](https://packagist.org/packages/aotd/mystem)[![Total Downloads](https://camo.githubusercontent.com/bdc0b3ec09c480d13e9a5ca890bc3e67f1be56941a26cf641b43a95a1a1774e6/68747470733a2f2f706f7365722e707567782e6f72672f616f74642f6d797374656d2f646f776e6c6f6164732e706e67)](https://packagist.org/packages/aotd/mystem)[![Build Status](https://camo.githubusercontent.com/897f56906dc3d592ec6622613c088ca96b2d57f494a8f523605c11b38ad16e71/68747470733a2f2f7472617669732d63692e6f72672f616f7464312f6d797374656d2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/aotd1/mystem)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/03c745b4925292d6f0b37f8b629d0cf12c25fa90226b8280220711c78a43d953/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f616f7464312f6d797374656d2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/aotd1/mystem/?branch=master)[![License](https://camo.githubusercontent.com/1f8604ca0ee0564d4cb6e9bf301acb74780b11e4edaf0d0dc6ee6c4a0a6aa77c/68747470733a2f2f706f7365722e707567782e6f72672f616f74642f6d797374656d2f6c6963656e73652e737667)](https://packagist.org/packages/aotd/mystem)

Использование Mystem
====================

[](#использование-mystem)

Простая обертка для [Yandex mystem](http://company.yandex.ru/technologies/mystem/). Работает исключительно с русской морфологией.

Разрабатывалась для определения ненормативной лексики в текстах, но вполне подойдет и для стемминга и морфологического анализа.

Установка
---------

[](#установка)

Библиотека доступна в Packagist ([aotd/mystem](http://packagist.org/packages/aotd/mystem)) и устанавливается через [Composer](http://getcomposer.org/).

```
php composer.phar require aotd/mystem 'dev-master'
```

Никто не запрещает просто скачать исходники с GitHub и использовать любой PSR-0 автолоадер.

Использование
-------------

[](#использование)

Все примеры собраны в папке examples.

- antimat - проверка текста на наличие обсценной лексики.
- jabberwocky - стемминг части стихотворения «Бармаглот» (в переводе Дины Орловской).
- verb-tense - определение времени глагола

### Использование с Yii

[](#использование-с-yii)

Устанавливаем библиотеку через composer

```
{
    "require": {
        "aotd/mystem": "dev-master"
    },
    "scripts": {
        "post-install-cmd": [ "MystemBinaryInstaller::install" ],
        "post-update-cmd":  [ "MystemBinaryInstaller::update" ]
    },
}
```

```
$ composer install
```

Секция scripts необходима для установки бинарного файла mystem от Яндекса в зависимости от целевой платформы (Win/Mac OS/Linux/FreeBSD)

Складываем `ExtMystem.php` в `/protected/extensions/Mystem`, добавлеям в конфиг в секцию `components`:

```
    ...
    'mystem' => array(
        'class' => 'ext.Mystem.ExtMystem',
//      'falsePositive' => __DIR__ . '/mystem/false-positive.txt',
//      'falsePositiveNormalized' => __DIR__ . '/mystem/false-positive-normalized.txt',
//      'falseNegative' => __DIR__ . '/mystem/false-negative.txt',
//      'falseNegativeNormalized' => __DIR__ . '/mystem/false-negative-normalized.txt',
    ),
    ...
```

Опционально указываем списки ложно-положительных, ложно-отрицательных слов для фильтра обсценной лексики...

```
    Yii::app()->mystem->checkArticle('Текст для проверки на наличие матов');
```

Profit!

P.S. Никто не отменяет великость и могучесть русского языка, потому всецело доверять такому решению не стоит :)

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity34

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 70% 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 ~209 days

Recently: every ~396 days

Total

10

Last Release

2800d ago

Major Versions

0.9.0 → 1.0.02013-09-11

1.3.1 → 3.0.02014-07-23

1.3.2 → 3.0.22018-11-02

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1240087?v=4)[aotd](/maintainers/aotd)[@aotd](https://github.com/aotd)

---

Top Contributors

[![aotd1](https://avatars.githubusercontent.com/u/1684688?v=4)](https://github.com/aotd1 "aotd1 (7 commits)")[![fr05t1k](https://avatars.githubusercontent.com/u/2131624?v=4)](https://github.com/fr05t1k "fr05t1k (1 commits)")[![iGusev](https://avatars.githubusercontent.com/u/1555767?v=4)](https://github.com/iGusev "iGusev (1 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (1 commits)")

---

Tags

yandexstemmerrussianmystem

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/aotd-mystem/health.svg)

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

###  Alternatives

[mck89/peast

Peast is PHP library that generates AST for JavaScript code

19139.2M47](/packages/mck89-peast)[t1gor/robots-txt-parser

PHP class to parse robots.txt rules according to Google, Yandex, W3C and The Web Robots Pages specifications.

90501.8k4](/packages/t1gor-robots-txt-parser)[bopoda/robots-txt-parser

PHP Class for parsing robots.txt files according to Google, Yandex specifications.

47289.3k1](/packages/bopoda-robots-txt-parser)[vipnytt/robotstxtparser

Robots.txt parsing library, with full support for every directive and specification.

27791.3k9](/packages/vipnytt-robotstxtparser)[nxp/russian-porter-stemmer

Russian porter stemmer

4591.6k1](/packages/nxp-russian-porter-stemmer)[lireincore/ymlparser

YML (Yandex Market Language) parser

2530.8k1](/packages/lireincore-ymlparser)

PHPackages © 2026

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