parameters: (self, text)
return_statement: return ["".join(x) for x in output]
docstring: Splits punctuation on a piece of text.
docstring_summary: Splits punctuation on a piece of text.
docstring_tokens: Splits punctuation on a piece of text .
function: def _run_split_on_punc(self, text):
      """Splits punctuation on a piece of 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]
function_tokens: def _run_split_on_punc ( self , 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 ]