edu.stanford.nlp.sequences
Class ColumnDocumentReaderAndWriter

java.lang.Object
  extended by edu.stanford.nlp.sequences.ColumnDocumentReaderAndWriter
All Implemented Interfaces:
IteratorFromReaderFactory<List<CoreLabel>>, DocumentReaderAndWriter<CoreLabel>, Serializable

public class ColumnDocumentReaderAndWriter
extends Object
implements DocumentReaderAndWriter<CoreLabel>

DocumentReader for column format

Author:
Jenny Finkel
See Also:
Serialized Form

Constructor Summary
ColumnDocumentReaderAndWriter()
           
 
Method Summary
 Iterator<List<CoreLabel>> getIterator(Reader r)
          Return an iterator over the contents read from r.
 void init(SeqClassifierFlags flags)
          This will be called immediately after construction.
 void init(String map)
           
 void printAnswers(List<CoreLabel> doc, PrintWriter out)
          This method prints the output of the classifier to a PrintWriter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColumnDocumentReaderAndWriter

public ColumnDocumentReaderAndWriter()
Method Detail

init

public void init(SeqClassifierFlags flags)
Description copied from interface: DocumentReaderAndWriter
This will be called immediately after construction. It's easier having an init() method because DocumentReaderAndWriter objects are usually created using reflection.

Specified by:
init in interface DocumentReaderAndWriter<CoreLabel>
Parameters:
flags - Flags specifying behavior

init

public void init(String map)

getIterator

public Iterator<List<CoreLabel>> getIterator(Reader r)
Description copied from interface: IteratorFromReaderFactory
Return an iterator over the contents read from r.

Specified by:
getIterator in interface IteratorFromReaderFactory<List<CoreLabel>>
Parameters:
r - Where to read objects from
Returns:
An Iterator over the objects

printAnswers

public void printAnswers(List<CoreLabel> doc,
                         PrintWriter out)
Description copied from interface: DocumentReaderAndWriter
This method prints the output of the classifier to a PrintWriter.

Specified by:
printAnswers in interface DocumentReaderAndWriter<CoreLabel>
Parameters:
doc - The document which has answers (it has been classified)
out - Where to send the output


Stanford NLP Group