Skip to content

Commit cc7d7b8

Browse files
author
Sherry Yang
committed
Update.
1 parent abe403d commit cc7d7b8

3 files changed

Lines changed: 19 additions & 61 deletions

File tree

learn-pr/wwl-data-ai/get-started-with-text-analysis-in-azure/includes/2-azure-language.md

Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,8 @@ Key phrase extraction can provide some context to this review by extracting the
5252
- waiter
5353

5454
In the classic Foundry portal, you can test out Azure Language's key phrase extraction feature in the Language Playground.
55-
56-
:::image
57-
type: content
58-
source: ../media/playground-key-phrases.png
59-
alt-text: Screenshot of the Language playground's key phrase extraction capability.
60-
lightbox: ../media/playground-key-phrases.png
61-
:::
55+
56+
![Screenshot of the Language playground's key phrase extraction capability.](../media/playground-key-phrases.png)
6257

6358
#### Entity recognition and linking
6459

@@ -91,12 +86,7 @@ You can provide Azure Language with unstructured text and it returns a list of *
9186

9287
In the classic Foundry portal, you can test out Azure Language's named entity recognition feature in the Language Playground.
9388

94-
:::image
95-
type: content
96-
source: ../media/playground-named-entities.png
97-
alt-text: Screenshot of the Language playground's named entity recognition capability.
98-
lightbox: ../media/playground-named-entities.png
99-
:::
89+
![Screenshot of the Language playground's named entity recognition capability.](../media/playground-named-entities.png)
10090

10191
Azure Language also supports **entity linking** to help disambiguate entities by linking to a specific reference. For recognized entities, the service returns a URL for a relevant *Wikipedia* article.
10292

@@ -137,12 +127,7 @@ The service would provide sentence analysis for each of the sentences. Each sent
137127

138128
In classic Foundry portal, you can test out Azure Language's sentiment analysis capability in the Language Playground.
139129

140-
:::image
141-
type: content
142-
source: ../media/playground-sentiment.png
143-
alt-text: Screenshot of the Language playground's sentiment capability.
144-
lightbox: ../media/playground-sentiment.png
145-
:::
130+
![Screenshot of the Language playground's sentiment capability.](../media/playground-sentiment.png)
146131

147132
#### Summarization
148133

@@ -164,12 +149,7 @@ The individual experienced an exceptional dining experience at the Foundry diner
164149

165150
In classic Foundry portal, you can test out Azure Language's summarization capability in the Language Playground.
166151

167-
:::image
168-
type: content
169-
source: ../media/playground-summarize.png
170-
alt-text: Screenshot of the Language playground's summarization capability.
171-
lightbox: ../media/playground-summarize.png
172-
:::
152+
![Screenshot of the Language playground's summarization capability.](../media/playground-summarize.png)
173153

174154
Next, let's learn how to get started with the Azure Language software development kit (SDK) to build a lightweight application.
175155

learn-pr/wwl-data-ai/get-started-with-text-analysis-in-azure/includes/3-language-sdk.md

Lines changed: 6 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,11 @@
88

99
A Foundry resource and project is sufficient for using Azure Language in Foundry portal, but you will need an additional *Language resource* to use the Azure Language SDK. You can create a Language resource in the Azure portal, or programmatically in a command line interface (CLI).
1010

11-
:::image
12-
type: content
13-
source: ../media/azure-portal-create-resource.png
14-
alt-text: Screenshot of the Azure portal with the marketplace open to the Language resource.
15-
lightbox: ../media/azure-portal-create-resource.png
16-
:::
11+
![Screenshot of the Azure portal with the marketplace open to the Language resource.](../media/azure-portal-create-resource.png)
1712

1813
When you create a Language resource, Azure creates an *endpoint* for Azure Language. The endpoint is the address to a specific cloud service or model. We can find the Language service endpoint and key in the Azure portal.
1914

20-
:::image
21-
type: content
22-
source: ../media/azure-portal-credentials.png
23-
alt-text: Screenshot of a Language resource in the Azure portal with the key and endpoint page open.
24-
lightbox: ../media/azure-portal-credentials.png
25-
:::
15+
![Screenshot of a Language resource in the Azure portal with the key and endpoint page open.](../media/azure-portal-credentials.png)
2616

2717
When you run your application code, your application sends a request, or call, to the endpoint. The call can be sent using the REST API or SDK. The service returns a response, such as key phrases detected, in a format known as JSON.
2818

@@ -47,12 +37,7 @@ pip install azure-ai-textanalytics
4737

4838
In the code editor, we can create one text file, and one Python file which contains application code.
4939

50-
:::image
51-
type: content
52-
source: ../media/python-sdk-document-example.png
53-
alt-text: Screenshot of Visual Studio Code with a text file open.
54-
lightbox: ../media/python-sdk-document-example.png
55-
:::
40+
![Screenshot of Visual Studio Code with a text file open.](../media/python-sdk-document-example.png)
5641

5742
At the start of the application code, import the SDK.
5843

@@ -61,32 +46,17 @@ from azure.ai.textanalytics import TextAnalyticsClient
6146
from azure.core.credentials import AzureKeyCredential
6247
```
6348

64-
:::image
65-
type: content
66-
source: ../media/python-sdk-client-example.png
67-
alt-text: Screenshot of Visual Studio Code with a Python file open with a focus on the client object created.
68-
lightbox: ../media/python-sdk-client-example.png
69-
:::
49+
![Screenshot of Visual Studio Code with a Python file open with a focus on the client object created.](../media/python-sdk-client-example.png)
7050

7151
Then we use our Language resource endpoint and key to create an authenticated **client object**, the tool your code uses to communicate with a service. The client object knows the service's endpoint, carries credentials (like keys or tokens), exposes methods (for example: `analyze_sentiment()`), and handles sending requests and receiving responses under the hood.
7252

7353
We use the client's methods to call Azure Language functions. For example, we can extract key phrases with `client.extract_key_phrases()`, recognize entities with the function `client.recognize_entities()`, and analyze sentiment with `client.analyze_sentiment()`. To generate a summary, we need to use an asynchronous technique to begin the summarization task and retrieve the results.
7454

75-
:::image
76-
type: content
77-
source: ../media/python-sdk-text-analysis-example.png
78-
alt-text: Screenshot of Visual Studio Code with a Python file open with a focus on the text analysis functions.
79-
lightbox: ../media/python-sdk-text-analysis-example.png
80-
:::
55+
![Screenshot of Visual Studio Code with a Python file open with a focus on the text analysis functions.](../media/python-sdk-text-analysis-example.png)
8156

8257
We can display the results of the analysis by running the application code in the terminal with the command `python <file_name>.py`. When we run the app, it uses Azure Language in our Foundry resource to perform each of the tasks.
8358

84-
:::image
85-
type: content
86-
source: ../media/python-sdk-results.png
87-
alt-text: Screenshot of Visual Studio Code with the terminal open with a focus on the results.
88-
lightbox: ../media/python-sdk-results.png
89-
:::
59+
![Screenshot of Visual Studio Code with the terminal open with a focus on the results.](../media/python-sdk-results.png)
9060

9161
## Examples of code to use with the Azure Language Python SDK
9262

learn-pr/wwl-data-ai/get-started-with-text-analysis-in-azure/includes/4-language-mcp.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ A **MCP server** gives an agent access to tools, data, or actions that the agent
1616

1717
You can access the Azure Language MCP server and other Foundry Tools in the *new* Foundry portal.
1818

19+
![Screenshot of the Azure Language MCP server description page in the new Foundry portal.](../media/azure-language-mcp-details.png)
20+
1921
:::image
2022
type: content
2123
source: ../media/azure-language-mcp-details.png
@@ -27,6 +29,8 @@ lightbox: ../media/azure-language-mcp-details.png
2729

2830
You can start out in the *new* Foundry portal by deploying a model and saving it in the Foundry playground as an agent.
2931

32+
![Screenshot of the agent in the Foundry playground.](../media/agent-playground.png)
33+
3034
:::image
3135
type: content
3236
source: ../media/agent-playground.png
@@ -39,6 +43,8 @@ lightbox: ../media/agent-playground.png
3943
4044
You can add tools, such as **Azure Language in Foundry Tools**, to your agent in the Foundry playground.
4145

46+
![Screenshot of the tool browser open in the playground and the Azure Language in Foundry Tools selected.](../media/add-tool-to-agent.png)
47+
4248
:::image
4349
type: content
4450
source: ../media/add-tool-to-agent.png
@@ -48,6 +54,8 @@ lightbox: ../media/add-tool-to-agent.png
4854

4955
To connect to the Azure Language MCP server, you need to configure your connection with your *Foundry resource name*. Once you've connected the MCP server to an agent as a tool, you can use prompts to instruct the agent to use the tool to analyze text. The ability to use Azure Language as a tool in an agent helps you build agentic solutions that make sense of text documents.
5056

57+
![Screenshot of Azure Language in Foundry Tools used in the Foundry playground.](../media/language-agent-response.png)
58+
5159
:::image
5260
type: content
5361
source: ../media/language-agent-response.png

0 commit comments

Comments
 (0)