public class BigramCollocation extends java.lang.Object implements java.lang.Comparable<BigramCollocation>
| Constructor and Description |
|---|
BigramCollocation(java.lang.String w1,
java.lang.String w2,
int frequency,
double score)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(BigramCollocation o) |
boolean |
equals(java.lang.Object obj) |
int |
frequency()
Returns the frequency of bigram in the corpus.
|
int |
hashCode() |
double |
score()
Returns the chi-square statistical score of the collocation.
|
java.lang.String |
toString() |
java.lang.String |
w1()
Returns the first word of bigram.
|
java.lang.String |
w2()
Returns the second word of bigram.
|
public BigramCollocation(java.lang.String w1,
java.lang.String w2,
int frequency,
double score)
w1 - the first word of bigram.w2 - the second word of bigram.frequency - the frequency of bigram in the corpus.score - the chi-square statistical score of collocation in a corpus.public java.lang.String w1()
public java.lang.String w2()
public int frequency()
public double score()
public java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int compareTo(BigramCollocation o)
compareTo in interface java.lang.Comparable<BigramCollocation>