Class TextMatcherUtil
java.lang.Object
io.mosip.authentication.core.util.TextMatcherUtil
The Class TextMatcherUtil is used to match two input strings and to provide
results based on the method called.
- Author:
- Manoj SP
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic IntegerphoneticsMatch(String inputString, String storedString, String language) This method gets two strings as input along with their language and gets their phonetic values using PhoneticEngine class.
-
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 stringstoredString- the stored stringlanguage- the language- Returns:
- true, if successful
- Throws:
org.apache.commons.codec.EncoderException- the encoder exception
-