Sentimentanalyse
Mit der Sentimentanalyse kann die Stimmung oder der Ton eines Textes beurteilt werden.
Bei der Sentimentanalyse werden die subjektiven Informationen in einem Ausdruck analysiert. Beispiel: Meinungen, Bewertungen, Emotionen oder Einstellungen zu einem Thema, einer Person oder einer Entity. Ausdrücke werden mit einem Konfidenzscore als positiv, negativ oder neutral klassifiziert.
Die Sentimentanalyse des Language-Service verwendet Natural Language Processing (NLP). Der Service versteht den Text und gibt positive, neutrale, gemischte und negative Sentiments sowie einen Konfidenzscore zurück. Er unterstützt sowohl die satz- als auch die aspektbasierte Sentimentanalyse.
Aspektbasierte Sentimentanalyse
Die aspektbasierte Sentimentanalyse (ABSA) extrahiert die einzelnen Aspekte im Eingabedokument und ordnet jeden der Aspekte in eine der Polaritätsklassen ein: positiv, negativ, gemischt und neutral. Mit dem prognostizierten Sentiment für jeden Aspekt bietet die Sprach-API auch einen Konfidenzscore für jede der Klassen und die entsprechenden Offsets in der Eingabe.
Konfidenzscores näher an 1 weisen auf eine höhere Konfidenz in der Klassifizierung des Labels hin, während niedrigere Scores auf einen niedrigeren Konfidenzscore hinweisen. Der Bereich des Vertrauensscores für jede Klasse liegt zwischen 0 und 1, und der kumulative Score aller vier Klassen ergibt 1.
Beispiel: Eine Rezension zu einem Restaurant, die besagt: "Das Essen ist marginal, aber der Service ist so schlecht." enthält ein positives Sentiment für den Food-Aspekt. Ebenso enthält sie ein starkes negatives Sentiment für den Serviceaspekt. Die Einstufung des Sentiments als negativ würde die Tatsache vernachlässigen, dass das Essen gut war. ABSA löst dieses Problem, indem es auf einen Aspekt als Attribut (oder Komponente) einer Entity verweist. Ein weiteres Beispiel ist der Bildschirm eines Smartphones oder die Bildqualität einer Kamera.
Wenn der Eingabetext "Ich hatte heute einen guten Tag bei der Arbeit" lautet, wird ein einzelner Aspekt "Tag" mit diesen Sentiments identifiziert: 100% positiv, 0% neutral, 0% gemischt und 0% negativ.
Sentimentanalyse auf Satzebene
Der Language-Service bietet auch Gefühle auf Satzebene mit Vertrauensscores für jeden Satz im Text. Je nach Anwendungsfall können Sie entweder das Satz- oder Dokumentsentiment, ABSA oder beides auswählen. Beispiel: In einem Analyseszenario für Kundenfeedback möchten Sie möglicherweise Sätze identifizieren, die für weitere Aktionen von Menschen geprüft werden müssen.
Anwendungsfälle
Beispiele für Business-Anwendungsfälle:
-
Markenmonitoring
-
Marktforschungsmonitoring
-
Analyse von Mitarbeiterfeedback
-
Kundenrezensionen und E-Mail-Analysen
-
Produktumfragen
Beispiel: Die Antworten in Kunden- und Mitarbeiterumfragen können mit dem Sentimentanalysemodell verarbeitet werden. Die Ergebnisse können dann zur Analyse und Nachverfolgung aggregiert werden.
Social Media Monitoring kann mit Sentimentanalyse genutzt werden, um den gesamten Stimmungsschwung des Kunden zu extrahieren. z.B. wenn ein neues Produkt auf den Markt gebracht wird oder bei der Durchführung von Wettbewerbsmarktforschung.
Unterstützte Features
-
Analyseebene: Satz und Aspekt
-
Englisch
-
Anforderungen unterstützen Batches mit einzelnen Datensätzen und mit mehreren Datensätzen.
Unterstützte Sprachen für Eingabetext
- Englisch
- Spanisch
Beispiel einer aspektbasierten Sentimentanalyse
Eingabetext | Bedeutung | Polaritätsscore |
---|---|---|
|
|
|
Beispielanforderung:
- API-Anforderungsformat:
-
POST https://<region-url>/20210101/actions/batchDetectLanguageSentiments?level=ASPECT
- JSON-Eingabe
-
{ "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-Antwort
-
{ "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": [] }
Beispiel einer Sentimentanalyse auf Satzebene
Eingabetext | Bedeutung | Polaritätsscore |
---|---|---|
Ich war von der Grillplatte beeindruckt, da sie auf der gesamten Oberfläche eine gleichmäßige Hitze hält. Mein einziger Kritikpunkt ist, dass das Kabel zu kurz ist. Es sollte mindestens 40 cm lang sein, damit ich kein Verlängerungskabel brauche. Insgesamt ist sie OK für den Preis. |
Satz 1 [positiv] Satz 2 [Negativ]] Satz 3 [Neu] |
|
Beispielanforderung:
- API-Anforderungsformat:
-
POST https://<region-url>/20210101/actions/batchDetectLanguageSentiments?level=SENTENCE
- JSON-Eingabe
-
{ "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-Antwort
-
{ "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": [] }
Die tatsächlichen Werte sowie die Eingabe- und Ausgabestruktur können je nach Modellversion variieren. Weitere Informationen finden Sie in der SDK-Dokumentation.
Einschränkungen
-
Die ermittelten Aspekte können Teilübereinstimmungen oder Teilaspekte sein.
-
Wenn Sätze semantisch oder strukturell falsch sind, entsprechen die Aspekte möglicherweise nicht Ihren Erwartungen.
-
Pronomen werden nicht als Aspekte betrachtet.
-
Sarkasmus wird nicht erkannt.