dkpro-cassis
dkpro-cassis copied to clipboard
Add positional predicates
Is your feature request related to a problem? Please describe. I think it would be great if the CAS API in cassis would also offer predicates such as "contains" or "overlaps" to check the positional relation between two annotations to each other.
Describe the solution you'd like A solution similar to https://github.com/apache/uima-uimaj/pull/62 which provides these predicates on two places:
- on annotation types, e.g. to do something like
sentence.contains(token) - as separate utility methods, e.g. to do something like
contains(sentence, token) - with different signature, e.g.
contains(begin1, end1, begin2, end2), contains(annotation1, begin2, end2), contains(annotation1, annotation2)