擅长:python、mysql、java
<p>您可以尝试使用<a href="http://www.clips.ua.ac.be/pattern" rel="nofollow">Pattern library</a></p>
<p>它为您的用例提供了一些有用的API:</p>
<pre><code> from pattern.en import comparative
comparative(‘cool’)
</code></pre>
<p>这给了</p>
^{pr2}$
<p>最高级的</p>
<pre><code>from pattern.en import superlative
superlative(‘cool’)
</code></pre>
<p>这给了</p>
<pre><code>'coolest'
</code></pre>
<p>Web演示:<a href="http://textanalysisonline.com/pattern-word-comparative" rel="nofollow">comparative</a>和<a href="http://textanalysisonline.com/pattern-word-superlative" rel="nofollow">superlative</a></p>