Class 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
    Author:
    Ram Sadasiv
    • Constructor Detail

      • CoreNlpSerializer

        public CoreNlpSerializer()
    • 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 interface ISerializer
      • main

        public static void main​(String[] argv)
      • serializeAggregate

        public void serializeAggregate​(Object aggregate,
                                       com.fasterxml.jackson.databind.node.ObjectNode json)
        Specified by:
        serializeAggregate in interface ISerializer