Class TextMatcherUtil

java.lang.Object
io.mosip.authentication.core.util.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 Details

    • TextMatcherUtil

      public TextMatcherUtil()
  • Method Details

    • 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