Skip to content

Commit 6502184

Browse files
authored
Merge pull request #271815 from MicrosoftDocs/main
4/10/2024 PM Publish
2 parents 83f9f33 + 46436ab commit 6502184

File tree

736 files changed

+7328
-1405
lines changed

Some content is hidden

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

736 files changed

+7328
-1405
lines changed

.openpublishing.redirection.iot-develop.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,26 @@
440440
"redirect_url": "/azure/iot-develop/about-iot-develop",
441441
"redirect_document_id": false
442442
},
443+
{
444+
"source_path_from_root": "/articles/iot-develop/quickstart-devkit-mxchip-az3166-iot-hub.md",
445+
"redirect_url": "/azure/iot/tutorial-devkit-mxchip-az3166-iot-hub",
446+
"redirect_document_id": false
447+
},
448+
{
449+
"source_path_from_root": "/articles/iot-develop/quickstart-devkit-stm-b-l475e-iot-hub.md",
450+
"redirect_url": "/azure/iot/tutorial-devkit-stm-b-l475e-iot-hub",
451+
"redirect_document_id": false
452+
},
453+
{
454+
"source_path_from_root": "/articles/iot-develop/concepts-azure-rtos-security-practices.md",
455+
"redirect_url": "/azure/iot/concepts-eclipse-threadx-security-practices",
456+
"redirect_document_id": false
457+
},
458+
{
459+
"source_path_from_root": "/articles/iot-develop/troubleshoot-embedded-device-quickstarts.md",
460+
"redirect_url": "/azure/iot/troubleshoot-embedded-device-tutorials",
461+
"redirect_document_id": false
462+
},
443463
{
444464
"source_path_from_root": "/articles/iot-develop/how-to-use-reliability-features-in-sdks.md",
445465
"redirect_url": "/azure/iot-develop/concepts-manage-device-reconnections",

articles/ai-services/language-service/language-detection/includes/quickstarts/csharp-sdk.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ author: jboback
33
manager: nitinme
44
ms.service: azure-ai-language
55
ms.topic: include
6-
ms.date: 12/19/2023
6+
ms.date: 03/29/2024
77
ms.author: jboback
88
---
99

10-
[Reference documentation](/dotnet/api/azure.ai.textanalytics?preserve-view=true&view=azure-dotnet-preview) | [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-preview) | [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 language detection application with the client library for .NET. In the following example, you will create a C# application that can identify the language a text sample was written in.
12+
Use this quickstart to create a language detection application with the client library for .NET. In the following example, you create a C# application that can identify the language a text sample was written in.
1313

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

@@ -18,18 +18,18 @@ Use this quickstart to create a language detection application with the client l
1818

1919
* Azure subscription - [Create one for free](https://azure.microsoft.com/free/cognitive-services)
2020
* 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.
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 need the key and endpoint from the resource you create to connect your application to the API. You paste your key and endpoint into the code later in the quickstart.
2323
* 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.
24+
* To use the Analyze feature, you need a Language resource with the standard (S) pricing tier.
2525

2626

2727

2828
## Setting up
2929

3030
### Create a new .NET Core application
3131

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*.
32+
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*.
3333

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

@@ -51,8 +51,10 @@ namespace LanguageDetectionExample
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+
55+
// This example requires environment variables named "LANGUAGE_KEY" and "LANGUAGE_ENDPOINT"
56+
static string languageKey = Environment.GetEnvironmentVariable("LANGUAGE_KEY");
57+
static string languageEndpoint = Environment.GetEnvironmentVariable("LANGUAGE_ENDPOINT");
5658

5759
// Example method for detecting the language of text
5860
static void LanguageDetectionExample(TextAnalyticsClient client)
@@ -64,7 +66,7 @@ namespace LanguageDetectionExample
6466

6567
static void Main(string[] args)
6668
{
67-
var client = new TextAnalyticsClient(endpoint, credentials);
69+
var client = new TextAnalyticsClient(languageEndpoint, languageKey);
6870
LanguageDetectionExample(client);
6971

7072
Console.Write("Press any key to exit.");

articles/ai-services/language-service/language-detection/includes/quickstarts/java-sdk.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ author: jboback
33
manager: nitinme
44
ms.service: azure-ai-language
55
ms.topic: include
6-
ms.date: 12/19/2023
6+
ms.date: 03/29/2024
77
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 language detection application with the client library for Java. In the following example, you will create a Java application that can identify the language a text sample was written in.
13+
Use this quickstart to create a language detection application with the client library for Java. In the following example, you create a Java application that can identify the language a text sample was written in.
1414

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

@@ -20,9 +20,9 @@ Use this quickstart to create a language detection application with the client l
2020
* Azure subscription - [Create one for free](https://azure.microsoft.com/free/cognitive-services)
2121
* [Java Development Kit](https://www.oracle.com/technetwork/java/javase/downloads/index.html) (JDK) with version 8 or above
2222
* 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**.
23-
* 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 need the key and endpoint from the resource you create to connect your application to the API. You paste your key and endpoint into the code below later in the quickstart.
2424
* You can use the free pricing tier (`Free F0`) to try the service, and upgrade later to a paid tier for production.
25-
* To use the Analyze feature, you will need a Language resource with the standard (S) pricing tier.
25+
* To use the Analyze feature, you need a Language resource with the standard (S) pricing tier.
2626

2727

2828

@@ -58,11 +58,12 @@ import com.azure.ai.textanalytics.TextAnalyticsClient;
5858

5959
public class Example {
6060

61-
private static String KEY = "replace-with-your-key-here";
62-
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");
6364

6465
public static void main(String[] args) {
65-
TextAnalyticsClient client = authenticateClient(KEY, ENDPOINT);
66+
TextAnalyticsClient client = authenticateClient(languageKey, languageEndpoint);
6667
detectLanguageExample(client);
6768
}
6869
// Method to authenticate the client object with your key and endpoint

articles/ai-services/language-service/language-detection/includes/quickstarts/nodejs-sdk.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ author: jboback
33
manager: nitinme
44
ms.service: azure-ai-language
55
ms.topic: include
6-
ms.date: 12/19/2023
6+
ms.date: 03/29/2024
77
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

1313

14-
Use this quickstart to create a language detection application with the client library for Node.js. In the following example, you will create a JavaScript application that can identify the language a text sample was written in.
14+
Use this quickstart to create a language detection application with the client library for Node.js. In the following example, you create a JavaScript application that can identify the language a text sample was written in.
1515

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

@@ -21,9 +21,9 @@ Use this quickstart to create a language detection application with the client l
2121
* Azure subscription - [Create one for free](https://azure.microsoft.com/free/cognitive-services)
2222
* [Node.js](https://nodejs.org/) v14 LTS or later
2323
* 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**.
24-
* 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.
24+
* You need the key and endpoint from the resource you create to connect your application to the API. You paste your key and endpoint into the code below later in the quickstart.
2525
* You can use the free pricing tier (`Free F0`) to try the service, and upgrade later to a paid tier for production.
26-
* To use the Analyze feature, you will need a Language resource with the standard (S) pricing tier.
26+
* To use the Analyze feature, you need a Language resource with the standard (S) pricing tier.
2727

2828

2929

@@ -64,17 +64,18 @@ Open the file and copy the below code. Remember to replace the `key` variable wi
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 sentences in different languages to be analyzed
7274
const documents = [
7375
"This document is written in English.",
7476
"这是一个用中文写的文件",
7577
];
7678

77-
7879
//Example of how to use the client library to detect language
7980
async function main() {
8081
console.log("== Language detection sample ==");

articles/ai-services/language-service/language-detection/includes/quickstarts/python-sdk.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
author: jboback
33
ms.service: azure-ai-language
44
ms.topic: include
5-
ms.date: 12/19/2023
5+
ms.date: 03/29/2024
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

1111

12-
Use this quickstart to create a language detection application with the client library for Python. In the following example, you will create a Python application that can identify the language a text sample was written in.
12+
Use this quickstart to create a language detection application with the client library for Python. In the following example, you create a Python application that can identify the language a text sample was written in.
1313

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

@@ -19,9 +19,9 @@ Use this quickstart to create a language detection application with the client l
1919
* Azure subscription - [Create one for free](https://azure.microsoft.com/free/cognitive-services)
2020
* [Python 3.8 or later](https://www.python.org/)
2121
* 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.
22+
* You need the key and endpoint from the resource you create to connect your application to the API. You paste your key and endpoint into the code below later in the quickstart.
2323
* 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.
24+
* To use the Analyze feature, you need a Language resource with the standard (S) pricing tier.
2525

2626

2727

@@ -44,17 +44,19 @@ Create a new Python file and copy the below code. Remember to replace the `key`
4444
[!INCLUDE [find the key and endpoint for a resource](../../../includes/find-azure-resource-info.md)]
4545

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

5052
from azure.ai.textanalytics import TextAnalyticsClient
5153
from azure.core.credentials import AzureKeyCredential
5254

5355
# Authenticate the client using your key and endpoint
5456
def authenticate_client():
55-
ta_credential = AzureKeyCredential(key)
57+
ta_credential = AzureKeyCredential(language_key)
5658
text_analytics_client = TextAnalyticsClient(
57-
endpoint=endpoint,
59+
endpoint=language_endpoint,
5860
credential=ta_credential)
5961
return text_analytics_client
6062

0 commit comments

Comments
 (0)