Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find relatedness in Wordnet using Python

I would like to find the relatedness (not similarity) between two words using Python. The hso (Hirst and St-Onge,1998), lesk (Banerjee and Pedersen, 2003), and vector (Patwardhan, 2003) algorithms are implemented in Perl here but i cant seem to find the same for Python in the nltk lib.

I need to use Python as it is part of a larger team project in Python. Any leads??

like image 741
user926321 Avatar asked Dec 22 '22 09:12

user926321


2 Answers

There is also a web interface you could access - you could presumably write a python client to query the web interface to get the lesk or vector values.

You can find those web interfaces here...

http://marimba.d.umn.edu http://talisker.d.umn.edu

Good luck, Ted

like image 199
Ted Pedersen Avatar answered Dec 24 '22 01:12

Ted Pedersen


I used NLTK to load WordNet into the Neo4j graph database, (see https://groups.google.com/d/topic/gremlin-users/C1OlTG9xCpo/discussion ).

And I used Bulbs ( http://bulbflow.com/ ) to create a library called WordGraph for interacting with Neo4j/WordNet through the Rexster REST server ( https://github.com/tinkerpop/rexster/wiki/ ).

Bulbs is a Python library that allows you to use the graph programming language Gremlin ( https://github.com/tinkerpop/gremlin/wiki ) to query/traverse Neo4j, and in this case, specifically WordNet.

I am in the process of posting WordGraph to Github ( https://github.com/espeed/wordgraph ) -- message me if you have questions.

like image 23
espeed Avatar answered Dec 24 '22 01:12

espeed