开发者

WORDNET database access

I have download wordnet(2.1) but i dont know how to access w开发者_JAVA技巧ordnet database?


There are both libraries and file-formats documented at the WordNet 3.0 Reference Manual. By the way, is there a reason you aren't using WordNet 3.0?


You should check out NLTK. It's the easiest way to access WordNet. It's written in python.

Just to show you how simple it can be:

>>> from nltk.corpus import wordnet as wn
>>> wn.synsets('motorcar')
[Synset('car.n.01')]

You can find further documentation here: http://nltk.googlecode.com/svn/trunk/doc/book/ch02.html (scroll down for WordNet)

Oh and don't forget to actually download WordNet:

>>>import nltk
>>>nltk.download()

then just choose WordNet and download


Highly recommend the MySql build at http://wnsqlbuilder.sourceforge.net/. You can also search for a SQL Server version. Big direct speed upticks.


If you are using C++, Wordnet comes with an interface on its own. You should find them in your WN distribution.

If you are using C#, then sharpnlp.codeplex.com is the place for you, they have a Wordnet interface.

Wordnet also has a Perl distribution, but I don't know if they can be directly used because I dont use Perl.

Best regards, David


Install nlk and then use

 from nltk import wordnet

And then by using synsets you can compare words

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜