Industry guru Dave Taylor offers tech support on technical and business topics, including iPhone, iPod, Microsoft Windows, Sony PSP, cellphones, online advertising, CSS, Web design, business, Unix, Linux, SEO, Mac OS X, and shell script programming.     


How can you hack the LocalDictionary on a Mac system?

Another question about the built-in Mac spell dictionary. (I did read the previous question How can I forget or edit a learned word in the Mac spelling dictionary?)

Under User>Library>Spelling> I have both LocalDictionary and en.

What is the relationship between these two? Adding a great number of specialized, technical words one at a time as they appear in my writing is taking a lot of time. Is there a way to add a great number of (specialized) words to one of these?


Dave's Answer:

Great question and an interesting one both, because it turns out that the Mac OS X spelling subsystem that underlies its common spelling capability is eminently hackable. How can you tell? Simply open up the LocalDictionary file that you reference.

Before I do, however, I will say that it's important to use the right editor: if you use an editor that adds the wrong line-end sequences, you can presumably mess up the dictionary. My suggestion, since I'm comfortable with the command line, is to open up Terminal.app and use either "emacs" or "vi" to add content to the file. Save the original file before you start, though, and presumably you could also just try something else like BBEdit, TextEdit or even Microsoft Word. It messes up? Just copy back the original!

Even if you don't want to hack the file, you can still open it up and have a look by using TextEdit. Launch the program, then navigate to Library > Spelling and open "LocalDictionary".

Here's what mine contains:

textedit mac localdictionary 1

Does it work? To test it while in TextEdit, I added the nonsense word "ptoi" and saved the file, then opened a new TextEdit window and typed that word in to the window. The result was that it was still marked as a spelling error. Hmm...

To test further, I logged out and logged in again. The result:

textedit mac localdictionary 2

No red squiggly line means that "ptoi" is now a valid word with an understood spelling.

Sweet! So there ya go. You don't need to use Terminal.app or the command line, you simply need to open up the file with TextEdit and add the words you need, save it, and you're good to go. Nice job making this easy to work with, Apple!


More Useful Mac OS X Help Articles:
✔   Audacity can't find LAME library, I can't save Mp3?
Hey Dave. I read your article Audacity can't save mp3 audio files and am still puzzled because I downloaded the LAME Mp3 converter...
✔   How to remove Dashboard as a "space" in Mac OS X Spaces?
I'm a big fan of the Spaces utility in Mac OS X that lets me have multiple virtual screens [see Set Up Mac...
✔   Best place to buy a cheap MacBook laptop?
Hi Dave. I am looking for two gently used MacBook laptops for my teen daughters. Personal computers would greatly facilitate their studies as...
✔   File too big error copying to USB flash drive on my Mac?
I'm baffled. I have a 16GB Kingston USB flash drive that I use on my Mac system and I'm trying to copy a...
✔   Stealth image capture photo from webcam on my Mac?
Someone sneaks into my cubicle while I'm at lunch and takes candy out of my desk. Petty, but stupid too. I want to...

Let's stay in touch!
Sign up for my weekly AskDaveTaylor Newsletter and you'll receive even more tech and gadget help right to your inbox, along with exclusive news and industry updates. It's good stuff. I promise!
    Enter your name: and your email addr:  





Categorized: Mac OS X Help   (Article 10221, Written by )
Tagged: hacking the mac, local spelling, mac os x, mac spelling, spelling dictionary
Previous: How can I have Pinterest updates appear on Facebook?
Next: How can my Pinterest pins link to specific Web page URLs?




Reader Comments To Date: 2

Greg said, on January 24, 2012 6:58 PM:

I am the original poster. Wow! Thanks a lot. Followup question: As I said in the post, I have two files in the Spelling folder: LocalDictionary and en. What is the "en" file? And as I add words the conventional way by Learn Spelling, both en and LocalDictionary both seem to be getting updated at different times. (I have read that en may stand for English and other languages might have their own spell check file but I have only used English on this computer.)

Dr S Venkatkrishnan said, on February 9, 2012 6:10 AM:

Dear Dave,
I have a query. I have iphone 3GS. I am not able to remove (meaning delete) not all but a few call log numbers. Why? If it is possible, please guide me. Thanks.

Starbucks coffee cup I do have a lot to say, and questions of my own for that matter, but first I'd like to say thank you, Dave, for all your helpful information by buying you a cup of coffee!

I do have a comment, now that you mention it!











I will never send you any unsolicited email. Ever.






Check This Out Too...

 
Look for Answers
Need Help? Ask Dave Taylor!


Follow Me on Pinterest

Find Me on Google+
ADT on G+
© 2002 - 2013 by Dave Taylor. All Rights Reserved.

Note: This web site is for the purpose of disseminating information for educational purposes, free of charge, for the benefit of all visitors. We take great care to provide quality information. However, we do not guarantee, and accept no legal liability whatsoever arising from or connected to, the accuracy, reliability, currency or completeness of any material contained on this web site or on any linked site. Further, please note that by submitting a question or comment you're agreeing to my terms of service, which are: you relinquish any subsequent rights of ownership to your material by submitting it on this site. My lawyer says "Thanks".
"Ask Dave Taylor®" is a registered trademark of Intuitive Systems, LLC.