dkpro / dkpro-cassis

UIMA CAS processing library written in Python
https://pypi.org/project/dkpro-cassis/
Apache License 2.0
85 stars 22 forks source link

cas.select_covered(some_type, some_sentence) is not working has expected when 2 or more annotations start at the beginning of the sentence. #144

Closed LaurentBie closed 3 years ago

LaurentBie commented 3 years ago

Describe the bug cas.select_covered(some_type, some_sentence) is not working has expected when 2 or more annotations start at the beginning of the sentence. Only the last annotation that starts at the beginning of the sentence is returned.

To Reproduce error_dkpro_cassis.zip

A solution would be to update the _get_feature_structures_in_range(...) method in the cas.py file. idx_begin = annotations.bisect_key_left((begin, begin)) idx_end = annotations.bisect_key_right((end, end))

jcklie commented 3 years ago

Thanks for the report! It will be fixed in the next release.