PiedWeb / TextAnalyzer

[PHP] Semantic Analysis : Extract Expressions from a text and order it by density.

Home Page:https://dev.piedweb.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Open Source Package

Text Analyzer

Latest Version Software License GitHub Tests Action Status Quality Score Code Coverage Type Coverage Total Downloads

Semantic Analysis : Extract Expressions from a text and order it by density.

Install

Via Packagist

$ composer require piedweb/text-analyzer

Usage

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

Testing

$ composer test

Contributing

Please see contributing

Credits

License

The MIT License (MIT). Please see License File for more information.

About

[PHP] Semantic Analysis : Extract Expressions from a text and order it by density.

https://dev.piedweb.com/

License:MIT License


Languages

Language:PHP 100.0%