The issue was originally identified in #112. When setting annotations on the current sentence, we should validate that the start and end positions of all entities are within the acceptable range. Since annotations can be imported, there may be cases where an invalid annotation has been imported, thus leading to this issue. An error should be shown and the invalid entities should be discarded.
It would be best if we can perform this validation when importing the annotations instead of when viewing a particular sentence.
The issue was originally identified in #112. When setting annotations on the current sentence, we should validate that the start and end positions of all entities are within the acceptable range. Since annotations can be imported, there may be cases where an invalid annotation has been imported, thus leading to this issue. An error should be shown and the invalid entities should be discarded.
It would be best if we can perform this validation when importing the annotations instead of when viewing a particular sentence.