Spaces:
Runtime error
Runtime error
handle UnboundLocalError in ar_spelling_checker
#4
by
imjunaidafzal
- opened
app.py
CHANGED
@@ -123,6 +123,7 @@ def ar_spelling_checker(text):
|
|
123 |
result = {}
|
124 |
|
125 |
for word in word_l:
|
|
|
126 |
if not word in vocab:
|
127 |
tmp_corrections = get_corrections(word, vocab)
|
128 |
if len(tmp_corrections) == 0:
|
|
|
123 |
result = {}
|
124 |
|
125 |
for word in word_l:
|
126 |
+
tmp_corrections = []
|
127 |
if not word in vocab:
|
128 |
tmp_corrections = get_corrections(word, vocab)
|
129 |
if len(tmp_corrections) == 0:
|