(self, tokens)
| 143 | return bpe_tokens |
| 144 | |
| 145 | def decode(self, tokens): |
| 146 | text = ''.join([self.decoder[token] for token in tokens]) |
| 147 | text = bytearray([self.byte_decoder[c] for c in text]).decode('utf-8', errors="replace").replace('</w>', ' ') |
| 148 | return text |
| 149 | |
| 150 | |
| 151 | _tokenizer = SimpleTokenizer() |
no outgoing calls
no test coverage detected