Skip to content

Commit 913f306

Browse files
author
Sherry Yang
committed
Add lightbox code.
1 parent 62c7141 commit 913f306

3 files changed

Lines changed: 12 additions & 13 deletions

File tree

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ You can provide Azure Language with unstructured text and it returns a list of *
8686

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

89-
![Screenshot of the Language playground's named entity recognition capability.](../media/playground-named-entities.png)
89+
:::image type="content" source="../media/playground-named-entities.png" alt-text="Screenshot of the Language playground's named entity recognition capability." lightbox="../media/playground-named-entities.png":::
9090

9191
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.
9292

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

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

130-
![Screenshot of the Language playground's sentiment capability.](../media/playground-sentiment.png)
130+
:::image type="content" source="../media/playground-sentiment.png" alt-text="Screenshot of the Language playground's sentiment capability." lightbox="../media/playground-sentiment.png":::
131131

132132
#### Summarization
133133

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

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

152-
![Screenshot of the Language playground's summarization capability.](../media/playground-summarize.png)
152+
:::image type="content" source="../media/playground-summarize.png" alt-text="Screenshot of the Language playground's summarization capability." lightbox="../media/playground-summarize.png":::
153153

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

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +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-
![Screenshot of the Azure portal with the marketplace open to the Language resource.](../media/azure-portal-create-resource.png)
11+
:::image type="content" source="../media/azure-portal-create-resource.png" alt-text="Screenshot of the Azure portal with the marketplace open to the Language resource." lightbox="../media/azure-portal-create-resource.png":::
1212

1313
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.
1414

15-
![Screenshot of a Language resource in the Azure portal with the key and endpoint page open.](../media/azure-portal-credentials.png)
15+
:::image type="content" source="../media/azure-portal-credentials.png" alt-text="Screenshot of a Language resource in the Azure portal with the key and endpoint page open." lightbox="../media/azure-portal-credentials.png":::
1616

1717
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.
1818

@@ -46,17 +46,17 @@ from azure.ai.textanalytics import TextAnalyticsClient
4646
from azure.core.credentials import AzureKeyCredential
4747
```
4848

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)
49+
:::image type="content" source="../media/python-sdk-client-example.png" alt-text="Screenshot of Visual Studio Code with a Python file open with a focus on the client object created." lightbox="../media/python-sdk-client-example.png":::
5050

5151
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.
5252

5353
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.
5454

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)
55+
:::image type="content" source="../media/python-sdk-text-analysis-example.png" alt-text="Screenshot of Visual Studio Code with a Python file open with a focus on the text analysis functions." lightbox="../media/python-sdk-text-analysis-example.png":::
5656

5757
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.
5858

59-
![Screenshot of Visual Studio Code with the terminal open with a focus on the results.](../media/python-sdk-results.png)
59+
:::image type="content" source="../media/python-sdk-results.png" alt-text="Screenshot of Visual Studio Code with the terminal open with a focus on the results." lightbox="../media/python-sdk-results.png":::
6060

6161
## Examples of code to use with the Azure Language Python SDK
6262

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,24 @@ 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 type="content" source="../media/azure-language-mcp-details.png" alt-text="Screenshot of the Azure Language MCP server description page in the new Foundry portal." lightbox="../media/azure-language-mcp-details.png":::
2020

2121
## Use the Azure Language MCP Server in Foundry portal
2222

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

25-
![Screenshot of the agent in the Foundry playground.](../media/agent-playground.png)
25+
:::image type="content" source="../media/agent-playground.png" alt-text="Screenshot of the agent in the Foundry playground." lightbox="../media/agent-playground.png":::
2626

2727
> [!NOTE]
2828
> 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.
2929
3030
You can add tools, such as **Azure Language in Foundry Tools**, to your agent in the Foundry playground.
3131

32-
![Screenshot of the tool browser open in the playground and the Azure Language in Foundry Tools selected.](../media/add-tool-to-agent.png)
32+
:::image type="content" source="../media/add-tool-to-agent.png" alt-text="Screenshot of the tool browser open in the playground and the Azure Language in Foundry Tools selected." lightbox="../media/add-tool-to-agent.png":::
3333

3434
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.
3535

36-
![Screenshot of Azure Language in Foundry Tools used in the Foundry playground.](../media/language-agent-response.png)
37-
36+
:::image type="content" source="../media/language-agent-response.png" alt-text="Screenshot of Azure Language in Foundry Tools used in the Foundry playground." lightbox="../media/language-agent-response.png":::
3837

3938
Next, try out text analysis in Foundry yourself.
4039

0 commit comments

Comments
 (0)