Ratings | | Unique User Downloads | | Download Rankings |
Not enough user ratings | | Total: 132 | | All time: 9,255 This week: 216 |
|
Description | | Author Venya
Contributor
|
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. Innovation Award
 September 2018
Number 2 |
Many applications need to search for documents that are more relevant to a given subject.
This package can take a given text and find documents that are more relevant to the text passed as parameter using Singular Value Decomposition algorithm.
Manuel Lemos |
| |
 |
|
Innovation award
 Nominee: 6x
Winner: 1x |
|
Details
PHP LSA Library
Singular value decomposition in PHP implementation language.
Install
#### 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
- [x] add save data
- [x] add load data
- [x] change transform
|
Applications that use this package |
|
No pages of applications that use this class were specified.
If you know an application of this package, send a message to the author to add a link here.