PHP Class TextAnalysis\Analysis\Keywords\Rake

Author: yooper
Show file Open project: yooper/php-text-analysis Class Usage Examples

Protected Properties

Property Type Description
$document ContentDocument;
$nGramSize integer
$tokens array

Public Methods

Method Description
__construct ( TokensDocument $document, integer $nGramSize = NGramFactory::BIGRAM )
__destruct ( )
getKeywordScores ( ) : array
getPhrases ( ) : array Get all the possible phrases
getTokens ( ) : array
getTokensDocument ( ) : TokensDocument

Method Details

__construct() public method

public __construct ( TokensDocument $document, integer $nGramSize = NGramFactory::BIGRAM )
$document TextAnalysis\Documents\TokensDocument
$nGramSize integer

__destruct() public method

public __destruct ( )

getKeywordScores() public method

public getKeywordScores ( ) : array
return array returns an array with the key as the phrase and the value is the score it is already sorted

getPhrases() public method

Get all the possible phrases
public getPhrases ( ) : array
return array

getTokens() public method

public getTokens ( ) : array
return array

getTokensDocument() public method

public getTokensDocument ( ) : TokensDocument
return TextAnalysis\Documents\TokensDocument

Property Details

$document protected property

protected ContentDocument; $document
return ContentDocument;

$nGramSize protected property

protected int $nGramSize
return integer

$tokens protected property

protected array $tokens
return array