This is project I worked on at college. It is an API that offers end-points to perform spell check on sentences and gives autocomplete suggestions for words.
- /spellcheck
- /autocomplete
- POST /spellcheck with a sentence returns positions of all words that are mis-spelled
- POST /autocomplete with a string returns auto-complete suggestions for that string
The API stores all the words from words.txt
file in a Trie Datastructure
. Tries are a great choice when it comes to storing large number of similar items with minimal overhead. Tries are used in the API for checking if a word is valid through trie traversals.