edu.stanford.nlp.tagger.maxent
Class TestClassifier

java.lang.Object
  extended by edu.stanford.nlp.tagger.maxent.TestClassifier

public class TestClassifier
extends java.lang.Object


Constructor Summary
TestClassifier(java.lang.String filename1, java.lang.String saveRoot)
           
 
Method Summary
static void expandModel(java.lang.String filename, java.lang.String oldModelFile, int iters)
           
static void iterate(java.lang.String filename)
           
static void save_param(java.lang.String filename)
          This saves the parameters in a file like for the Improved Iterative.
static void saveModel(java.lang.String filename1, java.lang.String modelPrefix, int iterations, java.lang.String[] args_output, boolean cg, java.lang.String lang, java.lang.String arch)
          Reads in the training corpus from a filename and trains the tagger
 void test(int format, java.lang.String saveRoot)
           
 void test(java.lang.String saveRoot)
          Test on a file containing correct tags already
static void testModel(java.lang.String filename, java.lang.String modelPrefix, java.lang.String debugPrefix, java.lang.String[] args_output)
          Test this file with the model saved in fileModel.holder.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestClassifier

public TestClassifier(java.lang.String filename1,
                      java.lang.String saveRoot)
               throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

test

public void test(int format,
                 java.lang.String saveRoot)
          throws java.lang.Exception
Throws:
java.lang.Exception

test

public void test(java.lang.String saveRoot)
          throws java.lang.Exception
Test on a file containing correct tags already

Throws:
java.lang.Exception

iterate

public static void iterate(java.lang.String filename)

saveModel

public static void saveModel(java.lang.String filename1,
                             java.lang.String modelPrefix,
                             int iterations,
                             java.lang.String[] args_output,
                             boolean cg,
                             java.lang.String lang,
                             java.lang.String arch)
Reads in the training corpus from a filename and trains the tagger

Parameters:
filename - is the corpus file savePath is a path where the learned tagger parameter files will be saved cg is true if we train using conjugate gradient, else iis

save_param

public static void save_param(java.lang.String filename)
This saves the parameters in a file like for the Improved Iterative. This calculates the model from a filename, with the specified parameters for the history and saves the result in files filename.holder.


expandModel

public static void expandModel(java.lang.String filename,
                               java.lang.String oldModelFile,
                               int iters)

testModel

public static void testModel(java.lang.String filename,
                             java.lang.String modelPrefix,
                             java.lang.String debugPrefix,
                             java.lang.String[] args_output)
                      throws java.lang.Exception
Test this file with the model saved in fileModel.holder.

Throws:
java.lang.Exception