Ruby-wordnet: traverse

Hello,

is anybody familiar with the Ruby-Wordnet module? If so, do you have
any idea about this error?

/usr/local/lib/ruby/site_ruby/1.8/wordnet/synset.rb:104:in
initialize': undefined methodindex’ for nil:NilClass
(NoMethodError)
from /usr/local/lib/ruby/site_ruby/1.8/wordnet/synset.rb:73:in
parse' from /usr/local/lib/ruby/site_ruby/1.8/wordnet/synset.rb:769:inpointers’
from /usr/local/lib/ruby/site_ruby/1.8/wordnet/synset.rb:768:in
pointers' from /usr/local/lib/ruby/1.8/sync.rb:229:insynchronize’
from /usr/local/lib/ruby/site_ruby/1.8/wordnet/synset.rb:767:in
pointers' from /usr/local/lib/ruby/1.8/sync.rb:229:insynchronize’
from /usr/local/lib/ruby/site_ruby/1.8/wordnet/synset.rb:766:in
pointers' from /usr/local/lib/ruby/site_ruby/1.8/wordnet/synset.rb:810:infetchSynsetPointers’
… 7 levels…
from /usr/local/lib/ruby/site_ruby/1.8/wordnet/synset.rb:693:in
traverse' from /usr/local/lib/ruby/site_ruby/1.8/wordnet/synset.rb:705:intraverse’
from /home/paul/ruby/wntest.rb:56
from /home/paul/ruby/wntest.rb:45

caused by this code:

    k = lex.lookupSynsets("hospital", WordNet::Noun )
    puts k[0].traverse(:hypernyms)

problem is that it randomly works for lots of words but not for
others. it doesn’t work for “hospital” or “vessel” but does for almost
all other words in my set.

Great, thank you!

On Feb 20, 2007, at 9:10 AM, Paul Nulty wrote:

is anybody familiar with the Ruby-Wordnet module? If so, do you have
any idea about this error?

I am familiar with it, and this is a bug in the 0.02 release:

dev(E)iate

It has been fixed in the SVN version and the 20061008 snapshot that’s
posted to:

dev(E)iate

I have some stuff left to commit before creating a new release, but
I’ll try to get that done by Friday.


Michael G. [email protected]
Rubymage, Architect, Believer
The FaerieMUD Consortium http://www.FaerieMUD.org/
ruby -e “p 12383406064495388618631689469409153107.to_s(36).tr(‘z’,’ ')”