Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,20 +3,20 @@ from symspellpy import SymSpell
|
|
| 3 |
import autocorrect
|
| 4 |
from autocorrect import Speller
|
| 5 |
|
| 6 |
-
def text_checker(inp_text):
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
|
| 14 |
-
def
|
| 15 |
check = Speller(lang='en')
|
| 16 |
sentence = inp_text
|
| 17 |
return check(sentence)
|
| 18 |
|
| 19 |
-
title = "
|
| 20 |
|
| 21 |
with gr.Blocks(title=title) as demo:
|
| 22 |
gr.Markdown(f'<h1 style="text-align: center; margin-bottom: 1rem;">{title}</h1>')
|
|
|
|
| 3 |
import autocorrect
|
| 4 |
from autocorrect import Speller
|
| 5 |
|
| 6 |
+
# def text_checker(inp_text):
|
| 7 |
+
# updated_text = text_checker_pre(inp_text)
|
| 8 |
+
# symsp = SymSpell()
|
| 9 |
+
# symsp.load_dictionary('dictionay.txt',term_index=0, count_index=1, separator=' ')
|
| 10 |
+
# sentence = updated_text
|
| 11 |
+
# terms = symsp.lookup_compound(sentence,max_edit_distance=2)
|
| 12 |
+
# return terms[0].term
|
| 13 |
|
| 14 |
+
def text_checker(inp_text):
|
| 15 |
check = Speller(lang='en')
|
| 16 |
sentence = inp_text
|
| 17 |
return check(sentence)
|
| 18 |
|
| 19 |
+
title = "Misspell Correction"
|
| 20 |
|
| 21 |
with gr.Blocks(title=title) as demo:
|
| 22 |
gr.Markdown(f'<h1 style="text-align: center; margin-bottom: 1rem;">{title}</h1>')
|