public class NGram extends java.lang.Object implements java.lang.Comparable<NGram>
| Modifier and Type | Field and Description |
|---|---|
int |
freq
Frequency of n-gram in the corpus.
|
java.lang.String[] |
words
Immutable word sequences.
|
| Constructor and Description |
|---|
NGram(java.lang.String[] words)
Constructor.
|
NGram(java.lang.String[] words,
int freq)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(NGram o) |
boolean |
equals(java.lang.Object obj) |
int |
hashCode() |
java.lang.String |
toString() |
public final java.lang.String[] words
public int freq
public NGram(java.lang.String[] words)
words - the n-gram word sequence.public NGram(java.lang.String[] words,
int freq)
words - the n-gram word sequence.freq - the frequency of n-gram in the corpus.