Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Begin and End of spans #29

Open
SarehAghaei opened this issue Feb 20, 2024 · 1 comment
Open

Begin and End of spans #29

SarehAghaei opened this issue Feb 20, 2024 · 1 comment

Comments

@SarehAghaei
Copy link

SarehAghaei commented Feb 20, 2024

When the beginning and end of spans are not the same, I encounter an error when calculating Krippendorff.
For instance, this error arises when working with the following matrix/dataframe.

begin end annotation
84 95 c1
96 100 c3
84 95 c1
96 99 c3

The error arises due to a RuntimeWarning indicating an invalid value encountered during scalar division. Specifically, it occurs at the calculation step: 1 - (o * d).sum() / (e * d).sum()

krippendorff.py:364

@zesch
Copy link
Collaborator

zesch commented Feb 21, 2024

Krippendorff assumes that the spans are the same and only the labels/annotations differ. In your case, you could either 1) manually ignore non matching annotations (if that makes sense in your use case) or 2) use the gamma IAA measure (also provided in inceptalytics
https://aclanthology.org/J15-3003.pdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants