# Wordnet and Ruby

**URL:** <https://www.ruby-forum.com/t/wordnet-and-ruby/133958>\
**Category:** Ruby\
**Created:** [April 5, 2008, 4:56pm UTC](https://www.ruby-forum.com/t/wordnet-and-ruby/133958 "2008-04-05T16:56:14Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![glenn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/4bbf92/32.png) [@glenn](https://www.ruby-forum.com/u/glenn)\
**Post date:** [April 5, 2008, 4:56pm UTC](https://www.ruby-forum.com/t/wordnet-and-ruby/133958/1 "2008-04-05T16:56:14Z")

</div>

Hi,

I am trying to use the Wordnet dictionary  
([http://wordnet.princeton.edu/](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  
[dev(E)iate](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

---

<div class="post-metadata">

**Author:** ![glenn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/4bbf92/32.png) [@glenn](https://www.ruby-forum.com/u/glenn)\
**Post date:** [April 7, 2008, 8:06pm UTC](https://www.ruby-forum.com/t/wordnet-and-ruby/133958/2 "2008-04-07T20:06:54Z")

</div>

> 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 [dev(E)iate](http://www.deveiate.org/projects/Linguistics/)

Hadley

---

<div class="post-metadata">

**Author:** ![glenn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/4bbf92/32.png) [@glenn](https://www.ruby-forum.com/u/glenn)\
**Post date:** [April 7, 2008, 7:40pm UTC](https://www.ruby-forum.com/t/wordnet-and-ruby/133958/3 "2008-04-07T19:40:22Z")

</div>

On Sat, Apr 5, 2008 at 4:54 PM, Glenn [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hi,
> 
> I am trying to use the Wordnet dictionary ([http://wordnet.princeton.edu/](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 [dev(E)iate](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](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](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](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

---

<div class="post-metadata">

**Author:** ![glenn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/4bbf92/32.png) [@glenn](https://www.ruby-forum.com/u/glenn)\
**Post date:** [April 10, 2008, 3:17am UTC](https://www.ruby-forum.com/t/wordnet-and-ruby/133958/4 "2008-04-10T03:17:11Z")

</div>

On Apr 5, 2008, at 7:54 AM, Glenn wrote:

> I am trying to use the Wordnet dictionary ([http://wordnet.princeton.edu/](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 [dev(E)iate](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/](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 ([Link Grammar](http://www.link.cs.cmu.edu/link/)), which is a  
syntactic English parser. I also maintain a Ruby interface to it  
([dev(E)iate](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  
([dev(E)iate](http://deveiate.org/projects/Linguistics/)  
).

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

---

<div class="post-metadata">

**Author:** ![glenn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/4bbf92/32.png) [@glenn](https://www.ruby-forum.com/u/glenn)\
**Post date:** [June 29, 2008, 3:27pm UTC](https://www.ruby-forum.com/t/wordnet-and-ruby/133958/5 "2008-06-29T15:27:46Z")

</div>

Slava Tt wrote:

> cannot access the [deveiate.org](http://deveiate.org) website.

[dev(E)iate](http://deveiate.org/projects/Linguistics/) is working for me.

---

<div class="post-metadata">

**Author:** ![glenn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/4bbf92/32.png) [@glenn](https://www.ruby-forum.com/u/glenn)\
**Post date:** [June 28, 2008, 5:08pm UTC](https://www.ruby-forum.com/t/wordnet-and-ruby/133958/6 "2008-06-28T17:08:15Z")

</div>

2 Michael G.:

I’m interested in using the Ruby Linguistics library, but cannot access  
the [deveiate.org](http://deveiate.org) website. Is this a temporary issue or maybe you’ve  
moved to the other domain?
