public class CoNLLUOutputter extends AnnotationOutputter
Write a subset of our CoreNLP output in CoNLL-U format.
The fields currently output are:
Field Number | Field Name | Description |
1 | ID | Word index, integer starting at 1 for each new sentence; may be a range for tokens with multiple words. |
2 | FORM | Word form or punctuation symbol. |
3 | LEMMA | Lemma or stem of word form, or an underscore if not available. |
4 | CPOSTAG | Universal part-of-speech tag, or underscore if not available. |
5 | POSTAG | Language-specific part-of-speech tag, or underscore if not available. |
6 | FEATS | List of morphological features from the universal feature inventory or from a defined language-specific extension; underscore if not available. |
7 | HEAD | Head of the current token, which is either a value of ID or zero ('0'). This is underscore if not available. |
8 | DEPREL | Dependency relation to the HEAD, or underscore if not available. |
9 | DEPS | List of secondary dependencies |
10 | MISC | Any other annotation |
AnnotationOutputter.Options
Constructor and Description |
---|
CoNLLUOutputter() |
CoNLLUOutputter(java.util.Properties props) |
CoNLLUOutputter(java.lang.String type) |
Modifier and Type | Method and Description |
---|---|
static void |
conllUPrint(Annotation annotation,
java.io.OutputStream os) |
static void |
conllUPrint(Annotation annotation,
java.io.OutputStream os,
AnnotationOutputter.Options options) |
static void |
conllUPrint(Annotation annotation,
java.io.OutputStream os,
StanfordCoreNLP pipeline) |
void |
print(Annotation doc,
java.io.OutputStream target,
AnnotationOutputter.Options options) |
getOptions, print, print, print, print, print
public CoNLLUOutputter()
public CoNLLUOutputter(java.lang.String type)
public CoNLLUOutputter(java.util.Properties props)
public void print(Annotation doc, java.io.OutputStream target, AnnotationOutputter.Options options) throws java.io.IOException
print
in class AnnotationOutputter
java.io.IOException
public static void conllUPrint(Annotation annotation, java.io.OutputStream os) throws java.io.IOException
java.io.IOException
public static void conllUPrint(Annotation annotation, java.io.OutputStream os, StanfordCoreNLP pipeline) throws java.io.IOException
java.io.IOException
public static void conllUPrint(Annotation annotation, java.io.OutputStream os, AnnotationOutputter.Options options) throws java.io.IOException
java.io.IOException