Mathieu Tozer's Dev Blog

Cocoa, the development of Words, and other software projects (including those dang assessment tasks).




Words: Milestone: Automatic Word Lookup (from dict protocol dictionaries)


E-mail this post



Remember me (?)



All personal information that you provide here will be governed by the Privacy Policy of Blogger.com. More...



modify the DictProtocolDictionary class so that handle Definition entities instead of instances of the custom Definition class.
The define method should return an array of these instead of the other types of objects.

MEMORY! Ugh. I was releasing autoreleased objects again. And you think you're doing the right thing! Yuck.

Anyway it's been a bit of a struggle so I haven't been taking notes today, but I've developed what you can see in the following screen shot.
WordsMilestoneAutomaticWordLookup.jpg

What I think I need next is a 'isConnected' checker method that the system can ask about the network status from where ever.

I'm also going to have to program it to flatted the returned definitions down into a more readable format.
1. See what a variety of dictionaries return in the command line
2. Try removing the \n from the responses.
3. See what it looks like in a tableview

I might have to make a subclass of the tableView to enable more than one line to be visible in a cell. In this way the user will be able to read a few lines of text of the definition.

Also the next step is to start using words for English, French and Italian. I have to start learning some languages!

Here's what the French dictionary responds with:

today t…ôdei] aujourd'hui
English returns

exculpate v : pronounce not guilty of criminal charges; "The suspect was cleared of the murder charges" [syn: {acquit}, {assoil},
{clear}, {discharge}, {exonerate}] [ant: {convict}]

Exculpate \Ex*cul"pate\, v. t. [imp. & p. p. {Exculpated}, p.
pr. & vb. n.. {Exculpating} (?).] [L. ex out + culpatus, p.
p. of culpare to find fault with, to blame, culpa fault. See
{Culpable}.]
To clear from alleged fault or guilt; to prove to be
guiltless; to relieve of blame; to acquit.
[1913 Webster]

He exculpated himself from being the author of the
heroic epistle. --Mason.
[1913 Webster]

I exculpate him further for his writing against me.
--Milman.

Syn: To exonerate; absolve; clear; acquit; excuse; vindicate;
justify.
[1913 Webster]


It would be nice if the dict protocol was more XMLey and tagged metadata to the results returned. Parsing is going to be a bitch because all dictionaries seems to abide by their own format.
Ah. See this http://xdxf.revdanica.com/

This might be the next 'type' or 'protocol' of dictionary that I could support.

Maybe developing dictionary 'packs' are in order. A plugin architecture so that parsers for various specific (and popular) dictionaries can be added and then made to work with Words nicely.


0 Responses to “Words: Milestone: Automatic Word Lookup (from dict protocol dictionaries)”

Leave a Reply

      Convert to boldConvert to italicConvert to link

 


+RSS | dev blog | Portfolio

About me

My status

Previous posts

  • my del.icio.us
  • my flickr