Closed hwsamuel closed 9 years ago
@hwsamuel , did you get it from using the all-words disambiguation? Which function did you call?
Meanwhile, I'll check through all functions that uses compare_overlaps()
and fix it asap.
I used the simple_lesk
function, no errors with the disambiguate
function
@hwsamuel , could I check with you about which word is causing the error?
I'm wondering whether is it that
I have been checking but it seems like the first scenario for my corpora.
I have added a check to all Lesk-like functions to return None
if word isn't in WordNet.
Also, user can choose to check whether synset exist for a word. Or use a the pywsd word has synset function in pywsd.util.has_synset()
, e.g.
from pywsd.utils import has_synset
from pywsd.lesk import simple_lesk
word = 'bing'
context = 'I was using bing to search for WSD software'.
if has_synset(word):
disambiguated = pywsd.lesk(word, context)
else:
disambiguated = None
@hwsamuel does it work for your dataset now?
Still broken, same error. Downloaded today.
@germanferrero can you post the code and the text you're trying to disambiguate? Otherwise it's hard to know what error you're getting.
I get the following error, possibly because no synset exists.