すべてのテキスト分析
テキスト分析全体として、前のセクションで説明した3つの機能の組み合わせが含まれます:感情分析、固有表現認識、およびキーワード抽出です。特定のテキストブロックに対してこれら3つのアクションすべてを実行し、テキストのトーン、認識されたエンティティの分類、およびテキストの要旨を提供するキーワードやフレーズを取得できます。
以下に示すように、1回のリクエストで最大1500文字のテキストブロックを入力として渡すことができます。テキストはget_text_analytics()に渡されます。また、オプションのキーワードを渡して、それらのキーワードを含む文のみに対して感情分析を実行することもできます。このメソッドは、2番目のパラメータとして空のリストを受け取ります。
レスポンスには、各テキスト分析機能の結果が含まれます。それぞれの機能の詳細については、各機能ページを参照してください。
以下で使用されているコンポーネントインスタンスziaの詳細については、こちらのヘルプセクションを参照してください。
使用パラメータ
| パラメータ名 | データ型 | 定義 |
|---|---|---|
| text | String | 必須パラメータ。分析するテキストを格納します。 |
copy
zia = app.zia()
result = zia.get_text_analytics(
[
"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
[
{
"keyword_extractor":{
"keywords":[
"Chennai",
"company",
"India",
"Indian",
"presence",
"locations",
"Pleasanton",
"California"
],
"keyphrases":[
"corporate headquarters",
"multinational technology company",
"Zoho Corporation",
"Zoho Office Suite",
"global headquarters",
"Tony Thomas",
"web-based business tools",
"Sridhar Vembu"
]
},
"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
}
},
{
"sentence":"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.",
"sentiment":"Neutral",
"confidence_scores":{
"negative":0,
"neutral":0.88,
"positive":0.12
}
}
],
"overall_score":0.83
}
],
"ner":{
"general_entities":[
{
"start_index":0,
"confidence_score":98,
"end_index":16,
"ner_tag":"Organization",
"token":"Zoho Corporation"
},
{
"start_index":24,
"confidence_score":99,
"end_index":30,
"ner_tag":"Miscellaneous",
"token":"Indian"
},
{
"start_index":122,
"confidence_score":90,
"end_index":139,
"ner_tag":"Miscellaneous",
"token":"Zoho Office Suite"
},
{
"start_index":168,
"confidence_score":99,
"end_index":181,
"ner_tag":"Person",
"token":"Sridhar Vembu"
},
{
"start_index":186,
"confidence_score":96,
"end_index":197,
"ner_tag":"Person",
"token":"Tony Thomas"
},
{
"start_index":220,
"confidence_score":100,
"end_index":225,
"ner_tag":"Number",
"token":"seven"
},
{
"start_index":268,
"confidence_score":99,
"end_index":275,
"ner_tag":"City",
"token":"Chennai"
},
{
"start_index":277,
"confidence_score":98,
"end_index":282,
"ner_tag":"Country",
"token":"India"
},
{
"start_index":314,
"confidence_score":99,
"end_index":324,
"ner_tag":"City",
"token":"Pleasanton"
},
{
"start_index":326,
"confidence_score":91,
"end_index":336,
"ner_tag":"State",
"token":"California"
}
]
}
}
]
情報: 上記の操作を実行するために必要な権限レベルを確認するには、SDKスコープの表を参照してください。
最終更新日 2026-02-23 18:09:41 +0530 IST
Yes
No
Send your feedback to us
Skip
Submit