public class AprioriPhraseExtractor extends java.lang.Object
The algorithm takes a collection of sentences and generates all n-grams of length at most MaxNGramSize that occur at least MinFrequency times in the sentences.
|Constructor and Description|
|Modifier and Type||Method and Description|
Extracts n-gram phrases.
public java.util.ArrayList<java.util.ArrayList<NGram>> extract(java.util.Collection<java.lang.String> sentences, int maxNGramSize, int minFrequency)
sentences- A collection of sentences (already split).
maxNGramSize- The maximum length of n-gram
minFrequency- The minimum frequency of n-gram in the sentences.