-
Notifications
You must be signed in to change notification settings - Fork 1
/
Spelling_Checker.py
34 lines (23 loc) · 967 Bytes
/
Spelling_Checker.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
from tkinter import *
from textblob import TextBlob
root = Tk()
root.title("Spelling Checker")
root.geometry("700x400")
root.config(background="#dae6f6")
def check_spelling():
word = enter_text.get()
a = TextBlob(word)
right = str(a.correct())
cs = Label(root, text="Correct text is:", font=("poppins", 20), bg="#dae6f6", fg="#364971")
cs.place(x=100, y=250)
spell.config(text=right)
heading = Label(root, text="Spelling Checker", font=("Trebuchet MS", 30, "bold"), bg="#dae6f6", fg="#364971")
heading.pack(pady=(50, 0))
enter_text = Entry(root, justify="center", width=30, font=("poppins", 25), bg="white", border=2)
enter_text.pack(pady=10)
enter_text.focus()
button = Button(root, text="Check", font=("arial", 20, "bold"), fg="white", bg="red", command=check_spelling)
button.pack()
spell = Label(root, font=("poppins", 20), bg="#dae6f6", fg="#364971")
spell.place(x=350, y=250)
root.mainloop()