3

I use a few programs that do spellchecking via hunspell, but they seem to check against US English. It'd be beaut if they'd use Australian English (maaaaybe UK English if there's Buckley's of Strine).

My language-related environment variables look right:

LANG=en_AU.UTF-8
LANGUAGE=en_AU:en

I've fossicked about for any hunspell-en-au|gb|etc packages, but they seem to have gone bush in 14.04. What's the fix?

detly
  • 3,332
  • 9
  • 37
  • 54

1 Answers1

6

G'day mate! There are actually a few myspell dictionaries that the Hunspell engine will happily use. I'm British and I found it frightfully upsetting when a filthy Canadian dictionary kept overriding my native tongue. I don't know why you colonial types can't just learn English rather than trying to break it...

Anyway, you probably just need to install the myspell-en-au package.

$ apt-cache search myspell-en
myspell-en-au - English_australian dictionary for myspell
myspell-en-gb - English_british dictionary for myspell
myspell-en-us - English_american dictionary for myspell
myspell-en-za - English_southafrican dictionary for myspell

Failing that, there is an OpenOffice addon dictionary. You can download this, extract it (rather than installing it) and copy out the en_AU.dic and stick it up your /usr/share/hunspell/dicts/ directory.

For clarification, my /usr/share/myspell/ directory is full of symlinks to /usr/share/hunspell/ and /usr/share/hyphen (part of the openoffice.org-hyphenation package). It seems —at least in terms of packaging dictionary files— the two projects have been merged which sort of makes sense as Hunspell is compatible with the same dictionaries.

Oli
  • 289,791
  • 117
  • 680
  • 835
  • I have all the `myspell-en-*` installed. Is there a way to tell `hunspell` which to use other than the env vars? – detly Aug 08 '14 at 23:46
  • Well you can tell it when you call it (with the -d flag) but I'm guessing you aren't calling it directly. What application are you using? – Oli Aug 09 '14 at 07:48
  • I'm using Atom. As far as I can tell, their [spell-check](https://github.com/atom/spell-check) package uses [node-spellchecker](https://github.com/atom/node-spellchecker) (...?) which itself uses [hunspell](https://github.com/atom/node-spellchecker/blob/master/src/spellchecker_hunspell.cc). But I'm not too fluent with Coffeescript, so I'm not 100% sure what's going on there. – detly Aug 11 '14 at 08:35
  • Bah, I just looked at that source again, and it looks like they [hard code the dicts](https://github.com/atom/node-spellchecker/blob/master/src/spellchecker_hunspell.cc#L18)! – detly Aug 11 '14 at 08:36