I know how to get the number of different senses a word has with polysemy count in Wordnet (via NLTK). But I was wondering if it is also possible to return these different senses, rather than just the number, because I'd like to use the senses in the rest of my script. Any one have a clue? Thanks!
This should work:
def polysemy(word):
return wn.synsets(word)
You were getting the number of senses because you were applying the len()
function to your list of senses.