paddlenlp/transformers/t5/tokenizer.py
def decode(self,
               token_ids,
               skip_special_tokens=False,
               clean_up_tokenization_spaces=True):
        """
        Converts a sequence of ids in a string, using the tokenizer and vocabulary with options to remove special
        tokens and clean up tokenization spaces.

        Similar to doing ``self.convert_tokens_to_string(self.convert_ids_to_tokens(token_ids))``.

        Args:
            token_ids (Union[List[int], Tensor]):
                List of tokenized input ids. 
            skip_special_tokens (bool, optional):
                Whether or not to remove special tokens in the decoding. Defaults to `False`.
            clean_up_tokenization_spaces (bool, optional):
                Whether or not to clean up the tokenization spaces. Defaults to `True`.

        Returns:
            str: The decoded sentence.
        """
        if hasattr(token_ids, "tolist"):
            token_ids = token_ids.tolist()
        text = self.convert_tokens_to_string(
            self.convert_ids_to_tokens(
                token_ids, skip_special_tokens=skip_special_tokens))
        if clean_up_tokenization_spaces:
            text = self.clean_up_tokenization(text)
        return text

        Converts a sequence of ids in a string, using the tokenizer and vocabulary with options to remove special
        tokens and clean up tokenization spaces.

        Similar to doing ``self.convert_tokens_to_string(self.convert_ids_to_tokens(token_ids))``.

        Args:
            token_ids (Union[List[int], Tensor]):
                List of tokenized input ids. 
            skip_special_tokens (bool, optional):
                Whether or not to remove special tokens in the decoding. Defaults to `False`.
            clean_up_tokenization_spaces (bool, optional):
                Whether or not to clean up the tokenization spaces. Defaults to `True`.

        Returns:
            str: The decoded sentence.
        
Converts a sequence of ids in a string, using the tokenizer and vocabulary with options to remove special
tokens and clean up tokenization spaces.


Converts a sequence of ids in a string using the tokenizer and vocabulary with options to remove special tokens and clean up tokenization spaces .
def decode(self,
               token_ids,
               skip_special_tokens=False,
               clean_up_tokenization_spaces=True):
        if hasattr(token_ids, "tolist"):
            token_ids = token_ids.tolist()
        text = self.convert_tokens_to_string(
            self.convert_ids_to_tokens(
                token_ids, skip_special_tokens=skip_special_tokens))
        if clean_up_tokenization_spaces:
            text = self.clean_up_tokenization(text)
        return text
def decode ( self , token_ids , skip_special_tokens = False , clean_up_tokenization_spaces = True ) : if hasattr ( token_ids , "tolist" ) : token_ids = token_ids . tolist ( ) text = self . convert_tokens_to_string ( self . convert_ids_to_tokens ( token_ids , skip_special_tokens = skip_special_tokens ) ) if clean_up_tokenization_spaces : text = self . clean_up_tokenization ( text ) return text
Converts a sequence of ids in a string, using the tokenizer and vocabulary with options to remove special
tokens and clean up tokenization spaces.
Converts a sequence of ids in a string using the tokenizer and vocabulary with options to remove special tokens and clean up tokenization spaces .
"""
        Converts a sequence of ids in a string, using the tokenizer and vocabulary with options to remove special
        tokens and clean up tokenization spaces.

        Similar to doing ``self.convert_tokens_to_string(self.convert_ids_to_tokens(token_ids))``.

        Args:
            token_ids (Union[List[int], Tensor]):
                List of tokenized input ids. 
            skip_special_tokens (bool, optional):
                Whether or not to remove special tokens in the decoding. Defaults to `False`.
            clean_up_tokenization_spaces (bool, optional):
                Whether or not to clean up the tokenization spaces. Defaults to `True`.

        Returns:
            str: The decoded sentence.
        """
The decoded sentence.
The decoded sentence .
str
self
token_ids
List of tokenized input ids.
List of tokenized input ids .
skip_special_tokens
Whether or not to remove special tokens in the decoding. Defaults to `False`.
Whether or not to remove special tokens in the decoding . Defaults to ` False ` .
`False`
clean_up_tokenization_spaces
Whether or not to clean up the tokenization spaces. Defaults to `True`.
Whether or not to clean up the tokenization spaces . Defaults to ` True ` .
`True`