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

Problem with Hyponym Count of Categories #94

Open
daxenberger opened this issue Jul 31, 2015 · 1 comment
Open

Problem with Hyponym Count of Categories #94

daxenberger opened this issue Jul 31, 2015 · 1 comment
Labels
Milestone

Comments

@daxenberger
Copy link
Member

Originally reported on Google Code with ID 100

What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?
Many categories that should have a non-zero hyponym count (from the hyponymCountMap
of the CategoryGraph class) instead have negative hyponym counts

What version of the product are you using? On what operating system?
JWPL-0.9.1

Please provide any additional information below.
I noticed the above problem when the Intrinsic Information Content (IIC) of many categories
returned the value -1. When I investigated the CategroyGraph class, I noticed that
the IIC of these categories is -1 because their hyponym count (returned by the hyponymCountMap)
is < 0. Surely this can't be right. The hyponym count of a node cannot be negative.
I later found that when calculating the hyponym counts in the createHyponymCountMap
function, some of the local variables were declared as int (sumChildHyponyms, childHyponymCount
and currNodeHyponymCount). At some point in the calculation, these variables exceed
the range of int (2,147,483,647) and the value gets flipped to negative (-2,147,483,647).
I was able to solve this problem by changing the types of these variables to long.
I suggest perhaps you do the same in the distribution version.

Reported by yayasadiq on 2012-07-19 14:32:18

@daxenberger
Copy link
Member Author

Thanks for the report and for figuring out a solution.
Do you like to provide a patch? We'd be happy to apply it and ship it with the next
release.


Reported by oliver.ferschke on 2012-07-20 22:14:02

  • Status changed: Accepted

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

No branches or pull requests

2 participants