-
Notifications
You must be signed in to change notification settings - Fork 132
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
disambiguate bug #58
Comments
@r-reilly seemed like the synset signatures were off when the |
A similar problem with KeyError: 'president.n.06' |
Try a hard reinstall:
You should see this : >>> import pywsd
>>> pywsd.__version__
'1.2.3'
>>> from pywsd import disambiguate
Warming up PyWSD (takes ~10 secs)... took 8.754118204116821 secs.
>>> disambiguate('I am going to run for president')
[('I', None), ('am', None), ('going', Synset('travel.v.01')), ('to', None), ('run', Synset('run.v.34')), ('for', None), ('president', Synset('president_of_the_united_states.n.02'))] |
Is there a way to upgrade the spaCy dependency? it changes results |
Currently Do you mean to use SpaCy as the POS tagger? |
Interesting- never mind! Somehow my spaCy version changed with an install and I thought it was from this package. |
I got this:
After I reinstalled pywsd. Seems I have gotten the wrong wn module. Any advice? Thx! |
Traceback (most recent call last):
File "/Users/rreilly/anaconda3/envs/-/lib/python3.7/site-packages/pandas/core/indexes/base.py", line 2897, in get_loc
return self._engine.get_loc(key)
File "pandas/_libs/index.pyx", line 107, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/index.pyx", line 131, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/hashtable_class_helper.pxi", line 1607, in pandas._libs.hashtable.PyObjectHashTable.get_item
File "pandas/_libs/hashtable_class_helper.pxi", line 1614, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'light.n.04'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "", line 1, in
File "/Users/rreilly/anaconda3/envs/-/lib/python3.7/site-packages/pywsd/allwords_wsd.py", line 51, in disambiguate
from_cache=from_cache)
File "/Users/rreilly/anaconda3/envs/-/lib/python3.7/site-packages/pywsd/lesk.py", line 251, in simple_lesk
from_cache=from_cache)
File "/Users/rreilly/anaconda3/envs/-/lib/python3.7/site-packages/pywsd/lesk.py", line 226, in simple_signatures
from_cache=from_cache)
File "/Users/rreilly/anaconda3/envs/-/lib/python3.7/site-packages/pywsd/lesk.py", line 123, in signatures
from_cache=from_cache)
File "/Users/rreilly/anaconda3/envs/-/lib/python3.7/site-packages/pywsd/lesk.py", line 48, in synset_signatures
return synset_signatures_from_cache(ss, hyperhypo, adapted, original_lesk)
File "/Users/rreilly/anaconda3/envs/-/lib/python3.7/site-packages/pywsd/lesk.py", line 35, in synset_signatures_from_cache
return cached_signatures[ss.name()][signature_type]
File "/Users/rreilly/anaconda3/envs/-/lib/python3.7/site-packages/pandas/core/frame.py", line 2980, in getitem
indexer = self.columns.get_loc(key)
File "/Users/rreilly/anaconda3/envs/-/lib/python3.7/site-packages/pandas/core/indexes/base.py", line 2899, in get_loc
return self._engine.get_loc(self._maybe_cast_indexer(key))
File "pandas/_libs/index.pyx", line 107, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/index.pyx", line 131, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/hashtable_class_helper.pxi", line 1607, in pandas._libs.hashtable.PyObjectHashTable.get_item
File "pandas/_libs/hashtable_class_helper.pxi", line 1614, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'light.n.04'
The text was updated successfully, but these errors were encountered: