Uploaded image for project: 'Commons Text'
  1. Commons Text
  2. TEXT-166

FuzzyScore JavaDoc mistake

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • 1.8
    • 1.9

    Description

      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.

      /**
      * <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) {

      Attachments

        Issue Links

          Activity

            People

              kinow Bruno P. Kinoshita
              ben.manes Ben Manes
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 40m
                  40m