PHPackages                             timostamm/text-scoring - 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. timostamm/text-scoring

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

timostamm/text-scoring
======================

07Puppet

Since Oct 3Pushed 8y ago1 watchersCompare

[ Source](https://github.com/timostamm/text-scoring)[ Packagist](https://packagist.org/packages/timostamm/text-scoring)[ RSS](/packages/timostamm-text-scoring/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

PHP Text Scoring Library
========================

[](#php-text-scoring-library)

This Library scores an input text based on weighted keywords.

It can be used to associate a selection of interests with a bunch of keywords and evaluate the relevance of a given text.

#### Example

[](#example)

```
// We setup our keywords.
// If "VW" is present in the text, add 10 points to the score.
// If "Stammmarke" is present in the text, add 5 points to the score.
$criteria = [
	new TextScoreKeyword('VW', 10),
	new TextScoreKeyword('Stammmarke', 5)
];

// This is our example text. It contains both keywords,
// so it should score 15 points.
$txt = 'Volkswagen (Abkürzung VW) ist die Stammmarke der Volkswagen AG.';
$scorer = new TextScorer($criteria);
$score = $scorer->score($txt);
print $score; // => 15
```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

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

### Community

Maintainers

![](https://www.gravatar.com/avatar/6364011a12f22cb5046056371bde6170218218c560eddfdc08b4644b7648af78?d=identicon)[timostamm](/maintainers/timostamm)

---

Top Contributors

[![timostamm](https://avatars.githubusercontent.com/u/4289451?v=4)](https://github.com/timostamm "timostamm (9 commits)")

### Embed Badge

![Health badge](/badges/timostamm-text-scoring/health.svg)

```
[![Health](https://phpackages.com/badges/timostamm-text-scoring/health.svg)](https://phpackages.com/packages/timostamm-text-scoring)
```

###  Alternatives

[michaelb/lumen-make

Lumen make adds more make commands to lumen for jobs, controllers, middleware, etc.

2119.6k](/packages/michaelb-lumen-make)

PHPackages © 2026

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