You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: learn-pr/wwl-data-ai/get-started-with-text-analysis-in-azure/includes/2-azure-language.md
+24-4Lines changed: 24 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,7 +53,12 @@ Key phrase extraction can provide some context to this review by extracting the
53
53
54
54
In the classic Foundry portal, you can test out Azure Language's key phrase extraction feature in the Language Playground.
55
55
56
-

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
+
:::
57
62
58
63
#### Entity recognition and linking
59
64
@@ -86,7 +91,12 @@ You can provide Azure Language with unstructured text and it returns a list of *
86
91
87
92
In the classic Foundry portal, you can test out Azure Language's named entity recognition feature in the Language Playground.
88
93
89
-

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
+
:::
90
100
91
101
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.
92
102
@@ -127,7 +137,12 @@ The service would provide sentence analysis for each of the sentences. Each sent
127
137
128
138
In classic Foundry portal, you can test out Azure Language's sentiment analysis capability in the Language Playground.
129
139
130
-

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
+
:::
131
146
132
147
#### Summarization
133
148
@@ -149,7 +164,12 @@ The individual experienced an exceptional dining experience at the Foundry diner
149
164
150
165
In classic Foundry portal, you can test out Azure Language's summarization capability in the Language Playground.
151
166
152
-

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
+
:::
153
173
154
174
Next, let's learn how to get started with the Azure Language software development kit (SDK) to build a lightweight application.
Copy file name to clipboardExpand all lines: learn-pr/wwl-data-ai/get-started-with-text-analysis-in-azure/includes/3-language-sdk.md
+40-7Lines changed: 40 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,16 +8,26 @@
8
8
9
9
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).
10
10
11
-

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.
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.
14
19
15
-

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
+
:::
16
26
17
27
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.
18
28
19
29
>[!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).
21
31
22
32
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**.
At the start of the application code, import the SDK.
42
58
@@ -45,15 +61,32 @@ from azure.ai.textanalytics import TextAnalyticsClient
45
61
from azure.core.credentials import AzureKeyCredential
46
62
```
47
63
48
-

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
70
50
71
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.
51
72
52
73
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
-

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
-

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
+
:::
57
90
58
91
## Examples of code to use with the Azure Language Python SDK
Copy file name to clipboardExpand all lines: learn-pr/wwl-data-ai/get-started-with-text-analysis-in-azure/includes/4-language-mcp.md
+24-4Lines changed: 24 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,24 +16,44 @@ A **MCP server** gives an agent access to tools, data, or actions that the agent
16
16
17
17
You can access the Azure Language MCP server and other Foundry Tools in the *new* Foundry portal.
18
18
19
-

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
+
:::
20
25
21
26
## Use the Azure Language MCP Server in Foundry portal
22
27
23
28
You can start out in the *new* Foundry portal by deploying a model and saving it in the Foundry playground as an agent.
24
29
25
-

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
+
:::
26
36
27
37
> [!NOTE]
28
38
> 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.
29
39
30
40
You can add tools, such as **Azure Language in Foundry Tools**, to your agent in the Foundry playground.
31
41
32
-

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
+
:::
33
48
34
49
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.
35
50
36
-

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.
0 commit comments