Class TextMatcherUtil


  • public final class TextMatcherUtil
    extends Object
    The Class TextMatcherUtil is used to match two input strings and to provide results based on the method called.
    Author:
    Manoj SP
    • Constructor Detail

      • TextMatcherUtil

        public TextMatcherUtil()
    • Method Detail

      • phoneticsMatch

        public static Integer phoneticsMatch​(String inputString,
                                             String storedString,
                                             String language)
                                      throws org.apache.commons.codec.EncoderException
        This method gets two strings as input along with their language and gets their phonetic values using PhoneticEngine class. Then the phonetic matching probability is calculated using Soundex class and validated against user threshold or default configured threshold. If the matching probability of both phonetic strings are greater than or equal to the given threshold, then the result is true, else false.
        Parameters:
        inputString - the input string
        storedString - the stored string
        language - the language
        Returns:
        true, if successful
        Throws:
        org.apache.commons.codec.EncoderException - the encoder exception