Class CoreNlpSerializer
- java.lang.Object
-
- io.outofprintmagazine.nlp.pipeline.serializers.CoreNlpSerializer
-
- All Implemented Interfaces:
ISerializer
public class CoreNlpSerializer extends Object implements ISerializer
Creates the base json syntax tree from coreDocument.
- root (document)
- metadata
- DocIDAnnotation
- DocTitleAnnotation
- DocSourceTypeAnnotation
- DocTypeAnnotation
- AuthorAnnotation
- DocDateAnnotation
- OOPThumbnailAnnotation
- corefs
- quotes
- sentences
- tokens
- tokenIndex
- TokensAnnotation
- word
- originalText
- lemma
- characterOffsetBegin
- characterOffsetEnd
- pos
- ner
- before
- after
- tokens
- metadata
- Author:
- Ram Sadasiv
-
-
Constructor Summary
Constructors Constructor Description CoreNlpSerializer()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
main(String[] argv)
void
serialize(edu.stanford.nlp.pipeline.CoreDocument document, com.fasterxml.jackson.databind.node.ObjectNode documentNode)
void
serializeAggregate(Object aggregate, com.fasterxml.jackson.databind.node.ObjectNode json)
protected void
serializeCoref(edu.stanford.nlp.pipeline.CoreDocument document, com.fasterxml.jackson.databind.node.ObjectNode documentNode)
protected void
serializeMetadata(edu.stanford.nlp.pipeline.CoreDocument document, com.fasterxml.jackson.databind.node.ObjectNode documentNode)
void
serializeQuotes(edu.stanford.nlp.pipeline.CoreDocument document, com.fasterxml.jackson.databind.node.ObjectNode documentNode)
-
-
-
Method Detail
-
serializeMetadata
protected void serializeMetadata(edu.stanford.nlp.pipeline.CoreDocument document, com.fasterxml.jackson.databind.node.ObjectNode documentNode)
-
serializeCoref
protected void serializeCoref(edu.stanford.nlp.pipeline.CoreDocument document, com.fasterxml.jackson.databind.node.ObjectNode documentNode)
-
serializeQuotes
public void serializeQuotes(edu.stanford.nlp.pipeline.CoreDocument document, com.fasterxml.jackson.databind.node.ObjectNode documentNode)
-
serialize
public void serialize(edu.stanford.nlp.pipeline.CoreDocument document, com.fasterxml.jackson.databind.node.ObjectNode documentNode)
- Specified by:
serialize
in interfaceISerializer
-
main
public static void main(String[] argv)
-
serializeAggregate
public void serializeAggregate(Object aggregate, com.fasterxml.jackson.databind.node.ObjectNode json)
- Specified by:
serializeAggregate
in interfaceISerializer
-
-