mohamedabdullah imjunaidafzal commited on
Commit
8eea974
·
1 Parent(s): f95ea9d

handle UnboundLocalError in ar_spelling_checker (#4)

Browse files

- handle UnboundLocalError in ar_spelling_checker (f41473e89944e3ae8a1ac6ee6b4e07c506075700)


Co-authored-by: Junaid Afzal <[email protected]>

Files changed (1) hide show
  1. app.py +1 -0
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: