JRQi commited on
Commit
6a116be
1 Parent(s): 5bd0c34

Update game1.py

Browse files
Files changed (1) hide show
  1. game1.py +1 -1
game1.py CHANGED
@@ -284,7 +284,7 @@ def interpre1(lang_selected, num_selected):
284
  text = eval(content[int(num_selected*2)])
285
  interpretation = eval(content[int(num_selected*2+1)])
286
 
287
- encodings = tokenizer(text['text'], return_offsets_mapping=True)
288
  print(encodings)
289
  print(encodings['offset_mapping'])
290
  is_subword = np.array(encodings['offset_mapping'])[:,0] != 0
 
284
  text = eval(content[int(num_selected*2)])
285
  interpretation = eval(content[int(num_selected*2+1)])
286
 
287
+ encodings = tokenizer(text['text'].split(' '), is_pretokenized=True, return_offsets_mapping=True)
288
  print(encodings)
289
  print(encodings['offset_mapping'])
290
  is_subword = np.array(encodings['offset_mapping'])[:,0] != 0