The GitHub Actions job "Java CI" on 
commons-text.git/fix-damerau-levenshtein-non-ascii has succeeded.
Run started by GitHub user Weiki886 (triggered by garydgregory).

Head commit for run:
9dde1b8d6abcfea813f0866fad4922c1e32b275e / Weiki <[email protected]>
Compare characters by value in DamerauLevenshteinDistance

calculateCost compared the boxed Character values returned by
SimilarityInput.at with ==, so it only recognized equal characters
that Character.valueOf caches. That cache covers values up to 127,
so every non-ASCII character compared unequal to itself: applying the
distance to "caf\u00e9" and "caf\u00e9" reported 1 instead of 0, and a
two-character CJK input compared against itself reported 2. The
adjacent-transposition branch never fired for non-ASCII input either,
so transposing two accented characters cost 2 instead of 1. The
limited variant was affected the same way and could return -1 for
inputs whose real distance is within the threshold.

Compare with Objects.equals instead, matching every other class in
this package: LevenshteinDistance, LevenshteinDetailedDistance,
JaroWinklerSimilarity and HammingDistance all use equals on the
values from at.

Report URL: https://github.com/apache/commons-text/actions/runs/33742470003

With regards,
GitHub Actions via GitBox

Reply via email to