Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I work at a school, and I would like to add a number of unique names to the local dictionary so that they won't be flagged as misspelled by the spell checker.

I've discovered the local dictionary at ~/Library/Spelling/

I also see that words are added to the localdictionary text file each on individual lines.

However, when I try to paste in a large number of names (or to simply replace this file with another) I find that the new entries aren't recognized by the spell checker, even after killing the applespell process, or restarting altogether.

Ideally, I'd like to set this up so I could create a script to install this custom dictionary on all computers at the school (this works in MS Office). Is this possible?

share|improve this question
    
What program are you using to write docs –  luca590 May 28 '11 at 16:52

2 Answers 2

The entries in that file must be ordered lexicographically (case-insensitive).

I assume Apple implements some sort of search algorithm, so if fzgwhduef is after xdejfu, it won't be found when spellchecking it.

Edit ~/Library/Spelling/LocalDictionary, keep the entries sorted, and killall AppleSpell in Terminal to make it read the changed file the next time you use it.

share|improve this answer
    
rev /usr/share/dict/words | gshuf > ~/Library/Spelling/en; killall AppleSpell works just fine for me. For some reason, words that are listed twice but with different capitalization aren't recognized though. –  ؘؘؘؘ Oct 7 '12 at 15:22

There is some additional work you need to do because there is actually a special character in between each word. You can see an example of it here on Macworld.

What they suggest is to show invisibles in your text editor of choice, textwrangler or textmate or xcode or vim or something like that would probably work, and just make sure that each word has the same separator as the previous words.

From Macworld:

To review the user additions to the spell checking dictionary download a copy of Bare Bones Software’s free TextWrangler. Open the en file in TextWrangler and choose Edit > Text Options. In the resulting sheet, enable the Show Invisibles option and click OK. You’ll find that the additions are now separated by a red ¿ character.

To edit user additions, delete any additions you don’t care for or add new ones, separating them with this upside-down question mark character that you’ve copied from within the document. Save the file and log out and log back in again for the changes to take.

share|improve this answer
1  
Hmm, when I try this, I don't see the hidden upside down question mark (¿). Instead, the only invisible character I see is the carriage return symbol, which looks a bit like horizontal line with a downward stroke on the right end. –  occam98 May 29 '11 at 2:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.