lingscope.drivers
Class SentencePosTagger
java.lang.Object
lingscope.drivers.SentencePosTagger
public class SentencePosTagger
- extends java.lang.Object
Use this sentence tagger when using a model that tags POS
Method Summary |
static void |
main(java.lang.String[] args)
|
static void |
tagSentence(java.lang.String sentence,
java.lang.String grammarFile,
boolean replaceCueWords,
Annotator cueAnnotator,
Annotator scopeAnnotator)
Tags the given sentence |
static void |
usage()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SentencePosTagger
public SentencePosTagger()
usage
public static void usage()
main
public static void main(java.lang.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(java.lang.String sentence,
java.lang.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
- the Annotator
object to identify negation or
hedge cue in the sentencescopeAnnotator
- the Annotator
object to identify negation
or hedge scope in the sentence