lingscope.algorithms
Class Annotator
java.lang.Object
lingscope.algorithms.Annotator
- Direct Known Subclasses:
- BaselineAnnotator, CrfAnnotator, NegexAnnotator
public abstract class Annotator
- extends java.lang.Object
Field Summary |
protected java.lang.String |
beginTag
|
protected java.lang.String |
interTag
|
protected java.lang.String |
otherTag
|
Constructor Summary |
Annotator(java.lang.String beginTag,
java.lang.String interTag,
java.lang.String otherTag)
|
Method Summary |
abstract AnnotatedSentence |
annotateSentence(java.lang.String sentence,
boolean isTokenized)
|
boolean |
isTargetNegated(java.lang.String sentence,
boolean isTokenized,
java.lang.String targetPhrase)
Checks if the given target phrase is negated in the given sentence. |
abstract void |
loadAnnotator(java.lang.String modelFile)
|
abstract void |
serializeAnnotator(java.lang.String trainingFile,
java.lang.String modelFile)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
beginTag
protected java.lang.String beginTag
interTag
protected java.lang.String interTag
otherTag
protected java.lang.String otherTag
Annotator
public Annotator(java.lang.String beginTag,
java.lang.String interTag,
java.lang.String otherTag)
serializeAnnotator
public abstract void serializeAnnotator(java.lang.String trainingFile,
java.lang.String modelFile)
annotateSentence
public abstract AnnotatedSentence annotateSentence(java.lang.String sentence,
boolean isTokenized)
loadAnnotator
public abstract void loadAnnotator(java.lang.String modelFile)
isTargetNegated
public boolean isTargetNegated(java.lang.String sentence,
boolean isTokenized,
java.lang.String targetPhrase)
- Checks if the given target phrase is negated in the given sentence. Only
the first word of the target phrase is used
- Parameters:
sentence
- isTokenized
- targetPhrase
-
- Returns: