You have use approximate string matching algorithm , There are several strategies to implement this . Blur is a Trie-based Java implementation of approximate string matching based on the Levenshtein word distance. you can find the implementation at github here
There is another strategy to implement its called boyer-moore approximate string matching algorithm . Here is the Java code for that
The usual approach to solve these problem using this algorithm and Levenshtein word distance is to compare the input to the possible outputs and choose the one with the smallest distance to the desired output.
Read full article from Java: how to find the most probable string in a list of strings? - Stack Overflow
No comments:
Post a Comment