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 |
|---|
AprioriPhraseExtractor() |
| Modifier and Type | Method and Description |
|---|---|
java.util.ArrayList<java.util.ArrayList<NGram>> |
extract(java.util.Collection<java.lang.String[]> sentences,
int maxNGramSize,
int minFrequency)
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-gramminFrequency - The minimum frequency of n-gram in the sentences.