What is sentiment analysis and opinion mining in Azure Cognitive Service for Language?

Sentiment analysis and opinion mining are features offered by Azure Cognitive Service for Language, 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.

  • Quickstarts are getting-started instructions to guide you through making requests to the service.
  • How-to guides contain instructions for using the service in more specific or customized ways.

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.

Deploy on premises using Docker containers

Use the available Docker container to deploy sentiment analysis on-premises. These docker containers enable you to bring the service closer to your data for compliance, security, or other operational reasons.

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 additional customization to the model used on your data.

  1. Create an Azure Language resource, which grants you access to the features offered by Azure Cognitive Service for Language. It will generate a password (called a key) and an endpoint URL that you'll use to authenticate API requests.

  2. 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.

  3. Send the request containing your data as raw unstructured text. Your key and endpoint will be used for authentication.

  4. Stream or store the response locally.

Responsible AI

An AI system includes not only the technology, but also the people who will use it, the people who will be affected by it, and the environment in which it is 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:

Reference documentation and code samples

As you use this feature in your applications, see the following reference documentation and samples for Azure Cognitive Services for 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

Next steps

There are two ways to get started using the entity linking feature:

  • Language Studio, which is a web-based platform that enables you to try several Language service features without needing to write code.
  • The quickstart article for instructions on making requests to the service using the REST API and client library SDK.