You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2025/10/26 19:33:48 UTC

(commons-text) branch master updated: No need for Latin

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-text.git


The following commit(s) were added to refs/heads/master by this push:
     new 4f355595 No need for Latin
4f355595 is described below

commit 4f3555954819dda2a9a0ff6f9a8bd694bee56632
Author: Gary D. Gregory <ga...@gmail.com>
AuthorDate: Sun Oct 26 15:33:42 2025 -0400

    No need for Latin
---
 .../apache/commons/text/similarity/LevenshteinDetailedDistance.java    | 3 ++-
 .../java/org/apache/commons/text/similarity/LevenshteinDistance.java   | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/commons/text/similarity/LevenshteinDetailedDistance.java b/src/main/java/org/apache/commons/text/similarity/LevenshteinDetailedDistance.java
index a25b988b..7e3df86a 100644
--- a/src/main/java/org/apache/commons/text/similarity/LevenshteinDetailedDistance.java
+++ b/src/main/java/org/apache/commons/text/similarity/LevenshteinDetailedDistance.java
@@ -168,7 +168,8 @@ public class LevenshteinDetailedDistance implements EditDistance<LevenshteinResu
          * of the cost table. It is also possible to use this to compute the unbounded Levenshtein distance by starting the threshold at 1 and doubling each
          * time until the distance is found; this is O(dm), where d is the distance.
          *
-         * One subtlety comes from needing to ignore entries on the border of our stripe eg. p[] = |#|#|#|* d[] = *|#|#|#| We must ignore the entry to the left
+         * One subtlety comes from needing to ignore entries on the border of our stripe, for example,
+         * p[] = |#|#|#|* d[] = *|#|#|#| We must ignore the entry to the left
          * of the leftmost member We must ignore the entry above the rightmost member
          *
          * Another subtlety comes from our stripe running off the matrix if the strings aren't of the same size. Since string s is always swapped to be the
diff --git a/src/main/java/org/apache/commons/text/similarity/LevenshteinDistance.java b/src/main/java/org/apache/commons/text/similarity/LevenshteinDistance.java
index 787279c6..0deb2b52 100644
--- a/src/main/java/org/apache/commons/text/similarity/LevenshteinDistance.java
+++ b/src/main/java/org/apache/commons/text/similarity/LevenshteinDistance.java
@@ -91,7 +91,8 @@ public class LevenshteinDistance implements EditDistance<Integer> {
          * of the cost table. It is also possible to use this to compute the unbounded Levenshtein distance by starting the threshold at 1 and doubling each
          * time until the distance is found; this is O(dm), where d is the distance.
          *
-         * One subtlety comes from needing to ignore entries on the border of our stripe eg. p[] = |#|#|#|* d[] = *|#|#|#| We must ignore the entry to the left
+         * One subtlety comes from needing to ignore entries on the border of our stripe, for example,
+         * p[] = |#|#|#|* d[] = *|#|#|#| We must ignore the entry to the left
          * of the leftmost member We must ignore the entry above the rightmost member
          *
          * Another subtlety comes from our stripe running off the matrix if the strings aren't of the same size. Since string s is always swapped to be the