Skip to content

Commit 6f5a8d5

Browse files
committed
acrolinx
1 parent 74bb1c4 commit 6f5a8d5

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

articles/ai-services/language-service/key-phrase-extraction/tutorials/integrate-power-bi.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ ms.custom:
1818

1919
Microsoft Power BI Desktop is a free application that lets you connect to, transform, and visualize your data. Key phrase extraction, one of the features of Azure AI Language, provides natural language processing. Given raw unstructured text, it can extract the most important phrases, analyze sentiment, and identify well-known entities such as brands. Together, these tools can help you quickly see what your customers are talking about and how they feel about it.
2020

21-
In this tutorial, you'll learn how to:
21+
In this tutorial, you learn how to:
2222

2323
> [!div class="checklist"]
2424
> * Use Power BI Desktop to import and transform data
@@ -40,7 +40,7 @@ In this tutorial, you'll learn how to:
4040
To get started, open Power BI Desktop and load the comma-separated value (CSV) file that you downloaded as part of the [prerequisites](#prerequisites). This file represents a day's worth of hypothetical activity in a fictional small company's support forum.
4141

4242
> [!NOTE]
43-
> Power BI can use data from a wide variety of web-based sources, such as SQL databases. See the [Power Query documentation](/power-query/connectors/) for more information.
43+
> Power BI can use data from a wide variety of web-based sources, such as SQL databases. For more information, *see* [Power Query documentation](/power-query/connectors/).
4444
4545
In the main Power BI Desktop window, select the **Home** ribbon. In the **External data** group of the ribbon, open the **Get Data** drop-down menu and select **Text/CSV**.
4646

@@ -50,15 +50,15 @@ The Open dialog appears. Navigate to your Downloads folder, or to the folder whe
5050

5151
![The CSV Import dialog](../media/tutorials/power-bi/csv-import.png)
5252

53-
The CSV import dialog lets you verify that Power BI Desktop has correctly detected the character set, delimiter, header rows, and column types. This information is all correct, so select **Load**.
53+
The CSV import dialog lets you verify that Power BI Desktop correctly detected the character set, delimiter, header rows, and column types. This information is all correct, so select **Load**.
5454

55-
To see the loaded data, click the **Data View** button on the left edge of the Power BI workspace. A table opens that contains the data, like in Microsoft Excel.
55+
To see the loaded data, select the **Data View** button on the left edge of the Power BI workspace. A table opens that contains the data, like in Microsoft Excel.
5656

5757
![The initial view of the imported data](../media/tutorials/power-bi/initial-data-view.png)
5858

5959
## Prepare the data
6060

61-
You might need to transform your data in Power BI Desktop before it's ready to be processed by Key Phrase Extraction.
61+
You might need to transform your data in Power BI Desktop before Key Phrase Extraction processing.
6262

6363
The sample data contains a `subject` column and a `comment` column. With the Merge Columns function in Power BI Desktop, you can extract key phrases from the data in both these columns, rather than just the `comment` column.
6464

@@ -68,7 +68,7 @@ In Power BI Desktop, select the **Home** ribbon. In the **External data** group,
6868

6969
Select `FabrikamComments` in the **Queries** list at the left side of the window if it isn't already selected.
7070

71-
Now select both the `subject` and `comment` columns in the table. You might need to scroll horizontally to see these columns. First click the `subject` column header, then hold down the Control key and click the `comment` column header.
71+
Now select both the `subject` and `comment` columns in the table. You might need to scroll horizontally to see these columns. First select the `subject` column header, then hold down the Control key and select the `comment` column header.
7272

7373
![Selecting fields to be merged](../media/tutorials/power-bi/select-columns.png)
7474

@@ -82,7 +82,7 @@ You might also consider filtering out blank messages using the Remove Empty filt
8282

8383
## Understand the API
8484

85-
[Key Phrase Extraction](/rest/api/language/text-analysis-runtime/analyze-text?view=rest-language-2024-11-01&preserve-view=true&tabs=HTTP#analyzetextkeyphraseextractioninput) can process up to a thousand text documents per HTTP request. Power BI prefers to deal with records one at a time, so in this tutorial your calls to the API will include only a single document each. The Key Phrases API requires the following fields for each document being processed.
85+
[Key Phrase Extraction](/rest/api/language/text-analysis-runtime/analyze-text?view=rest-language-2024-11-01&preserve-view=true&tabs=HTTP#analyzetextkeyphraseextractioninput) can process up to a thousand text documents per HTTP request. Power BI prefers to deal with records one at a time, so in this tutorial your calls to the API include only a single document each. The Key Phrases API requires the following fields for each document being processed.
8686

8787
| Field | Description |
8888
| - | - |
@@ -92,10 +92,10 @@ You might also consider filtering out blank messages using the Remove Empty filt
9292

9393
## Create a custom function
9494

95-
Now you're ready to create the custom function that will integrate Power BI and Key Phrase Extraction. The function receives the text to be processed as a parameter. It converts data to and from the required JSON format and makes the HTTP request to the Key Phrases API. The function then parses the response from the API and returns a string that contains a comma-separated list of the extracted key phrases.
95+
Now you're ready to create the custom function that integrates Power BI and Key Phrase Extraction. The function receives the text to be processed as a parameter. It converts data to and from the required JSON format and makes the HTTP request to the Key Phrases API. The function then parses the response from the API and returns a string that contains a comma-separated list of the extracted key phrases.
9696

9797
> [!NOTE]
98-
> Power BI Desktop custom functions are written in the [Power Query M formula language](/powerquery-m/power-query-m-reference), or just "M" for short. M is a functional programming language based on [F#](/dotnet/fsharp/). You don't need to be a programmer to finish this tutorial, though; the required code is included below.
98+
> Power BI Desktop custom functions are written in the [Power Query M formula language](/powerquery-m/power-query-m-reference), or just "M" for short. M is a functional programming language based on [F#](/dotnet/fsharp/). You don't need to be a programmer to finish this tutorial, though; the required code is included.
9999
100100
In Power BI Desktop, make sure you're still in the Query Editor window. If you aren't, select the **Home** ribbon, and in the **External data** group, select **Edit Queries**.
101101

@@ -106,7 +106,7 @@ A new query, initially named `Query1`, appears in the Queries list. Double-click
106106
Now, in the **Home** ribbon, in the **Query** group, select **Advanced Editor** to open the Advanced Editor window. Delete the code that's already in that window and paste in the following code.
107107

108108
> [!NOTE]
109-
> Replace the example endpoint below (containing `<your-custom-subdomain>`) with the endpoint generated for your Language resource. You can find this endpoint by signing in to the [Azure portal](https://azure.microsoft.com/features/azure-portal/), navigating to your resource, and selecting **Key and endpoint**.
109+
> Replace the following example endpoint (containing `<your-custom-subdomain>`) with the endpoint generated for your Language resource. You can find this endpoint by signing in to the [Azure portal](https://azure.microsoft.com/features/azure-portal/), navigating to your resource, and selecting **Key and endpoint**.
110110
111111

112112
```fsharp
@@ -153,12 +153,12 @@ After you close the Invoke Custom Function dialog, a banner may appear asking yo
153153
Select **Edit Credentials,** make sure `Anonymous` is selected in the dialog, then select **Connect.**
154154

155155
> [!NOTE]
156-
> You select `Anonymous` because Key Phrase Extraction authenticates requests using your access key, so Power BI does not need to provide credentials for the HTTP request itself.
156+
> You select `Anonymous` because Key Phrase Extraction authenticates requests using your access key, so Power BI doesn't need to provide credentials for the HTTP request itself.
157157
158158
> [!div class="mx-imgBorder"]
159159
> ![setting authentication to anonymous](../media/tutorials/power-bi/access-web-content.png)
160160
161-
If you see the Edit Credentials banner even after choosing anonymous access, you might have forgotten to paste your Language resource key into the code in the `KeyPhrases` [custom function](#create-a-custom-function).
161+
If you see the Edit Credentials banner even after choosing anonymous access, you check to see if you pasted your Language resource key into the code in the `KeyPhrases` [custom function](#create-a-custom-function).
162162

163163
Next, a banner may appear asking you to provide information about your data sources' privacy.
164164

@@ -170,20 +170,20 @@ Select **Continue** and choose `Public` for each of the data sources in the dial
170170

171171
## Create the word cloud
172172

173-
Once you have dealt with any banners that appear, select **Close & Apply** in the Home ribbon to close the Query Editor.
173+
Once you address with any banners that appear, select **Close & Apply** in the Home ribbon to close the Query Editor.
174174

175175
Power BI Desktop takes a moment to make the necessary HTTP requests. For each row in the table, the new `keyphrases` column contains the key phrases detected in the text by the Key Phrases API.
176176

177-
Now you'll use this column to generate a word cloud. To get started, click the **Report** button in the main Power BI Desktop window, to the left of the workspace.
177+
Now you use this column to generate a word cloud. To get started, select the **Report** button in the main Power BI Desktop window, to the left of the workspace.
178178

179179
> [!NOTE]
180-
> Why use extracted key phrases to generate a word cloud, rather than the full text of every comment? The key phrases provide us with the *important* words from our customer comments, not just the *most common* words. Also, word sizing in the resulting cloud isn't skewed by the frequent use of a word in a relatively small number of comments.
180+
> Why use extracted key phrases to generate a word cloud, rather than the full text of every comment? The key phrases provide us with the *important* words from our customer comments, not just the *most common* words. Also, word sizing in the resulting cloud doesn't correlate to the frequent use of a word in a relatively small number of comments.
181181
182-
If you don't already have the Word Cloud custom visual installed, install it. In the Visualizations panel to the right of the workspace, click the three dots (**...**) and choose **Import From Market**. If the word "cloud" is not among the displayed visualization tools in the list, you can search for "cloud" and click the **Add** button next the Word Cloud visual. Power BI installs the Word Cloud visual and lets you know that it installed successfully.
182+
If you don't already have the Word Cloud custom visual installed, install it. In the Visualizations panel to the right of the workspace, select the three dots (**...**) and choose **Import From Market**. If the word "cloud" isn't among the displayed visualization tools in the list, you can search for "cloud" and select the **Add** button next the Word Cloud visual. Power BI installs the Word Cloud visual and lets you know that it installed successfully.
183183

184184
![adding a custom visual](../media/tutorials/power-bi/add-custom-visuals.png)<br><br>
185185

186-
First, click the Word Cloud icon in the Visualizations panel.
186+
First, select the Word Cloud icon in the Visualizations panel.
187187

188188
![Word Cloud icon in visualizations panel](../media/tutorials/power-bi/visualizations-panel.png)
189189

@@ -193,19 +193,19 @@ Now switch to the Format page of the Visualizations panel. In the Stop Words cat
193193

194194
![activating default stop words](../media/tutorials/power-bi/default-stop-words.png)
195195

196-
Down a little further in this panel, turn off **Rotate Text** and **Title**.
196+
Scroll down the panel and turn off **Rotate Text** and **Title**.
197197

198198
![activate focus mode](../media/tutorials/power-bi/word-cloud-focus-mode.png)
199199

200-
Select the Focus Mode tool in the report to get a better look at our word cloud. The tool expands the word cloud to fill the entire workspace, as shown below.
200+
Select the Focus Mode tool in the report to get a better look at our word cloud. The tool expands the word cloud to fill the entire workspace.
201201

202202
![A Word Cloud](../media/tutorials/power-bi/word-cloud.png)
203203

204204
## Using other features
205205

206206
Azure AI Language also provides sentiment analysis and language detection. The language detection in particular is useful if your customer feedback isn't all in English.
207207

208-
Both of these other APIs are similar to the Key Phrases API. That means you can integrate them with Power BI Desktop using custom functions that are nearly identical to the one you created in this tutorial. Just create a blank query and paste the appropriate code below into the Advanced Editor, as you did earlier. (Don't forget your access key!) Then, as before, use the function to add a new column to the table.
208+
Both of these other APIs are similar to the Key Phrases API. That means you can integrate them with Power BI Desktop using custom functions that are nearly identical to the one you created in this tutorial. Just create a blank query and paste the appropriate code into the Advanced Editor, as you did earlier. (Don't forget your access key!) Then, as before, use the function to add a new column to the table.
209209

210210
The Sentiment Analysis function below returns a label indicating how positive the sentiment expressed in the text is.
211211

0 commit comments

Comments
 (0)