Adding to NSMutable Dictionary

Discussion in 'Mac Programming' started by Blakeasd, Apr 15, 2011.

  1. macrumors 6502a

    Joined:
    Dec 29, 2009
    Messages:
    642
    #1
    Is it possible to add all of the terms (not the definitions, just the name of the work) from the built-in OS X Dictionary into an NSMutableDictionary?
     
  2. macrumors G5

    gnasher729

    Joined:
    Nov 25, 2005
    Messages:
    14,249
    #2
    I wish you lots of luck doing this, but there seems to be no useful documentation about it at all. If you figure it out, I would be very grateful if you posted here how to do it.
     
  3. Moderator

    robbieduncan

    Staff Member

    Joined:
    Jul 24, 2002
    Messages:
    24,480
    Location:
    London
    #3
    Dictionaries are in /Library/Dictionaries/

    Each Dictionary is a bundle (with a .dictionary extension). Within each dictionary bundle in the resources is a (localised) xml file called <DictionaryName>.xml. You can parse the xml (the format looks quite simple) to get all the keys (and definitions if you want).
     

Share This Page