Spell Checker Data Structure
Spell checker program using trie data structure.
Spell checker data structure. Trienode char letter boolean fullword. Which data structure can be used for efficiently building a word dictionary and spell checker. Hashing is one simple option for this.
The controller will read words from an input text file one by one and pass them to the spell checker for processing. Class trienode char letter. I m looking for a data structure who would give me the best compromise between space complexity and runtime complexity.
I really want an efficient way to index my dictionary data to be used using a damerau levenshtein distance to determine which words are closest to the misspelled word. I think hashing is the possible data structure for spell checker because in hashing we use hash tables hash functions and hash values if we need check the spelling of a word then that word is sent to hash function for checking if it is right then it is stored in the hash table at the produced hash value in this way hashing is very useful in. For example if you are dealing only with english language words then the soundex algorithm can be used to pre process your word corpus.
We can put all words in a hash table. The spell checker will incorporate a database of known words built from a simple word list and organized for efficient searching. Dictionary source is from dictionary txt which is to be in the same directory of the program or else change the file name and location possible java import java io.
The answer depends upon the functionalists required in spell checker and availability of memory. If the spell checker finds an exact match it will simply indicate the word is spelled correctly.