Text Analysis
This post summarizes Text Analysis, module 2.2 of Level Up’s Azure AI Fundamentals series. The lesson is on YouTube as Azure AI Fundamentals AI-901 Exam: 2.2: Text Analysis. Module 2.1 is Choosing the Right AI Workload.
Text goes in. Meaning or metadata comes out.
Text analysis discovers meaning, patterns, and labels in existing language. Typical outputs are keywords, named entities, sentiment, categories, and summaries. It analyzes language and returns information about that language. It does not execute actions or create business records.
The current AI-901 objectives name four capabilities you should recognize. Questions often describe the desired output without naming the technique.
| Capability | Question it answers |
|---|---|
| Key-phrase extraction | What are the important topics? |
| Named-entity recognition | Who, what, and where are mentioned? |
| Sentiment analysis | What attitude or opinion is expressed? |
| Summarization | What is the essential meaning? |
Key-phrase extraction finds the important topics
Key-phrase extraction identifies the most important words or phrases in a passage. It does not have to label those phrases as people, places, or organizations.
From “The Contoso TrailMaster arrived late, and its battery will not charge,” possible phrases are Contoso TrailMaster, late delivery, and battery charging. Teams use this to tag documents, index support cases, discover recurring topics, and improve search.
The exam signal is a request to identify the main subjects or important phrases.
Named-entity recognition labels specific things
Named-entity recognition finds named items and assigns them types. “Maria Chen contacted Contoso from Seattle on September 12” can yield:
| Text | Entity type |
|---|---|
| Maria Chen | Person |
| Contoso | Organization |
| Seattle | Location |
| September 12 | Date |
Key phrases identify important topics. Named entities identify specific real-world items and label their types. A phrase can be important without being a named entity. The exam signal is people, organizations, locations, dates, products, or quantities.
Sentiment analysis estimates expressed opinion
Sentiment analysis estimates whether language is positive, neutral, mixed, or negative. “The agent was helpful, but the replacement arrived broken” can be positive about the agent, negative about the replacement, and mixed overall.
Mixed sentiment is common when one part of a message is positive and another is negative. Use cases include prioritizing dissatisfied customers, analyzing reviews, and tracking experience by sentence or by target. The exam signal is a request to determine how customers feel.
Summarization condenses existing text
Summarization shortens text while preserving its essential information. A 20-message support conversation might become: “Customer cannot charge the TrailMaster after a late delivery. Troubleshooting failed, and a replacement is requested.”
Extractive summarization selects important existing sentences. Abstractive summarization generates a new condensed explanation.
Summarization sits near generative AI. Condensing existing text is summarization. Creating a novel response is generative AI. The exam signal is a shorter version that contains the main points.
Classification, extraction, and generation are different transformations
| Transformation | Output | Example |
|---|---|---|
| Classification | A label from known categories | Billing complaint |
| Extraction | Information found in the input | TrailMaster, September 12 |
| Generation | Newly composed content | A personalized reply |
Classification asks which bucket. Extraction asks which facts. Generation asks what new content. They can appear in one workflow: classify the support case, extract the product and order number, then generate a response.
Named entities and information extraction answer different requests
Named-entity recognition identifies general entity types in language: person, organization, location, date. Information extraction produces structured fields for a defined purpose: invoice number, total, vendor, due date. It can process documents, images, audio, and video.
If the scenario requests named categories such as people and locations, choose named-entity recognition. If it requests fields for a record, choose information extraction.
Match the requested output
Ignore the industry. Find the requested output. Match that output to the capability.
| The system must… | Capability |
|---|---|
| Find recurring topics in complaints | Key-phrase extraction |
| Detect company and product names | Named-entity recognition |
| Identify dissatisfied customers | Sentiment analysis |
| Condense a long case history | Summarization |
| Route cases as billing, technical, or returns | Classification |
| Capture invoice number and total | Information extraction |
| Draft a personalized response | Generative AI |
The same message can support several capabilities. “I bought a TrailMaster in Seattle. It arrived three days late, and I’m extremely disappointed.” TrailMaster and Seattle are named entities. Late delivery is a key phrase. The attitude is negative sentiment. “Delivery complaint” is a classification label. Classify by the desired result.
A company that routes incoming messages into Billing, Technical support, Returns, and General inquiry needs classification. The system assigns each message to one of several predefined categories.
Bring this to your team
Level Up can run a personalized Azure AI Fundamentals workshop for your team. Tell us a little about your group and we’ll reply with pricing.