Azure AI Text Analytics for Python
Guides Python developers through Azure-powered text analysis and NLP workflows.
The evidence prioritizes DefaultAzureCredential, constrains the production credential chain, and uses context managers for clients and async credentials; it also documents a legacy API-key path and PII/healthcare examples. Points are deducted because it does not require user confirmation for sending data to Azure, disclose text/PII/healthcare data flow, retention, or compliance boundaries, or explain least-privilege permissions, recovery, and rollback.
Installation, authentication, sync/async lifecycle, major operations, and per-document error checks are mostly consistent, with notes on batch limits and long-running operations. Points are deducted for an unpinned SDK version, undefined variables in some examples, and thin guidance for exceptions, timeouts, retries, service outages, and input limits; static review cannot verify key paths, so the score stays at or below 10.
Triggers and target scenarios are reasonably clear, covering sentiment, entities, key phrases, PII, language, healthcare, and batch analysis. Points are deducted because non-fit boundaries, input/output contracts, and semantic limits are incomplete, Chinese-language support and mainland-China reachability are not addressed, and the core capability depends on an external Azure service with limited environment-fit evidence.
SKILL.md provides layered installation, environment, authentication, scenario, best-practice, and reference sections, with MIT, author, and 1.0.0 metadata; the repository README, license, and CI provide some governance signals. Points are deducted because the skill lacks a changelog, explicit maintenance owner/update path, FAQ, dependency pinning, and systematic troubleshooting, while the reference files duplicate some content.
Examples directly cover core Text Analytics calls and include result iteration, document-level error checks, PII redaction, batch operations, and async usage, providing useful coding acceleration. Points are deducted because several snippets are not complete runnable programs and omit resource setup, language parameters, production error handling, and verifiable output; static review cannot establish correctness, so the score is capped at 7.
The skill contains concrete code examples, API method names, reference files, and repository-level test/CI material, giving it some auditability. Points are deducted because there are no skill-specific tests, pinned dependency evidence, embedded official documentation, or real execution results, and the repository-level evidence does not demonstrate reproduction of this skill's key paths; static evidence is insufficient for more than 5.
- Before processing PII or healthcare text, clarify whether the data may be sent to Azure, applicable compliance requirements, regional deployment, and retention policies.
- Verify the current azure-ai-textanalytics API, dependency versions, batch limits, and regional service availability; the examples were not executed in this review.
- Add complete handling for exceptions, timeouts, retries, authentication failures, and input validation, and define context such as endpoint and documents in examples.
What it does & when to use it
This skill supports Python development with the Azure AI Text Analytics SDK for Azure AI Language. It covers sentiment analysis, opinion mining, entity recognition, key phrase extraction, language detection, PII detection, healthcare NLP, and batch actions. It recommends DefaultAzureCredential and deterministic client cleanup through synchronous or asynchronous context managers. It is a good fit for Azure-backed NLP integration, provided the project has a Language resource, endpoint, and suitable credentials.
It explains how to install azure-ai-textanalytics, configure AZURE_LANGUAGE_ENDPOINT and authentication variables, and call Azure through TextAnalyticsClient or its async counterpart. The examples process sentiment and mined opinions, named entities, redacted PII, key phrases, detected languages, healthcare entities, and long-running batch operations. They also show confidence scores, per-document error checks, and healthcare entity data-source links.
- A Python application needs to classify customer feedback as positive, negative, or neutral and inspect aspect-level opinions.
- A developer needs to extract people, organizations, locations, and other named entities with confidence scores.
- A text-processing workflow must detect and redact sensitive values such as Social Security numbers and email addresses.
- A healthcare application needs to identify medical entities and normalized information in clinical text.
- A service needs to run entity recognition, key phrase extraction, and sentiment analysis together across multiple documents.
Pros & cons
- Covers the main text-analysis operations, including sentiment, entities, PII, key phrases, language, and healthcare NLP.
- Provides both synchronous and asynchronous client patterns with explicit resource cleanup.
- Recommends DefaultAzureCredential for local development and Azure-hosted identity scenarios.
- Includes opinion mining, batch analysis, and per-document error handling.
- Requires access to Azure AI Language and a configured endpoint and credential.
- Does not document Azure resource provisioning, permission setup, or service pricing.
- Targets the Python SDK and provides no implementation for other languages.
- The supplied skill text includes no dedicated test suite or skill-specific test coverage evidence.
How to install
Install the collection with npx skills add microsoft/skills, then select the required skill in the wizard. For manual use, clone the repository and copy .github/plugins/azure-sdk-python/skills/azure-ai-textanalytics-py/. The skill explicitly provides pip install azure-ai-textanalytics for the Python package.
How to use
In an Agent Skills-compatible coding agent, ask for work containing triggers such as “text analytics,” “sentiment analysis,” “entity recognition,” “key phrase,” “PII detection,” or “TextAnalyticsClient.” Set AZURE_LANGUAGE_ENDPOINT and prefer DefaultAzureCredential; for production, set AZURE_TOKEN_CREDENTIALS=prod or a specific credential. Use with TextAnalyticsClient(...) for synchronous code and async with for the asynchronous credential and client. Azure resource provisioning is not documented by this skill.
Compared to similar skills
For authentication, the skill clearly favors DefaultAzureCredential and presents AzureKeyCredential only as a legacy path for existing keyed deployments that have not migrated to Entra ID. It does not provide a direct comparison with other text-analysis products or SDKs.