commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Benson (JIRA)" <>
Subject [jira] [Commented] (LANG-684) Levenshtein Distance Within a Given Threshold
Date Wed, 15 Jun 2011 21:54:47 GMT


Matt Benson commented on LANG-684:

I am no expert, and I see how LD might be used in proximity to soundex codecs, but at the
end of the day I agree with Hen that it's not exactly a fit.  We should just add this improvement
to [lang] and have done with it.

> Levenshtein Distance Within a Given Threshold
> ---------------------------------------------
>                 Key: LANG-684
>                 URL:
>             Project: Commons Lang
>          Issue Type: New Feature
>          Components: lang.*
>            Reporter: Eli Lindsey
>            Priority: Minor
>             Fix For: 3.0
>         Attachments: LevenshteinDistanceWithThreshold.patch
> It'd be nice to have a function that calculates the Levenshtein distance only if it's
within some integer threshold.  
> Oftentimes you care less about the actual LD and more about it being within a certain
range.  This common, limited computation can be performed much faster than the normal unbounded
LD method; instead of O(nm), you can do it in O(km) (n and m are string lengths, k is the
> Also, providing a function like this makes it easier for library users to rewrite the
unbounded Levenshtein function to run in O(dm) time (d is the edit distance) if necessary.
> I'm attaching a patch that implements this function and adds appropriate test cases.

This message is automatically generated by JIRA.
For more information on JIRA, see:


View raw message