Skip to content

Commit 147b7b7

Browse files
authored
Merge pull request #277767 from MicrosoftDocs/main
6/10/2024 PM Publish
2 parents 933240b + 30b2e7e commit 147b7b7

File tree

182 files changed

+2930
-3627
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

182 files changed

+2930
-3627
lines changed

.openpublishing.redirection.azure-resource-manager.json

Lines changed: 1943 additions & 1938 deletions
Large diffs are not rendered by default.

.openpublishing.redirection.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1649,6 +1649,11 @@
16491649
"source_path_from_root": "/articles/dns/dns-getstarted-create-recordset.md",
16501650
"redirect_url": "/azure/dns/dns-getstarted-powershell",
16511651
"redirect_document_id": false
1652+
},
1653+
{
1654+
"source_path_from_root": "/articles/time-series-insights/migration-to-adx.md",
1655+
"redirect_url": "/azure/time-series-insights/migration-to-fabric.md",
1656+
"redirect_document_id": false
16521657
},
16531658
{
16541659
"source_path_from_root": "/articles/dns/dns-operations-dnszones-cli-nodejs.md",

articles/ai-services/language-service/key-phrase-extraction/includes/quickstarts/csharp-sdk.md

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,40 +7,40 @@ ms.date: 12/19/2023
77
ms.author: jboback
88
---
99

10-
[Reference documentation](/dotnet/api/azure.ai.textanalytics?preserve-view=true&view=azure-dotnet) | [Additional samples](https://github.com/Azure/azure-sdk-for-net/tree/master/sdk/textanalytics/Azure.AI.TextAnalytics/samples) | [Package (NuGet)](https://www.nuget.org/packages/Azure.AI.TextAnalytics/5.2.0) | [Library source code](https://github.com/Azure/azure-sdk-for-net/tree/master/sdk/textanalytics/Azure.AI.TextAnalytics)
10+
[Reference documentation](/dotnet/api/azure.ai.textanalytics?preserve-view=true&view=azure-dotnet) | [More samples](https://github.com/Azure/azure-sdk-for-net/tree/master/sdk/textanalytics/Azure.AI.TextAnalytics/samples) | [Package (NuGet)](https://www.nuget.org/packages/Azure.AI.TextAnalytics/5.2.0) | [Library source code](https://github.com/Azure/azure-sdk-for-net/tree/master/sdk/textanalytics/Azure.AI.TextAnalytics)
1111

12-
Use this quickstart to create a key phrase extraction application with the client library for .NET. In the following example, you will create a C# application that can identify key words and phrases found in text.
13-
14-
[!INCLUDE [Use Language Studio](../../../includes/use-language-studio.md)]
12+
Use this quickstart to create a key phrase extraction application with the client library for .NET. In the following example, you create a C# application that can identify key words and phrases found in text.
1513

1614

1715
## Prerequisites
1816

1917
* Azure subscription - [Create one for free](https://azure.microsoft.com/free/cognitive-services)
2018
* The [Visual Studio IDE](https://visualstudio.microsoft.com/vs/)
21-
* Once you have your Azure subscription, <a href="https://portal.azure.com/#create/Microsoft.CognitiveServicesTextAnalytics" title="Create a Language resource" target="_blank">create a Language resource </a> in the Azure portal to get your key and endpoint. After it deploys, select **Go to resource**.
22-
* You will need the key and endpoint from the resource you create to connect your application to the API. You'll paste your key and endpoint into the code below later in the quickstart.
23-
* You can use the free pricing tier (`Free F0`) to try the service, and upgrade later to a paid tier for production.
24-
* To use the Analyze feature, you will need a Language resource with the standard (S) pricing tier.
25-
2619

2720

2821
## Setting up
2922

30-
### Create a new .NET Core application
23+
[!INCLUDE [Create an Azure resource](../../../includes/create-resource.md)]
3124

32-
Using the Visual Studio IDE, create a new .NET Core console app. This will create a "Hello World" project with a single C# source file: *program.cs*.
3325

34-
Install the client library by right-clicking on the solution in the **Solution Explorer** and selecting **Manage NuGet Packages**. In the package manager that opens select **Browse** and search for `Azure.AI.TextAnalytics`. Select version `5.2.0`, and then **Install**. You can also use the [Package Manager Console](/nuget/consume-packages/install-use-packages-powershell#find-and-install-a-package).
3526

27+
[!INCLUDE [Get your key and endpoint](../../../includes/get-key-endpoint.md)]
3628

3729

3830

39-
## Code example
31+
[!INCLUDE [Create environment variables](../../../includes/environment-variables.md)]
32+
33+
34+
### Create a new .NET Core application
35+
36+
Using the Visual Studio IDE, create a new .NET Core console app. This creates a "Hello World" project with a single C# source file: *program.cs*.
4037

41-
Copy the following code into your *program.cs* file. Remember to replace the `key` variable with the key for your resource, and replace the `endpoint` variable with the endpoint for your resource. Then run the code.
38+
Install the client library by right-clicking on the solution in the **Solution Explorer** and selecting **Manage NuGet Packages**. In the package manager that opens select **Browse** and search for `Azure.AI.TextAnalytics`. Select version `5.2.0`, and then **Install**. You can also use the [Package Manager Console](/nuget/consume-packages/install-use-packages-powershell#find-and-install-a-package).
4239

43-
[!INCLUDE [find the key and endpoint for a resource](../../../includes/find-azure-resource-info.md)]
40+
41+
## Code example
42+
43+
Copy the following code into your *program.cs* file. Then run the code.
4444

4545
```csharp
4646
using Azure;
@@ -51,8 +51,12 @@ namespace KeyPhraseExtractionExample
5151
{
5252
class Program
5353
{
54-
private static readonly AzureKeyCredential credentials = new AzureKeyCredential("replace-with-your-key-here");
55-
private static readonly Uri endpoint = new Uri("replace-with-your-endpoint-here");
54+
// This example requires environment variables named "LANGUAGE_KEY" and "LANGUAGE_ENDPOINT"
55+
static string languageKey = Environment.GetEnvironmentVariable("LANGUAGE_KEY");
56+
static string languageEndpoint = Environment.GetEnvironmentVariable("LANGUAGE_ENDPOINT");
57+
58+
private static readonly AzureKeyCredential credentials = new AzureKeyCredential(languageKey);
59+
private static readonly Uri endpoint = new Uri(languageEndpoint);
5660

5761
// Example method for extracting key phrases from text
5862
static void KeyPhraseExtractionExample(TextAnalyticsClient client)

articles/ai-services/language-service/key-phrase-extraction/includes/quickstarts/java-sdk.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,30 @@ ms.custom: devx-track-java
88
ms.author: jboback
99
---
1010

11-
[Reference documentation](/java/api/overview/azure/ai-textanalytics-readme?preserve-view=true&view=azure-java-stable) | [Additional samples](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/textanalytics/azure-ai-textanalytics/src/samples) | [Package (Maven)](https://mvnrepository.com/artifact/com.azure/azure-ai-textanalytics/5.2.0) | [Library source code](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/textanalytics/azure-ai-textanalytics)
11+
[Reference documentation](/java/api/overview/azure/ai-textanalytics-readme?preserve-view=true&view=azure-java-stable) | [More samples](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/textanalytics/azure-ai-textanalytics/src/samples) | [Package (Maven)](https://mvnrepository.com/artifact/com.azure/azure-ai-textanalytics/5.2.0) | [Library source code](https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/textanalytics/azure-ai-textanalytics)
1212

13-
Use this quickstart to create a key phrase extraction application with the client library for Java. In the following example, you will create a Java application that can identify key words and phrases found in text.
13+
Use this quickstart to create a key phrase extraction application with the client library for Java. In the following example, you create a Java application that can identify key words and phrases found in text.
1414

15-
[!INCLUDE [Use Language Studio](../../../includes/use-language-studio.md)]
1615

1716
## Prerequisites
1817

1918
* Azure subscription - [Create one for free](https://azure.microsoft.com/free/cognitive-services)
2019
* [Java Development Kit](https://www.oracle.com/technetwork/java/javase/downloads/index.html) (JDK) with version 8 or above
21-
* Once you have your Azure subscription, <a href="https://portal.azure.com/#create/Microsoft.CognitiveServicesTextAnalytics" title="Create a Language resource" target="_blank">create a Language resource </a> in the Azure portal to get your key and endpoint. After it deploys, select **Go to resource**.
22-
* You will need the key and endpoint from the resource you create to connect your application to the API. You'll paste your key and endpoint into the code below later in the quickstart.
23-
* You can use the free pricing tier (`Free F0`) to try the service, and upgrade later to a paid tier for production.
24-
* To use the Analyze feature, you will need a Language resource with the standard (S) pricing tier.
25-
2620

2721

2822
## Setting up
2923

24+
[!INCLUDE [Create an Azure resource](../../../includes/create-resource.md)]
25+
26+
27+
28+
[!INCLUDE [Get your key and endpoint](../../../includes/get-key-endpoint.md)]
29+
30+
31+
32+
[!INCLUDE [Create environment variables](../../../includes/environment-variables.md)]
33+
34+
3035
### Add the client library
3136

3237
Create a Maven project in your preferred IDE or development environment. Then add the following dependency to your project's *pom.xml* file. You can find the implementation syntax [for other build tools](https://mvnrepository.com/artifact/com.azure/azure-ai-textanalytics/5.2.0) online.
@@ -41,15 +46,9 @@ Create a Maven project in your preferred IDE or development environment. Then ad
4146
</dependencies>
4247
```
4348

44-
45-
46-
4749
## Code example
4850

49-
50-
Create a Java file named `Example.java`. Open the file and copy the below code. Remember to replace the `key` variable with the key for your resource, and replace the `endpoint` variable with the endpoint for your resource. Then run the code.
51-
52-
[!INCLUDE [find the key and endpoint for a resource](../../../includes/find-azure-resource-info.md)]
51+
Create a Java file named `Example.java`. Open the file and copy the below code. Then run the code.
5352

5453
```java
5554
import com.azure.core.credential.AzureKeyCredential;
@@ -59,11 +58,12 @@ import com.azure.ai.textanalytics.TextAnalyticsClient;
5958

6059
public class Example {
6160

62-
private static String KEY = "replace-with-your-key-here";
63-
private static String ENDPOINT = "replace-with-your-endpoint-here";
61+
// This example requires environment variables named "LANGUAGE_KEY" and "LANGUAGE_ENDPOINT"
62+
private static String languageKey = System.getenv("LANGUAGE_KEY");
63+
private static String languageEndpoint = System.getenv("LANGUAGE_ENDPOINT");
6464

6565
public static void main(String[] args) {
66-
TextAnalyticsClient client = authenticateClient(KEY, ENDPOINT);
66+
TextAnalyticsClient client = authenticateClient(languageKey, languageEndpoint);
6767
extractKeyPhrasesExample(client);
6868
}
6969
// Method to authenticate the client object with your key and endpoint

articles/ai-services/language-service/key-phrase-extraction/includes/quickstarts/nodejs-sdk.md

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,30 @@ ms.author: jboback
88
ms.custom: devx-track-js
99
---
1010

11-
[Reference documentation](/javascript/api/overview/azure/ai-language-text-readme) | [Additional samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/cognitivelanguage/ai-language-text/samples/v1) | [Package (npm)](https://www.npmjs.com/package/@azure/ai-language-text) | [Library source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/cognitivelanguage/ai-language-text)
11+
[Reference documentation](/javascript/api/overview/azure/ai-language-text-readme) | [More samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/cognitivelanguage/ai-language-text/samples/v1) | [Package (npm)](https://www.npmjs.com/package/@azure/ai-language-text) | [Library source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/cognitivelanguage/ai-language-text)
1212

13-
Use this quickstart to create a key phrase extraction application with the client library for Node.js. In the following example, you will create a JavaScript application that can identify key words and phrases found in text.
13+
Use this quickstart to create a key phrase extraction application with the client library for Node.js. In the following example, you create a JavaScript application that can identify key words and phrases found in text.
1414

15-
[!INCLUDE [Use Language Studio](../../../includes/use-language-studio.md)]
1615

1716
## Prerequisites
1817

1918
* Azure subscription - [Create one for free](https://azure.microsoft.com/free/cognitive-services)
2019
* [Node.js](https://nodejs.org/) v14 LTS or later
21-
* Once you have your Azure subscription, <a href="https://portal.azure.com/#create/Microsoft.CognitiveServicesTextAnalytics" title="Create a Language resource" target="_blank">create a Language resource </a> in the Azure portal to get your key and endpoint. After it deploys, select **Go to resource**.
22-
* You will need the key and endpoint from the resource you create to connect your application to the API. You'll paste your key and endpoint into the code below later in the quickstart.
23-
* You can use the free pricing tier (`Free F0`) to try the service, and upgrade later to a paid tier for production.
24-
* To use the Analyze feature, you will need a Language resource with the standard (S) pricing tier.
25-
2620

2721

2822
## Setting up
2923

24+
[!INCLUDE [Create an Azure resource](../../../includes/create-resource.md)]
25+
26+
27+
28+
[!INCLUDE [Get your key and endpoint](../../../includes/get-key-endpoint.md)]
29+
30+
31+
32+
[!INCLUDE [Create environment variables](../../../includes/environment-variables.md)]
33+
34+
3035
### Create a new Node.js application
3136

3237
In a console window (such as cmd, PowerShell, or Bash), create a new directory for your app, and navigate to it.
@@ -52,21 +57,18 @@ npm install @azure/ai-language-text
5257
```
5358

5459

55-
56-
57-
5860
## Code example
5961

60-
Open the file and copy the below code. Remember to replace the `key` variable with the key for your resource, and replace the `endpoint` variable with the endpoint for your resource. Then run the code.
61-
62-
[!INCLUDE [find the key and endpoint for a resource](../../../includes/find-azure-resource-info.md)]
62+
Open the file and copy the below code. Then run the code.
6363

6464
```javascript
6565
"use strict";
6666

67-
const { TextAnalysisClient, AzureKeyCredential } = require("@azure/ai-language-text");
68-
const key = '<paste-your-key-here>';
69-
const endpoint = '<paste-your-endpoint-here>';
67+
const { TextAnalyticsClient, AzureKeyCredential } = require("@azure/ai-text-analytics");
68+
69+
// This example requires environment variables named "LANGUAGE_KEY" and "LANGUAGE_ENDPOINT"
70+
const key = process.env.LANGUAGE_KEY;
71+
const endpoint = process.env.LANGUAGE_ENDPOINT;
7072

7173
//example sentence for performing key phrase extraction
7274
const documents = ["Dr. Smith has a very modern medical office, and she has great staff."];

articles/ai-services/language-service/key-phrase-extraction/includes/quickstarts/python-sdk.md

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,30 @@ ms.date: 12/19/2023
66
ms.author: jboback
77
---
88

9-
[Reference documentation](/python/api/azure-ai-textanalytics/azure.ai.textanalytics?preserve-view=true&view=azure-python) | [Additional samples](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/textanalytics/azure-ai-textanalytics/samples) | [Package (PyPi)](https://pypi.org/project/azure-ai-textanalytics/5.2.0/) | [Library source code](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/textanalytics/azure-ai-textanalytics)
9+
[Reference documentation](/python/api/azure-ai-textanalytics/azure.ai.textanalytics?preserve-view=true&view=azure-python) | [More samples](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/textanalytics/azure-ai-textanalytics/samples) | [Package (PyPi)](https://pypi.org/project/azure-ai-textanalytics/5.2.0/) | [Library source code](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/textanalytics/azure-ai-textanalytics)
1010

11-
Use this quickstart to create a key phrase extraction application with the client library for Python. In the following example, you will create a Python application that can identify key words and phrases found in text.
11+
Use this quickstart to create a key phrase extraction application with the client library for Python. In the following example, you create a Python application that can identify key words and phrases found in text.
1212

13-
[!INCLUDE [Use Language Studio](../../../includes/use-language-studio.md)]
1413

1514
## Prerequisites
1615

1716
* Azure subscription - [Create one for free](https://azure.microsoft.com/free/cognitive-services)
1817
* [Python 3.8 or later](https://www.python.org/)
19-
* Once you have your Azure subscription, <a href="https://portal.azure.com/#create/Microsoft.CognitiveServicesTextAnalytics" title="Create a Language resource" target="_blank">create a Language resource </a> in the Azure portal to get your key and endpoint. After it deploys, select **Go to resource**.
20-
* You will need the key and endpoint from the resource you create to connect your application to the API. You'll paste your key and endpoint into the code below later in the quickstart.
21-
* You can use the free pricing tier (`Free F0`) to try the service, and upgrade later to a paid tier for production.
22-
* To use the Analyze feature, you will need a Language resource with the standard (S) pricing tier.
23-
2418

2519

2620
## Setting up
2721

22+
[!INCLUDE [Create an Azure resource](../../../includes/create-resource.md)]
23+
24+
25+
26+
[!INCLUDE [Get your key and endpoint](../../../includes/get-key-endpoint.md)]
27+
28+
29+
30+
[!INCLUDE [Create environment variables](../../../includes/environment-variables.md)]
31+
32+
2833
### Install the client library
2934

3035
After installing Python, you can install the client library with:
@@ -34,25 +39,23 @@ pip install azure-ai-textanalytics==5.2.0
3439
```
3540

3641

37-
3842
## Code example
3943

40-
Create a new Python file and copy the below code. Remember to replace the `key` variable with the key for your resource, and replace the `endpoint` variable with the endpoint for your resource. Then run the code.
41-
42-
[!INCLUDE [find the key and endpoint for a resource](../../../includes/find-azure-resource-info.md)]
44+
Create a new Python file and copy the below code. Then run the code.
4345

4446
```python
45-
key = "paste-your-key-here"
46-
endpoint = "paste-your-endpoint-here"
47+
# This example requires environment variables named "LANGUAGE_KEY" and "LANGUAGE_ENDPOINT"
48+
language_key = os.environ.get('LANGUAGE_KEY')
49+
language_endpoint = os.environ.get('LANGUAGE_ENDPOINT')
4750

4851
from azure.ai.textanalytics import TextAnalyticsClient
4952
from azure.core.credentials import AzureKeyCredential
5053

5154
# Authenticate the client using your key and endpoint
5255
def authenticate_client():
53-
ta_credential = AzureKeyCredential(key)
56+
ta_credential = AzureKeyCredential(language_key)
5457
text_analytics_client = TextAnalyticsClient(
55-
endpoint=endpoint,
58+
endpoint=language_endpoint,
5659
credential=ta_credential)
5760
return text_analytics_client
5861

@@ -79,7 +82,6 @@ key_phrase_extraction_example(client)
7982
```
8083

8184

82-
8385
### Output
8486

8587
```console

0 commit comments

Comments
 (0)