edu.stanford.nlp.parser.lexparser
Class ArabicUnknownWordModelTrainer
java.lang.Object
edu.stanford.nlp.parser.lexparser.AbstractUnknownWordModelTrainer
edu.stanford.nlp.parser.lexparser.ArabicUnknownWordModelTrainer
- All Implemented Interfaces:
- UnknownWordModelTrainer
public class ArabicUnknownWordModelTrainer
- extends AbstractUnknownWordModelTrainer
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ArabicUnknownWordModelTrainer
public ArabicUnknownWordModelTrainer()
initializeTraining
public void initializeTraining(Options op,
Lexicon lex,
Index<java.lang.String> wordIndex,
Index<java.lang.String> tagIndex,
double totalTrees)
- Description copied from interface:
UnknownWordModelTrainer
- Initialize the trainer with a few of the data structures it needs
to train. Also, it is necessary to estimate the number of trees
that it will be given, as many of the UWMs switch training modes
after seeing a fraction of the trees.
This is an initialization method and not part of the constructor
because these Trainers are generally loaded by reflection, and
making this a method instead of a constructor lets the compiler
catch silly errors.
- Specified by:
initializeTraining
in interface UnknownWordModelTrainer
- Overrides:
initializeTraining
in class AbstractUnknownWordModelTrainer
train
public void train(TaggedWord tw,
int loc,
double weight)
- Trains this lexicon on the Collection of trees.
finishTraining
public UnknownWordModel finishTraining()
- Description copied from interface:
UnknownWordModelTrainer
- Returns the trained UWM. Many of the subclasses build exactly
one model, and some of the finishTraining methods manipulate the
data in permanent ways, so this should only be called once
Stanford NLP Group