Skip to content

Commit 419c827

Browse files
committed
updating endpoint information
1 parent f7f4959 commit 419c827

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed
35.2 KB
Loading

articles/cognitive-services/text-analytics/tutorials/tutorial-power-bi-key-phrases.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,13 +111,14 @@ A new query, initially named `Query1`, appears in the Queries list. Double-click
111111
Now, in the **Home** ribbon, in the **Query** group, click **Advanced Editor** to open the Advanced Editor window. Delete the code that's already in that window and paste in the following code.
112112

113113
> [!NOTE]
114-
> The examples below assume the Text Analytics API endpoint begins with `https://westus.api.cognitive.microsoft.com`. Text Analytics allows you to create a subscription in 13 different regions. If you signed up for the service in a different region, please make sure to use the endpoint for the region you selected. You can find this endpoint by signing in to the [Azure portal](https://azure.microsoft.com/features/azure-portal/), selecting your Text Analytics subscription, and selecting the Overview page.
114+
> Replace the example endpoint below (containing `<your-custom-subdomain>`) with the endpoint generated for your Text Analytics resource. You can find this endpoint by signing in to the [Azure portal](https://azure.microsoft.com/features/azure-portal/), selecting your Text Analytics subscription, and selecting `Quick start`.
115+
115116

116117
```fsharp
117118
// Returns key phrases from the text in a comma-separated list
118119
(text) => let
119120
apikey = "YOUR_API_KEY_HERE",
120-
endpoint = "https://westus.api.cognitive.microsoft.com/text/analytics/v2.1/keyPhrases",
121+
endpoint = "https://<your-custom-subdomain>.cognitiveservices.azure.com/text/analytics" + "/v2.1/keyPhrases",
121122
jsontext = Text.FromBinary(Json.FromValue(Text.Start(Text.Trim(text), 5000))),
122123
jsonbody = "{ documents: [ { language: ""en"", id: ""0"", text: " & jsontext & " } ] }",
123124
bytesbody = Text.ToBinary(jsonbody),
@@ -220,7 +221,7 @@ The Sentiment Analysis function below returns a score indicating how positive th
220221
// Returns the sentiment score of the text, from 0.0 (least favorable) to 1.0 (most favorable)
221222
(text) => let
222223
apikey = "YOUR_API_KEY_HERE",
223-
endpoint = "https://westus.api.cognitive.microsoft.com/text/analytics/v2.1/sentiment",
224+
endpoint = "https://<your-custom-subdomain>.cognitiveservices.azure.com/text/analytics/v2.1/sentiment",
224225
jsontext = Text.FromBinary(Json.FromValue(Text.Start(Text.Trim(text), 5000))),
225226
jsonbody = "{ documents: [ { language: ""en"", id: ""0"", text: " & jsontext & " } ] }",
226227
bytesbody = Text.ToBinary(jsonbody),
@@ -237,7 +238,7 @@ Here are two versions of a Language Detection function. The first returns the IS
237238
// Returns the two-letter language code (for example, 'en' for English) of the text
238239
(text) => let
239240
apikey = "YOUR_API_KEY_HERE",
240-
endpoint = "https://westus.api.cognitive.microsoft.com/text/analytics/v2.1/languages",
241+
endpoint = "https://<your-custom-subdomain>.cognitiveservices.azure.com/text/analytics/v2.1/languages",
241242
jsontext = Text.FromBinary(Json.FromValue(Text.Start(Text.Trim(text), 5000))),
242243
jsonbody = "{ documents: [ { id: ""0"", text: " & jsontext & " } ] }",
243244
bytesbody = Text.ToBinary(jsonbody),
@@ -251,7 +252,7 @@ in language
251252
// Returns the name (for example, 'English') of the language in which the text is written
252253
(text) => let
253254
apikey = "YOUR_API_KEY_HERE",
254-
endpoint = "https://westus.api.cognitive.microsoft.com/text/analytics/v2.1/languages",
255+
endpoint = "https://<your-custom-subdomain>.cognitiveservices.azure.com/text/analytics/v2.1/languages",
255256
jsontext = Text.FromBinary(Json.FromValue(Text.Start(Text.Trim(text), 5000))),
256257
jsonbody = "{ documents: [ { id: ""0"", text: " & jsontext & " } ] }",
257258
bytesbody = Text.ToBinary(jsonbody),
@@ -271,7 +272,7 @@ Finally, here's a variant of the Key Phrases function already presented that ret
271272
// Returns key phrases from the text as a list object
272273
(text) => let
273274
apikey = "YOUR_API_KEY_HERE",
274-
endpoint = "https://westus.api.cognitive.microsoft.com/text/analytics/v2.1/keyPhrases",
275+
endpoint = "https://<your-custom-subdomain>.cognitiveservices.azure.com/text/analytics/v2.1/keyPhrases",
275276
jsontext = Text.FromBinary(Json.FromValue(Text.Start(Text.Trim(text), 5000))),
276277
jsonbody = "{ documents: [ { language: ""en"", id: ""0"", text: " & jsontext & " } ] }",
277278
bytesbody = Text.ToBinary(jsonbody),

0 commit comments

Comments
 (0)