public class CoNLLDocumentReaderAndWriter extends java.lang.Object implements DocumentReaderAndWriter<CoreLabel>
This reader is specifically for replicating CoNLL systems. For normal use, you should use the saner ColumnDocumentReaderAndWriter.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
BOUNDARY |
Constructor and Description |
---|
CoNLLDocumentReaderAndWriter() |
Modifier and Type | Method and Description |
---|---|
java.util.Iterator<java.util.List<CoreLabel>> |
getIterator(java.io.Reader r)
Return an iterator over the contents read from r.
|
void |
init(SeqClassifierFlags flags)
This will be called immediately after construction.
|
static void |
main(java.lang.String[] args)
Count some stats on what occurs in a file.
|
void |
printAnswers(java.util.List<CoreLabel> doc,
java.io.PrintWriter out)
Write a standard CoNLL format output file.
|
java.lang.String |
toString() |
public static final java.lang.String BOUNDARY
public void init(SeqClassifierFlags flags)
DocumentReaderAndWriter
init
in interface DocumentReaderAndWriter<CoreLabel>
flags
- Flags specifying behaviorpublic java.lang.String toString()
toString
in class java.lang.Object
public java.util.Iterator<java.util.List<CoreLabel>> getIterator(java.io.Reader r)
IteratorFromReaderFactory
getIterator
in interface IteratorFromReaderFactory<java.util.List<CoreLabel>>
r
- Where to read objects frompublic void printAnswers(java.util.List<CoreLabel> doc, java.io.PrintWriter out)
printAnswers
in interface DocumentReaderAndWriter<CoreLabel>
doc
- The document: A List of CoreLabelout
- Where to send the answers topublic static void main(java.lang.String[] args) throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException