5

I would like to use the spellchecking dictionaries bundled with OS X from the command line (hunspell), but can't seem to find them. In /System/Library/Spelling there are only 2 files pl_PL.{aff,dic}, and find / -name '*.dic' revealed nothing.

I know I can dowload dictionaries from OpenOffice etc., but I'd like to find the ones bundled with OS X.

EDIT To clarify, there are at least two kinds of dictionaries in OS X:

  • Definitions used in Dictionary.app. I'm not interested in those.
  • Word lists used by the system spellchecker (red dotted lines). I know OS X uses hunspell because the hunspell website says so, and there are numerous posts on how to add new ones (1, 2). Just, I don't want to add new ones but use the English one that obviously comes with the system.
5
  • What build of hunspell is in play? (as it's not explicitly included as a command line tool on OS X - adding that detail might help you get a better quality answer.) Another answer here shows that the spell check routines for TextEdit source words from the same place as Dictionary app - so be clear to explain how your problem is different than locating /Library/Dictionary or ~/Library/Dictionary
    – bmike
    Aug 3 '13 at 18:24
  • @bmike libhunspell is in /usr/lib/libhunspell-1.2.0.0.0.dylib. I'm not sure which of the answers you're referring to, the top-rated answer copied words from Wikipedia? Another answer + comments in this thread however is correct and exactly what I'm after (apple.stackexchange.com/a/21446/54379)
    – thpani
    Aug 3 '13 at 19:35
  • Now that you have added information to your question it makes more sense so my answer was wrong and I removed it.
    – Ruskes
    Aug 3 '13 at 20:15
  • /usr/share/dict there is a words file in there
    – tik27
    Aug 3 '13 at 20:29
  • @thipani, libhunspell is a library and not callable directly from the command line, what is hunspell
    – mmmmmm
    Aug 4 '13 at 0:08
2

The spelling dictionaries you are interested in appear to be located in the following location (checked on 10.8.4 and 10.6.8):

/System/Library/Services/AppleSpell.service/Contents/Resources/

The word lists are stored in this directory by language, so U.S. English is in the English.lproj folder.

However, these files are stored in a binary format that I haven't deciphered yet...

0

Under macOS Catalina...

There are two locations:

  • /System/Library/Services/AppleSpell.service/Contents/Resources/AppleSpell.8
  • /Users/${HOME}/Library/Dictionaries/

The first is the system spell check dictionary and the second is the user dictionary that is created/modified when the user adds a learned word. The second one can be edited using any standard text editor.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .