public interface UnknownWordModelTrainer
Modifier and Type | Field and Description |
---|---|
static IntTaggedWord |
NULL_ITW |
static short |
nullTag |
static int |
nullWord |
static java.lang.String |
unknown |
Modifier and Type | Method and Description |
---|---|
UnknownWordModel |
finishTraining()
Returns the trained UWM.
|
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(TaggedWord tw,
int loc,
double weight)
Tallies statistics for a single word.
|
void |
train(Tree tree,
double weight)
Tallies statistics for a single tree.
|
static final java.lang.String unknown
static final int nullWord
static final short nullTag
static final IntTaggedWord NULL_ITW
void initializeTraining(Options op, Lexicon lex, Index<java.lang.String> wordIndex, Index<java.lang.String> tagIndex, double totalTrees)
void train(java.util.Collection<Tree> trees)
void train(java.util.Collection<Tree> trees, double weight)
void train(Tree tree, double weight)
void train(TaggedWord tw, int loc, double weight)
void incrementTreesRead(double weight)
weight
- The weight of trees additionally trained onUnknownWordModel finishTraining()