public abstract class AnnotationOutputter extends Object
An interface for outputting CoreNLP Annotations to different output formats. These are intended to be for more or less human consumption (or for transferring to other applications) -- that is, there output is not intended to be read back into CoreNLP losslessly.
For lossless (or near lossless) serialization,
see AnnotationSerializer
; e.g.,
ProtobufAnnotationSerializer
.
XMLOutputter
,
JSONOutputter
Modifier and Type | Class and Description |
---|---|
static class |
AnnotationOutputter.Options |
Constructor and Description |
---|
AnnotationOutputter() |
Modifier and Type | Method and Description |
---|---|
static AnnotationOutputter.Options |
getOptions(StanfordCoreNLP pipeline)
Populates options from StanfordCoreNLP pipeline
|
String |
print(Annotation ann) |
String |
print(Annotation ann,
AnnotationOutputter.Options options) |
void |
print(Annotation annotation,
OutputStream os) |
abstract void |
print(Annotation doc,
OutputStream target,
AnnotationOutputter.Options options) |
void |
print(Annotation annotation,
OutputStream os,
StanfordCoreNLP pipeline) |
String |
print(Annotation ann,
StanfordCoreNLP pipeline) |
public abstract void print(Annotation doc, OutputStream target, AnnotationOutputter.Options options) throws IOException
IOException
public void print(Annotation annotation, OutputStream os) throws IOException
IOException
public void print(Annotation annotation, OutputStream os, StanfordCoreNLP pipeline) throws IOException
IOException
public String print(Annotation ann, AnnotationOutputter.Options options) throws IOException
IOException
public String print(Annotation ann) throws IOException
IOException
public String print(Annotation ann, StanfordCoreNLP pipeline) throws IOException
IOException
public static AnnotationOutputter.Options getOptions(StanfordCoreNLP pipeline)