Class SentencePosTagger


  • public class SentencePosTagger
    extends Object
    Use this sentence tagger when using a model that tags POS
    Author:
    shashank
    • Constructor Detail

      • SentencePosTagger

        public SentencePosTagger()
    • Method Detail

      • usage

        public static void usage()
      • main

        public static void main​(String[] args)
        Parameters:
        args - 0 - cue tagging model 1 - cue tagger type (baseline, crf or negex) 2 - replace cue words with custom tag CUE (true) or not (false) 3 - crf pos-based scope tagging model 4 - POS model file 5 - sentence to tag
      • tagSentence

        public static void tagSentence​(String sentence,
                                       String grammarFile,
                                       boolean replaceCueWords,
                                       Annotator cueAnnotator,
                                       Annotator scopeAnnotator)
        Tags the given sentence
        Parameters:
        sentence - the text of the sentence to tag
        grammarFile - path to the Stanford part of speech model file
        replaceCueWords - if true, cue words will be replaced with custom tag 'CUE'
        cueAnnotator - the Annotator object to identify negation or hedge cue in the sentence
        scopeAnnotator - the Annotator object to identify negation or hedge scope in the sentence