gyroing commited on
Commit
0254671
1 Parent(s): 42ee07f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -26,7 +26,7 @@ def fix_words(words: typing.List[str]) -> typing.List[str]:
26
  fixed_words = []
27
 
28
  for word, pos in tagger.tag(words):
29
- if pos[-1] == "e":
30
  if word[-1] != "ِ":
31
  if (word[-1] == "ه") and (word[-2] != "ا"):
32
  word += "‌ی"
@@ -34,8 +34,8 @@ def fix_words(words: typing.List[str]) -> typing.List[str]:
34
 
35
  fixed_words.append(word)
36
 
37
- #return fixed_words
38
- return tagger.tag(words)
39
 
40
  iface = gr.Interface(fn=preprocess_text, inputs="text", outputs="text")
41
  iface.launch()
 
26
  fixed_words = []
27
 
28
  for word, pos in tagger.tag(words):
29
+ if pos[-1] == "ez":
30
  if word[-1] != "ِ":
31
  if (word[-1] == "ه") and (word[-2] != "ا"):
32
  word += "‌ی"
 
34
 
35
  fixed_words.append(word)
36
 
37
+ return fixed_words
38
+ #return tagger.tag(words)
39
 
40
  iface = gr.Interface(fn=preprocess_text, inputs="text", outputs="text")
41
  iface.launch()