edu.washington.cs.knowitall.extractor.conf
Class ReVerbOpenNlpClassifierTrainer

java.lang.Object
  extended by edu.washington.cs.knowitall.extractor.conf.ReVerbOpenNlpClassifierTrainer

public class ReVerbOpenNlpClassifierTrainer
extends Object

Used to train the ReVerb confidence function using the features described by ReVerbFeatures. Given a set of LabeledBinaryExtraction instances, this class featurizes them and trains a logistic regression classifier using Weka's Logistic class. This class can be called from the command-line to train a classifier and save the resulting model to a file.

Author:
afader

Constructor Summary
ReVerbOpenNlpClassifierTrainer(Iterable<LabeledBinaryExtraction> examples)
          Constructs and trains a new Logistic classifier using the given examples.
 
Method Summary
 opennlp.maxent.GISModel getModel()
           
static void main(String[] args)
          Trains a logistic regression classifier using the examples in the given file, and saves the model to disk.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReVerbOpenNlpClassifierTrainer

public ReVerbOpenNlpClassifierTrainer(Iterable<LabeledBinaryExtraction> examples)
                               throws Exception
Constructs and trains a new Logistic classifier using the given examples.

Parameters:
examples -
Throws:
Exception
Method Detail

getModel

public opennlp.maxent.GISModel getModel()
Returns:
the trained classifier.

main

public static void main(String[] args)
                 throws Exception
Trains a logistic regression classifier using the examples in the given file, and saves the model to disk. The examples must be in the format described in LabeledBinaryExtractionReader.

Parameters:
args -
Throws:
Exception


Copyright © 2010-2012 University of Washington CSE. All Rights Reserved.