Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how can I corect word spelling by use of nltk?

from spellchecker import SpellChecker

spell = SpellChecker()

# find those words that may be misspelled
misspelled = spell.unknown(['something', 'is', 'hapenning', 'here'])

for word in misspelled:
    # Get the one `most likely` answer
    print(spell.correction(word))

    # Get a list of `likely` options
    print(spell.candidates(word))
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #I #corect #word #spelling
ADD COMMENT
Topic
Name
7+6 =