← ClaudeAtlas

azure-ai-textanalytics-pylisted

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".
aiskillstore/marketplace · ★ 329 · AI & Automation · score 82
Install: claude install-skill aiskillstore/marketplace
# 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}")