I start Java by trying to write a program that matches the input to a list of predefined strings. I looked at the Levenshtein distance, but I ran into such problems:
If I have an entry, such as a “beef filet,” I want it to match a “beef filet." The problem is that the “beef fillet” is closer, according to Levenshtein, to something like “tuna fillet,” which, of course, is wrong.
Should I use something like Lucene for this? Does Lucene use methods in a Java class?
Thanks!
source share