🔍 Provide the API to easily support "did you mean...?"
Eventually we might want to implement fuzzy search or an API to facilitate the computation of edit distances.
I am interested in working on this. For my purposes, the API I need would just be a single function that takes a string and a trie, and returns a list of paths, sorted by distance to the input. What do you have in mind?
Reference edit distance implementations:
- https://github.com/ifazk/mula/
- https://github.com/c-cube/spelll/
@kentookura Yes, that's correct. Alternatively, it can take a list of strings (as a hierarchical name) and a trie. Either way it works!
It seems that the standard library will soon contain an edit distance function:
https://github.com/ocaml/ocaml/pull/13760
@kentookura Wow this is great news!