gingerit python - Grammer correction using python

gingerit python – Grammer correction using python

gingerit python - Grammer correction using python

Grammer is needed everywhere From writing a letter, email, essay or article. Good Grammer with a correct word spoken help you to communicate clearly and help you to put a good impression on others. So as a programmer we always want to do things with code. So in this post i will give you a brief introduction with example gingerit python module which help you correct spelling with python.

gingerit python module?

so what is gingerit python module? gingerit is a python package that helps you in the grammatical correction of a word according to the context of a sentence. gingerit uses gingersoftware API. gingerapi helps you to check the grammatical mistake in terms, text, and documents and corrects them.

By using gingerit package you can fix grammatical mistakes and misspelled words and function. so lets move to the next part where we will install ginger python on our computer with the help of python pip.

Installation of gingerit python module?

If your downloading gingerit from pip its has some bug and the gingerit package hasn’t been updated yet so I will recommend you to download gingerit file which I have providing and I have fix the issues too Click Here To download gingerit.py file

pip install requests
pip install cloudscraper

Also Read: Build Your own Notepad using python

After You download the gingerit.py From above link extract the zip file and there will be the gingerit.py

How to use gingerit python?

Here is an example code where we will gonna use gingerit package to build a simple grammar checker program. where I will pass a sentence with misspelled words and incorrect grammar. Make sure you create a main.py file In same path or folder where gingerit.py file which i have provided you.

from gingerit import GingerIt
text = input("Enter a sentence >>: ")
corrected_text = GingerIt().parse(text)
print(corrected_text['result'])

OUTPUT

input sentance : my nme are khan. how are your doy?
output correct sentance : My name is Khan. How is your day?

So as you can see I have shared an example code above where I have done grammatical and spelling mistakes.

See also  Egg-Catcher using Python

Conclusion

gengerit package has been not updated for a while by the person who has created it due to which if you install gengerit from pip it will show error and HTML code due to Cloudflare protection on API. so i have fixed that issue and shared that with the new genreit.py file so download it from above link. Make sure you put the gengerit.py file in the same path or folder where you test your code.

Leave a Comment

Your email address will not be published. Required fields are marked *

Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

we provide projects, courses, and other stuff for free. in order for running we use Google ads to make revenue. please disable adblocker to support us.