Search code examples
rubynlpwordnet

Using Wordnet Gem - Wordnet::Lexicon.new gives NameError


I just installed the wordnet gem and wordnet-defaultdb gem . When i try to create a ne lexicon using the WordNet::Lexicon.new command in I get Name Error. Lexicon does not show up as a subclass of WordNet either.

I have spent a whole day trying to figure this out. Is this an installation issue? If it is can someone guide me or point me to guide on how to install the wordnet gem.

I'm using MRI-1.9.3


Solution

  • Had this similar issue using the WordNet gem. The wordnet-defaultdb gem relies on two dependencies: sqlite3, which should be standard, and wordnet itself. Add gem "wordnet", "~> 1.0.0" to your gemfile and the wordnet-defaultdb gem should now be working fine.