Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how do i import and use WordNet 3.0 in python?

Tags:

python

wordnet

I have downloaded the latest version of WordNet 3.0. I am not able to find a proper documentation of how to use it in python.

Does NLTK have wordnet 3.0 ?

I have already used an older version of wordnet in nltk.

Please help me.

like image 204
Apps Avatar asked Apr 29 '11 09:04

Apps


1 Answers

No, it seems that NLTK only supports 3.0.

If I were doing this, I'd choose between using the 3.0 Java API through Jython or spawn the wn executable using the subprocess module.

I'd lean towards the latter method in case I needed to integrate with an extensive existing codebase. Unfortunately this means doing work that a future 3.0 implementation in NLTK will make obsolete, but well - that's life.

like image 151
Jacob Oscarson Avatar answered Oct 02 '22 23:10

Jacob Oscarson