Hi, I was getting a StringIndexOutOfBoundsException in DependencyUtil.doesSubsume(annot1, annot2) with exactly this situation:
*negex annotator* *the text begins "negative for <anything>"* If the chunk *negative for xyz *is preceded by anything else, even a space, the problem goes away. It also goes away when you choose another style of negation. "no headache", for instance I've traced the problem back to some illegal entries in the jCAS You can see from the image below that the ContextAnnotation's begin offset is illegal. Clearly there's an off-by-one error and this triggered the exception because in my example, the Annotation is created right from the 0th char of my note text. But it occurred to me that in every other case, where the annotation doesn't begin on the first character and it doesn't throw an exception, it might cause downstream methods like doesSubsume to give the wrong result because the begin/end offsets are wrong. I'm not sure how to follow this up. But if anyone wants to tackle it....? This is from HistoryAttributeClassifier beginning at line 274 [image: image.png]