What is sentiment analysis and opinion mining?
Sentiment analysis and opinion mining are features offered by the Language service, a collection of machine learning and AI algorithms in the cloud for developing intelligent applications that involve written language. These features help you find out what people think of your brand or topic by mining text for clues about positive or negative sentiment, and can associate them with specific aspects of the text.
Both sentiment analysis and opinion mining work with a variety of written languages.
Sentiment analysis
The sentiment analysis feature provides sentiment labels (such as "negative", "neutral" and "positive") based on the highest confidence score found by the service at a sentence and document-level. This feature also returns confidence scores between 0 and 1 for each document & sentences within it for positive, neutral and negative sentiment.
Opinion mining
Opinion mining is a feature of sentiment analysis. Also known as aspect-based sentiment analysis in Natural Language Processing (NLP), this feature provides more granular information about the opinions related to words (such as the attributes of products or services) in text.
Typical workflow
To use this feature, you submit data for analysis and handle the API output in your application. Analysis is performed as-is, with no added customization to the model used on your data.
Create an Azure AI Language resource, which grants you access to the features offered by Azure AI Language. It generates a password (called a key) and an endpoint URL that you use to authenticate API requests.
Create a request using either the REST API or the client library for C#, Java, JavaScript, and Python. You can also send asynchronous calls with a batch request to combine API requests for multiple features into a single call.
Send the request containing your text data. Your key and endpoint are used for authentication.
Stream or store the response locally.
Get started with sentiment analysis
To use sentiment analysis, you submit raw unstructured text for analysis and handle the API output in your application. Analysis is performed as-is, with no additional customization to the model used on your data. There are two ways to use sentiment analysis:
Development option | Description |
---|---|
Language studio | Language Studio is a web-based platform that lets you try entity linking with text examples without an Azure account, and your own data when you sign up. For more information, see the Language Studio website or language studio quickstart. |
REST API or Client library (Azure SDK) | Integrate sentiment analysis into your applications using the REST API, or the client library available in a variety of languages. For more information, see the sentiment analysis quickstart. |
Docker container | Use the available Docker container to deploy this feature on-premises. These docker containers enable you to bring the service closer to your data for compliance, security, or other operational reasons. |
Reference documentation and code samples
As you use this feature in your applications, see the following reference documentation and samples for Azure AI Language:
Development option / language | Reference documentation | Samples |
---|---|---|
REST API | REST API documentation | |
C# | C# documentation | C# samples |
Java | Java documentation | Java Samples |
JavaScript | JavaScript documentation | JavaScript samples |
Python | Python documentation | Python samples |
Responsible AI
An AI system includes not only the technology, but also the people who use it, the people who will be affected by it, and the environment in which it's deployed. Read the transparency note for sentiment analysis to learn about responsible AI use and deployment in your systems. You can also see the following articles for more information:
Next steps
- The quickstart articles with instructions on using the service for the first time.