Wordnet and Ruby

G

Glenn

[Note: parts of this message were removed to make it a legal post.]

Hi,

I am trying to use the Wordnet dictionary (http://wordnet.princeton.edu/) with Ruby and am not having any luck.

There is a Ruby tie-in for Wordnet. The project's home page is at http://www.deveiate.org/projects/Ruby-WordNet/. It's not clear to me whether this is an active project, or if Ruby-Wordnet can be installed on Windows. I tried, but I don't think it installed successfully. If anyone has any insight into this, it would be greatly appreciated. I'd like to know also if there is a way to install Ruby-Wordnet as a gem.

The project that I am working on involves parsing text and replacing the words in the text with their parts of speech, so I need to have access to a sizable English dictionary, preferably one that is free (or cheap) and freely available. If anyone knows about such a dictionary, and knows how to tie it in with Ruby, and could let me know about it, that would be great. If such a add-on was a Ruby gem, even better.

I am using Ruby 1.8.6 on Windows XP.

Thanks for your help.

Glenn
 
J

Jano Svitok

Hi,

I am trying to use the Wordnet dictionary (http://wordnet.princeton.edu/) with Ruby and am not having any luck.

There is a Ruby tie-in for Wordnet. The project's home page is at http://www.deveiate.org/projects/Ruby-WordNet/.
It's not clear to me whether this is an active project,

Their trac says last change in sources 8 months ago.
or if Ruby-Wordnet can be installed on Windows. I tried, but I don't think it installed successfully. If anyone has any insight into this, it would be greatly appreciated. I'd like to know also if there is a way to install Ruby-Wordnet as a gem.

It seems you have to install bdb extension first.
These two pages seem helpful:

http://linuxbrit.co.uk/rbot/wiki/InstallGuide (look for BDB on Win32)
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/25223

When you have bdb, just continue with ruby-wordnet installation. (This
is what I've read out of the docs/sources right now, so usual warnings
apply.)
The project that I am working on involves parsing text and replacing the words in the text with their parts of speech, so I need to have access to a sizable English dictionary, preferably one that is free (or cheap) and freely available. If anyone knows about such a dictionary, and knows how to tie it in with Ruby, and could let me know about it, that would be great. If such a add-on was a Ruby gem, even better.

British National Corpus ;-)
http://www.natcorp.ox.ac.uk/corpus/index.xml.ID=products, it seems
that a BNC Baby can be obtained for 30 Euros together with Brown
corpus.
It's XML (although quite large) so with REXML help (or any other XML
parser, and maybe with some preprocessing) you should be able to use
that.

Jano
 
H

hadley wickham

The project that I am working on involves parsing text and replacing the words in the text with their parts of speech, so I need to have access to a sizable English dictionary, preferably one that is free (or cheap) and freely available. If anyone knows about such a dictionary, and knows how to tie it in with Ruby, and could let me know about it, that would be great. If such a add-on was a Ruby gem, even better.
Have a look at http://www.deveiate.org/projects/Linguistics/

Hadley
 
M

Michael Granger

I am trying to use the Wordnet dictionary (http://wordnet.princeton.edu/
) with Ruby and am not having any luck.

There is a Ruby tie-in for Wordnet. The project's home page is at http://www.deveiate.org/projects/Ruby-WordNet/
. It's not clear to me whether this is an active project, or if
Ruby-Wordnet can be installed on Windows. I tried, but I don't
think it installed successfully. If anyone has any insight into
this, it would be greatly appreciated.

I might have some insight (I'm the author of the Ruby-WordNet
library), but I don't have access to a Windows machine and very little
Ruby+Windows experience.

Ruby-WordNet is "active", though, at least in the sense that I'm still
interested in maintaining and releasing it. I'd welcome any patches
that made it easier to install or use.
I'd like to know also if there is a way to install Ruby-Wordnet as a
gem.

There currently is not, as the released version of Ruby-WordNet uses
both bdb and the WordNet dict files. Bdb isn't available as a gem, and
the WordNet dict files require separate installation, so it's a bit
difficult to gemify at the moment.

I have a version in development (well, more of a quick hack, really)
which uses a Sequel-backed dataset (as in http://
sequel.rubyforge.org/) instead of bdb, which in turn will make it
possible to distribute as a gem, but it's not really ready for
distribution yet.
The project that I am working on involves parsing text and replacing
the words in the text with their parts of speech, so I need to have
access to a sizable English dictionary, preferably one that is free
(or cheap) and freely available. If anyone knows about such a
dictionary, and knows how to tie it in with Ruby, and could let me
know about it, that would be great. If such a add-on was a Ruby
gem, even better.


If you're extracting parts of speech, you might also be interested in
CMU's Link Grammar (http://www.link.cs.cmu.edu/link/), which is a
syntactic English parser. I also maintain a Ruby interface to it (http://deveiate.org/projects/Ruby-LinkParser/
), as well as a library that combines both it and WordNet with other
NLP utilities in a general natural linguistics framework (http://deveiate.org/projects/Linguistics/
).

I'd be happy to answer any questions as best I can about all of the
above.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,150
Latest member
MakersCBDReviews
Top