ropendev/expression

Text Analyser: Extract Expression from a text and order it by density.

Installs: 15

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/ropendev/expression

0.0.6 2019-01-06 07:53 UTC

This package is auto-updated.

Last update: 2025-10-07 04:20:48 UTC


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

  1. Please check if test are still running without error (phpunit)
  2. 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

Contributors

Latest Version Build Status Quality Score Total Downloads