louismullie / treat

Natural language processing framework for Ruby.
Other
1.37k stars 128 forks source link

Getting `WordNet::SynsetType not defined` #97

Closed theideasmith closed 9 years ago

theideasmith commented 9 years ago

First off, this library seems awesome! - I am going to use it to build a tweet responding bot - if I could only get it to work.

Also, I run Treat::Core::Installer.install and Treat::Core::Installer.install 'english'

When trying to run the examples in README, I come across the error; NameError: constant WordNet::SynsetType not defined when running "hello".synonyms and for other word related functions. Any ideas what's up with this, or what dependencies I haven't installed

chickensmitten commented 9 years ago

Similar issue here. Could it be that the Java_home is not properly installed? there seems to be instructions in this blog post (http://www.sitepoint.com/seeking-lovecraft-part-1-an-introduction-to-nlp-and-the-treat-gem/), but I don't know how to get $JAVA_HOME environment variable configured properly. Any ideas?

ojak commented 9 years ago

@aclinnovator Have you included the DSL?

include Treat::Core::DSL
trosborn commented 9 years ago

The issue is called by the most recent update to rwordnet. rwordnet 1.0.0 renames SynsetType. In order to get this working you can use rwordnet, 0.1.3 or older.

I tried renaming the constant to work with the latest version of rwordnet, but then I ran into a problem related to indices. At some point I'll look more into getting treat working with the latest version of rwordnet.

louismullie commented 9 years ago

Fixed by the PR above and subsequent PRs. Thanks!

trosborn commented 9 years ago

You're welcome. I'm happy to lend a hand :smile: