A dictionary mapping special token class attribute (cls_token, unk_token...) to their values (' ', ' '...) Convert tokens of AddedToken type in string. All returned tokens are strings
(self)
| 871 | |
| 872 | @property |
| 873 | def special_tokens_map(self): |
| 874 | """ A dictionary mapping special token class attribute (cls_token, unk_token...) to their |
| 875 | values ('<unk>', '<cls>'...) |
| 876 | Convert tokens of AddedToken type in string. |
| 877 | All returned tokens are strings |
| 878 | """ |
| 879 | set_attr = {} |
| 880 | for attr in self.SPECIAL_TOKENS_ATTRIBUTES: |
| 881 | attr_value = getattr(self, "_" + attr) |
| 882 | if attr_value: |
| 883 | set_attr[attr] = str(attr_value) |
| 884 | return set_attr |
| 885 | |
| 886 | @property |
| 887 | def special_tokens_map_extended(self): |
nothing calls this directly
no outgoing calls
no test coverage detected