Spaces:
Sleeping
Sleeping
Update src/main.py
Browse files- src/main.py +2 -2
src/main.py
CHANGED
|
@@ -24,10 +24,10 @@ def result():
|
|
| 24 |
eng_to_asl_translator = NlpSpacyBaseTranslator(sentence=sentence)
|
| 25 |
generated_gloss = eng_to_asl_translator.translate_to_gloss()
|
| 26 |
gloss_list_lower = [gloss.lower() for gloss in generated_gloss.split() if gloss.isalnum() ]
|
| 27 |
-
gloss_list = gloss_list_lower
|
| 28 |
#gloss_list = sentence.split()
|
| 29 |
#print('gloss before synonym:', gloss_list_lower)
|
| 30 |
-
|
| 31 |
#print('synonym list:', gloss_list)
|
| 32 |
gloss_sentence = " ".join(gloss_list)
|
| 33 |
return render_template('translate.html', sentence=sentence, gloss_list=gloss_list, gloss_sentence=gloss_sentence)
|
|
|
|
| 24 |
eng_to_asl_translator = NlpSpacyBaseTranslator(sentence=sentence)
|
| 25 |
generated_gloss = eng_to_asl_translator.translate_to_gloss()
|
| 26 |
gloss_list_lower = [gloss.lower() for gloss in generated_gloss.split() if gloss.isalnum() ]
|
| 27 |
+
#gloss_list = gloss_list_lower
|
| 28 |
#gloss_list = sentence.split()
|
| 29 |
#print('gloss before synonym:', gloss_list_lower)
|
| 30 |
+
gloss_list = [sp.find_synonyms(gloss, nlp, dict_docs_spacy, dict_2000_tokens) for gloss in gloss_list_lower]
|
| 31 |
#print('synonym list:', gloss_list)
|
| 32 |
gloss_sentence = " ".join(gloss_list)
|
| 33 |
return render_template('translate.html', sentence=sentence, gloss_list=gloss_list, gloss_sentence=gloss_sentence)
|