for(int j=0;j<negatableConcepts.size();j++){
SentenceElement cns = negatableConcepts.get(j);
if(cns.isConcept()){
Mention lex = cns.getMention();
if(token.isPostNegation()){
Annotation a = new Annotation();
a.setOffset(token.getOffset()+sent.getOffset());
a.setText(token.getText());
lex.setModality(Mention.MODALITY_NEGATED);
lex.setModalityAnnotation(a);
}else{
Annotation a = new Annotation();
a.setOffset(token.getOffset()+sent.getOffset());
a.setText(token.getText());
lex.setModality(Mention.MODALITY_UNCERTAIN);
lex.setModalityAnnotation(a);
}
}
}
}
// clear retro concepts
negatableConcepts.clear();
// if token is stop word then stop the negation process
}else if (token.isStopWord()){
negationConcept = null;
negatableConcepts.clear();
window = 0;
// do the actual negation here
}else if (token.isConcept()){
if(negationConcept != null){
Mention lex = token.getMention();
Annotation a = new Annotation();
a.setOffset(negationConcept.getOffset()+sent.getOffset());
a.setText(negationConcept.getText());
lex.setModality(Mention.MODALITY_NEGATED);
lex.setModalityAnnotation(a);
}else{