You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First off, thank you for building sematch! This package has been incredibly valuable for me.
Suggestion / question - is there any reason why WordNetSimilarity is restricted to only nouns at the moment? I noticed that synsets seem to be restricted to nouns only, but WordNet includes verb taxonomies also.
nltk.corpus.wordnet.synsets doesn't require the POS argument to be passed in (it defaults to nltk.corpus.wordnet.POS_LIST, so I think a potentially nice extension would be to remove the restriction on measuring similarity between nouns only
The text was updated successfully, but these errors were encountered:
I'm not the original author, but I agree with you. I believe there is no technical reason for this, there just wasn't a use case that needed similarity between other POS.
The change is fairly straightforward, I will get back to it once we achieve Py3 compatibility.
First off, thank you for building sematch! This package has been incredibly valuable for me.
Suggestion / question - is there any reason why
WordNetSimilarity
is restricted to only nouns at the moment? I noticed that synsets seem to be restricted to nouns only, but WordNet includes verb taxonomies also.Relevant code:
wn.NOUN
here: https://github.com/gsi-upm/sematch/blob/master/sematch/semantic/similarity.py#L232word_similarity
does not override the default parameter: https://github.com/gsi-upm/sematch/blob/master/sematch/semantic/similarity.py#L334-L335 (in fact, it appears that all callers ofword2synset
assume that the input word is a noun)nltk.corpus.wordnet.synsets
doesn't require the POS argument to be passed in (it defaults tonltk.corpus.wordnet.POS_LIST
, so I think a potentially nice extension would be to remove the restriction on measuring similarity between nouns onlyThe text was updated successfully, but these errors were encountered: