|
|
|
|
|
by microtonal
4695 days ago
|
|
It depends on what the grandparent means with 'not exactly'. If it means 'within a certain edit distance', it is very doable. You can store your dictionary in an automaton and construct a Levenshtein[1] automaton in linear time. The intersection of the dictionary and Levenshtein automaton gives all words within the given edit distance. My library (Dictomaton) that I mention in another comment implements this. There is a different implementation in recent Lucene versions, that is used for finding documents with keywords that approximately match the query. [1] http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.16.6... |
|