public class CoNLLOutputter extends AnnotationOutputter
Write a subset of our CoreNLP output in CoNLL format.
The fields currently output are:
Field Number | Field Name | Description |
1 | ID | Token Counter, starting at 1 for each new sentence. |
2 | FORM | Word form or punctuation symbol. |
3 | LEMMA | Lemma of word form, or an underscore if not available. |
4 | POSTAG | Fine-grained part-of-speech tag, or underscore if not available. |
5 | NER | Named Entity tag, or underscore if not available. |
6 | HEAD | Head of the current token, which is either a value of ID or zero ('0'). This is underscore if not available. |
7 | DEPREL | Dependency relation to the HEAD, or underscore if not available. |
AnnotationOutputter.Options
Constructor and Description |
---|
CoNLLOutputter() |
Modifier and Type | Method and Description |
---|---|
static void |
conllPrint(Annotation annotation,
OutputStream os) |
static void |
conllPrint(Annotation annotation,
OutputStream os,
AnnotationOutputter.Options options) |
static void |
conllPrint(Annotation annotation,
OutputStream os,
StanfordCoreNLP pipeline) |
void |
print(Annotation doc,
OutputStream target,
AnnotationOutputter.Options options) |
getOptions, print, print, print, print, print
public void print(Annotation doc, OutputStream target, AnnotationOutputter.Options options) throws IOException
print
in class AnnotationOutputter
IOException
public static void conllPrint(Annotation annotation, OutputStream os) throws IOException
IOException
public static void conllPrint(Annotation annotation, OutputStream os, StanfordCoreNLP pipeline) throws IOException
IOException
public static void conllPrint(Annotation annotation, OutputStream os, AnnotationOutputter.Options options) throws IOException
IOException