Package org.apache.commons.codec.language

Examples of org.apache.commons.codec.language.RefinedSoundex.difference()


      int refinedSoundexThreshold = (int) Math.round(threshold
          * Math.min(value.length(), similarityGroupValue.length()));

      try {
        int refinedSoundexDiff = refinedSoundex.difference(value, similarityGroupValue);

        if (refinedSoundexDiff >= refinedSoundexThreshold) {
          return true;
        }
      } catch (Exception e) {
View Full Code Here


              // soundex analysis
              int difference = -1;
              int length = 0;
              RefinedSoundex soundex = new RefinedSoundex();
              try {
                difference = soundex.difference(title1, title2);
                length = Math.max(soundex.encode(title1).length(), soundex.encode(title2).length());
              } catch (Exception e) {}
           
              double diff = (double)difference / (double)length;
              if(diff >= 0.75) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.