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

Method tokens

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

Source from the content-addressed store, hash-verified

219 return self._encodings
220
221 def tokens(self, batch_index: int = 0) -> List[str]:
222 if not self._encodings:
223 raise ValueError("tokens() is not available when using Python based tokenizers")
224 return self._encodings[batch_index].tokens
225
226 def words(self, batch_index: int = 0) -> List[Optional[int]]:
227 if not self._encodings:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected