class_docstr: Customtokenizer which will tokenize the input text as words or phases and convert the words (str) to an index (int) using the vocab.
  If you would like tokens, please use `hub.BertTokenizer`.
docstr: Converts a sequence of ids (integer) to a string if only_convert_to_tokens is False or a list a sequence of tokens (str)
  when only_convert_to_tokens is True.
  Args:
      token_ids: list of tokenized input ids or dict with a key called 'text', can be obtained by using the `encode` methods.
      only_convert_to_tokens:  if set to True, will only return a list a sequence of tokens (str). `paddlehub.dataset.base_nlp_dataset` will use this optional argument.
      skip_pad_token: if set to True, will replace pad tokens.
      skip_special_tokens: if set to True, will replace special tokens.
      clean_up_tokenization_spaces: if set to True, will clean up the tokenization spaces.
docstr_tok: ["Converts","a","sequence","of","ids","(","integer",")","to","a","string","if","only_convert_to_tokens","is","False","or","a","list","a","sequence","of","tokens","(","str",")","when","only_convert_to_tokens","is","True",".","Args",":","token_ids",":","list","of","tokenized","input","ids","or","dict","with","a","key","called","'text","'",",","can","be","obtained","by","using","the","`","encode","`","methods",".","only_convert_to_tokens",":","if","set","to","True",",","will","only","return","a","list","a","sequence","of","tokens","(","str",")",".","`","paddlehub.dataset.base_nlp_dataset","`","will","use","this","optional","argument",".","skip_pad_token",":","if","set","to","True",",","will","replace","pad","tokens",".","skip_special_tokens",":","if","set","to","True",",","will","replace","special","tokens",".","clean_up_tokenization_spaces",":","if","set","to","True",",","will","clean","up","the","tokenization","spaces","."]
code: def decode(
      self,
      token_ids: List[int],
      only_convert_to_tokens: bool = True,
      skip_pad_token: bool = False,
      clean_up_tokenization_spaces: bool = True,
  ):
      """
      Converts a sequence of ids (integer) to a string if only_convert_to_tokens is False or a list a sequence of tokens (str)
      when only_convert_to_tokens is True.
      Args:
          token_ids: list of tokenized input ids or dict with a key called 'text', can be obtained by using the `encode` methods.
          only_convert_to_tokens:  if set to True, will only return a list a sequence of tokens (str). `paddlehub.dataset.base_nlp_dataset` will use this optional argument.
          skip_pad_token: if set to True, will replace pad tokens.
          skip_special_tokens: if set to True, will replace special tokens.
          clean_up_tokenization_spaces: if set to True, will clean up the tokenization spaces.
      """
      if isinstance(token_ids, dict):
          token_ids = token_ids["text"]
  
      tokens = self.convert_ids_to_tokens(
          token_ids, skip_pad_token=skip_pad_token
      )
  
      if only_convert_to_tokens:
          return tokens
  
      if tokens and self.tokenize_chinese_chars:
          text = "".join(self.convert_tokens_to_string(tokens))
      else:
          text = " ".join(self.convert_tokens_to_string(tokens))
  
      if (
          not self.tokenize_chinese_chars
          and clean_up_tokenization_spaces
      ):
          clean_text = self.clean_up_tokenization(text)
          return clean_text
      else:
          return text
  
imports: import collections
  import inspect
  import os
  from typing import Callable, List, Union
  import paddlehub
  from paddlehub.utils.log import logger
  from paddlehub.text.bert_tokenizer import BasicTokenizer
  from paddlehub.text.utils import load_vocab, whitespace_tokenize
label_desc: Use image node_id 12 for calling the CustomTokenizer obj's underlying member method code with example usage: obj.decode(token_ids, only_convert_to_tokens, skip_pad_token, clean_up_tokenization_spaces) and returns: tokens, clean_text, text