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

Method encodings

bert/tokenization_utils_base.py:213–219  ·  view source on GitHub ↗

Return the list all encoding from the tokenization process Returns: List[EncodingFast] or None if input was tokenized through Python (i.e. not fast) tokenizer

(self)

Source from the content-addressed store, hash-verified

211
212 @property
213 def encodings(self) -> Optional[List[EncodingFast]]:
214 """
215 Return the list all encoding from the tokenization process
216
217 Returns: List[EncodingFast] or None if input was tokenized through Python (i.e. not fast) tokenizer
218 """
219 return self._encodings
220
221 def tokens(self, batch_index: int = 0) -> List[str]:
222 if not self._encodings:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected