Return-Path: X-Original-To: apmail-commons-notifications-archive@minotaur.apache.org Delivered-To: apmail-commons-notifications-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 47B8A17C27 for ; Sun, 1 Mar 2015 12:14:35 +0000 (UTC) Received: (qmail 85511 invoked by uid 500); 1 Mar 2015 12:14:35 -0000 Delivered-To: apmail-commons-notifications-archive@commons.apache.org Received: (qmail 85454 invoked by uid 500); 1 Mar 2015 12:14:35 -0000 Mailing-List: contact notifications-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list notifications@commons.apache.org Received: (qmail 85366 invoked by uid 99); 1 Mar 2015 12:14:35 -0000 Received: from eris.apache.org (HELO hades.apache.org) (140.211.11.105) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Mar 2015 12:14:35 +0000 Received: from hades.apache.org (localhost [127.0.0.1]) by hades.apache.org (ASF Mail Server at hades.apache.org) with ESMTP id C12C2AC082C for ; Sun, 1 Mar 2015 12:14:34 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r941823 [5/21] - in /websites/production/commons/content/sandbox/commons-text: ./ apidocs/ apidocs/org/apache/commons/text/diff/ apidocs/org/apache/commons/text/diff/class-use/ apidocs/org/apache/commons/text/similarity/ apidocs/org/apache/... Date: Sun, 01 Mar 2015 12:14:31 -0000 To: notifications@commons.apache.org From: britter@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20150301121434.C12C2AC082C@hades.apache.org> Added: websites/production/commons/content/sandbox/commons-text/apidocs/org/apache/commons/text/similarity/HammingDistance.html ============================================================================== --- websites/production/commons/content/sandbox/commons-text/apidocs/org/apache/commons/text/similarity/HammingDistance.html (added) +++ websites/production/commons/content/sandbox/commons-text/apidocs/org/apache/commons/text/similarity/HammingDistance.html Sun Mar 1 12:14:29 2015 @@ -0,0 +1,298 @@ + + + + + +HammingDistance (Apache Commons Text 0.1-SNAPSHOT API) + + + + + + + + + + +
+
org.apache.commons.text.similarity
+

Class HammingDistance

+
+
+
    +
  • java.lang.Object
  • +
  • +
      +
    • org.apache.commons.text.similarity.HammingDistance
    • +
    +
  • +
+
+
    +
  • +
    +
    All Implemented Interfaces:
    +
    StringMetric<Integer>
    +
    +
    +
    +
    public class HammingDistance
    +extends Object
    +implements StringMetric<Integer>
    +
    The hamming distance between two strings of equal length is the number of + positions at which the corresponding symbols are different. + +

    + For further explanation about the Hamming Distance, take a look at its + Wikipedia page at http://en.wikipedia.org/wiki/Hamming_distance. +

    +
  • +
+
+
+ +
+
+
    +
  • + + + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        compare

        +
        public Integer compare(CharSequence left,
        +              CharSequence right)
        +
        Find the Hamming Distance between two strings with the same + length. + +

        The distance starts with zero, and for each occurrence of a + different character in either String, it increments the distance + by 1, and finally return its value.

        + +

        Since the Hamming Distance can only be calculated between strings of equal length, input of different lengths + will throw IllegalArgumentException

        + +
        + distance.compare("", "")               = 0
        + distance.compare("pappa", "pappa")     = 0
        + distance.compare("1011101", "1011111") = 1
        + distance.compare("ATCG", "ACCC")       = 2
        + distance.compare("karolin", "kerstin"  = 3
        + 
        +
        +
        Specified by:
        +
        compare in interface StringMetric<Integer>
        +
        Parameters:
        left - the first CharSequence, must not be null
        right - the second CharSequence, must not be null
        +
        Returns:
        distance
        +
        Throws:
        +
        IllegalArgumentException - if either input is null or + if they do not have the same length
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + +

Copyright © 2014–2015 The Apache Software Foundation. All rights reserved.

+ + \ No newline at end of file Propchange: websites/production/commons/content/sandbox/commons-text/apidocs/org/apache/commons/text/similarity/HammingDistance.html ------------------------------------------------------------------------------ svn:eol-style = native Modified: websites/production/commons/content/sandbox/commons-text/apidocs/org/apache/commons/text/similarity/JaroWrinklerDistance.html ============================================================================== --- websites/production/commons/content/sandbox/commons-text/apidocs/org/apache/commons/text/similarity/JaroWrinklerDistance.html (original) +++ websites/production/commons/content/sandbox/commons-text/apidocs/org/apache/commons/text/similarity/JaroWrinklerDistance.html Sun Mar 1 12:14:29 2015 @@ -23,7 +23,8 @@ @@ -366,7 +359,7 @@ implements
  • score

    -
    protected static double score(CharSequence first,
    +
    protected static double score(CharSequence first,
                CharSequence second)
    This method returns the Jaro-Winkler score for string matching.
    Parameters:
    first - the first string to be matched
    second - the second string to be machted
    @@ -379,7 +372,7 @@ implements
  • transpositions

    -
    protected static int transpositions(CharSequence first,
    +
    protected static int transpositions(CharSequence first,
                      CharSequence second)
    Calculates the number of transposition between two strings.
    Parameters:
    first - The first string.
    second - The second string.
    @@ -392,11 +385,9 @@ implements
  • indexOfDifference

    -
    protected static int indexOfDifference(CharSequence... css)
    -

    - Compares all CharSequences in an array and returns the index at which the +

    protected static int indexOfDifference(CharSequence... css)
    +
    Compares all CharSequences in an array and returns the index at which the CharSequences begin to differ. -

    For example, @@ -404,29 +395,27 @@ implements

    Parameters:
    css - array of CharSequences, entries may be null
    Returns:
    the index where the strings begin to differ; -1 if they are all - equal
    Since:
    -
    2.4, 3.0 Changed signature from indexOfDifference(String...) to - indexOfDifference(CharSequence...)
    + equal
  • @@ -435,7 +424,7 @@ implements
  • getSetOfMatchingCharacterWithin

    -
    protected static String getSetOfMatchingCharacterWithin(CharSequence first,
    +
    protected static String getSetOfMatchingCharacterWithin(CharSequence first,
                                          CharSequence second,
                                          int limit)
    Gets a set of matching characters between two strings. @@ -463,7 +452,8 @@ implements -
  • Package
  • +
  • Overview
  • +
  • Package
  • Use
  • Tree
  • @@ -474,7 +464,7 @@ implements


  • -
    public class LevenshteinDistance
    +
    public class LevenshteinDistance
     extends Object
     implements StringMetric<Integer>
    -

    - A string metric for measuring the difference between two sequences. +

    An algorithm for measuring the difference between two character 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).

    This code has been adapted from Apache Commons Lang 3.3.

    -
    Since:
    -
    1.0
  • @@ -149,8 +152,7 @@ implements Integer compare(CharSequence left, CharSequence right) -
    - Find the Levenshtein distance between two Strings.
    +
    Find the Levenshtein distance between two Strings.
    @@ -158,8 +160,7 @@ implements compare(CharSequence left, CharSequence right, int threshold) -
    - 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.
    @@ -191,7 +192,7 @@ implements
  • LevenshteinDistance

    -
    public LevenshteinDistance()
    +
    public LevenshteinDistance()
  • @@ -208,17 +209,11 @@ implements
  • compare

    -
    public Integer compare(CharSequence left,
    +
    public Integer compare(CharSequence left,
                   CharSequence right)
    -

    - Find the Levenshtein distance between two Strings. -

    +
    Find the Levenshtein distance between two Strings. -

    - 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). -

    +

    A higher score indicates a greater distance.

    The previous implementation of the Levenshtein distance algorithm was @@ -237,17 +232,17 @@ implements

    Specified by:
    @@ -264,19 +259,11 @@ implements
  • compare

    -
    public Integer compare(CharSequence left,
    +
    public Integer compare(CharSequence left,
                   CharSequence right,
                   int threshold)
    -

    - 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. -

    - -

    - 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). -

    This implementation follows from Algorithms on Strings, Trees and @@ -287,17 +274,17 @@ implements

    Parameters:
    left - the first string, must not be null
    right - the second string, must not be null
    threshold - the target threshold, must not be negative
    Returns:
    result distance
    @@ -320,7 +307,8 @@ implements
    -
  • Package
  • +
  • Overview
  • +
  • Package
  • Use
  • Tree
  • @@ -372,6 +360,6 @@ implements Copyright © 2014 The Apache Software Foundation. All rights reserved.

    +

    Copyright © 2014–2015 The Apache Software Foundation. All rights reserved.

    - + \ No newline at end of file Modified: websites/production/commons/content/sandbox/commons-text/apidocs/org/apache/commons/text/similarity/StringMetric.html ============================================================================== --- websites/production/commons/content/sandbox/commons-text/apidocs/org/apache/commons/text/similarity/StringMetric.html (original) +++ websites/production/commons/content/sandbox/commons-text/apidocs/org/apache/commons/text/similarity/StringMetric.html Sun Mar 1 12:14:29 2015 @@ -23,7 +23,8 @@
    -

    Copyright © 2014 The Apache Software Foundation. All rights reserved.

    +

    Copyright © 2014–2015 The Apache Software Foundation. All rights reserved.

    - + \ No newline at end of file Added: websites/production/commons/content/sandbox/commons-text/apidocs/org/apache/commons/text/similarity/class-use/FuzzyScore.html ============================================================================== --- websites/production/commons/content/sandbox/commons-text/apidocs/org/apache/commons/text/similarity/class-use/FuzzyScore.html (added) +++ websites/production/commons/content/sandbox/commons-text/apidocs/org/apache/commons/text/similarity/class-use/FuzzyScore.html Sun Mar 1 12:14:29 2015 @@ -0,0 +1,115 @@ + + + + + +Uses of Class org.apache.commons.text.similarity.FuzzyScore (Apache Commons Text 0.1-SNAPSHOT API) + + + + + + + + + +
    +

    Uses of Class
    org.apache.commons.text.similarity.FuzzyScore

    +
    +
    No usage of org.apache.commons.text.similarity.FuzzyScore
    + + + + +

    Copyright © 2014–2015 The Apache Software Foundation. All rights reserved.

    + + \ No newline at end of file Propchange: websites/production/commons/content/sandbox/commons-text/apidocs/org/apache/commons/text/similarity/class-use/FuzzyScore.html ------------------------------------------------------------------------------ svn:eol-style = native Added: websites/production/commons/content/sandbox/commons-text/apidocs/org/apache/commons/text/similarity/class-use/HammingDistance.html ============================================================================== --- websites/production/commons/content/sandbox/commons-text/apidocs/org/apache/commons/text/similarity/class-use/HammingDistance.html (added) +++ websites/production/commons/content/sandbox/commons-text/apidocs/org/apache/commons/text/similarity/class-use/HammingDistance.html Sun Mar 1 12:14:29 2015 @@ -0,0 +1,115 @@ + + + + + +Uses of Class org.apache.commons.text.similarity.HammingDistance (Apache Commons Text 0.1-SNAPSHOT API) + + + + + + + + + +
    +

    Uses of Class
    org.apache.commons.text.similarity.HammingDistance

    +
    +
    No usage of org.apache.commons.text.similarity.HammingDistance
    + + + + +

    Copyright © 2014–2015 The Apache Software Foundation. All rights reserved.

    + + \ No newline at end of file Propchange: websites/production/commons/content/sandbox/commons-text/apidocs/org/apache/commons/text/similarity/class-use/HammingDistance.html ------------------------------------------------------------------------------ svn:eol-style = native Modified: websites/production/commons/content/sandbox/commons-text/apidocs/org/apache/commons/text/similarity/class-use/JaroWrinklerDistance.html ============================================================================== --- websites/production/commons/content/sandbox/commons-text/apidocs/org/apache/commons/text/similarity/class-use/JaroWrinklerDistance.html (original) +++ websites/production/commons/content/sandbox/commons-text/apidocs/org/apache/commons/text/similarity/class-use/JaroWrinklerDistance.html Sun Mar 1 12:14:29 2015 @@ -23,7 +23,8 @@
  • -

    Copyright © 2014 The Apache Software Foundation. All rights reserved.

    +

    Copyright © 2014–2015 The Apache Software Foundation. All rights reserved.

    - + \ No newline at end of file Modified: websites/production/commons/content/sandbox/commons-text/apidocs/org/apache/commons/text/similarity/class-use/LevenshteinDistance.html ============================================================================== --- websites/production/commons/content/sandbox/commons-text/apidocs/org/apache/commons/text/similarity/class-use/LevenshteinDistance.html (original) +++ websites/production/commons/content/sandbox/commons-text/apidocs/org/apache/commons/text/similarity/class-use/LevenshteinDistance.html Sun Mar 1 12:14:29 2015 @@ -23,7 +23,8 @@
  • -

    Copyright © 2014 The Apache Software Foundation. All rights reserved.

    +

    Copyright © 2014–2015 The Apache Software Foundation. All rights reserved.

    - + \ No newline at end of file Modified: websites/production/commons/content/sandbox/commons-text/apidocs/org/apache/commons/text/similarity/class-use/StringMetric.html ============================================================================== --- websites/production/commons/content/sandbox/commons-text/apidocs/org/apache/commons/text/similarity/class-use/StringMetric.html (original) +++ websites/production/commons/content/sandbox/commons-text/apidocs/org/apache/commons/text/similarity/class-use/StringMetric.html Sun Mar 1 12:14:29 2015 @@ -23,7 +23,8 @@