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

MASI (and probably other set-valued) distance functions cause ClassCastException on category-wise agreement #10

Open
chmeyer opened this issue Jul 1, 2015 · 0 comments
Assignees
Labels
🐛Bug Something isn't working

Comments

@chmeyer
Copy link
Member

chmeyer commented Jul 1, 2015

Originally reported on Google Code with ID 10

What steps will reproduce the problem?
1. create a multi-label study: study.addItem(new SetAnnotation(voter1), new SetAnnotation(voter2));
2. calculate category-wise agreement on e.g. Alpha with MASI distance function: new
KrippendorffAlphaAgreement(study, new MASISet...).calculateCategoryAgreement(new SetAnnotation(CATEGORY));

What is the expected output? What do you see instead?
Exception in thread "main" java.lang.ClassCastException: java.lang.Object cannot be
cast to de.tudarmstadt.ukp.dkpro.statistics.agreement.distance.SetAnnotation
    at de.tudarmstadt.ukp.dkpro.statistics.agreement.distance.MASISetAnnotationDistanceFunction.measureDistance(MASISetAnnotationDistanceFunction.java:46)
    at de.tudarmstadt.ukp.dkpro.statistics.agreement.coding.KrippendorffAlphaAgreement.calculateCategoryAgreement(KrippendorffAlphaAgreement.java:166)
...

What version of the product are you using? On what operating system?
Both in 2.0.0 and latest SNAPSHOT.

This happens because measureDistance() in MASISetAnnotationDistanceFunction tries to
cast an Object (NULL_CATEGORY) to SetAnnotation.
The problem is gone, when passing an empty SetAnnotation instead of Object.

Reported by daxenberger.j on 2014-10-15 14:11:12

@chmeyer chmeyer self-assigned this Jul 1, 2015
@reckart reckart added 🐛Bug Something isn't working and removed 🐛Bug Something isn't working Type-Defect labels Jan 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants