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

Bruno P. Kinoshita updated TEXT-166:
------------------------------------
    Fix Version/s: 1.8.1

> FuzzyScore JavaDoc mistake
> --------------------------
>
>                 Key: TEXT-166
>                 URL: https://issues.apache.org/jira/browse/TEXT-166
>             Project: Commons Text
>          Issue Type: Task
>            Reporter: Ben Manes
>            Assignee: Bruno P. Kinoshita
>            Priority: Trivial
>             Fix For: 1.8.1
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> {{FuzzyScore}} was adapted from {{StringUtils#getFuzzyDistance}} and the 
> JavaDoc was copied as is. The deprecated utility method took three arguments 
> (term, query, locale). The class takes {{locale}} as a constructor argument 
> and the remaining as method arguments. However, the JavaDoc was unchanged and 
> shows the {{locale}} method parameter.
> {code:java}
> /**
> * <p>
> * Find the Fuzzy Score which indicates the similarity score between two
> * Strings.
> * </p>
> *
> * <pre>
> * score.fuzzyScore(null, null, null) = IllegalArgumentException
> * score.fuzzyScore("", "", Locale.ENGLISH) = 0
> * score.fuzzyScore("Workshop", "b", Locale.ENGLISH) = 0
> * score.fuzzyScore("Room", "o", Locale.ENGLISH) = 1
> * score.fuzzyScore("Workshop", "w", Locale.ENGLISH) = 1
> * score.fuzzyScore("Workshop", "ws", Locale.ENGLISH) = 2
> * score.fuzzyScore("Workshop", "wo", Locale.ENGLISH) = 4
> * score.fuzzyScore("Apache Software Foundation", "asf", Locale.ENGLISH) = 3
> * </pre>
> *
> * @param term a full term that should be matched against, must not be null
> * @param query the query that will be matched against a term, must not be
> * null
> * @return result score
> * @throws IllegalArgumentException if either CharSequence input is {@code 
> null}
> */
> public Integer fuzzyScore(final CharSequence term, final CharSequence query) 
> {{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to