Auto correct algorithm

Viewed 7210

I want to implement the following in C++:

1) Check whether the given word exists in a dictionary. The dictionary file is a huge file; consider 100MB or 3-4 Million words.

2) Suggest corrections for the incorrect word.

3) Autocomplete feature.

My Approach

1) I am planning to build a tree so searching will efficient.

2) I am not getting how to implement auto correction feature.

3) I can implement auto complete feature using trees

My tree Image

What's the best data structure and algorithm to implement all the above features?

3 Answers
Related