You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Jonathan Baker (JIRA)" <ji...@apache.org> on 2015/02/28 20:06:04 UTC

[jira] [Updated] (LANG-1011) Create a new class StringDistance as host for the getXXDistance methods in StringUtils

     [ https://issues.apache.org/jira/browse/LANG-1011?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Baker updated LANG-1011:
---------------------------------
    Attachment: StringDistanceTest4Pre8.java
                StringDistanceTest4.java

(Warning: thinking out loud; java 8 noob; too much coffee)

3. Would it make sense to break out implementations into their own classes?  Some of the methods have other parameters besides the two CharSequences being compared.  These would be delegated to from StringDistances class.

4. Would it make sense to have those classes all implement StringDistance<DISTANCE>, which would extend BiFunction<CharSequence, CharSequence, DISTANCE> when java 8 is supported?

With #3 and #4, the various algorithms could be used interchangeably, even if some require some initial configuration.

> Create a new class StringDistance as host for the getXXDistance methods in StringUtils
> --------------------------------------------------------------------------------------
>
>                 Key: LANG-1011
>                 URL: https://issues.apache.org/jira/browse/LANG-1011
>             Project: Commons Lang
>          Issue Type: New Feature
>          Components: lang.*
>            Reporter: Benedikt Ritter
>            Assignee: Benedikt Ritter
>             Fix For: 3.4
>
>         Attachments: StringDistanceTest4.java, StringDistanceTest4Pre8.java
>
>
> We're getting more and more algorithms that calculate distances between strings, so it makes sense to create a new class for this kind of logic.
> deprecate getLevenshteinDistance and getJaroWinklerDistance and delegate to the new class. If the new class is implemented in 3.4, move getFuzzyDistance (is has not yet been released)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)