public class Contextualizer extends SimpleEngine
TermOccurrence
s within Document
s so as
to make method TermOccurrence
#getContext()
invokable.history, terminology
pipelineService
Constructor and Description |
---|
Contextualizer() |
Modifier and Type | Method and Description |
---|---|
ContextData |
computeContextData(CrossTable crossTable,
Term x,
Term y)
Computes coefficients a, b, c and d (available) and computes the association
rate based on these coefficients.
|
CrossTable |
computeCrossTable() |
void |
computeDocumentViews() |
java.util.Iterator<java.util.Iterator<TermOccurrence>> |
contextIterator(Term t,
int contextSize) |
AssociationRate |
createAssocRate() |
void |
execute() |
long |
setContexts() |
void |
toAssocRateVector(Term t,
CrossTable table,
AssociationRate assocRateFunction,
boolean normalize)
Normalize this vector according to a cross table
and an association rate measure.
|
getEngineName
public void execute()
execute
in class SimpleEngine
public long setContexts()
public void computeDocumentViews()
public AssociationRate createAssocRate()
public void toAssocRateVector(Term t, CrossTable table, AssociationRate assocRateFunction, boolean normalize)
ContextVector.Entry
.frequency
values
with the normalized ones.contextVector
- table
- the pre-computed co-occurrences CrossTable
assocRateFunction
- the AssociationRate
measure implementationnormalize
- public ContextData computeContextData(CrossTable crossTable, Term x, Term y)
#getLastX()
.x
- the base termy
- the co termpublic java.util.Iterator<java.util.Iterator<TermOccurrence>> contextIterator(Term t, int contextSize)
public CrossTable computeCrossTable()