Skip to content

Commit abe403d

Browse files
author
Sherry Yang
committed
Fix for publishing.
1 parent 734b0d2 commit abe403d

3 files changed

Lines changed: 88 additions & 15 deletions

File tree

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

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,12 @@ Key phrase extraction can provide some context to this review by extracting the
5353

5454
In the classic Foundry portal, you can test out Azure Language's key phrase extraction feature in the Language Playground.
5555

56-
![Screenshot of the Language playground's key phrase extraction capability.](../media/playground-key-phrases.png)
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+
:::
5762

5863
#### Entity recognition and linking
5964

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

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

89-
![Screenshot of the Language playground's named entity recognition capability.](../media/playground-named-entities.png)
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+
:::
90100

91101
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.
92102

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

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

130-
![Screenshot of the Language playground's sentiment capability.](../media/playground-sentiment.png)
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+
:::
131146

132147
#### Summarization
133148

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

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

152-
![Screenshot of the Language playground's summarization capability.](../media/playground-summarize.png)
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+
:::
153173

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

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

Lines changed: 40 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,26 @@
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-
![Screenshot of the Azure portal with the marketplace open to the Language resource.](../media/azure-portal-create-resource.png)
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+
:::
1217

1318
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.
1419

15-
![Screenshot of a Language resource in the Azure portal with the key and endpoint page open.](../media/azure-portal-credentials.png)
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+
:::
1626

1727
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.
1828

1929
>[!NOTE]
20-
>You can review foundational material on [applications and using endpoints here](/training/modules/get-started-with-ai-in-azure/5-endpoints?pivots=text?azure-portal=true).
30+
>You can review foundational material on applications and using endpoints in: [Get started with AI in Azure](/training/modules/get-started-with-ai-in-azure/5-endpoints?pivots=text?azure-portal=true).
2131
2232
The **Azure Language SDK** is a set of programming libraries that let your application talk to Azure’s Language Services. You would use the SDK when writing applications in **Python**, **JavaScript**, **C#**, or **Java**.
2333

@@ -36,7 +46,13 @@ pip install azure-ai-textanalytics
3646
```
3747

3848
In the code editor, we can create one text file, and one Python file which contains application code.
39-
![Screenshot of Visual Studio Code with a text file open.](../media/python-sdk-document-example.png)
49+
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+
:::
4056

4157
At the start of the application code, import the SDK.
4258

@@ -45,15 +61,32 @@ from azure.ai.textanalytics import TextAnalyticsClient
4561
from azure.core.credentials import AzureKeyCredential
4662
```
4763

48-
![Screenshot of Visual Studio Code with a Python file open with a focus on the client object created.](../media/python-sdk-client-example.png)
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+
:::
4970

5071
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.
5172

5273
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.
53-
![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)
74+
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+
:::
5481

5582
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.
56-
![Screenshot of Visual Studio Code with the terminal open with a focus on the results.](../media/python-sdk-results.png)
83+
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+
:::
5790

5891
## Examples of code to use with the Azure Language Python SDK
5992

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

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,44 @@ 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)
19+
:::image
20+
type: content
21+
source: ../media/azure-language-mcp-details.png
22+
alt-text: Screenshot of the Azure Language MCP server description page in the new Foundry portal.
23+
lightbox: ../media/azure-language-mcp-details.png
24+
:::
2025

2126
## Use the Azure Language MCP Server in Foundry portal
2227

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

25-
![Screenshot of the agent in the Foundry playground.](../media/agent-playground.png)
30+
:::image
31+
type: content
32+
source: ../media/agent-playground.png
33+
alt-text: Screenshot of the agent in the Foundry playground.
34+
lightbox: ../media/agent-playground.png
35+
:::
2636

2737
> [!NOTE]
2838
> A Foundry resource provides a unified environment that already includes access to Language tools. You do not need to create a separate Azure Language resource to access the Azure Language MCP server.
2939
3040
You can add tools, such as **Azure Language in Foundry Tools**, to your agent in the Foundry playground.
3141

32-
![Screenshot of the tool browser open in the playground and the Azure Language in Foundry Tools selected.](../media/add-tool-to-agent.png)
42+
:::image
43+
type: content
44+
source: ../media/add-tool-to-agent.png
45+
alt-text: Screenshot of the tool browser open in the playground and the Azure Language in Foundry Tools selected.
46+
lightbox: ../media/add-tool-to-agent.png
47+
:::
3348

3449
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.
3550

36-
![Screenshot of Azure Language in Foundry Tools used in the Foundry playground.](../media/language-agent-response.png)
51+
:::image
52+
type: content
53+
source: ../media/language-agent-response.png
54+
alt-text: Screenshot of Azure Language in Foundry Tools used in the Foundry playground.
55+
lightbox: ../media/language-agent-response.png
56+
:::
3757

3858
Next, try out text analysis in Foundry yourself.
3959

0 commit comments

Comments
 (0)