public class CrossTable
extends java.lang.Object
Constructor and Description |
---|
CrossTable(TermIndex termIndex)
Constructs this cross table with a term index and inits the table
with all co-occurrences of the term index's terms.
|
Modifier and Type | Method and Description |
---|---|
double |
computeRate(AssociationRate rate,
Term x,
Term y)
Computes coefficients a, b, c and d (available) and computes the association
rate based on these coefficients.
|
int |
getLastA()
The number of times
coTerm id a co-occurrence of term
WARNING : not thread safe ! |
int |
getLastB()
The number of times a co-occurrence of
term is not coTerm
WARNING : not thread safe ! |
int |
getLastC()
The number of times
coTerm is a co-occurrence of another term
than term . |
int |
getLastD()
The number of times neither
term nor coTerm is a co-occurrence of something else
WARNING : not thread safe ! |
public CrossTable(TermIndex termIndex)
termIndex
- The term index of the corpusjava.lang.NullPointerException
- if terms' context vectors are not already computedjava.lang.NullPointerException
- when the context vectors of term index terms are notTerm.getContextVector()
public double computeRate(AssociationRate rate, Term x, Term y)
#getLastX()
.rate
- the association rate measurex
- the base termy
- the co termgetLastA()
,
getLastB()
,
getLastC()
,
getLastD()
public int getLastA()
coTerm
id a co-occurrence of term
WARNING : not thread safe !public int getLastB()
term
is not coTerm
WARNING : not thread safe !public int getLastC()
coTerm
is a co-occurrence of another term
than term
.
WARNING : not thread safe !public int getLastD()
term
nor coTerm
is a co-occurrence of something else
WARNING : not thread safe !