PHP Classes
elePHPant
Icontem

File: README.md

Recommend this page to a friend!
  Classes of Raskin Veniamin  >  PHP Singular Value Decomposition  >  README.md  >  Download  
File: README.md
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: PHP Singular Value Decomposition
Analyze texts to find a relation with given terms
Author: By
Last change:
Date: 1 year ago
Size: 761 bytes
 

 

Contents

Class file image Download

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