code: def clean_text(text):
      
      # Replace a few nasty unicode characters with their ASCII equivalent
      maps = {u'×': u'x', u'–': u'-', u'−': '-'}
      for element in maps:
          text = text.replace(element, maps[element])
  
      # Replace genitives
      text = re.sub(r'(?<=\w)\'s\b|(?<=\w)s\'(?!\w)', '  ', text)
  
      logging.debug(u'Clean text: "%s"', text)
  
      return text
docs: Clean text before parsing.