センチメント分析

センチメント分析を使用すると、テキストの気分すなわちトーンを測定できます。

センチメント分析は、表現の主観的情報を分析します。たとえば、トピック、個人、エンティティに対する、意見、評価、感情または態度です。表現は、肯定的、否定的、中立という信頼度スコアを使用して分類されます。

言語サービスの感情分析では、自然言語処理(NLP)を使用します。このサービスはテキストを理解し、センチメント(肯定的、中立、混在、否定的)および信頼度スコアを返します。センテンスとアスペクトベース両方のセンチメント分析がサポートされます。

Aspectベースの感情分析

アスペクトベースのセンチメント分析(ABSA)は、入力ドキュメントの個々のアスペクトを抽出し、各アスペクトを極性クラスの1つ(肯定的、否定的、混在、中立)に分類します。言語APIは、各アスペクトの予測センチメントを使用して、各クラスの信頼度スコアと、入力での対応するオフセットも提供します。

信頼度スコアが1に近いとラベルの分類の信頼性が高いことを示しますが、値が小さくなると信頼度スコアも低くなります。各クラスの信頼度スコア範囲は0から1で、4つすべてのクラスの合計スコアが1になります。

たとえば、「Food is marginal、 but the service is so bad.」というレストラン・レビューには、食品のアスペクトに対して肯定的なセンチメントが含まれます。また、サービスのアスペクトでは非常に否定的なセンチメントが含まれます。全体的なセンチメントを否定的と分類すると、料理が良いという事実を無視することになります。ABSAは、エンティティの属性(またはコンポーネント)としてアスペクトを参照することで、この問題に対処します。また、電話の画面またはカメラの画質。

入力データが「今日は仕事でいい一日だった」である場合、日という1つのアスペクトは、肯定的100%、中立0%、混在0%、否定的0%のセンチメントとして識別されます。

センテンス・レベルのセンチメント分析

言語サービスは、テキストの各文の信頼度スコアを使用してセンテンス・レベルのセンチメントも提供します。ユース・ケースに基づいて、センテンスまたはドキュメントのセンチメント、またはABSA、あるいはその両方を選択できます。たとえば、顧客フィードバック分析シナリオでは、さらにアクションを行うために人によるレビューが必要なセンテンスを識別することをお薦めします。

ユース・ケース

次のようなビジネス・ユース・ケースがあります:

  • ブランド・モニタリング

  • 市場研究のモニタリング

  • 従業員フィードバック分析

  • 顧客レビューおよび電子メール分析

  • 製品アンケート

たとえば、顧客や従業員の未加工のアンケート回答を、センチメント分析モデルを使用して処理できます。その後、結果を集計して、分析とフォローアップを行ったり、エンゲージメントに役立てたりできます。

ソーシャル・メディア・モニタリングをセンチメント分析とともに使用すると、顧客の全体的なムード・スイングを抽出できます。たとえば、新製品が売り出されるときや、競合市場調査が行われるときです。

サポートされている機能

  • 分析レベル: センテンスおよびアスペクト

  • 英語

  • リクエストでは、単一レコードおよび複数レコード・バッチがサポートされます。

入力テキストでサポートされる言語

  • 英語
  • スペイン語

アスペクトベースのセンチメント分析の例

入力テキスト センチメント 極性スコア
OCI recently added new services to the 
existing compliance program including SOC, HIPAA, and ISO, to 
enable our customers to solve their use cases. We also released 
new technical papers and guidance documents related to Object 
Storage, the Australian Prudential Regulation Authority (APRA), 
and the Central Bank of Brazil. These resources help regulated 
customers better understand how OCI supports their 
regional and industry-specific compliance requirements. Not 
only are we expanding our number of compliance offerings and 
regulatory alignments, we continue to add regions and services 
at a faster rate.
services 
[Positive]
OCI 
[Positive]
resources 
[Positive]
regions 
[Positive]
1. OCI recently added new services to the existing compliance program including SOC, HIPAA, and ISO, to enable 
our customers to solve their use cases. NEUTRAL 0.5512
2. We also released new white papers and guidance documents related to Object Storage, the Australian Prudential 
Regulation Authority (APRA), and the Central Bank of Brazil. NEUTRAL 0.5512
3. These resources help regulated customers better understand how OCI supports their regional and industry-
specific compliance requirements. POSITIVE 0.6763
4. Not only are we expanding our number of compliance offerings and regulatory alignments, we continue to add 
regions and services at a faster rate. POSITIVE 0.4658

サンプル・リクエスト:

APIリクエスト形式:
POST https://<region-url>/20210101/actions/batchDetectLanguageSentiments?level=ASPECT 
入力JSON
{
"documents": [
    {
        "key" : "doc1",
        "text" : "OCI recently added new services to existing compliance 
program including SOC, HIPAA, and ISO to enable our customers to solve their 
use cases. We also released new white papers and guidance documents related to 
Object Storage, the Australian Prudential Regulation Authority (APRA), and the 
Central Bank of Brazil. These resources help regulated customers better 
understand how OCI supports their regional and industry-specific compliance 
requirements. Not only are we expanding our number of compliance offerings and 
regulatory alignments, we continue to add regions and services at a faster clip."
    }
]
}
レスポンスJSON:
{
    "documents": [
        {
            "key": "1",
            "documentSentiment": "Positive",
            "documentScores": {
                "Neutral": 0.44763687,
                "Positive": 0.46578798,
                "Mixed": 0.064058214,
                "Negative": 0.022516921
            },
            "sentences": [
                {
                    "offset": 0,
                    "length": 147,
                    "text": "OCI recently added new services to the existing compliance program including SOC, HIPAA, and ISO, to enable our customers to solve their use cases.",
                    "sentiment": "Neutral",
                    "scores": {
                        "Negative": 0.0154264,
                        "Mixed": 0,
                        "Neutral": 0.98231775,
                        "Positive": 0.0022558598
                    }
                },
                {
                    "offset": 148,
                    "length": 170,
                    "text": "We also released new white papers and guidance documents related to Object Storage, the Australian Prudential Regulation Authority (APRA), and the Central Bank of Brazil.",
                    "sentiment": "Neutral",
                    "scores": {
                        "Mixed": 0,
                        "Neutral": 0.97296304,
                        "Negative": 0.007886417,
                        "Positive": 0.019150572
                    }
                },
                {
                    "offset": 319,
                    "length": 137,
                    "text": "These resources help regulated customers better understand how OCI supports their regional and industry-specific compliance requirements.",
                    "sentiment": "Neutral",
                    "scores": {
                        "Neutral": 0.5864549,
                        "Positive": 0.35583654,
                        "Mixed": 0.02932497,
                        "Negative": 0.028383587
                    }
                },
                {
                    "offset": 457,
                    "length": 145,
                    "text": "Not only are we expanding our number of compliance offerings and regulatory alignments, we continue to add regions and services at a faster rate.",
                    "sentiment": "Positive",
                    "scores": {
                        "Negative": 0.022516921,
                        "Positive": 0.46578798,
                        "Mixed": 0.064058214,
                        "Neutral": 0.44763687
                    }
                }
            ],
            "aspects": [
                {
                    "offset": 325,
                    "length": 9,
                    "text": "resources",
                    "sentiment": "Positive",
                    "scores": {
                        "Positive": 0.9841423768960832,
                        "Negative": 0.01398839404953044,
                        "Neutral": 0,
                        "Mixed": 0.0018692290543864747
                    }
                }
            ],
            "languageCode": "en"
        }
    ],
    "errors": []
}

センテンス・レベルのセンチメント分析の例

入力テキスト センチメント 極性スコア

私はグリッドードルに感銘を受け、表面を通して均一な熱を保っていました。私の唯一の懸念は、コードが短すぎること、私はそれが少なくとも16インチの長さだったことを本当に願っていますので、私は延長コードを購入する必要はありません。全体的に見て、値段はいいと思います。

センテンス1 [肯定的な]

センテンス2 [否定的]

センテンス3 [中立]

Positive: 0.9997686743736267,
Negative: 0.00023133518698159605,
Neutral: 0
Positive: 0.0043107867240906,
Negative: 
0.9956892132759094,
Neutral": 0
Positive: 0.9908866882324219,
Negative: 0,
Neutral: 0.009113257750868797
Positive: 0.0933981895446777,
Negative: 0,
Neutral: 0.906601857487112284

サンプル・リクエスト:

APIリクエスト形式:
POST https://<region-url>/20210101/actions/batchDetectLanguageSentiments?level=SENTENCE
入力JSON

{
    "documents": [
        {
            "key": "doc1",
            "text": "OCI recently added new services to existing compliance program including SOC, HIPAA, and ISO to enable our customers to solve their use cases. We also released new white papers and guidance documents related to Object Storage, the Australian Prudential Regulation Authority (APRA), and the Central Bank of Brazil. These resources help regulated customers better understand how OCI supports their regional and industry-specific compliance requirements. Not only are we expanding our number of compliance offerings and regulatory alignments, we continue to add regions and services at a faster clip."
        }
    ]
}
レスポンスJSON:
{
    "documents": [
        {
            "key": "doc1",
            "documentSentiment": "positive",
            "documentScores": {
                "positive": 0.6763582,
                "mixed": 0.08708387,
                "neutral": 0.12376911,
                "negative": 0.11278882
            },
            "sentences": [
                {
                    "text": "OCI recently added new services to existing compliance program including SOC, HIPAA, and ISO to enable our customers to solve their use cases.",
                    "sentiment": "neutral",
                    "scores": {
                        "positive": 0.15475821,
                        "neutral": 0.5567636,
                        "mixed": 0.09907853,
                        "negative": 0.18939966
                    }
                },
                {
                    "text": "We also released new white papers and guidance documents related to Object Storage, the Australian Prudential Regulation Authority (APRA), and the Central Bank of Brazil.",
                    "sentiment": "neutral",
                    "scores": {
                        "mixed": 0.07148028,
                        "negative": 0.12318015,
                        "positive": 0.11138679,
                        "neutral": 0.6939528
                    }
                },
                {
                    "text": "These resources help regulated customers better understand how OCI supports their regional and industry-specific compliance requirements.",
                    "sentiment": "positive",
                    "scores": {
                        "negative": 0.11278882,
                        "neutral": 0.12376911,
                        "mixed": 0.08708387,
                        "positive": 0.6763582
                    }
                },
                {
                    "text": "Not only are we expanding our number of compliance offerings and regulatory alignments, we continue to add regions and services at a faster clip.",
                    "sentiment": "neutral",
                    "scores": {
                        "mixed": 0.0973028,
                        "positive": 0.18745653,
                        "negative": 0.1592837,
                        "neutral": 0.55595696
                    }
                }
            ],
            "aspects": [],
            "languageCode": "en"
        }
    ],
    "errors": []
}

実際の値および入力や出力の構造は、モデルのバージョンによって異なる場合があります。SDKのドキュメントを参照してください。

制約

  • 識別されるアスペクトは、部分一致または分割されたアスペクトである場合があります。

  • センテンスのセマンティクスまたは構造が正しくない場合、アスペクトが予期したものと異なる可能性があります。

  • 代名詞は側面とはみなされません。

  • 皮は認識されません。