Click here to view this site's accessibility statement.

Image via
After toiling about setting up my own WordNet Similarity system (see ) and realizing that such a good system has not been very active since 2008, I decided to give it a stab and make it easier for other people to do the same.
What's nice about WordNet Similarity is that it uses a variety of similarity metrics to judge semantic relatedness between two terms, which is convenient because of the way WordNet constructs synsets. Once you have your own system it's easy to make a simple API that lets you access similarity metrics between individual terms.
The bundled package contains:
Digest SHA1 v2.13
Text Similarity v.0.08
WordNet v3.0
WordNet QueryData v1.9
WordNet Similarity v2.05
and is everything you need to successfully deploy it on a system. I use a Mac machine, but you should be able to extract a lot of it for a Windows machine too.
./configuremakemake install
On a Mac/Unix system it will install WordNet into /usr/local/WordNet-3.0/. If you get permission errors, use the super-user command sudo.
perl Makefile.PL
make
make install
httpd.conf file at /etc/apache2/httpd.conf to accept Perl/CGI requests. You should be able to find references online to help you with that.perl wordVectors.pl vectors.dat --stopfile /Users/yourname/Downloads/packages/WordNet-Similarity-2.01/samples/stoplist.txt
This lets the WordVector generator skip over any stopwords. The result should be a vectors.dat file that's about 37.1MB big.
similarity_server.conf so that both the lock and error log paths point to the folder you're currently in, as the original settings didn't work (for me). Change vectordb to point to vectors.dat#!/usr/local/bin/perl -wT to #!/usr/bin/perl -wT.
perl -T similarity_server.pl & and keep both your finders and toes crossed. You should see something along the lines of:
Lock file = /Users/myname/Sites/wn/similarity.lock
Error log = /Users/myname/Sites/wn/similarity.log
Word vectors = vectors.dat
Stoplist = stoplist.txt
Loading modules... done.
Started server... accepting requests.
This entry was posted on Sunday, July 3rd, 2011 at 7:10 pm, EST under the category of Coding. You can leave a response, or trackback from your own site.