opennlp.perceptron
Class SimplePerceptronSequenceTrainer

java.lang.Object
  extended by opennlp.perceptron.SimplePerceptronSequenceTrainer

public class SimplePerceptronSequenceTrainer
extends Object

Trains models for sequences using the perceptron algorithm. Each outcome is represented as a binary perceptron classifier. This supports standard (integer) weighting as well average weighting. Sequence information is used in a simplified was to that described in: Discriminative Training Methods for Hidden Markov Models: Theory and Experiments with the Perceptron Algorithm. Michael Collins, EMNLP 2002. Specifically only updates are applied to tokens which were incorrectly tagged by a sequence tagger rather than to all feature across the sequence which differ from the training sequence.


Constructor Summary
SimplePerceptronSequenceTrainer()
           
 
Method Summary
 void nextIteration(int iteration)
           
 AbstractModel trainModel(int iterations, SequenceStream sequenceStream, int cutoff, boolean useAverage)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimplePerceptronSequenceTrainer

public SimplePerceptronSequenceTrainer()
Method Detail

trainModel

public AbstractModel trainModel(int iterations,
                                SequenceStream sequenceStream,
                                int cutoff,
                                boolean useAverage)
                         throws IOException
Throws:
IOException

nextIteration

public void nextIteration(int iteration)


Copyright © 2011 The Apache Software Foundation. All Rights Reserved.