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

Method all_special_ids

bert/tokenization_utils_base.py:926–932  ·  view source on GitHub ↗

List the vocabulary indices of the special tokens (' ', ' '...) mapped to class attributes (cls_token, unk_token...).

(self)

Source from the content-addressed store, hash-verified

924
925 @property
926 def all_special_ids(self):
927 """ List the vocabulary indices of the special tokens ('<unk>', '<cls>'...) mapped to
928 class attributes (cls_token, unk_token...).
929 """
930 all_toks = self.all_special_tokens
931 all_ids = self.convert_tokens_to_ids(all_toks)
932 return all_ids
933
934
935ENCODE_KWARGS_DOCSTRING = r"""

Callers

nothing calls this directly

Calls 1

convert_tokens_to_idsMethod · 0.80

Tested by

no test coverage detected