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

Method words

bert/tokenization_utils_base.py:226–229  ·  view source on GitHub ↗
(self, batch_index: int = 0)

Source from the content-addressed store, hash-verified

224 return self._encodings[batch_index].tokens
225
226 def words(self, batch_index: int = 0) -> List[Optional[int]]:
227 if not self._encodings:
228 raise ValueError("words() is not available when using Python based tokenizers")
229 return self._encodings[batch_index].words
230
231 def token_to_word(self, batch_or_token_index: int, token_index: Optional[int] = None) -> int:
232 """

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected