ropendev / expression
Text Analyser: Extract Expression from a text and order it by density.
0.0.6
2019-01-06 07:53 UTC
Requires
- athoshun/html-filter: ^2.0
- neitanod/forceutf8: ^2.0
- ropendev/curl: ^1.0
- ropendev/simple_html_dom: ^1.7
Requires (Dev)
- phpunit/phpunit: ^7.5
README
Install
Via Packagist
Usage
use \rOpenDev\curl\CurlRequest; ... // Configure $test = new \rOpenDev\ExtractExpression\ExtractExpression(); $test->onlyInSentence = true; // Default value: FALSE $test->expressionMaxWords = 5; // Max expression size in words $test->keepTrail = 5; // Don't keep trail for less than 3 occurences found ine one text $test->addContent("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed..."); // Get Results $test->getExpressions(int max = 0); // @return array with expression => number $test->getTrail('expression'); // @return array with sentence where we find expression (best with onlyInSentence = true) $test->getTrails(); // @return array with expression => array trails $test->getWordNumber(); // @return int
Contribute
To send a pull resquest
- Please check if test are still running without error (
phpunit
) - Check coding standard before to commit :
php-cs-fixer fix src --rules=@Symfony --verbose && php-cs-fixer fix src --rules='{"array_syntax": {"syntax": "short"}}' --verbose