Converts a token (str) in an id using the vocab.
(self, token)
| 217 | return split_tokens |
| 218 | |
| 219 | def _convert_token_to_id(self, token): |
| 220 | """ Converts a token (str) in an id using the vocab. """ |
| 221 | return self.vocab.get(token, self.vocab.get(self.unk_token)) |
| 222 | |
| 223 | def _convert_id_to_token(self, index): |
| 224 | """Converts an index (integer) in a token (str) using the vocab.""" |
nothing calls this directly
no outgoing calls
no test coverage detected