public class CoNLLDocumentReaderAndWriter extends 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 String |
BOUNDARY |
static String |
OTHER |
Constructor and Description |
---|
CoNLLDocumentReaderAndWriter() |
Modifier and Type | Method and Description |
---|---|
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.
|
static void |
main(String[] args)
Count some stats on what occurs in a file.
|
void |
printAnswers(List<CoreLabel> doc,
PrintWriter out)
Write a standard CoNLL format output file.
|
String |
toString() |
public static final String BOUNDARY
public static final String OTHER
public void init(SeqClassifierFlags flags)
DocumentReaderAndWriter
init
in interface DocumentReaderAndWriter<CoreLabel>
flags
- Flags specifying behaviorpublic Iterator<List<CoreLabel>> getIterator(Reader r)
IteratorFromReaderFactory
getIterator
in interface IteratorFromReaderFactory<List<CoreLabel>>
r
- Where to read objects frompublic void printAnswers(List<CoreLabel> doc, PrintWriter out)
printAnswers
in interface DocumentReaderAndWriter<CoreLabel>
doc
- The document: A List of CoreLabelout
- Where to send the answers topublic static void main(String[] args) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException