擅长:python、mysql、java
<p>使用:</p>
<pre><code>wn.synset('dog.n.1').name()
</code></pre>
<p>而不是:</p>
<pre><code>wn.synset('dog.n.1').name
</code></pre>
<p>因为NLTK更改了Synset属性以获取函数。见<a href="https://github.com/nltk/nltk/commit/ba8ab7e23ea2b8d61029484098fd62d5986acd9c">https://github.com/nltk/nltk/commit/ba8ab7e23ea2b8d61029484098fd62d5986acd9c</a></p>
<p>这是对NLTK的API的一个很好的更改列表,以适合py3.x:<a href="https://github.com/nltk/nltk/wiki/Porting-your-code-to-NLTK-3.0">https://github.com/nltk/nltk/wiki/Porting-your-code-to-NLTK-3.0</a></p>