PHPackages                             vench/php-lsa - 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. vench/php-lsa

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

vench/php-lsa
=============

vench/php-lsa

1.0.1(7y ago)2453[1 issues](https://github.com/vench/php-lsa/issues)Apache-2.0PHPPHP &gt;=7.0.0

Since Aug 31Pushed 7y ago1 watchersCompare

[ Source](https://github.com/vench/php-lsa)[ Packagist](https://packagist.org/packages/vench/php-lsa)[ RSS](/packages/vench-php-lsa/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

PHP LSA Library
===============

[](#php-lsa-library)

Singular value decomposition in PHP implementation language.

This package can analyze texts to find a relation with given terms.

It can take an array with text document strings and transform them so they can be queried.

The package can also take a given text and perform a query to return the index of the document that matches better text that was given in the original array of text documents.

#### Install

[](#install)

`composer require vench/php-lsa`

#### Examples

[](#examples)

Find the most similar text.

```
    $documents = [
            "The quick brown fox jumped over the lazy dog",
            "hey diddle diddle, the cat and the fiddle",
            "the cow jumped over the moon",
            "the little dog laughed to see such fun",
            "and the dish ran away with the spoon",
     ];

     $lsa = new LSA(4);
     $trans = $lsa->fitTransform($documents);

     $query = "the brown fox ran around the dog";
     $index = $lsa->query($query, $trans);
     echo $documents[$index], PHP_EOL;

```

#### TODO

[](#todo)

- add save data
- add load data
- change transform

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 90% 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 ~32 days

Total

2

Last Release

2781d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8c355f2782d69124333c3a7ece74e575b66856d7544d11031bd6ad169be72f9d?d=identicon)[vench](/maintainers/vench)

---

Top Contributors

[![vench](https://avatars.githubusercontent.com/u/6245539?v=4)](https://github.com/vench "vench (18 commits)")[![peter279k](https://avatars.githubusercontent.com/u/9021747?v=4)](https://github.com/peter279k "peter279k (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/vench-php-lsa/health.svg)

```
[![Health](https://phpackages.com/badges/vench-php-lsa/health.svg)](https://phpackages.com/packages/vench-php-lsa)
```

PHPackages © 2026

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