edu.stanford.nlp.tagger.maxent
Class Test

java.lang.Object
  |
  +--edu.stanford.nlp.tagger.maxent.Test

public class Test
extends Object

This class is used to run the learned POS tagging model over test data. There are two versions : 1. Running on tagged text and obtaining the accuracy results and the output of the model together with the original (presumably correct) tags. 2. Running on untagged text in which case the output is the tags according to the model only. The main method detects with what kind of text it has been invoked. There is a learned model in /u/nlp/data/tagger.params. If we have a file of one sentence per line, tokenized in Penn Treebank style, we can invoke the tagger on it like this:
java -mx256m edu.stanford.nlp.tagger.maxent.Test /u/nlp/data/tagger.params/wsj0-21 test.txt
The result will be written to file test.txt.words.


Constructor Summary
Test()
           
 
Method Summary
static void main(String[] args)
          Main has two arguments.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Test

public Test()
Method Detail

main

public static void main(String[] args)
Main has two arguments. The first is the filename of the model, and the second is the test file.



Stanford NLP Group