Designing a system that will identify typos and sentences

This was asked in an interview.

I think the answer can be made by constructing a trie of all valid words, and then sentences can be made based on a valid path that would otherwise be set as incorrect.

Say if the user is typing apfle and the system discovers that after ap, the valid path was an application that would then satisfy apple.

Is there a better solution than this? Perhaps the one that is implemented using spell checking.

+4
source share
2 answers

In typical search engines, you will find many Analyzer materials that address the same underlying problem. A very popular Analyzer would be an n-gram analyzer.

Perhaps this helps.

0
source

All Articles