paddlenlp/transformers/ctrl/tokenizer.py
def convert_tokens_to_string(self, tokens):
        """
        Converts a sequence of tokens (list of string) to a single string.

        Args:
            tokens (List[str]): A sequence of tokens.

        Returns:
            str: Converted string.

        Example:
            .. code-block::

                from paddlenlp.transformers import CTRLTokenizer

                tokenizer = CTRLTokenizer.from_pretrained('crtl')
                print(tokenizer.convert_tokens_to_string(['Welcome', 'to', 'use', 'Padd@@', 'le@@', 'Padd@@', 'le', 'and', 'Padd@@', 'le@@', 'N@@', 'LP']))
                # 'Welcome to use PaddlePaddle and PaddleNLP'

        """
        out_string = " ".join(tokens).replace("@@ ", "").strip()
        return out_string

        Converts a sequence of tokens (list of string) to a single string.

        Args:
            tokens (List[str]): A sequence of tokens.

        Returns:
            str: Converted string.

        Example:
            .. code-block::

                from paddlenlp.transformers import CTRLTokenizer

                tokenizer = CTRLTokenizer.from_pretrained('crtl')
                print(tokenizer.convert_tokens_to_string(['Welcome', 'to', 'use', 'Padd@@', 'le@@', 'Padd@@', 'le', 'and', 'Padd@@', 'le@@', 'N@@', 'LP']))
                # 'Welcome to use PaddlePaddle and PaddleNLP'

        
Converts a sequence of tokens (list of string) to a single string.
Converts a sequence of tokens ( list of string ) to a single string .
def convert_tokens_to_string(self, tokens):
        out_string = " ".join(tokens).replace("@@ ", "").strip()
        return out_string
def convert_tokens_to_string ( self , tokens ) : out_string = " " . join ( tokens ) . replace ( "@@ " , "" ) . strip ( ) return out_string
Converts a sequence of tokens (list of string) to a single string.
Converts a sequence of tokens ( list of string ) to a single string .
"""
        Converts a sequence of tokens (list of string) to a single string.

        Args:
            tokens (List[str]): A sequence of tokens.

        Returns:
            str: Converted string.

        Example:
            .. code-block::

                from paddlenlp.transformers import CTRLTokenizer

                tokenizer = CTRLTokenizer.from_pretrained('crtl')
                print(tokenizer.convert_tokens_to_string(['Welcome', 'to', 'use', 'Padd@@', 'le@@', 'Padd@@', 'le', 'and', 'Padd@@', 'le@@', 'N@@', 'LP']))
                # 'Welcome to use PaddlePaddle and PaddleNLP'

        """
None
str
self
tokens
A sequence of tokens.
A sequence of tokens .
examples
code-block:.

from paddlenlp.transformers import CTRLTokenizer

tokenizer = CTRLTokenizer.from_pretrained('crtl')
print(tokenizer.convert_tokens_to_string(['Welcome', 'to', 'use', 'Padd@@', 'le@@', 'Padd@@', 'le', 'and', 'Padd@@', 'le@@', 'N@@', 'LP']))
'Welcome to use PaddlePaddle and PaddleNLP'
code - block : . from paddlenlp . transformers import CTRLTokenizer tokenizer = CTRLTokenizer . from_pretrained ( ' crtl ' ) print ( tokenizer . convert_tokens_to_string ( [ ' Welcome ' ' to ' ' use ' ' Padd@@ ' ' le@@ ' ' Padd@@ ' ' le ' ' and ' ' Padd@@ ' ' le@@ ' ' N@@ ' ' LP ' ] )) ' Welcome to use PaddlePaddle and PaddleNLP '