- The dictionary can be used to spellcheck words and to suggest words that begin with a particular prefix
- Associated presentation
- each word is on a separate line
- no empty lines
- character set: uppercase and lowercase English alphabet, single apostrophe
- Multiple words in a line
- Has empty lines
- character set: uppercase and lowercase English alphabet, single apostrophe, some punctuation marks
- To spellcheck only:
./run
- To spellcheck and find words with a certain prefix:
./run $PREFIX
(eg:./run super
) - Misspelled words are in
misspelled_words.txt
- Words that start with the given prefix are in
words_with_prefix.txt
- Total number of misspelled words and words that start with a given prefix are printed to the terminal
- Time taken is benchmarked with ruby's
benchmark
gem
SpellChecker.new('large.txt').spellcheck_lines('sonnets.txt')
- If needed, swap out
large.txt
for another dictionary and/orsonnets.txt
for another text file
- If needed, swap out