code: def _clean_result(self, text):
          
          text = re.sub('\s\s+', ' ', text)
          text = re.sub('\.\.+', '.', text)
          text = text.replace("'", "\\'")
          return text
docs: Remove double spaces, punctuation and escapes apostrophes.