Token span in an encoded string (list of tokens) Args: start: index of the first token in the span end: index of the token following the last token in the span
| 115 | |
| 116 | |
| 117 | class TokenSpan(NamedTuple): |
| 118 | """ Token span in an encoded string (list of tokens) |
| 119 | |
| 120 | Args: |
| 121 | start: index of the first token in the span |
| 122 | end: index of the token following the last token in the span |
| 123 | """ |
| 124 | |
| 125 | start: int |
| 126 | end: int |
| 127 | |
| 128 | |
| 129 | class BatchEncoding(UserDict): |