edu.stanford.nlp.sequences
Class PlainTextDocumentReaderAndWriter
java.lang.Object
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PlainTextDocumentReaderAndWriter
public PlainTextDocumentReaderAndWriter()
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>>
getIteratorOld
public Iterator<List<CoreLabel>> getIteratorOld(Reader r)
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