AlchemyAPI をテストしました。100% 正確というわけではありませんが、この種の技術はまだ初期段階にあると思います。
APIキーを取得するには、登録(無料)が必要です。
使用例は次のとおりです。http://access.alchemyapi.com/calls/text/TextGetTextSentiment?apikey=<insert your api key>&sentiment=1&showSourceText=1&text=Kindle%20e-book%20sales%20soar%20for%20Amazon.%20Amazon.com%20says%20it%20is%20selling%20more%20e-books%20for%20its%20Kindle%20electronic%20reading%20device%20than%20paperback%20and%20hardback%20print%20editions%20combined
入力は次のとおりです。
- センチメント=1
- showSourceText=1
- テキスト(サンプルテキストを使用し、uriでエンコードされています)
次の出力が得られました (予想される肯定的な感情ではなく、中立的な感情)。
<?xml version="1.0" encoding="UTF-8"?>
<results>
<status>OK</status>
<usage>By accessing AlchemyAPI or using information generated by AlchemyAPI, you are agreeing to be bound by the AlchemyAPI Terms of Use: http://www.alchemyapi.com/company/terms.html</usage>
<url></url>
<language>english</language>
<text>Kindle e-book sales soar for Amazon. Amazon.com says it is selling more e-books for its Kindle electronic reading device than paperback and hardback print editions combined</text>
<docSentiment>
<type>neutral</type>
</docSentiment>
</results>
別の使用例:http://access.alchemyapi.com/calls/text/TextGetTextSentiment?apikey=<insert your api key>&sentiment=1&showSourceText=1&text=kindle%20is%20amazing
そして出力:
<?xml version="1.0" encoding="UTF-8"?>
<results>
<status>OK</status>
<usage>By accessing AlchemyAPI or using information generated by AlchemyAPI, you are agreeing to be bound by the AlchemyAPI Terms of Use: http://www.alchemyapi.com/company/terms.html</usage>
<url></url>
<language>english</language>
<text>kindle is amazing</text>
<docSentiment>
<type>positive</type>
<score>0.283568</score>
</docSentiment>
</results>