Closed reckart closed 6 years ago
I expect this is relate to underlying code hitting an empty path and the length of this path being calculated as something like nodesInPath.size()-1
.
Fixing this by letting PathLengthComparator return NO_PATH whenever the underlying code returns a negative path length.
Looking into the code, I get the impression that all LexSemResourceComparators should return NOT_FOUND (-1.0) if the similarity cannot be determined, even if the underlying measure provides more detail, e.g. why the similarity cannot be determined. Hence, changing the unit test to expect NOT_FOUND.