code: def _correct(token, term_freq):
      
      if token.lower() in term_freq:
          return token
      e1 = [t for t in _ed1(token) if t in term_freq]
      if len(e1) > 0:
          e1.sort(key=term_freq.get)
          return e1[0]
      e2 = [t for t in _ed2(token) if t in term_freq]
      if len(e2) > 0:
          e2.sort(key=term_freq.get)
          return e2[0]
      return token
docs: Correct a single token according to the term_freq