Sentiment Analysis and Opinion Mining with the Azure Text Analytics Client Library
This demo showcases the sentiment analysis and opinion mining feature of the Azure Cognitive Language service using the Text Analyics client library for Python.
Features
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.
See more about sentiment analysis and opinion mining in the product documentation.
Getting Started
Prerequisites
- Python 3.6 later
- An Azure subscription and a Language resource to run this demo.
Installation
This demo requires the azure-ai-textanalytics client library and flask.
pip install azure-ai-textanalytics flask
Quickstart
git clone https://github.com/Azure-Samples/pycon2022-azure-sdk-textanalytics.git
cd pycon2022-azure-sdk-textanalytics
Demo
-
Set your Language endpoint and API key values to the following environment variables:
AZURE_LANGUAGE_ENDPOINT
AZURE_LANGUAGE_KEY
-
Run
python app.py
and open the browser onhttp://127.0.0.1:5000/
.
Resources
Discover more with the Azure Text Analytics client library: