--- title: "感情分析" url: https://docs.catalyst.zoho.com/ja/sdk/nodejs/v2/zia-services/text-analytics/sentiment-analysis/ description: "このページでは、Node.jsアプリケーションで感情分析機能を使用する方法について、サンプルコードスニペットとともに説明します。" last_updated: 2026-03-30T08:10:30Z service: Zia Services type: general related_links: - name: "Sentiment Analysis - API" url: /ja/api/code-reference/zia-services/text-analytics/sentiment-analysis/#SentimentAnalysis - name: "Text Analytics" url: /ja/zia-services/help/text-analytics/introduction --- # Sentiment Analysis [Zia Sentiment Analysis](https://docs.catalyst.zoho.com/ja/zia-services/help/text-analytics/introduction)は、Text Analyticsの一部で、テキストコンテンツを処理してメッセージのトーンと、そこから伝わる感情を認識します。テキスト内の各文を分析して、そのトーンが**positive**、**negative**、または**neutral**のいずれであるかを判定します。次に、各文で認識された感情に基づいて、テキスト全体のトーンをこれら3つの感情のいずれかとして判定します。 レスポンスには、各文で検出された感情の信頼度スコアも返され、分析の精度が示されます。信頼度スコアは0から1の範囲です。全体的な分析の信頼度スコアも返されます。 1回のリクエストで最大**1500文字**のテキストブロックを入力として渡すことができます。入力テキストは`getSentimentAnalysis()`に渡されます。 テキストに対してオプションのキーワードを渡すこともできます。これにより、Sentiment Analysisはそれらのキーワードを含む文のみを処理して、感情を判定します。他の文は無視されます。 以下で使用されている`zia`リファレンスは、 [コンポーネントインスタンスページ](https://docs.catalyst.zoho.com/ja/sdk/nodejs/v2/zia-services/get-component-instance)で定義されています。 ```javascript zia.getSentimentAnalysis(['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']) //テキストとオプションのキーワードを渡して処理する .then((result) => console.log(result)) .catch((error) => console.log(error.toString())); ``` 受信するサンプルレスポンスを以下に示します。レスポンスはNode.jsの両方のバージョンで同じです。 #### Node js ```json "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 } ] ```