Class TextAnnotater

java.lang.Object
tagger.TextAnnotater

public class TextAnnotater extends Object
Provided text is converted to CoreDocument object, allowing the CoreNLP library to annotate parts of speech for each word
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final edu.stanford.nlp.pipeline.CoreDocument
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor creates document object upon instantiation with each word and punctuation identified with a part of speech
    If a Path has already been instantiated, constructor reads file and calls resulting String constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    edu.stanford.nlp.pipeline.CoreDocument
     

    Methods inherited from class java.lang.Object

    clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • document

      private final edu.stanford.nlp.pipeline.CoreDocument document
  • Constructor Details

    • TextAnnotater

      public TextAnnotater(String text)
      Constructor creates document object upon instantiation with each word and punctuation identified with a part of speech
    • TextAnnotater

      public TextAnnotater(Path file) throws IOException
      If a Path has already been instantiated, constructor reads file and calls resulting String constructor
      Throws:
      IOException
  • Method Details

    • getDocument

      public edu.stanford.nlp.pipeline.CoreDocument getDocument()