(a: Sequence[int], b: Sequence[int])
| 2304 | |
| 2305 | @staticmethod |
| 2306 | def longest_token_prefix(a: Sequence[int], b: Sequence[int]): |
| 2307 | longest_prefix = 0 |
| 2308 | for _a, _b in zip(a, b): |
| 2309 | if _a == _b: |
| 2310 | longest_prefix += 1 |
| 2311 | else: |
| 2312 | break |
| 2313 | return longest_prefix |
| 2314 | |
| 2315 | @classmethod |
| 2316 | def from_pretrained( |
no outgoing calls
no test coverage detected