parameters: (self, text)
return_statement: return "".join(output)
docstring: Performs invalid character removal and whitespace cleanup on text.
docstring_summary: Performs invalid character removal and whitespace cleanup on text.
docstring_tokens: Performs invalid character removal and whitespace cleanup on text .
function: def _clean_text(self, text):
      """Performs invalid character removal and whitespace cleanup on text."""
      output = []
      for char in text:
        cp = ord(char)
        if cp == 0 or cp == 0xfffd or _is_control(char):
          continue
        if _is_whitespace(char):
          output.append(" ")
        else:
          output.append(char)
      return "".join(output)
function_tokens: def _clean_text ( self , text ) : output = [ ] for char in text : cp = ord ( char ) if cp == 0 or cp == 0xfffd or _is_control ( char ) : continue if _is_whitespace ( char ) : output . append ( " " ) else : output . append ( char ) return "" . join ( output )