Install any skill in seconds. Free to start, no credit card required.
Get Started Free →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.
.claude/skills/azure-ai-textanalytics-py/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-20 | ✗→✓ | ▲ Improved | — | — |
| case-19 | ✗→✗ | = Same ✗ | — | — |
| case-11 | ✗→✗ | = Same ✗ | — | — |
| case-18 | ✗→✗ | = Same ✗ | — | — |
| case-17 | ✗→✗ | = Same ✗ | — | — |
Client library for Azure AI Language service NLP capabilities including sentiment, entities, key phrases, and more.
bashpip install azure-ai-textanalytics
bashAZURE_LANGUAGE_ENDPOINT=https://<resource>.cognitiveservices.azure.com AZURE_LANGUAGE_KEY=<your-api-key> # If using API key
pythonimport 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))
pythonfrom azure.ai.textanalytics import TextAnalyticsClient from azure.identity import DefaultAzureCredential client = TextAnalyticsClient( endpoint=os.environ["AZURE_LANGUAGE_ENDPOINT"], credential=DefaultAzureCredential() )
pythondocuments = [ "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}") # Opinion mining (aspect-based sentiment) for sentence in doc.sentences: for opinion in sentence.mined_opinions: target = opinion.target print(f" Target: '{target.text}' - {target.sentiment}") for assessment in opinion.assessments: print(f" Assessment: '{assessment.text}' - {assessment.sentiment}")
pythondocuments = ["Microsoft was founded by Bill Gates and Paul Allen in Albuquerque."] result = client.recognize_entities(documents) for doc in result: if not doc.is_error: for entity in doc.entities: print(f"Entity: {entity.text}") print(f" Category: {entity.category}") print(f" Subcategory: {entity.subcategory}") print(f" Confidence: {entity.confidence_score:.2f}")
pythondocuments = ["My SSN is 123-45-6789 and my email is john@example.com"] result = client.recognize_pii_entities(documents) for doc in result: if not doc.is_error: print(f"Redacted: {doc.redacted_text}") for entity in doc.entities: print(f"PII: {entity.text} ({entity.category})")
pythondocuments = ["Azure AI provides powerful machine learning capabilities for developers."] result = client.extract_key_phrases(documents) for doc in result: if not doc.is_error: print(f"Key phrases: {doc.key_phrases}")
pythondocuments = ["Ce document est en francais.", "This is written in English."] result = client.detect_language(documents) for doc in result: if not doc.is_error: print(f"Language: {doc.primary_language.name} ({doc.primary_language.iso6391_name})") print(f"Confidence: {doc.primary_language.confidence_score:.2f}")
pythondocuments = ["Patient has diabetes and was prescribed metformin 500mg twice daily."] poller = client.begin_analyze_healthcare_entities(documents) result = poller.result() for doc in result: if not doc.is_error: for entity in doc.entities: print(f"Entity: {entity.text}") print(f" Category: {entity.category}") print(f" Normalized: {entity.normalized_text}") # Entity links (UMLS, etc.) for link in entity.data_sources: print(f" Link: {link.name} - {link.entity_id}")
pythonfrom azure.ai.textanalytics import ( RecognizeEntitiesAction, ExtractKeyPhrasesAction, AnalyzeSentimentAction ) documents = ["Microsoft announced new Azure AI features at Build conference."] poller = client.begin_analyze_actions( documents, actions=[ RecognizeEntitiesAction(), ExtractKeyPhrasesAction(), AnalyzeSentimentAction() ] ) results = poller.result() for doc_results in results: for result in doc_results: if result.kind == "EntityRecognition": print(f"Entities: {[e.text for e in result.entities]}") elif result.kind == "KeyPhraseExtraction": print(f"Key phrases: {result.key_phrases}") elif result.kind == "SentimentAnalysis": print(f"Sentiment: {result.sentiment}")
pythonfrom azure.ai.textanalytics.aio import TextAnalyticsClient from azure.identity.aio import DefaultAzureCredential async def analyze(): async with TextAnalyticsClient( endpoint=endpoint, credential=DefaultAzureCredential() ) as client: result = await client.analyze_sentiment(documents) # Process results...
| Client | Purpose | |--------|---------| | TextAnalyticsClient | All text analytics operations | | TextAnalyticsClient (aio) | Async version |
| Method | Description | |--------|-------------| | analyze_sentiment | Sentiment analysis with opinion mining | | recognize_entities | Named entity recognition | | recognize_pii_entities | PII detection and redaction | | recognize_linked_entities | Entity linking to Wikipedia | | extract_key_phrases | Key phrase extraction | | detect_language | Language detection | | begin_analyze_healthcare_entities | Healthcare NLP (long-running) | | begin_analyze_actions | Multiple analyses in batch |
This skill is applicable to execute the workflow or actions described in the overview.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-19 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-11 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-18 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-17 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-06 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-16 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-07 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-22 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-09 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-21 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-08 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-03 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-12 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-02 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-10 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-04 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-15 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-20 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-13 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-01 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-05 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-14 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +5 percentage points is the difference between those two pass rates over the 22 comparable cases.
The per-case answers from this run were removed by the retention sweep, so the case table below shows the verdicts without the text either arm produced. The counts above were recorded at the time and are unaffected. Answers are now kept for 180 days.
Other measured skills in the registry, with their headline benchmark lift.