Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

getting the lemma of a word using wordnet

How can I get the lemma for a given word using Wordnet. I couldn't seem to find in the wordnet documentation what i want. http://wordnet.princeton.edu/wordnet/man/wn.1WN.html

For example for the word "books" i want to get "book" , ashes => ash , booking => book, apples => apple .... etc.

i want to achieve this using wordnet in command line and I cant find exact options to retrieve such case.

A php solution would also be of great help because I originally intend to use the wordnet php API but it seems the current one in their website isn't working.

like image 954
ralpu Avatar asked Oct 11 '25 11:10

ralpu


2 Answers

Morphy is a morphological processor native to WordNet. The WordNet interfaces invoke Morphy to lemmatize a word as part of the lookup process (e.g. you query "enlightened", it returns the results for both "enlightened" and, via Morphy, "enlighten").

The interfaces don't include a feature that allows a user to directly access Morphy, so using it in command line is only possible if you write your own program using one of the WordNet APIs. You can find documentation for Morphy at the WordNet site.

As near as I can tell, the PHP interface is still available, although you may need to use WordNet 2.x.

like image 172
ibadibam Avatar answered Oct 14 '25 00:10

ibadibam


If you can use another tool try TreeTagger.

like image 45
Aurelio De Rosa Avatar answered Oct 14 '25 00:10

Aurelio De Rosa



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!