Wordnet in Objective-C

I know that the Wordnet webpage refers to the fact that it comes with C interface enabled. However, I have serious problems adding it to my project. My question is double.

Firstly: does the machine need to install wordnet to use the API (or can the data be read at runtime from dict files?) And, thus, are distributed between machines that do not have wordnet installed).

Second: how to include Wordnet in project C. I tried to add the source files directly, but it will work on init (). I went through the debugger, and it looks like it wants to download files from my local drive, not the included files in the project. Is there a way to prevent this from happening on machines that don't have Wordnet installed (from part 1).

Thanks for the help,

+6
source share
2 answers

If I am mistaken, and you mean another WordNet, there is a Cocoa front-end, available for years here .

+2
source

Just found it today. It can be useful, because for this you only need to add the sqlite.db file from WordNet and provide a super super thin Objective-C shell to invoke sqlite to talk to the database. Using this as a template for your understanding should allow you to expand it to allow various requests.

https://gist.github.com/atduskgreg/c30a5fb167f4c35d6f89

EDIT: in the above example, you can see the format of the request. Thanks to this knowledge, you can get the sqlite file for the WordNet database: https://code.google.com/p/synonym/downloads/detail?name=wordnet30.1.tar.gz&can=2&q=

either just use the C calls for sqlite or choose a more robust Objective-C shell, for example: https://github.com/ccgus/fmdb

0
source

All Articles