    def tokenize(self, text):
        """
        Converts a string to a list of tokens.

        Args:
            text (str): The text to be tokenized.

        Returns:
            List(str): A list of string representing converted tokens.

        Examples:
            .. code-block::

                from paddlenlp.transformers import BertTokenizer

                berttokenizer = BertTokenizer.from_pretrained('bert-base-uncased')
                tokens = berttokenizer.tokenize('He was a puppeteer')

                '''
                ['he', 'was', 'a', 'puppet', '##eer']
                '''

        """

        return self._tokenize(text)
Converts a string to a list of tokens.

Args:
text (str): The text to be tokenized.

Returns:
List(str): A list of string representing converted tokens.

Examples:
.. code-block::

from paddlenlp.transformers import BertTokenizer

berttokenizer = BertTokenizer.from_pretrained('bert-base-uncased')
tokens = berttokenizer.tokenize('He was a puppeteer')
ptstructure/vqa/pytorchnlp/transformers/bert/tokenizer.py