感情分析
Zia感情分析は、テキスト分析の一部で、テキストコンテンツを処理してメッセージのトーンとそれを通じて伝えられる感情を認識します。テキスト内の各文を分析し、そのトーンがポジティブ、ネガティブ、またはニュートラルであるかを判定します。次に、各文で認識された感情に基づいて、テキスト全体のトーンをこれら3つの感情のいずれかとして判定します。
レスポンスには、各文で検出された感情の信頼度スコアも返され、分析の精度を示します。信頼度スコアは0から1の範囲にあります。全体的な分析の信頼度スコアも返されます。
1回のリクエストで最大1500文字のテキストブロックを入力として渡すことができます。入力テキストはget_sentiment_analysis()に渡されます。
テキストのオプションのキーワードを渡すこともできます。これにより、感情分析はこれらのキーワードを含む文のみを処理し、それらの感情を判定します。他の文は無視されます。このメソッドは、2番目のパラメータとして空のリストを受け取ります。
以下で使用されているコンポーネントインスタンスziaの詳細については、こちらのヘルプセクションを参照してください。
使用パラメータ
| パラメータ名 | データ型 | 定義 |
|---|---|---|
| text | String | 必須パラメータ。分析するテキストを格納します。 |
| keyword | String | オプションパラメータ。キーワードを含む文をフィルタリングして感情を分析するためのキーワードを格納します。 |
copy
zia = app.zia()
result = zia.get_sentiment_analysis(
[
"Zoho Corporation, is an Indian multinational technology company that makes web-based business tools. It is best known for Zoho Office Suite. The company was founded by Sridhar Vembu and Tony Thomas and has a presence in seven locations with its global headquarters in Chennai, India, and corporate headquarters in Pleasanton, California.","Zoho"],
[],
)
サンプルレスポンスを以下に示します:
copy
{
"sentiment_prediction":[
{
"document_sentiment":"Neutral",
"sentence_analytics":[
{
"sentence":"Zoho Corporation, is an Indian multinational technology company that makes web-based business tools.",
"sentiment":"Neutral",
"confidence_scores":{
"negative":0,
"neutral":1,
"positive":0
}
},
{
"sentence":"It is best known for Zoho Office Suite.",
"sentiment":"Neutral",
"confidence_scores":{
"negative":0,
"neutral":0.6,
"positive":0.4
}
}
],
"overall_score":0.83
}
]
}
情報: 上記の操作を実行するために必要な権限レベルを確認するには、SDKスコープの表を参照してください。
最終更新日 2026-02-23 18:09:41 +0530 IST
Yes
No
Send your feedback to us
Skip
Submit