hosseinfani / ReQue

A Benchmark Workflow and Dataset Collection for Query Refinement
https://hosseinfani.github.io/ReQue/
Other
25 stars 1 forks source link

PYWSD: cannot import name 'WordNet' from 'wn' #19

Closed hosseinfani closed 3 years ago

hosseinfani commented 3 years ago

(ReQue) C:\Users\hfani\Documents\ReQue\develop\qe>python main.py Traceback (most recent call last): File "main.py", line 38, in from cmn import expander_factory as ef File "C:\Users\hfani\Documents\ReQue\develop\qe\cmn\expander_factory.py", line 7, in from expanders.sensedisambiguation import SenseDisambiguation File "C:\Users\hfani\Documents\ReQue\develop\qe\expanders\sensedisambiguation.py", line 1, in from pywsd import disambiguate File "C:\ProgramData\Anaconda3\envs\ReQue\lib\site-packages\pywsd__init.py", line 14, in from wn import WordNet ImportError: cannot import name 'WordNet' from 'wn' (C:\ProgramData\Anaconda3\envs\ReQue\lib\site-packages\wn\init__.py)

hosseinfani commented 3 years ago

Seems there is a dependency conflict for pywsd library. See here for the full story. So, we have to fix the wordnet version to 0.0.23. We did that in our environment.yml. One can downgrade wn to this version by pip install -U wn=0.0.23

bhrt-sharma commented 3 years ago

it was actually pip install -U wn==0.0.22 that worked for me on python3.8 environment.