commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brit...@apache.org
Subject [7/8] [text] Better JavaDoc for LevenshteinDistance
Date Sun, 14 Dec 2014 20:41:26 GMT
Better JavaDoc for LevenshteinDistance


Project: http://git-wip-us.apache.org/repos/asf/commons-text/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-text/commit/2f995e0d
Tree: http://git-wip-us.apache.org/repos/asf/commons-text/tree/2f995e0d
Diff: http://git-wip-us.apache.org/repos/asf/commons-text/diff/2f995e0d

Branch: refs/heads/master
Commit: 2f995e0db2ee3a9a61f512c098f4d54466233b43
Parents: 1947f0c
Author: Benedikt Ritter <britter@apache.org>
Authored: Sun Dec 14 21:39:43 2014 +0100
Committer: Benedikt Ritter <britter@apache.org>
Committed: Sun Dec 14 21:39:43 2014 +0100

----------------------------------------------------------------------
 .../text/similarity/LevenshteinDistance.java    | 24 ++++++--------------
 1 file changed, 7 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-text/blob/2f995e0d/src/main/java/org/apache/commons/text/similarity/LevenshteinDistance.java
----------------------------------------------------------------------
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 5bd9d3e..4bc2e8a 100644
--- a/src/main/java/org/apache/commons/text/similarity/LevenshteinDistance.java
+++ b/src/main/java/org/apache/commons/text/similarity/LevenshteinDistance.java
@@ -19,8 +19,12 @@ package org.apache.commons.text.similarity;
 import java.util.Arrays;
 
 /**
+ * An algorithm for measuring the difference between two character sequences.
+ *
  * <p>
- * A string metric for measuring the difference between two sequences.
+ * This is the number of changes needed to change one sequence into another,
+ * where each change is a single character modification (deletion, insertion
+ * or substitution).
  * </p>
  *
  * <p>
@@ -30,15 +34,9 @@ import java.util.Arrays;
 public class LevenshteinDistance implements StringMetric<Integer> {
 
     /**
-     * <p>
      * Find the Levenshtein distance between two Strings.
-     * </p>
      *
-     * <p>
-     * This is the number of changes needed to change one String into another,
-     * where each change is a single character modification (deletion, insertion
-     * or substitution).
-     * </p>
+     * <p>A higher score indicates a greater distance.</p>
      *
      * <p>
      * The previous implementation of the Levenshtein distance algorithm was
@@ -81,16 +79,8 @@ public class LevenshteinDistance implements StringMetric<Integer>
{
     }
 
     /**
-     * <p>
-     * Find the Levenshtein distance between two Strings if it's less than or
+     * Find the Levenshtein distance between two CharSequences if it's less than or
      * equal to a given threshold.
-     * </p>
-     *
-     * <p>
-     * This is the number of changes needed to change one String into another,
-     * where each change is a single character modification (deletion, insertion
-     * or substitution).
-     * </p>
      *
      * <p>
      * This implementation follows from Algorithms on Strings, Trees and


Mime
View raw message