Skip to content

Commit 17682e2

Browse files
Merge pull request avinashkranjan#2916 from smty2018/nlp2
Spell Correction Script using NLP
2 parents 6842a19 + bedb704 commit 17682e2

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

Spell Correction (NLP)/ReadMe.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Spell Correction Script using TextBlob
2+
3+
This Python script demonstrates a basic spell correction utility using the `TextBlob` library. It allows you to input a sentence, and the script will correct any spelling mistakes in the sentence.
4+
5+
Requirements:
6+
7+
pip install textblob
8+

Spell Correction (NLP)/script.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
from textblob import TextBlob
2+
3+
def main():
4+
user_input = input("Enter a sentence: ")
5+
6+
corrected_text = TextBlob(user_input).correct()
7+
8+
print(f"Original: {user_input}")
9+
print(f"Corrected: {corrected_text}")
10+
11+
if __name__ == "__main__":
12+
main()

0 commit comments

Comments
 (0)