class_docstr: Runs basic tokenization (punctuation splitting, lower casing, etc.).
class_docstr_tok: ["Runs","basic","tokenization","(","punctuation","splitting",",","lower","casing",",","etc",".",")","."]
docstr: Splits punctuation on a piece of text.
docstr_tok: ["Splits","punctuation","on","a","piece","of","text","."]
code: def _run_split_on_punc(
      self, text: str, never_split: List[str] = None
  ):
      """Splits punctuation on a piece of text."""
      if never_split is not None and text in never_split:
          return [text]
      chars = list(text)
      i = 0
      start_new_word = True
      output = []
      while i < len(chars):
          char = chars[i]
          if is_punctuation(char):
              output.append([char])
              start_new_word = True
          else:
              if start_new_word:
                  output.append([])
              start_new_word = False
              output[-1].append(char)
          i += 1
  
      return ["".join(x) for x in output]
  
imports: import collections
  import os
  import pickle
  import unicodedata
  from typing import Dict, List, Optional, Union, Tuple
  from paddle.utils import try_import
  from paddlehub.text.utils import load_vocab, is_whitespace, is_control, is_punctuation, whitespace_tokenize, is_chinese_char
label_desc: Use image node_id 4 for calling the BasicTokenizer obj's underlying member method code with example usage: obj._run_split_on_punc(text, never_split) and returns: unknown, list