(self, token_ids_0, token_ids_1=None)
| 236 | return word |
| 237 | |
| 238 | def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=None): |
| 239 | if self.add_bos_token: |
| 240 | bos_token_ids = [self.bos_token_id] |
| 241 | else: |
| 242 | bos_token_ids = [] |
| 243 | |
| 244 | output = bos_token_ids + token_ids_0 |
| 245 | |
| 246 | if token_ids_1 is None: |
| 247 | return output |
| 248 | |
| 249 | return output + bos_token_ids + token_ids_1 |
| 250 | |
| 251 | def _tokenize(self, text): |
| 252 | """Tokenize a string.""" |
nothing calls this directly
no outgoing calls
no test coverage detected