alayaran commited on
Commit
0503cea
1 Parent(s): 402944d

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +7 -2
README.md CHANGED
@@ -12,7 +12,12 @@ You can use tokenizer as following
12
  from transformers import AutoTokenizer
13
  tokenizer = AutoTokenizer.from_pretrained('alayaran/bodo-roberta-base')
14
 
15
- tokenizer('कौटि नख'राव दैनि कानेक्सन होबाय')
16
 
17
  # {'input_ids': [310, 294, 313, 267, 503, 11, 268, 263, 277, 298, 287, 265, 267, 321, 263, 265, 272, 310, 273, 378, 295, 266, 271, 263, 269], 'attention_mask': [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}
18
- ```
 
 
 
 
 
 
12
  from transformers import AutoTokenizer
13
  tokenizer = AutoTokenizer.from_pretrained('alayaran/bodo-roberta-base')
14
 
15
+ t = tokenizer('कौटि नख'राव दैनि कानेक्सन होबाय')
16
 
17
  # {'input_ids': [310, 294, 313, 267, 503, 11, 268, 263, 277, 298, 287, 265, 267, 321, 263, 265, 272, 310, 273, 378, 295, 266, 271, 263, 269], 'attention_mask': [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}
18
+ # to decode
19
+
20
+ tokenizer.decode(t['input_ids'],skip_special_tokens=True)
21
+
22
+ # "कौटि नख'राव दैनि कानेक्सन होबाय"
23
+ ```