Spaces:
Runtime error
Runtime error
Update game1.py
Browse files
game1.py
CHANGED
@@ -283,7 +283,7 @@ def interpre1(lang_selected, num_selected):
|
|
283 |
text = eval(content[int(num_selected*2)])
|
284 |
interpretation = eval(content[int(num_selected*2+1)])
|
285 |
|
286 |
-
encodings = tokenizer(text['text'],
|
287 |
print(encodings['offset_mapping'])
|
288 |
is_subword = np.array(encodings['offset_mapping'])[:,0] != 0
|
289 |
print(is_subword)
|
|
|
283 |
text = eval(content[int(num_selected*2)])
|
284 |
interpretation = eval(content[int(num_selected*2+1)])
|
285 |
|
286 |
+
encodings = tokenizer(text['text'], return_offsets_mapping=True)
|
287 |
print(encodings['offset_mapping'])
|
288 |
is_subword = np.array(encodings['offset_mapping'])[:,0] != 0
|
289 |
print(is_subword)
|