MCPcopy Create free account
hub / github.com/SooLab/CGFormer / TokenSpan

Class TokenSpan

bert/tokenization_utils_base.py:117–126  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

115
116
117class 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
129class BatchEncoding(UserDict):

Callers 1

word_to_tokensMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected