2

Hunspell should help the user to write names properly. The names should be defined in the home directory of the user, so that every user can define his or her own list of important names.

If a user starts to create a dictionary of names it would be very feasible to check for the full names:

# Name               # should be detected as 
Walter Brattain      # correct
Walter Britain       # wrong

Leon Cooper          # correct
Leon Copper          # wrong

Léon Brillouin       # correct
Leon Brillouin       # wrong

How can I generate the required dictionary?

I tried so far

cat ~/.hunspell_default/mynames.dic
Walter Brattain
Leon Cooper
Léon Brillouin

cat ~/.hunspell_default/mynames.aff
SET UTF-8
TRY esianrtolcdugmphbyfvkwzESIANRTOLCDUGMPHBYFVKWZ'

But this does not help Hunspell to find the misspelled names.

~/.hunspell_default$ echo "Walter Britain and Leon Copper visit Leon Brillouin." | hunspell -m -p mynames.dic 
Walter  st:Walter
Walter  st:Walt fl:R

Britain  st:Britain

and  st:and

Leon  st:Leon

Copper  st:copper
Copper  st:cop fl:R

visit  st:visit

Leon  st:Leon

Brillouin  st:Brillouin
  • 1
    Do you have a $HOME/.hunspell_default ? – D McKeon Jan 11 at 23:09
  • @DMcKeon No. Thank you. My dict folder name was wrong. I will change it. Is it sufficient to put the number of words and the wordlist as in the box simply in $HOME/.hunspell_default/mynames.dic? Or do I have to convert it and create the .aff file too? – Jonas Stein Jan 11 at 23:19
  • Rather than trying to summarize, I'll just quote: > A dictionary file (*.dic) contains a list of words, one per line and refer you to: manpages.ubuntu.com/manpages/bionic/man5/hunspell.5.html – D McKeon Jan 13 at 22:52

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.