Skip to content

krishnaturlapati/spellcheck

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spell Check Python

Objectives:

  • SpellCheck should find misspelled words
  • SpellCheck should suggest possible/closet correct spelling
  • For input in text file SpellCheck should print the line number the word is misspelled

English dictionary source: https://raw.githubusercontent.com/matthewreagan/WebstersEnglishDictionary/master/dictionary.json

Pickle words in dict

>>> import pickle 
>>> import json
>>> data = open('dictionary.json', 'r').read()
>>> eng_words=json.loads(data).keys()
>>> eng_words_list=list(eng_words)
>>> with open('dictwords.pkl', 'wb') as the_file:
...     pickle.dump(eng_words_list, the_file)

Usage

python spellcheck.py 'this is corect '
misspelled word found: corect , possible correct word: correct

About

simple spell checker in python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages