alvations / pywsd

Python Implementations of Word Sense Disambiguation (WSD) Technologies.
MIT License
743 stars 134 forks source link

PyWSD with `wn` #70

Open arademaker opened 2 years ago

arademaker commented 2 years ago

Hi @goodmami and @alvations , is pywsd ready to be used with https://github.com/goodmami/wn? If so, how can we do that? I am trying to write a tutorial for the users of our Portuguese Wordnet at http://github.com/own-pt/openWordnet-PT.

goodmami commented 2 years ago

I think https://github.com/goodmami/wn can do everything PyWSD needs, but it's just the effort of porting it over. There's not too many places the old wn or wnic are called, and where they are it looks mostly trivial to port:

pywsd$ git grep -cP '\bwn(ic)?\.'
CHANGELOG.md:1
Precompute Signatures.ipynb:1
README.md:2
pywsd/__init__.py:1
pywsd/allwords_wsd.py:1
pywsd/baseline.py:9
pywsd/lesk.py:13
pywsd/similarity.py:17
pywsd/utils.py:7
quick_reference.md:4

One big problem is that this package has few tests and those that exist appear to be broken (e.g., importing pywsd.semcor which was removed a long time ago), so I can't be sure of the correctness. In addition, I wouldn't switch until the next release of https://github.com/bond-lab/omw-data/ which should have an English wordnet that's more compatible with the Princeton WordNet 3.0 and 3.1.