lingscope.algorithms
Class BaselineAnnotator

java.lang.Object
  extended by lingscope.algorithms.Annotator
      extended by lingscope.algorithms.BaselineAnnotator
Direct Known Subclasses:
BaselineCueAnnotator, BaselineScopeAnnotator

public abstract class BaselineAnnotator
extends Annotator

The baseline annotator


Field Summary
protected  java.util.Set<java.lang.String> phrases
           
 
Fields inherited from class lingscope.algorithms.Annotator
beginTag, interTag, otherTag
 
Constructor Summary
BaselineAnnotator(java.lang.String beginTag, java.lang.String interTag, java.lang.String otherTag)
           
 
Method Summary
static java.util.Set<java.lang.String> getCueWords(java.lang.String abnerTaggedSentence, java.lang.String beginTag, java.lang.String intermediateTag, java.lang.String otherTag)
          Gets the set of cue word phrases in the given sentence.
 void loadAnnotator(java.lang.String modelFile)
           
 void serializeAnnotator(java.lang.String trainingFile, java.lang.String modelFile)
           
 
Methods inherited from class lingscope.algorithms.Annotator
annotateSentence, isTargetNegated
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

phrases

protected java.util.Set<java.lang.String> phrases
Constructor Detail

BaselineAnnotator

public BaselineAnnotator(java.lang.String beginTag,
                         java.lang.String interTag,
                         java.lang.String otherTag)
Method Detail

serializeAnnotator

public void serializeAnnotator(java.lang.String trainingFile,
                               java.lang.String modelFile)
Specified by:
serializeAnnotator in class Annotator

loadAnnotator

public void loadAnnotator(java.lang.String modelFile)
Specified by:
loadAnnotator in class Annotator

getCueWords

public static java.util.Set<java.lang.String> getCueWords(java.lang.String abnerTaggedSentence,
                                                          java.lang.String beginTag,
                                                          java.lang.String intermediateTag,
                                                          java.lang.String otherTag)
Gets the set of cue word phrases in the given sentence. The given sentence is tagged according to Abner's specifications

Parameters:
abnerTaggedSentence - sentence tagged by abner's specification.
beginTag - the tag to mark the beginning of the cue
intermediateTag - the tag to mark intermediate portions
otherTag - the other tag
Returns:
the set of cue words or phrases in the given sentence