Skip to content

Latest commit

 

History

History
189 lines (125 loc) · 5.67 KB

File metadata and controls

189 lines (125 loc) · 5.67 KB

Cognitive Services Language SDK

The Cognitive Service Language SDK has support for the Text Analytics Cognitive Service. While this repository contains the Autorest generated SDK, the easiest way to consume the SDK is by installing the NuGet package for it.

Note that the Cognitive Services Language SDK is simply a wrapper on top of the Text Analytics Cognitive service. As such, it will generate calls to the Azure service.

Prerequisites

You must have a Cognitive Services API account with Text Analytics API.

You must also have the endpoint and access key that was generated for you during sign up.

Installing the NuGet SDK Package

  1. Create a new Console solution in Visual Studio.
  2. Right click on the solution and click Manage NuGet Packages for Solution
  3. Select the Browse tab, and Search for Microsoft.AI.TextAnalytics
  4. Select the NuGet package and install it.

Calling the Text Analytics API using the SDK

See Text Analytics Quickstart guide for detailed instructions on how to use the SDK in your application.

Releases

see https://aka.ms/autorest

The current release is release_2_1. A preview release release_2_1_preview is also available.

tag: release_2_1
add-credentials: true

directive:
  - suppress: LongRunningResponseStatusCode
    reason: The validation tools do not properly recognize 202 as a supported response code.

Release 2.0

These settings apply only when --tag=release_2_0 is specified on the command line.

input-file: stable/v2.0/TextAnalytics.json

Release 2.1

These settings apply only when --tag=release_2_1 is specified on the command line.

input-file: stable/v2.1/TextAnalytics.json

Release 2.1-Preview

These settings apply only when --tag=release_2_1_preview is specified on the command line.

input-file: preview/v2.1/TextAnalytics.json

Release 3.0-Preview.1

These settings apply only when --tag=release_3_0_preview.1 is specified on the command line.

input-file: preview/v3.0-preview.1/TextAnalytics.json

Release 3.0

These settings apply only when --tag=release_3_0 is specified on the command line.

input-file: stable/v3.0/TextAnalytics.json

Release 3.1-Preview.1

These settings apply only when --tag=release_3_1_preview.1 is specified on the command line.

input-file: preview/v3.1-preview.1/TextAnalytics.json

Release 3.1-Preview.2

These settings apply only when --tag=release_3_1_preview.2 is specified on the command line.

input-file: preview/v3.1-preview.2/TextAnalytics.json

Release 3.1-Preview.3

These settings apply only when --tag=release_3_1_preview.3 is specified on the command line.

input-file: preview/v3.1-preview.3/TextAnalytics.json

Release 3.1-Preview.4

These settings apply only when --tag=release_3_1_preview.4 is specified on the command line.

input-file: preview/v3.1-preview.4/TextAnalytics.json

Release 3.1-Preview.5

These settings apply only when --tag=release_3_1_preview.5 is specified on the command line.

input-file: preview/v3.1-preview.5/TextAnalytics.json

Release 3.1

These settings apply only when --tag=release_3_1 is specified on the command line.

input-file: stable/v3.1/TextAnalytics.json

Release 3.2-preview.1

These settings apply only when --tag=release_3_2_preview.1 is specified on the command line.

input-file: preview/v3.2-preview.1/TextAnalytics.json

Release 3.2-preview.2

These settings apply only when --tag=release_3_2_preview.2 is specified on the command line.

input-file: preview/v3.2-preview.2/TextAnalytics.json

Swagger to SDK

This section describes what SDK should be generated by the automatic system. This is not used by Autorest itself.

swagger-to-sdk:
  - repo: azure-sdk-for-net-track2

CSharp Settings

These settings apply only when --csharp is specified on the command line.

csharp:
  sync-methods: None
  license-header: MICROSOFT_MIT_NO_VERSION
  azure-arm: false
  namespace: Microsoft.Azure.CognitiveServices.Language.TextAnalytics
  output-folder: $(csharp-sdks-folder)/CognitiveServices/Language.TextAnalytics/src/Generated
  clear-output-folder: true

Python

See configuration in readme.python.md

Go

See configuration in readme.go.md

Java

These settings apply only when --java is specified on the command line. Please also specify --azure-libraries-for-java-folder=<path to the root directory of your azure-libraries-for-java clone>.

java:
  azure-arm: true
  namespace: com.microsoft.azure.cognitiveservices.language.textanalytics
  license-header: MICROSOFT_MIT_NO_CODEGEN
  payload-flattening-threshold: 1
  output-folder: $(azure-libraries-for-java-folder)/cognitiveservices/data-plane/language/textanalytics
  with-optional-parameters: true
  with-single-async-method: true