public class CustomAnnotationSerializer extends AnnotationSerializer
AnnotationSerializer.IntermediateEdge, AnnotationSerializer.IntermediateNode, AnnotationSerializer.IntermediateSemanticGraph| Constructor and Description |
|---|
CustomAnnotationSerializer() |
CustomAnnotationSerializer(boolean compress,
boolean haveAnte) |
| Modifier and Type | Method and Description |
|---|---|
static void |
main(String[] args) |
Pair<Annotation,InputStream> |
read(InputStream is)
Read a single object from this stream.
|
static void |
saveCorefChain(PrintWriter pw,
int cid,
CorefChain cluster)
Serializes one coref cluster (i.e., one entity)
|
OutputStream |
write(Annotation corpus,
OutputStream os)
Append a single object to this stream.
|
public CustomAnnotationSerializer()
public CustomAnnotationSerializer(boolean compress,
boolean haveAnte)
public static void saveCorefChain(PrintWriter pw, int cid, CorefChain cluster)
pw - the buffercid - id of cluster to savecluster - the clusterpublic OutputStream write(Annotation corpus, OutputStream os) throws IOException
AnnotationSerializerwrite in class AnnotationSerializercorpus - The document to serialize to the stream.os - The output stream to serialize to.IOException - Thrown if the underlying output stream throws the exception.public Pair<Annotation,InputStream> read(InputStream is) throws IOException
AnnotationSerializerread in class AnnotationSerializeris - The input stream to read a document from.IOException - Thrown if the underlying stream throws the exception.