例如,在计算这两种含义之间的相似性时,采用以下两种含义:<代码>Synset(里程.n.03)和Synset(支持.v.09)
。
from nltk.corpus import wordnet as wn
mile = wn.synset( mile.n.03 )
support = wn.synset( support.v.09 )
support2 = wn.synset( documentation.n.03 )
wn.path_similarity(mile,support) #no output
wn.path_similarity(mile,support2) #get an output 0.08333
为什么会发生这种情况? 还是有一些根本错误,一是正在制造的?