From 2e489daf9f63e91b5af228c88463e06ddedc0284 Mon Sep 17 00:00:00 2001 From: Hariom Vyas Date: 2020年9月13日 16:34:20 +0530 Subject: [PATCH 1/6] Create spell_checker.py --- projects/Spell_checker/spell_checker.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 projects/Spell_checker/spell_checker.py diff --git a/projects/Spell_checker/spell_checker.py b/projects/Spell_checker/spell_checker.py new file mode 100644 index 000000000..651ae598b --- /dev/null +++ b/projects/Spell_checker/spell_checker.py @@ -0,0 +1,9 @@ +from textblob import TextBlob # importing textblob library + +a = input("Enter the word to be checked:- ") # incorrect spelling +print("original text: "+str(a)) #printing original text + +b = TextBlob(a) #correcting the text + +# prints the corrected spelling +print("corrected text: "+str(b.correct())) From 2d08086a9589ae953db1a9488bf9084c10550488 Mon Sep 17 00:00:00 2001 From: Hariom Vyas Date: 2020年9月13日 16:50:14 +0530 Subject: [PATCH 2/6] Create README.md --- projects/Spell_checker/README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 projects/Spell_checker/README.md diff --git a/projects/Spell_checker/README.md b/projects/Spell_checker/README.md new file mode 100644 index 000000000..c906ebf6a --- /dev/null +++ b/projects/Spell_checker/README.md @@ -0,0 +1,20 @@ +# Script Title + +Here, you can input any word and check if it is having a correct spelling or not. + +### Prerequisites + +First thing which you need to install is #####textblob library +####pip install textblob +You need to run this command in your terminal or your ide terminal. +If you are using Jupyter Notebook you need to use the below command +####import sys +####!{sys.executable} -m pip install textblob + +### How to run the script + +You can first install the textblob library and then you can run the python script. + +## *Author Name* + +[Hariom1509](https://github.com/Hariom1509) From aba2aa83b9f071e17e6d5d5b657d592ee7ea6dad Mon Sep 17 00:00:00 2001 From: Hariom Vyas Date: 2020年9月13日 16:52:12 +0530 Subject: [PATCH 3/6] Update README.md --- projects/Spell_checker/README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/projects/Spell_checker/README.md b/projects/Spell_checker/README.md index c906ebf6a..c27f3be1b 100644 --- a/projects/Spell_checker/README.md +++ b/projects/Spell_checker/README.md @@ -4,11 +4,16 @@ Here, you can input any word and check if it is having a correct spelling or not ### Prerequisites -First thing which you need to install is #####textblob library +First thing which you need to install is textblob library + ####pip install textblob + You need to run this command in your terminal or your ide terminal. + If you are using Jupyter Notebook you need to use the below command + ####import sys + ####!{sys.executable} -m pip install textblob ### How to run the script From e3d9e3023526063c75c565a04c922f237e6b5fdc Mon Sep 17 00:00:00 2001 From: Hariom Vyas Date: 2020年9月13日 16:55:46 +0530 Subject: [PATCH 4/6] Update README.md --- projects/Spell_checker/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/projects/Spell_checker/README.md b/projects/Spell_checker/README.md index c27f3be1b..1c53423d5 100644 --- a/projects/Spell_checker/README.md +++ b/projects/Spell_checker/README.md @@ -6,15 +6,15 @@ Here, you can input any word and check if it is having a correct spelling or not First thing which you need to install is textblob library -####pip install textblob +pip install textblob You need to run this command in your terminal or your ide terminal. If you are using Jupyter Notebook you need to use the below command -####import sys +import sys -####!{sys.executable} -m pip install textblob +!{sys.executable} -m pip install textblob ### How to run the script From 330710a182612f5a18eeea2510a62881fd595a08 Mon Sep 17 00:00:00 2001 From: Hariom Vyas Date: 2020年9月13日 16:58:23 +0530 Subject: [PATCH 5/6] Update README.md --- projects/Spell_checker/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/projects/Spell_checker/README.md b/projects/Spell_checker/README.md index 1c53423d5..50b49590f 100644 --- a/projects/Spell_checker/README.md +++ b/projects/Spell_checker/README.md @@ -6,15 +6,15 @@ Here, you can input any word and check if it is having a correct spelling or not First thing which you need to install is textblob library -pip install textblob +>pip install textblob You need to run this command in your terminal or your ide terminal. If you are using Jupyter Notebook you need to use the below command -import sys +>import sys -!{sys.executable} -m pip install textblob +>!{sys.executable} -m pip install textblob ### How to run the script From 2900943e4e45d5425b1635bd17ceb4a1aa6d7099 Mon Sep 17 00:00:00 2001 From: Hariom Vyas Date: 2020年9月13日 19:51:14 +0530 Subject: [PATCH 6/6] Update spell_checker.py Added the changes as requested --- projects/Spell_checker/spell_checker.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/projects/Spell_checker/spell_checker.py b/projects/Spell_checker/spell_checker.py index 651ae598b..a9dd8d964 100644 --- a/projects/Spell_checker/spell_checker.py +++ b/projects/Spell_checker/spell_checker.py @@ -1,9 +1,12 @@ from textblob import TextBlob # importing textblob library -a = input("Enter the word to be checked:- ") # incorrect spelling -print("original text: "+str(a)) #printing original text +t = 1 +while t: + a = input("Enter the word to be checked:- ") # incorrect spelling + print("original text: "+str(a)) #printing original text -b = TextBlob(a) #correcting the text + b = TextBlob(a) #correcting the text -# prints the corrected spelling -print("corrected text: "+str(b.correct())) + # prints the corrected spelling + print("corrected text: "+str(b.correct())) + t = int(input("Try Again? 1 : 0 "))

AltStyle によって変換されたページ (->オリジナル) /