public abstract class AbstractUnknownWordModelTrainer extends java.lang.Object implements UnknownWordModelTrainer
NULL_ITW, nullTag, nullWord, unknown
Constructor and Description |
---|
AbstractUnknownWordModelTrainer() |
Modifier and Type | Method and Description |
---|---|
void |
incrementTreesRead(double weight)
Maintains a (real-valued) count of how many (weighted) trees have
been read in.
|
void |
initializeTraining(Options op,
Lexicon lex,
Index<java.lang.String> wordIndex,
Index<java.lang.String> tagIndex,
double totalTrees)
Initialize the trainer with a few of the data structures it needs
to train.
|
void |
train(java.util.Collection<Tree> trees)
Tallies statistics for this particular collection of trees.
|
void |
train(java.util.Collection<Tree> trees,
double weight)
Tallies statistics for a weighted collection of trees.
|
void |
train(Tree tree,
double weight)
Tallies statistics for a single tree.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
finishTraining, train
public void initializeTraining(Options op, Lexicon lex, Index<java.lang.String> wordIndex, Index<java.lang.String> tagIndex, double totalTrees)
UnknownWordModelTrainer
initializeTraining
in interface UnknownWordModelTrainer
public final void train(java.util.Collection<Tree> trees)
UnknownWordModelTrainer
train
in interface UnknownWordModelTrainer
public final void train(java.util.Collection<Tree> trees, double weight)
UnknownWordModelTrainer
train
in interface UnknownWordModelTrainer
public final void train(Tree tree, double weight)
UnknownWordModelTrainer
train
in interface UnknownWordModelTrainer
public void incrementTreesRead(double weight)
UnknownWordModelTrainer
incrementTreesRead
in interface UnknownWordModelTrainer
weight
- The weight of trees additionally trained on