Semantic Analysis : Extract Expressions from a text and order it by density.
Via Packagist
$ composer require piedweb/text-analyzer
use \PiedWeb\ExpressionHarvester\MultiAnalyzer;
$test = new MultiAnalyzer($onlyInSentence = true, $expressionMaxWords = 5, $keepTrail = 5);
$result = $test->addContent("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed..."); // @return \PiedWeb\TextAnalyzer\Analysis
$result->getExpressions(); // @return array
$result->getTrails(); // @return array
$result->getTrail('expression'); // @return array
$result->getWordNumber(); // @çeturn int
$results = $test->exec(); // @return \PiedWeb\TextAnalyzer\Analysis
// same methods except in get expression, the value for each expression is not anymore his number
$ composer test
Please see contributing
The MIT License (MIT). Please see License File for more information.