Error when curating sentence-level named entity linking annotations in INCEpTION
Project: Named Entity Linking for PDF Sentence-Level Annotations
Description: We have created a project for named entity linking in INCEpTION where we are labeling entire sentences in PDF documents and linking them to instances in our custom knowledge base. The annotation process works perfectly. However, when we try to curate the annotations, we encounter the following error message:
"Unable to render annotatations"
(Note: This seems to be a typo, it should likely read "annotations".)
When checking the logs, the following error appears:
End position of range [...] is not part of any visible row. In a sentence-based editor, this is most likely caused by annotations outside sentences.
Steps to Reproduce:
- Create a project for named entity linking.
- Define a custom knowledge base and use a set of four labels for spans.
- Annotate entire sentences in PDF documents with entity links from the knowledge base.
- Attempt to curate the annotations.
- Observe the error message and log details.
Workaround:
- During curation, we discovered that changing the page size to 1 row prevents the error from occurring.
Expected Behavior: The curator should be able to load and manage the annotated sentences and their corresponding links without any issues.
Actual Behavior: Curating results in an error message: "Unable to render annotatations". The logs suggest the issue might be related to annotations being outside of visible sentence boundaries.
Log Output (Error):
End position of range [...] is not part of any visible row. In a sentence-based editor, this is most likely caused by annotations outside sentences.
Layer Settings:
- Granularity: Character level
- Overlap: Any
Possible Cause: We suspect this might be happening because we are performing entity linking on a sentence level, and the error is related to how annotations are rendered in sentence-based views. However, we have set the layer to character-level granularity and allowed overlapping annotations.
Request: Could you please explain why this error occurs during curation? Is it related to the sentence-level entity linking in a sentence-based editor? How can we resolve this issue?
Additional Information:
- Version of INCEpTION: 33.2
- Environment: Ubuntu
Thank you for your assistance in resolving this issue!
Would you be able to provide a small project export containing an affected PDF that I could use to reproduce the problem?
sample_project_inception_bug.zip Sure, attached you can find the sample project. Note that the annotations do not make any sense. They have been done just so that you can reproduce the error.
@kapllan thank you for the project. I have imported and checked as admin as well as the one annotator user and selected the different annotations, but did not encounter the problem. I am using INCEpTION 34.1.
Does the problem occur for you simply when opening the document? Or only when selecting annoations?
Could you please try with INCEpTION 33.7 or 34.1?
I downloaded the latest version of INCEpTION and imported the project locally. I get the same error when performing curation. So, annotation works just fine, only during curation I receive the error message when the page size is selected to be bigger than 1 row, cf. screenshot.
I tried INCEpTION 34.1.
@reckart I would like to kindly ask you if you have any further updates on this issue?
Not yet. Next bug fix release should be next Tuesday. I will try looking at the issue before that and see if a fix can be included in that release.
@reckart thanks!
I could reproduce the issue with your project.
Looks like you have hit this issue https://github.com/inception-project/inception/issues/5035 which is already fixed in INCEpTION 33.6.
You should upgrade to INCEpTION 33.7 or 34.1 to avoid the issue in the future.
To fix you existing project, you can perform these steps:
- first export the entire project so you have a backup
- open the CAS Doctor panel in the project settings and click check - it will generate a report mentioning that there are many annotations ending in whitespace
- enable the TrimAnnotationsRepair and click repair
- run check again - it will list many errors of zero-sized tokens/sentences
- enable the RemoveZeroSizeTokensAndSentencesRepair and click repair
- run check again - hopefully all will be ok now
Finally check your data if all looks good.
Thanks. I will try it out. Let's see if it helps. As I said, I am using INCEpTION 34.1.
@kapllan If it doesn't work and you continue to have problems, please let me know.