azure-ai-textanalytics-py

Solid

Azure AI Text Analytics SDK for sentiment analysis, entity recognition, key phrases, language detection, PII, and healthcare NLP. Use for natural language processing on text. Triggers: "text analytics", "sentiment analysis", "entity recognition", "key phrase", "PII detection", "TextAnalyticsClient".

AI & Automation 2,541 stars 295 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 96/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Azure AI Text Analytics SDK for Python Client library for Azure AI Language service NLP capabilities including sentiment, entities, key phrases, and more. ## Installation ```bash pip install azure-ai-textanalytics ``` ## Environment Variables ```bash AZURE_LANGUAGE_ENDPOINT=https://<resource>.cognitiveservices.azure.com AZURE_LANGUAGE_KEY=<your-api-key> # If using API key ``` ## Authentication ### API Key ```python import os from azure.core.credentials import AzureKeyCredential from azure.ai.textanalytics import TextAnalyticsClient endpoint = os.environ["AZURE_LANGUAGE_ENDPOINT"] key = os.environ["AZURE_LANGUAGE_KEY"] client = TextAnalyticsClient(endpoint, AzureKeyCredential(key)) ``` ### Entra ID (Recommended) ```python from azure.ai.textanalytics import TextAnalyticsClient from azure.identity import DefaultAzureCredential client = TextAnalyticsClient( endpoint=os.environ["AZURE_LANGUAGE_ENDPOINT"], credential=DefaultAzureCredential() ) ``` ## Sentiment Analysis ```python documents = [ "I had a wonderful trip to Seattle last week!", "The food was terrible and the service was slow." ] result = client.analyze_sentiment(documents, show_opinion_mining=True) for doc in result: if not doc.is_error: print(f"Sentiment: {doc.sentiment}") print(f"Scores: pos={doc.confidence_scores.positive:.2f}, " f"neg={doc.confidence_scores.negative:.2f}, " f"neu={doc.confidence_scores.neutral:.2f}") ...

Details

Author
microsoft
Repository
microsoft/skills
Created
4 months ago
Last Updated
yesterday
Language
TypeScript
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category