Package lingscope.drivers
Class SentencePosTagger
- java.lang.Object
-
- lingscope.drivers.SentencePosTagger
-
public class SentencePosTagger extends Object
Use this sentence tagger when using a model that tags POS- Author:
- shashank
-
-
Constructor Summary
Constructors Constructor Description SentencePosTagger()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidmain(String[] args)static voidtagSentence(String sentence, String grammarFile, boolean replaceCueWords, Annotator cueAnnotator, Annotator scopeAnnotator)Tags the given sentencestatic voidusage()
-
-
-
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 taggrammarFile- path to the Stanford part of speech model filereplaceCueWords- if true, cue words will be replaced with custom tag 'CUE'cueAnnotator- theAnnotatorobject to identify negation or hedge cue in the sentencescopeAnnotator- theAnnotatorobject to identify negation or hedge scope in the sentence
-
-