Hi,
I'm working with the cTAKES pipeline to annotate some clinical text. The cTAKES
syntactic chunker generates overlapping and nested annotations with the same
syntactic type. For example:
[NP ascending [NP colon polyps]]
What I would like to do is to use TextMarker rules to eliminate nested
annotations, so at the end of the day just have the following:
[NP colon ascending polyps]
I've tried to use UNMARK, but the following two rules appear to remove all NPs
starting at the first match, even the containing annotation:
NP{PARTOF(NP)->UNMARK(NP)};
NP{CONTAINS(NP)->UNMARK(NP)};
Is there way to accomplish this that I'm missing? Using loops perhaps?
Thanks,
Will