3 ms·
Interesting. I had to write a badwords filter for a random name generator (for a procedural galaxy generator...) and it's quite a task just for English.
by Tloewald 10y ago
Interesting. I had to write a badwords filter for a random name generator (for a procedural galaxy generator...) and it's quite a task just for English.
- bsenftner 10y agoIf you've not used a Trie https://en.wikipedia.org/wiki/Trie https://en.wikipedia.org/wiki/Trie I suggest checking them out. Very useful for fuzzy searching.
- majewsky 10y agoIndeed. I did a spell checker for a Haskell university course, and the trie was the recommended data structure. Makes it really easy to eliminate large chunks of the dictionary at once when edit distance gets too large during traversal.