PHP Class TextAnalysis\NGrams\NGramFactory

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

Public Methods

Method Description
create ( array $tokens, integer $nGramSize = self::BIGRAM, $separator = ' ' ) : array Generate Ngrams from the tokens

Protected Methods

Method Description
__construct ( ) Protect the constructor

Method Details

__construct() protected method

Protect the constructor
protected __construct ( )

create() public static method

Generate Ngrams from the tokens
public static create ( array $tokens, integer $nGramSize = self::BIGRAM, $separator = ' ' ) : array
$tokens array
$nGramSize integer
return array return an array of the ngrams