PHPackages                             deevee15/text-similarity-php - 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. deevee15/text-similarity-php

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

deevee15/text-similarity-php
============================

php service for text similarity

v1.0.0(1mo ago)12Apache-2.0PHPPHP &gt;=8.1CI passing

Since Apr 15Pushed 2d agoCompare

[ Source](https://github.com/deevee15/text-similarity-php)[ Packagist](https://packagist.org/packages/deevee15/text-similarity-php)[ Docs](https://similarity.deevee.ru)[ RSS](/packages/deevee15-text-similarity-php/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

TextSimilarity
==============

[](#textsimilarity)

TextSimilarity is pure PHP library for detecting duplicate news articles using morphological analysis and entity-weighted scoring.

Read more about TextSimilarity:

- [Features](#features)
- [Installation](#installation)
- [Requirements](#requirements)
- [Getting started](#getting-started)
- [How it works](#how-it-works)
- [Demo](#demo)
- [Licence](#license)

Features
--------

[](#features)

- Morphological text processing via phpMorphy
- Named entity extraction (names, locations, organizations, abbreviations)
- Weighted scoring system with configurable coefficients
- File-based word cache for performance
- English, Deutsch and Russian language support

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

[](#installation)

TextSimilarity is installed via [Composer](https://getcomposer.org/). To [add a dependency](https://getcomposer.org/doc/04-schema.md#package-links) to TextSimilarity in your project,

Run the following to use the latest stable version

```
composer require deevee15/text-similarity-php
```

Requirements
------------

[](#requirements)

- PHP 8.1 or above
- [phpMorphy library](https://github.com/cijic/phpmorphy)

Getting started
---------------

[](#getting-started)

```
use PHPTextSimilarity\TextSimilarity;

$result = TextSimilarity::compare(
    'en',
    'First article`s text...',
    'Second article`s text...',
    ['first' => "Article's title", 'second' => "Article's title"]
);
```

How it works
------------

[](#how-it-works)

The TextSimilarity library divides all words from compared texts and article titles into entities (proper names, common nouns, locations, abbreviations, organizations), converts them to the nominative case, then retains only the matching ones, assigns points based on the matches, and multiplies them by the importance coefficients specified in src/Config/WeightConfig.php.

Demo
----

[](#demo)

Here is the link to the [demo website](https://similarity.deevee.ru)

License
-------

[](#license)

Apache 2.0

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance95

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

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

55d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1091650655f0c29c429031c9510290ab7cc97cd3fac0251a4792647081708f1b?d=identicon)[deevee15](/maintainers/deevee15)

---

Tags

duplicate-detectionnatural-language-processingnlpphpphpmorphytext-similarityphpcomparisontextsimilarityphpcomparison

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/deevee15-text-similarity-php/health.svg)

```
[![Health](https://phpackages.com/badges/deevee15-text-similarity-php/health.svg)](https://phpackages.com/packages/deevee15-text-similarity-php)
```

###  Alternatives

[edgaras/strsim

Collection of string similarity and distance algorithms in PHP including Levenshtein, Damerau-Levenshtein, Jaro-Winkler, and more

2843.7k4](/packages/edgaras-strsim)[povils/figlet

Figlet text generator - PHP

647.2k5](/packages/povils-figlet)[akh/typograf

Типография текста

1927.9k2](/packages/akh-typograf)

PHPackages © 2026

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