public class NegexAnnotator
extends JCasAnnotator_ImplBase
Modifier and Type | Class and Description |
---|---|
static class |
NegexAnnotator.NamedEntityTargetAnnoFilter
only bother with IdentifiedAnnotations that have concepts
|
static class |
NegexAnnotator.NegexRule |
static class |
NegexAnnotator.NegexToken |
static interface |
NegexAnnotator.TargetAnnoFilter |
Modifier and Type | Field and Description |
---|---|
private boolean |
checkPossibilities |
private java.util.List<NegexAnnotator.NegexRule> |
listNegexRules |
private static Log |
log |
private boolean |
negatePossibilities |
private boolean |
storeAsInterval |
private java.lang.String |
targetTypeName |
Constructor and Description |
---|
NegexAnnotator() |
Modifier and Type | Method and Description |
---|---|
private void |
annotateNegation(JCas aJCas,
Sentence s,
Annotation anno,
NegexAnnotator.NegexToken t,
boolean negated,
boolean possible)
set the certainty/confidence flag on a named entity, and add a negation
context annotation.
|
private void |
checkNegation(JCas aJCas,
Sentence s,
Annotation ne)
check the negation status of the specfied term in the specified sentence
|
private void |
checkNegation2(JCas aJCas,
Sentence s,
IdentifiedAnnotation ne,
boolean negPoss) |
private NegexAnnotator.NegexToken |
findTokenByTag(java.lang.String tag,
java.lang.String[] stopTags,
boolean before,
int neRelStart,
int neRelEnd,
NegexAnnotator.NegexToken[] tokens) |
private boolean |
getBooleanConfigParam(UimaContext aContext,
java.lang.String param,
boolean defaultVal) |
private java.util.List<java.lang.String> |
initalizeRuleList() |
void |
initialize(UimaContext aContext) |
private java.util.List<NegexAnnotator.NegexRule> |
initializeRules() |
private void |
negateAnnotations(JCas aJCas,
AnnotationIndex sentenceIdx,
AnnotationIndex targetIdx,
NegexAnnotator.TargetAnnoFilter filter) |
void |
process(JCas aJCas) |
private static final Log log
private java.util.List<NegexAnnotator.NegexRule> listNegexRules
private boolean negatePossibilities
private boolean checkPossibilities
private boolean storeAsInterval
private java.lang.String targetTypeName
public void initialize(UimaContext aContext) throws ResourceInitializationException
ResourceInitializationException
private boolean getBooleanConfigParam(UimaContext aContext, java.lang.String param, boolean defaultVal)
private java.util.List<java.lang.String> initalizeRuleList()
private java.util.List<NegexAnnotator.NegexRule> initializeRules()
public void process(JCas aJCas)
private void negateAnnotations(JCas aJCas, AnnotationIndex sentenceIdx, AnnotationIndex targetIdx, NegexAnnotator.TargetAnnoFilter filter)
private NegexAnnotator.NegexToken findTokenByTag(java.lang.String tag, java.lang.String[] stopTags, boolean before, int neRelStart, int neRelEnd, NegexAnnotator.NegexToken[] tokens)
private void checkNegation(JCas aJCas, Sentence s, Annotation ne)
aJCas
- for adding annotationss
- the sentence in which we will lookne
- the named entity whose negation status will be checked.checkPoss
- should possibility be checked?negPoss
- should possiblities be negated?private void checkNegation2(JCas aJCas, Sentence s, IdentifiedAnnotation ne, boolean negPoss)
private void annotateNegation(JCas aJCas, Sentence s, Annotation anno, NegexAnnotator.NegexToken t, boolean negated, boolean possible)
aJCas
- s
- used to figure out text spanne
- the certainty/confidence will be set to -1t
- the tokenfSetCertainty
- should we set the certainty (true) or confidence (false)