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

Method __len__

bert/tokenization_utils.py:181–183  ·  view source on GitHub ↗

Size of the full vocabulary with the added tokens

(self)

Source from the content-addressed store, hash-verified

179 return self.added_tokens_encoder
180
181 def __len__(self):
182 """ Size of the full vocabulary with the added tokens """
183 return self.vocab_size + len(self.added_tokens_encoder)
184
185 def _add_tokens(self, new_tokens: Union[List[str], List[AddedToken]], special_tokens=False) -> int:
186 """

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected