Converts a token (str) in an id using the vocab.
(self, token)
| 259 | return bpe_tokens |
| 260 | |
| 261 | def _convert_token_to_id(self, token): |
| 262 | """Converts a token (str) in an id using the vocab.""" |
| 263 | return self.encoder.get(token, self.encoder.get(self.unk_token)) |
| 264 | |
| 265 | def _convert_id_to_token(self, index): |
| 266 | """Converts an index (integer) in a token (str) using the vocab.""" |
nothing calls this directly
no outgoing calls
no test coverage detected