Man is [+HUMAN], [+MALE], [+ADULT]
Woman is [+HUMAN], [-MALE], [+ADULT]
[+HUMAN] and [+ADULT] = similarity features
[+-MALE] is the discrimating features
传统语义学和将此理论应用于计算语义学的共同问题是
"Is there a specific list of features that we can use to compare any
"If so, what are the features on this list?"
concepts?"
dog_sense = wn.synsets('dog')[0] # It's http://goo.gl/b9sg9X
jb_sense = wn.synsets('James_Baldwin')[0] # It's http://goo.gl/CQQIG9
# Features to check against whether the 'dubious' concept is a human or an animal
human = wn.synset('person.n.01') # i.e. [+human]
animal = wn.synset('animal.n.01') # i.e. [+animal]
if dog_sense.wup_similarity(animal) > dog_sense.wup_similarity(human):
print "Dog is more of an animal than human"
elif dog_sense.wup_similarity(animal) < dog_sense.wup_similarity(human):
print "Dog is more of a human than animal"
你可以试着用一些相似性函数来筛选。但这本质上与遵循超词树是一样的——所有的wordnet相似性函数在计算中都使用了超词距离。另外,synset的许多可选属性可能值得探讨,但是它们的存在可能非常不一致。在
这取决于你的“选择限制”是什么,或者我称之为语义特征,因为在经典语义学中,存在着一个
concepts
的世界,要比较我们必须找到的概念例如:
传统语义学和将此理论应用于计算语义学的共同问题是
(参见www.acl.ldc.upenn.edu/E/E91/E91-1034.pdf更多详情)
回到WordNet,我可以建议两种方法来解决“选择限制”
首先,检查上一个词的区别特征,但是首先你必须决定什么是区别特征。为了区分动物和人类,让我们把区别特征作为[+-human]和[+-animal]。在
^{pr2}$其次,按照@Jacob的建议检查相似性度量。
相关问题 更多 >
编程相关推荐