edu.stanford.nlp.tagger.maxent
Class ReadDataTagged

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

public class ReadDataTagged
extends Object

Reads tagged data from a file and creates a dictionary. The tagged data has to be whitespace-separated items, with the word and tag split off by a delimiter character, which is found as the last instance of the delimiter character in the item.

Author:
Kristina Toutanova

Constructor Summary
ReadDataTagged(String filename, String delimiter, String encoding)
           
ReadDataTagged(TaggerConfig config)
           
 
Method Summary
 DataWordTag get(int index)
           
 int getSize()
          Returns the number of tokens in the data read, which is the number of words plus one end sentence token per sentence.
static void main(String[] args)
           
 void release()
          Frees the memory that is stored in this object by dropping the word-tag data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReadDataTagged

public ReadDataTagged(String filename,
                      String delimiter,
                      String encoding)
               throws Exception
Throws:
Exception

ReadDataTagged

public ReadDataTagged(TaggerConfig config)
Method Detail

release

public void release()
Frees the memory that is stored in this object by dropping the word-tag data.


get

public DataWordTag get(int index)

getSize

public int getSize()
Returns the number of tokens in the data read, which is the number of words plus one end sentence token per sentence.

Returns:
The number of tokens in the data

main

public static void main(String[] args)


Stanford NLP Group