<p>这取决于你的“选择限制”是什么,或者我称之为语义特征,因为在经典语义学中,存在着一个<code>concepts</code>的世界,要比较我们必须找到的概念</p>
<ul>
<li><strong>区分特征</strong>(即用于区分它们的概念特征)和</li>
<li><strong>相似性特征</strong>(即概念的特征相似并突出区分它们的必要性)</li>
</ul>
<p>例如:</p>
<pre><code>Man is [+HUMAN], [+MALE], [+ADULT]
Woman is [+HUMAN], [-MALE], [+ADULT]
[+HUMAN] and [+ADULT] = similarity features
[+-MALE] is the discrimating features
</code></pre>
<p>传统语义学和将此理论应用于计算语义学的共同问题是</p>
<blockquote>
<p>"Is there a specific list of features that we can use to compare any</p>
<p>"If so, what are the features on this list?"
concepts?"</p>
</blockquote>
<p>(参见www.acl.ldc.upenn.edu/E/E91/E91-1034.pdf更多详情)</p>
<p>回到WordNet,我可以建议两种方法来解决“选择限制”</p>
<p>首先,<strong>检查上一个词的区别特征</strong>,但是首先你必须决定什么是区别特征。为了区分动物和人类,让我们把区别特征作为[+-human]和[+-animal]。在</p>
^{pr2}$
<p>其次,<strong>按照@Jacob的建议检查相似性度量。</strong></p>
<pre><code>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"
</code></pre>