@staticmethod
def add_prefix(label_words, prefix):
    "Add prefix to label words. For example, if a label words is in the middle of a template,\n        the prefix should be ``' '``.\n\n        Args:\n            label_words (:obj:`Union[Sequence[str], Mapping[str, str]]`, optional): The label words that are projected by the labels.\n            prefix (:obj:`str`, optional): The prefix string of the verbalizer.\n\n        Returns:\n            :obj:`Sequence[str]`: New label words with prefix.\n        "
    new_label_words = []
    if isinstance(label_words[0], list):
        assert (max([len(w) for w in label_words]) == 1), 'Providing multiple label words, you should use other verbalizers instead.'
        label_words = [w[0] for w in label_words]
    for word in label_words:
        if word.startswith('<!>'):
            new_label_words.append(word.split('<!>')[1])
        else:
            new_label_words.append((prefix + word))
    return new_label_words
Add prefix to label words. For example, if a label words is in the middle of a template,
the prefix should be ``' '``.

Args:
    label_words (:obj:`Union[Sequence[str], Mapping[str, str]]`, optional): The label words that are projected by the labels.
    prefix (:obj:`str`, optional): The prefix string of the verbalizer.

Returns:
    :obj:`Sequence[str]`: New label words with prefix.
@staticmethod
def add_prefix(label_words, prefix):
    "Add prefix to label words. For example, if a label words is in the middle of a template,\n        the prefix should be ``' '``.\n\n        Args:\n            label_words (:obj:`Union[Sequence[str], Mapping[str, str]]`, optional): The label words that are projected by the labels.\n            prefix (:obj:`str`, optional): The prefix string of the verbalizer.\n\n        Returns:\n            :obj:`Sequence[str]`: New label words with prefix.\n        "
    new_label_words = []
    if isinstance(label_words[0], list):
        assert (max([len(w) for w in label_words]) == 1), 'Providing multiple label words, you should use other verbalizers instead.'
        label_words = [w[0] for w in label_words]
    for word in label_words:
        if word.startswith('<!>'):
            new_label_words.append(word.split('<!>')[1])
        else:
            new_label_words.append((prefix + word))
    return new_label_words