ngram

fun ngram(maxNGramSize: Int, minFreq: Int, text: List<String>): Array<Array<NGram>>

An Apiori-like algorithm to extract n-gram phrases.

Return

An array of sets of n-grams. The i-th entry is the set of i-grams.

Parameters

maxNGramSize

The maximum length of n-gram

minFreq

The minimum frequency of n-gram in the sentences.

text

input text.