larsga / Duke

Duke is a fast and flexible deduplication engine written in Java
Apache License 2.0
614 stars 194 forks source link

NumericComparator returns troublesome values for negative inputs #181

Open nhambletCCRI opened 10 years ago

nhambletCCRI commented 10 years ago

For example, NumericComparator.compare("-12", "-6") returns 2. This mucks up PropertyImpl.sim, causing it to return non-probabilities. If the signs of the inputs to NumericComparator.compare differ, the value will be negative, which is similarly troublesome.

nhambletCCRI commented 10 years ago

Actually, sorry, if the signs disagree, the comparison will be 0.0, which is probably fine.