edu.stanford.nlp.sequences
Class PlainTextDocumentReaderAndWriter

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

public class PlainTextDocumentReaderAndWriter
extends Object
implements DocumentReaderAndWriter

Author:
Jenny Finkel
See Also:
Serialized Form

Constructor Summary
PlainTextDocumentReaderAndWriter()
           
 
Method Summary
static String getAnswers(List<CoreLabel> l)
           
static String getAnswersInlineXML(List<CoreLabel> l)
           
static String getAnswersXML(List<CoreLabel> l)
           
 Iterator<List<CoreLabel>> getIterator(Reader r)
           
 void init(SeqClassifierFlags flags)
          Will be called immediately after construction.
 void printAnswers(List<CoreLabel> l)
           
 void printAnswers(List<CoreLabel> l, PrintWriter out)
          Print the classifications for the document to the given Writer.
 void printAnswersInlineXML(List<CoreLabel> l)
           
static void printAnswersInlineXML(List<CoreLabel> doc, PrintWriter out)
           
 void printAnswersText(List<CoreLabel> l, PrintWriter out)
           
static void printAnswersXML(List<CoreLabel> l)
           
static void printAnswersXML(List<CoreLabel> doc, PrintWriter out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlainTextDocumentReaderAndWriter

public PlainTextDocumentReaderAndWriter()
Method Detail

init

public void init(SeqClassifierFlags flags)
Description copied from interface: DocumentReaderAndWriter
Will be called immediately after construction. Needed because of reflection.

Specified by:
init in interface DocumentReaderAndWriter

getIterator

public Iterator<List<CoreLabel>> getIterator(Reader r)
Specified by:
getIterator in interface IteratorFromReaderFactory<List<CoreLabel>>

getAnswers

public static String getAnswers(List<CoreLabel> l)

printAnswers

public void printAnswers(List<CoreLabel> l)

printAnswers

public void printAnswers(List<CoreLabel> l,
                         PrintWriter out)
Print the classifications for the document to the given Writer. This method now checks the outputFormat property, and can print in text, inlineXML, or standOffXML.

Specified by:
printAnswers in interface DocumentReaderAndWriter

printAnswersText

public void printAnswersText(List<CoreLabel> l,
                             PrintWriter out)

getAnswersXML

public static String getAnswersXML(List<CoreLabel> l)

printAnswersXML

public static void printAnswersXML(List<CoreLabel> l)

printAnswersXML

public static void printAnswersXML(List<CoreLabel> doc,
                                   PrintWriter out)

getAnswersInlineXML

public static String getAnswersInlineXML(List<CoreLabel> l)

printAnswersInlineXML

public void printAnswersInlineXML(List<CoreLabel> l)

printAnswersInlineXML

public static void printAnswersInlineXML(List<CoreLabel> doc,
                                         PrintWriter out)


Stanford NLP Group