code: def get_case(word, correction):
      
      if word.istitle():
          return correction.title()
      if word.isupper():
          return correction.upper()
      if correction == word and not word.islower():
          return word
      if len(word) > 2 and word[:2].isupper():
          return correction.title()
      if not known_as_lower([correction]): #expensive
          try:
              return CASE_MAPPED[correction]
          except KeyError:
              pass
      return correction
docs: Best guess of intended case.
  
      manchester => manchester
      chilton => Chilton
      AAvTech => AAvTech
      THe => The
      imho => IMHO