Wordnet for the Web

This page documents the use made of the Wordnet vocabulary in the SWAD-Europe project. It relates in particular to work under way in WP9 (visualisation and accessibility) and WP? (thesauri).

Installation

Background resources:

Installation Log

On a Debian system, the following procedure installs Wordnet, Lingua::Wordnet (Perl) and the Ruby Wordnet library.


apt-get install wordnet
# installs wordnet files in /usr/share/wordnet

# Perl module:
wget http://www.perl.com/CPAN-local/authors/id/D/DB/DBRIAN/Lingua-Wordnet0.73.tar.gz

#unpack this, then in that directory:
sudo mkdir -p /usr/local/wordnet1.7/lingua-wordnet/
perl Makefile.PL

sudo perl scripts/convertdb.pl
	
# the interactive installer will want to know where wordnet's files live,
# and where to store its own optimised indices. We will need these later for 
# the Ruby module too.

	This program will convert your Wordnet databases into files usable by
	Lingua::Wordnet. This will not affect your existing Wordnet files, but
	will require up to 40MB disk space. Continue? [y]

	Data directory: [/usr/local/wordnet1.7/dict/] /usr/share/wordnet/

	Lingua::Wordnet needs to write the new files to a data directory.
	Where do you want these files saved? 
	[/usr/local/wordnet1.7/lingua-wordnet/]

	Starting conversion ...
	  Index files:   "index.noun"  => "lingua_wordnet.index"
	  # ...etc
	Conversion completed.

# Now we can install the Ruby package, to allow Ruby scripts access to this 
# database of terms and concepts.
# eg from http://www.deveiate.org/code/Ruby-WordNet-0.01.tar.gz
# ... see the INSTALL file for dependency information (ruby, wordnet, bdb, perl tools as above)

# you could install from src: 
# ftp://moulon.inra.fr/pub/ruby/bdb-0.3.8.tar.gz
# or on a Debian box:  "apt-get install libdb-ruby" might work (I had version 
#£ mismatch errors with BDB).
#
# (note that the Ruby Wordnet installer won't notice if these Ruby BerkeleyDB 
# tools are missing, but you'll find that the tests and the examples won't run).
# NOTE: 
# Ruby installation had trouble reading...
#/usr/local/wordnet1.7/lingua-wordnet/lingua_wordnet.data:  Berkeley DB (Btree, version 6, native byte-order)
# due to a version mismatch with berkeley db.