Skip to content

Commit 8cf1bca

Browse files
Merge pull request #53473 from sherzyang/NEW-get-started-with-text-analysis-in-azure
Fix for publishing.
2 parents ac4b63b + 75ce730 commit 8cf1bca

29 files changed

Lines changed: 11 additions & 13 deletions

learn-pr/wwl-data-ai/get-started-with-text-analysis-in-azure/1-introduction.yml renamed to learn-pr/wwl-data-ai/get-started-text-analysis-azure/1-introduction.yml

File renamed without changes.

learn-pr/wwl-data-ai/get-started-with-text-analysis-in-azure/2-azure-language.yml renamed to learn-pr/wwl-data-ai/get-started-text-analysis-azure/2-azure-language.yml

File renamed without changes.

learn-pr/wwl-data-ai/get-started-with-text-analysis-in-azure/3-language-sdk.yml renamed to learn-pr/wwl-data-ai/get-started-text-analysis-azure/3-language-sdk.yml

File renamed without changes.

learn-pr/wwl-data-ai/get-started-with-text-analysis-in-azure/4-language-mcp.yml renamed to learn-pr/wwl-data-ai/get-started-text-analysis-azure/4-language-mcp.yml

File renamed without changes.

learn-pr/wwl-data-ai/get-started-with-text-analysis-in-azure/5-exercise.yml renamed to learn-pr/wwl-data-ai/get-started-text-analysis-azure/5-exercise.yml

File renamed without changes.

learn-pr/wwl-data-ai/get-started-with-text-analysis-in-azure/6-knowledge-check.yml renamed to learn-pr/wwl-data-ai/get-started-text-analysis-azure/6-knowledge-check.yml

File renamed without changes.

learn-pr/wwl-data-ai/get-started-with-text-analysis-in-azure/7-summary.yml renamed to learn-pr/wwl-data-ai/get-started-text-analysis-azure/7-summary.yml

File renamed without changes.

learn-pr/wwl-data-ai/get-started-with-text-analysis-in-azure/includes/1-introduction.md renamed to learn-pr/wwl-data-ai/get-started-text-analysis-azure/includes/1-introduction.md

File renamed without changes.

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

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ First, we might want to extract the keywords and phrases used in some text, whic
3535

3636
For example, you might receive a review such as:
3737

38-
> "*I had a fantastic meal at the Foundry diner in Seattle on Saturday. The mushroom risotto was perfectly prepared, and really tasty. Our waiter, Pete, was friendly and efficient; and gave us a great recommendation for a dessert (strawberry cheesecake). I'd definitely recommend this place for a casual dinner.*"
38+
> "*I had a fantastic meal at the diner in Seattle on Saturday. The mushroom risotto was perfectly prepared, and really tasty. Our waiter, Pete, was friendly and efficient; and gave us a great recommendation for a dessert (strawberry cheesecake). I'd definitely recommend this place for a casual dinner.*"
3939
4040
Key phrase extraction can provide some context to this review by extracting the following phrases:
4141
- casual dinner
4242
- dessert
4343
- fantastic meal
44-
- Foundry diner
44+
- diner
4545
- great recommendation
4646
- mushroom risotto
4747
- Pete
@@ -53,7 +53,7 @@ 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 type="content" source="../media/playground-key-phrases.png" alt-text="Screenshot of the Language playground's key phrase extraction capability." lightbox="../media/playground-key-phrases.png":::
5757

5858
#### Entity recognition and linking
5959

@@ -80,8 +80,6 @@ You can provide Azure Language with unstructured text and it returns a list of *
8080
|DateTime|TimeRange|"6pm to 7pm"|
8181
|DateTime|Duration|"1 minute and 45 seconds"|
8282
|DateTime|Set|"every Tuesday"|
83-
|URL||"`https://www.bing.com`"|
84-
|Email||"`[email protected]`"|
8583
|US-based Phone Number||"(312) 555-0176"|
8684

8785
In the classic Foundry portal, you can test out Azure Language's named entity recognition feature in the Language Playground.
@@ -109,7 +107,7 @@ Azure Language returns sentiment scores in three categories: positive, neutral,
109107

110108
We could analyze the sentiment of our restaurant review:
111109

112-
> "*I had a fantastic meal at the Foundry diner in Seattle on Saturday. The mushroom risotto was perfectly prepared, and really tasty. Our waiter, Pete, was friendly and efficient; and gave us a great recommendation for a dessert (strawberry cheesecake). I'd definitely recommend this place for a casual dinner.*"
110+
> "*I had a fantastic meal at the diner in Seattle on Saturday. The mushroom risotto was perfectly prepared, and really tasty. Our waiter, Pete, was friendly and efficient; and gave us a great recommendation for a dessert (strawberry cheesecake). I'd definitely recommend this place for a casual dinner.*"
113111
114112
The sentiment score for the review might be:
115113

@@ -135,17 +133,17 @@ With **text summarization**, we can generate both *extractive* summaries that in
135133

136134
Given the example text:
137135

138-
> "*I had a fantastic meal at the Foundry diner in Seattle on Saturday. The mushroom risotto was perfectly prepared, and really tasty. Our waiter, Pete, was friendly and efficient; and gave us a great recommendation for a dessert (strawberry cheesecake). I'd definitely recommend this place for a casual dinner.*"
136+
> "*I had a fantastic meal at the diner in Seattle on Saturday. The mushroom risotto was perfectly prepared, and really tasty. Our waiter, Pete, was friendly and efficient; and gave us a great recommendation for a dessert (strawberry cheesecake). I'd definitely recommend this place for a casual dinner.*"
139137
140138
We could extract an:
141139

142140
**Extractive summary**
143-
- (Rank score: 100%) I had a fantastic meal at the Foundry diner in Seattle on Saturday.
141+
- (Rank score: 100%) I had a fantastic meal at the diner in Seattle on Saturday.
144142
- (Rank score: 52%) The mushroom risotto was perfectly prepared, and really tasty.
145143
- (Rank score: 63%) I'd definitely recommend this place for a casual dinner.
146144

147145
**Abstractive summary**
148-
The individual experienced an exceptional dining experience at the Foundry diner in Seattle, highlighting the delectable mushroom risotto as a standout dish. They appreciated the friendly and efficient service provided by the waiter, Pete, who also offered a highly recommended dessert option—strawberry cheesecake. The overall ambiance and food quality were such that the diner was deemed suitable for a casual dinner. The positive review underscores the diner's ability to deliver a satisfying meal, paired with commendable customer service, making it a recommended destination for future dining in the area. The summary encapsulates the main points of enjoyment and recommendation without redundant details from the original document.
146+
The individual experienced an exceptional dining experience at the diner in Seattle, highlighting the delectable mushroom risotto as a standout dish. They appreciated the friendly and efficient service provided by the waiter, Pete, who also offered a highly recommended dessert option—strawberry cheesecake. The overall ambiance and food quality were such that the diner was deemed suitable for a casual dinner. The positive review underscores the diner's ability to deliver a satisfying meal, paired with commendable customer service, making it a recommended destination for future dining in the area. The summary encapsulates the main points of enjoyment and recommendation without redundant details from the original document.
149147

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

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ client = TextAnalyticsClient(endpoint=endpoint, credential=AzureKeyCredential(ke
7878
#### Key phrase extraction
7979

8080
```python
81-
text = "I had a fantastic meal at the Foundry diner in Seattle on Saturday. The mushroom risotto was perfectly prepared, and really tasty. Our waiter, Pete, was friendly and efficient; and gave us a great recommendation for a dessert (strawberry cheesecake). I'd definitely recommend this place for a casual dinner."
81+
text = "I had a fantastic meal at the diner in Seattle on Saturday. The mushroom risotto was perfectly prepared, and really tasty. Our waiter, Pete, was friendly and efficient; and gave us a great recommendation for a dessert (strawberry cheesecake). I'd definitely recommend this place for a casual dinner."
8282

8383
result = client.extract_key_phrases([text])[0]
8484

@@ -90,7 +90,7 @@ for phrase in result.key_phrases:
9090
#### Entity extraction
9191

9292
```python
93-
text = "I had a fantastic meal at the Foundry diner in Seattle on Saturday. The mushroom risotto was perfectly prepared, and really tasty. Our waiter, Pete, was friendly and efficient; and gave us a great recommendation for a dessert (strawberry cheesecake). I'd definitely recommend this place for a casual dinner."
93+
text = "I had a fantastic meal at the diner in Seattle on Saturday. The mushroom risotto was perfectly prepared, and really tasty. Our waiter, Pete, was friendly and efficient; and gave us a great recommendation for a dessert (strawberry cheesecake). I'd definitely recommend this place for a casual dinner."
9494

9595
result = client.recognize_entities([text])[0]
9696

@@ -101,7 +101,7 @@ for entity in result.entities:
101101
#### Sentiment analysis
102102

103103
```python
104-
text = "I had a fantastic meal at the Foundry diner in Seattle on Saturday. The mushroom risotto was perfectly prepared, and really tasty. Our waiter, Pete, was friendly and efficient; and gave us a great recommendation for a dessert (strawberry cheesecake). I'd definitely recommend this place for a casual dinner."
104+
text = "I had a fantastic meal at the diner in Seattle on Saturday. The mushroom risotto was perfectly prepared, and really tasty. Our waiter, Pete, was friendly and efficient; and gave us a great recommendation for a dessert (strawberry cheesecake). I'd definitely recommend this place for a casual dinner."
105105

106106
result = client.analyze_sentiment([text])[0]
107107

@@ -117,7 +117,7 @@ In the Python SDK, **extractive summarization** is done as a long‑running acti
117117
from azure.ai.textanalytics import ExtractiveSummaryAction
118118

119119
text = (
120-
"I had a fantastic meal at the Foundry diner in Seattle on Saturday. The mushroom risotto was perfectly prepared, and really tasty. Our waiter, Pete, was friendly and efficient; and gave us a great recommendation for a dessert (strawberry cheesecake). I'd definitely recommend this place for a casual dinner."
120+
"I had a fantastic meal at the diner in Seattle on Saturday. The mushroom risotto was perfectly prepared, and really tasty. Our waiter, Pete, was friendly and efficient; and gave us a great recommendation for a dessert (strawberry cheesecake). I'd definitely recommend this place for a casual dinner."
121121
)
122122

123123
poller = client.begin_analyze_actions(

0 commit comments

Comments
 (0)