paddlenlp/transformers/prophetnet/tokenizer.py
def convert_ids_to_tokens(self, ids, skip_special_tokens=False):
        """
        Converts a single index or a sequence of indices to a token or
        a sequence of tokens, using the vocabulary and added tokens.

        Args:
            ids (int or List[int]):
                The token id (or token ids) to be converted to token(s).
            skip_special_tokens (bool, optional):
                Whether or not to remove special tokens in the decoding.
                Defaults to `False` and we do not remove special tokens.

        Returns:
            str or List[str]: The decoded token(s).
        """
        if not isinstance(ids, (list, tuple)):
            return self._convert_id_to_token(ids)
        tokens = [self._convert_id_to_token(_id) for _id in ids]
        if skip_special_tokens:
            return [
                token for token in tokens
                if token not in self.all_special_tokens
            ]
        return tokens

        Converts a single index or a sequence of indices to a token or
        a sequence of tokens, using the vocabulary and added tokens.

        Args:
            ids (int or List[int]):
                The token id (or token ids) to be converted to token(s).
            skip_special_tokens (bool, optional):
                Whether or not to remove special tokens in the decoding.
                Defaults to `False` and we do not remove special tokens.

        Returns:
            str or List[str]: The decoded token(s).
        
Converts a single index or a sequence of indices to a token or
a sequence of tokens, using the vocabulary and added tokens.
Converts a single index or a sequence of indices to a token or a sequence of tokens using the vocabulary and added tokens .
def convert_ids_to_tokens(self, ids, skip_special_tokens=False):
        if not isinstance(ids, (list, tuple)):
            return self._convert_id_to_token(ids)
        tokens = [self._convert_id_to_token(_id) for _id in ids]
        if skip_special_tokens:
            return [
                token for token in tokens
                if token not in self.all_special_tokens
            ]
        return tokens
def convert_ids_to_tokens ( self , ids , skip_special_tokens = False ) : if not isinstance ( ids , ( list , tuple ) ) : return self . _convert_id_to_token ( ids ) tokens = [ self . _convert_id_to_token ( _id ) for _id in ids ] if skip_special_tokens : return [ token for token in tokens if token not in self . all_special_tokens ] return tokens
Converts a single index or a sequence of indices to a token or
a sequence of tokens, using the vocabulary and added tokens.
Converts a single index or a sequence of indices to a token or a sequence of tokens using the vocabulary and added tokens .
"""
        Converts a single index or a sequence of indices to a token or
        a sequence of tokens, using the vocabulary and added tokens.

        Args:
            ids (int or List[int]):
                The token id (or token ids) to be converted to token(s).
            skip_special_tokens (bool, optional):
                Whether or not to remove special tokens in the decoding.
                Defaults to `False` and we do not remove special tokens.

        Returns:
            str or List[str]: The decoded token(s).
        """
The decoded token(s).
The decoded token ( s ) .
str or List[str]
self
ids
The token id (or token ids) to be converted to token(s).
The token id ( or token ids ) to be converted to token ( s ) .
skip_special_tokens
Whether or not to remove special tokens in the decoding.
Defaults to `False` and we do not remove special tokens.
Whether or not to remove special tokens in the decoding . Defaults to ` False ` and we do not remove special tokens .