public abstract class AnnotationOutputter
extends java.lang.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.,
edu.stanford.nlp.pipeline.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
|
java.lang.String |
print(Annotation ann) |
java.lang.String |
print(Annotation ann,
AnnotationOutputter.Options options) |
void |
print(Annotation annotation,
java.io.OutputStream os) |
abstract void |
print(Annotation doc,
java.io.OutputStream target,
AnnotationOutputter.Options options) |
void |
print(Annotation annotation,
java.io.OutputStream os,
StanfordCoreNLP pipeline) |
java.lang.String |
print(Annotation ann,
StanfordCoreNLP pipeline) |
public abstract void print(Annotation doc, java.io.OutputStream target, AnnotationOutputter.Options options) throws java.io.IOException
java.io.IOExceptionpublic void print(Annotation annotation, java.io.OutputStream os) throws java.io.IOException
java.io.IOExceptionpublic void print(Annotation annotation, java.io.OutputStream os, StanfordCoreNLP pipeline) throws java.io.IOException
java.io.IOExceptionpublic java.lang.String print(Annotation ann, AnnotationOutputter.Options options) throws java.io.IOException
java.io.IOExceptionpublic java.lang.String print(Annotation ann) throws java.io.IOException
java.io.IOExceptionpublic java.lang.String print(Annotation ann, StanfordCoreNLP pipeline) throws java.io.IOException
java.io.IOExceptionpublic static AnnotationOutputter.Options getOptions(StanfordCoreNLP pipeline)