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
Jonas Stein
  • 3,898
  • 4
  • 34
  • 55
  • 1
    Do you have a $HOME/.hunspell_default ? – D McKeon Jan 11 '19 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 '19 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: https://manpages.ubuntu.com/manpages/bionic/man5/hunspell.5.html – D McKeon Jan 13 '19 at 22:52

0 Answers0