Spaces:
Sleeping
Sleeping
togokah
commited on
Commit
·
92b04eb
1
Parent(s):
408d9c4
Updates: fix answer letter; delete prints
Browse files
utilities/utils.py
CHANGED
@@ -14,6 +14,7 @@ def points_to_mark(good, total):
|
|
14 |
|
15 |
|
16 |
def answer_letter(answer, variants):
|
|
|
17 |
for var in variants:
|
18 |
letter, var = var.split(') ')
|
19 |
if var == answer:
|
|
|
14 |
|
15 |
|
16 |
def answer_letter(answer, variants):
|
17 |
+
answer = answer.lower()
|
18 |
for var in variants:
|
19 |
letter, var = var.split(') ')
|
20 |
if var == answer:
|
utilities_language_w2v/esp_main_workflow_w2v.py
CHANGED
@@ -94,7 +94,6 @@ def main_workflow(
|
|
94 |
current_text_sentences = [sent.text.strip() for sent in esp_constants.nlp(current_text).sents]
|
95 |
logs.success('Получили Ваш текст!')
|
96 |
progress.progress(10)
|
97 |
-
print(current_text_sentences)
|
98 |
|
99 |
# Compute frequency dict
|
100 |
FREQ_DICT = compute_frequency_dict(current_text)
|
@@ -135,7 +134,6 @@ def main_workflow(
|
|
135 |
distractor_minimum = None
|
136 |
logs.error('Вы не выбрали языковой уровень!')
|
137 |
st.stop()
|
138 |
-
print('LEVEL SUCCESS')
|
139 |
# Start generation process
|
140 |
workflow = [SENTENCE(original=sent.strip(), n_sentence=num, max_num_distractors=num_distractors)
|
141 |
for num, sent in enumerate(current_text_sentences)]
|
@@ -185,7 +183,6 @@ def main_workflow(
|
|
185 |
logs.success('Подобрали неправильные варианты!')
|
186 |
for sentence in workflow:
|
187 |
sentence.inflect_distractors()
|
188 |
-
print(sentence.target_words)
|
189 |
progress_s.progress(80)
|
190 |
logs.success('Просклоняли и проспрягали неправильные варианты!')
|
191 |
|
|
|
94 |
current_text_sentences = [sent.text.strip() for sent in esp_constants.nlp(current_text).sents]
|
95 |
logs.success('Получили Ваш текст!')
|
96 |
progress.progress(10)
|
|
|
97 |
|
98 |
# Compute frequency dict
|
99 |
FREQ_DICT = compute_frequency_dict(current_text)
|
|
|
134 |
distractor_minimum = None
|
135 |
logs.error('Вы не выбрали языковой уровень!')
|
136 |
st.stop()
|
|
|
137 |
# Start generation process
|
138 |
workflow = [SENTENCE(original=sent.strip(), n_sentence=num, max_num_distractors=num_distractors)
|
139 |
for num, sent in enumerate(current_text_sentences)]
|
|
|
183 |
logs.success('Подобрали неправильные варианты!')
|
184 |
for sentence in workflow:
|
185 |
sentence.inflect_distractors()
|
|
|
186 |
progress_s.progress(80)
|
187 |
logs.success('Просклоняли и проспрягали неправильные варианты!')
|
188 |
|