(cls, text, tokenizer, tokenize)
| 167 | |
| 168 | @classmethod |
| 169 | def process_sample(cls, text, tokenizer, tokenize): |
| 170 | if isinstance(text, str) and tokenize: |
| 171 | if not cls.reserve_punct: |
| 172 | text = punctuation_standardization(text) |
| 173 | text = tokenizer.EncodeAsIds(text).tokenization if text else [] |
| 174 | return text |
| 175 | |
| 176 | @staticmethod |
| 177 | def trim_field(content, max_length): |
no test coverage detected