I know the Wordnet webpage cites that it comes with a C interface included. However, I am having significant trouble adding it to my project. My question is two fold.
First: Does a machine need to have wordnet installed to utilize the API (or can the data be read a runtime from the dict files? and thus distributed to machines that do not have wordnet installed)
Second: How can you include Wordnet in a C project. I've tried adding the source files directly, but it crashes on init(). I've stepped through the debugger and it looks like it is looking to load the files from my local drive rather than the included files in the project. Is there a way to prevent this for machines that do not have Wordnet installed (from part 1).
Thank you for the help,
Unless I'm mistaken and you're referring to a different WordNet, there has been a Cocoa front-end available for years here.
Just found this today. Might be helpful, as it only requires adding the sqlite.db file of WordNet and provides a super super thin Objective-C wrapper on the sqlite call to talk to the database. Using this as a template for your understanding should allow you to extend it to allow various queries.
https://gist.github.com/atduskgreg/c30a5fb167f4c35d6f89
EDIT: With the above example, you can see the format the query takes. With that knowledge, you could grab the sqlite file for the WordNet database from: https://code.google.com/p/synonym/downloads/detail?name=wordnet30.1.tar.gz&can=2&q=
then either just use the C calls for sqlite or pick a more robust Objective-C wrapper like: https://github.com/ccgus/fmdb
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With