cltl / WordnetTools

Set of functions to use a wordnet in Wordnet-LMF format
http://wordpress.let.vupr.nl/software/wordnettools/
GNU General Public License v3.0
7 stars 7 forks source link

Request for example code for getting synomym, antonym, hypernym #1

Open aunwesha opened 1 year ago

aunwesha commented 1 year ago

Hello,

I want to do the following:

  1. Load Wordnet file in LMF format
  2. Using a word as an argument write functions to fetch the synonym, antonym, hypernym, etc.

Could you please point to the relevant classes and methods in this library to achieve this.

A sample main() program would be helpful.

piekvossen commented 1 year ago

You can find examples in the scripts folder.

Piek

Sent from my iPad

On 28 Dec 2022, at 15:14, aunwesha @.***> wrote:



Hello,

I want to do the following:

  1. Load Wordnet file in LMF format
  2. Using a word as an argument write functions to fetch the synonym, antonym, hypernym, etc.

Could you please point to the relevant classes and methods in this library to achieve this.

A sample main() program would be helpful.

— Reply to this email directly, view it on GitHubhttps://github.com/cltl/WordnetTools/issues/1, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAUDKLAN76H4SLDOLTNNUFLWPRDNLANCNFSM6AAAAAATLJRJBI. You are receiving this because you are subscribed to this thread.Message ID: @.***>

Bidisa commented 1 year ago

I am using the API not the commandline. I have found the following functions for getting synonyms, hypernyms etc. For example public ArrayList getHyperonyms (Synset synset) in the class WordNetLmfData. All these functions takes synset as a argument. Which is the function that returns a synset giving a word as an argument, e.g. something like List getSynsets(String word, String partOfSpeech) In which class I can find such a function?