Spaces:
Sleeping
Sleeping
Update game1.py
Browse files
game1.py
CHANGED
|
@@ -301,7 +301,7 @@ def interpre1(lang_selected, num_selected):
|
|
| 301 |
while index_tmp < len(interpretation) - 1:
|
| 302 |
if not is_subword[index_tmp+1]:
|
| 303 |
interpretation_combined.append(interpretation[i])
|
| 304 |
-
|
| 305 |
else:
|
| 306 |
text_combined = interpretation[index_tmp][0]
|
| 307 |
score_combinded = interpretation[index_tmp][1]
|
|
@@ -311,7 +311,7 @@ def interpre1(lang_selected, num_selected):
|
|
| 311 |
score_combinded += interpretation[index_tmp+length][1]
|
| 312 |
length += 1
|
| 313 |
interpretation_combined.append((text_combined, score_combinded/length))
|
| 314 |
-
|
| 315 |
|
| 316 |
print(interpretation_combined)
|
| 317 |
res = {"original": text['text'], "interpretation": interpretation_combined}
|
|
|
|
| 301 |
while index_tmp < len(interpretation) - 1:
|
| 302 |
if not is_subword[index_tmp+1]:
|
| 303 |
interpretation_combined.append(interpretation[i])
|
| 304 |
+
index_tmp += 1
|
| 305 |
else:
|
| 306 |
text_combined = interpretation[index_tmp][0]
|
| 307 |
score_combinded = interpretation[index_tmp][1]
|
|
|
|
| 311 |
score_combinded += interpretation[index_tmp+length][1]
|
| 312 |
length += 1
|
| 313 |
interpretation_combined.append((text_combined, score_combinded/length))
|
| 314 |
+
index_tmp += length
|
| 315 |
|
| 316 |
print(interpretation_combined)
|
| 317 |
res = {"original": text['text'], "interpretation": interpretation_combined}
|