1

I do not want to add a new dictionary to PyEnchant , instead I want to add single words to the dictionary with suggestions how to correct them. For example I have the code

import enchant
enchantdict = enchant.Dict("de_GE")
suggested_words = [enchantdict.suggest(word) for word in ['Kunden','Nr','201']]

where "Nr" is a short way of saying "Nummer" (meaning "Number" in English). I would like to add to the PyEnchant dictionary such, that it is able to suggest "Nummer" when it sees "Nr". How can I do this?

Make42
  • 12,236
  • 24
  • 79
  • 155

1 Answers1

1

It appears you're looking for enchantdict.store_replacement('Nr', 'Nummer'). It's explained in the documentation, not that hard to find.

nnnmmm
  • 7,964
  • 4
  • 22
  • 41