Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I obtain synonyms? #4

Open
MartenPostma opened this issue Jun 27, 2016 · 5 comments
Open

How do I obtain synonyms? #4

MartenPostma opened this issue Jun 27, 2016 · 5 comments

Comments

@MartenPostma
Copy link
Collaborator

No description provided.

@MartenPostma
Copy link
Collaborator Author

In order to get all synonyms from a lemma, simply call instance.les_lemma_synonyms(LEMMA).
for example:

instance.les_lemma_synonyms('huis')
{'behuizing',
'bouw',
'bouwen',
'bouwwerk',
'constructie',
'familie',
'gebouw',
'geslacht',
'heem',
'home',
'honk',
'huis',
'huisje',
'hulsel',
'kas',
'maagschap',
'omhulsel',
'omkleedsel',
'pand',
'perceel',
'staak',
'stam',
'tak',
'tehuis',
'thuis',
'woning',
'woongelegenheid',
'woonhuis',
'woonruimte'}

@MartenPostma
Copy link
Collaborator Author

In addition to that, we compiled a tsv synonyms file at: https://github.com/MartenPostma/OpenDutchWordnet/blob/master/synonyms.tsv

@pmkruyen
Copy link

pmkruyen commented Jul 1, 2016

Thanks! But which specific script do I need to run to call "instance.les...."? I tried to call it using the les.py script among others (in the powershell) but this script does not seem to do the job. Which one should I use?

@MartenPostma
Copy link
Collaborator Author

You first have to load the module as indicated in the README:

from OpenDutchWordnet import Wn_grid_parser

#please check the attribute LICENSE before using this module

print(Wn_grid_parser.LICENSE)

#the attribute 'odwn' stores the path to the most recent version

print(Wn_grid_parser.odwn)

#example of how to use module

instance = Wn_grid_parser(Wn_grid_parser.odwn)

then you can use this method. Although, it's only tested on Mac Os X and Linux. So no garanties there. That is why I create the synonym file to be on the safe side.

@pmkruyen
Copy link

pmkruyen commented Jul 6, 2016

Thanks Marten, I tried and tried, but did not succeed in getting the module running (note, I guess it is wn_ instead of Wn_). However the synonym file does the trick.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants