edu.stanford.nlp.parser.lexparser
Class FrenchUnknownWordModelTrainer

java.lang.Object
  extended by edu.stanford.nlp.parser.lexparser.AbstractUnknownWordModelTrainer
      extended by edu.stanford.nlp.parser.lexparser.FrenchUnknownWordModelTrainer
All Implemented Interfaces:
UnknownWordModelTrainer

public class FrenchUnknownWordModelTrainer
extends AbstractUnknownWordModelTrainer


Field Summary
 
Fields inherited from interface edu.stanford.nlp.parser.lexparser.UnknownWordModelTrainer
NULL_ITW, nullTag, nullWord, unknown
 
Constructor Summary
FrenchUnknownWordModelTrainer()
           
 
Method Summary
 UnknownWordModel finishTraining()
          Returns the trained UWM.
 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(TaggedWord tw, int loc, double weight)
          Trains this lexicon on the Collection of trees.
 
Methods inherited from class edu.stanford.nlp.parser.lexparser.AbstractUnknownWordModelTrainer
incrementTreesRead, train, train, train
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FrenchUnknownWordModelTrainer

public FrenchUnknownWordModelTrainer()
Method Detail

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