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, java.lang.String delimiter)
           
 
Method Summary
static void expandModel(java.lang.String filename, java.lang.String oldModelFile, int iters, java.lang.String delimiter)
           
static void iterate(java.lang.String filename)
           
static void save_param(java.lang.String filename, java.lang.String delimiter)
          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, java.lang.String delimiter)
          Reads in the training corpus from a filename and trains the tagger
 void test(int format, java.lang.String saveRoot, java.lang.String delimiter)
           
 void test(java.lang.String saveRoot, java.lang.String delimiter)
          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, java.lang.String delimiter)
          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,
                      java.lang.String delimiter)
               throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

test

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

test

public void test(java.lang.String saveRoot,
                 java.lang.String delimiter)
          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,
                             java.lang.String delimiter)
                      throws java.lang.Exception
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
Throws:
java.lang.Exception

save_param

public static void save_param(java.lang.String filename,
                              java.lang.String delimiter)
                       throws java.lang.Exception
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.

Throws:
java.lang.Exception

expandModel

public static void expandModel(java.lang.String filename,
                               java.lang.String oldModelFile,
                               int iters,
                               java.lang.String delimiter)
                        throws java.lang.Exception
Throws:
java.lang.Exception

testModel

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

Throws:
java.lang.Exception