Search
 
SCRIPT & CODE EXAMPLE
 

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))
Comment

how can I corect word spelling by use of nltk?

from textblob import TextBlob
 
data = "Natural language is a cantral part of our day to day life, and it's so antresting to work on any problem related to langages."
 
output = TextBlob(data).correct()
print(output)
Comment

PREVIOUS NEXT
Code Example
Python :: how to convert a datatype to another 
Python :: csv manipulation python 
Python :: how to hide tkinter window 
Python :: urllib.error.HTTPError: HTTP Error 404: Not Found 
Python :: python enumerate 
Python :: how to move the last column to the first column in pandas 
Python :: python get file line count 
Python :: how to see directory from os module 
Python :: how to find length of list python 
Python :: python terminal progress bar 
Python :: python find first occurrence in list 
Python :: math module sin() function in python 
Python :: python argparser flags 
Python :: python unittest coverage main function 
Python :: rename colums dataframe pandas 
Python :: list all files in python 
Python :: python string to operator 
Python :: python combinations 
Python :: python print fraction 
Python :: python list index() 
Python :: palindrome words python 
Python :: pandas sub columns 
Python :: Flatten List in Python Using NumPy flat 
Python :: dataframe python 
Python :: check if 2 strings are equal python 
Python :: python try catch print stack 
Python :: add elements to list python 
Python :: numpy create empty array 
Python :: Progress Bars in Python 
Python :: pyqt5 drop down menu 
ADD CONTENT
Topic
Content
Source link
Name
9+3 =