Class LevenshteinDetailedDistance

java.lang.Object
org.apache.commons.text.similarity.LevenshteinDetailedDistance
All Implemented Interfaces:
BiFunction<CharSequence,CharSequence,LevenshteinResults>, EditDistance<LevenshteinResults>, ObjectSimilarityScore<CharSequence,LevenshteinResults>, SimilarityScore<LevenshteinResults>

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

Since:
1.0
  • Constructor Details

    • LevenshteinDetailedDistance

      Deprecated.
      Constructs a new instance that uses a version of the algorithm that does not use a threshold parameter.
      See Also:
    • LevenshteinDetailedDistance

      Constructs a new instance for a threshold.

      If the threshold is not null, distance calculations will be limited to a maximum length.

      If the threshold is null, the unlimited version of the algorithm will be used.

      Parameters:
      threshold - If this is null then distances calculations will not be limited. This may not be negative.
  • Method Details