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.
| 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 void init(SeqClassifierFlags flags)
DocumentReaderAndWriterinit in interface DocumentReaderAndWriter<CoreLabel>flags - Flags specifying behaviorpublic Iterator<List<CoreLabel>> getIterator(Reader r)
IteratorFromReaderFactorygetIterator 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
IOExceptionClassNotFoundException