Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generated new SDK for Text Analytics 2.2.0-preview #1

Open
wants to merge 3 commits into
base: psSdkJson6
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
// <auto-generated>
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>

namespace Microsoft.Azure.CognitiveServices.Language.TextAnalytics
{
using Microsoft.Rest;
using Models;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;

/// <summary>
/// The Text Analytics API is a suite of text analytics web services built
/// with best-in-class Microsoft machine learning algorithms. The API can
/// be used to analyze unstructured text for tasks such as sentiment
/// analysis, key phrase extraction and language detection. No training
/// data is needed to use this API; just bring your text data. This API
/// uses advanced natural language processing techniques to deliver best in
/// class predictions. Further documentation can be found in
/// https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview
/// </summary>
public partial interface ITextAnalyticsClient : System.IDisposable
{
/// <summary>
/// The base URI of the service.
/// </summary>

/// <summary>
/// Gets or sets json serialization settings.
/// </summary>
JsonSerializerSettings SerializationSettings { get; }

/// <summary>
/// Gets or sets json deserialization settings.
/// </summary>
JsonSerializerSettings DeserializationSettings { get; }

/// <summary>
/// Supported Cognitive Services endpoints (protocol and hostname, for
/// example: https://westus.api.cognitive.microsoft.com).
/// </summary>
string Endpoint { get; set; }

/// <summary>
/// Subscription credentials which uniquely identify client
/// subscription.
/// </summary>
ServiceClientCredentials Credentials { get; }


/// <summary>
/// The API returns a list of strings denoting the key talking points
/// in the input text.
/// </summary>
/// <remarks>
/// See the &lt;a
/// href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview#supported-languages"&gt;Text
/// Analytics Documentation&lt;/a&gt; for details about the languages
/// that are supported by key phrase extraction.
/// </remarks>
/// <param name='input'>
/// Collection of documents to analyze. Documents can now contain a
/// language field to indicate the text language
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
Task<HttpOperationResponse<KeyPhraseBatchResult>> KeyPhrasesWithHttpMessagesAsync(MultiLanguageBatchInput input, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));

/// <summary>
/// The API returns the detected language and a numeric score between 0
/// and 1.
/// </summary>
/// <remarks>
/// Scores close to 1 indicate 100% certainty that the identified
/// language is true. A total of 120 languages are supported.
/// </remarks>
/// <param name='input'>
/// Collection of documents to analyze.
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
Task<HttpOperationResponse<LanguageBatchResult>> DetectLanguageWithHttpMessagesAsync(BatchInput input, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));

/// <summary>
/// The API returns a numeric score between 0 and 1.
/// </summary>
/// <remarks>
/// Scores close to 1 indicate positive sentiment, while scores close
/// to 0 indicate negative sentiment. A score of 0.5 indicates the lack
/// of sentiment (e.g. a factoid statement). See the &lt;a
/// href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview#supported-languages"&gt;Text
/// Analytics Documentation&lt;/a&gt; for details about the languages
/// that are supported by sentiment analysis.
/// </remarks>
/// <param name='input'>
/// Collection of documents to analyze.
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
Task<HttpOperationResponse<SentimentBatchResult>> SentimentWithHttpMessagesAsync(MultiLanguageBatchInput input, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));

/// <summary>
/// The API returns a list of recognized entities in a given document.
/// </summary>
/// <remarks>
/// The API returns a list of recognized entities in a given document.
/// To get even more information on each recognized entity we recommend
/// using the Bing Entity Search API by querying for the recognized
/// entities names. See the &lt;a
/// href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/text-analytics-supported-languages"&gt;Supported
/// languages in Text Analytics API&lt;/a&gt; for the list of enabled
/// languages.The API returns a list of known entities and general
/// named entities ("Person", "Location", "Organization" etc) in a
/// given document. Known entities are returned with Wikipedia Id and
/// Wikipedia link, and also Bing Id which can be used in Bing Entity
/// Search API. General named entities are returned with entity types.
/// If a general named entity is also a known entity, then all
/// information regarding it (Wikipedia Id, Bing Id, entity type etc)
/// will be returned. See the &lt;a
/// href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/how-tos/text-analytics-how-to-entity-linking#supported-types-for-named-entity-recognition"&gt;Supported
/// Entity Types in Text Analytics API&lt;/a&gt; for the list of
/// supported Entity Types. See the &lt;a
/// href="https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/text-analytics-supported-languages"&gt;Supported
/// languages in Text Analytics API&lt;/a&gt; for the list of enabled
/// languages.
/// </remarks>
/// <param name='input'>
/// Collection of documents to analyze.
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
Task<HttpOperationResponse<EntitiesBatchResultV2dot1>> EntitiesWithHttpMessagesAsync(MultiLanguageBatchInput input, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
// <auto-generated>
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>

namespace Microsoft.Azure.CognitiveServices.Language.TextAnalytics.Models
{
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;

public partial class BatchInput
{
/// <summary>
/// Initializes a new instance of the BatchInput class.
/// </summary>
public BatchInput()
{
CustomInit();
}

/// <summary>
/// Initializes a new instance of the BatchInput class.
/// </summary>
public BatchInput(IList<Input> documents = default(IList<Input>))
{
Documents = documents;
CustomInit();
}

/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();

/// <summary>
/// </summary>
[JsonProperty(PropertyName = "documents")]
public IList<Input> Documents { get; set; }

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
// <auto-generated>
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>

namespace Microsoft.Azure.CognitiveServices.Language.TextAnalytics.Models
{
using Newtonsoft.Json;
using System.Linq;

public partial class DetectedLanguage
{
/// <summary>
/// Initializes a new instance of the DetectedLanguage class.
/// </summary>
public DetectedLanguage()
{
CustomInit();
}

/// <summary>
/// Initializes a new instance of the DetectedLanguage class.
/// </summary>
/// <param name="name">Long name of a detected language (e.g. English,
/// French).</param>
/// <param name="iso6391Name">A two letter representation of the
/// detected language according to the ISO 639-1 standard (e.g. en,
/// fr).</param>
/// <param name="score">A confidence score between 0 and 1. Scores
/// close to 1 indicate 100% certainty that the identified language is
/// true.</param>
public DetectedLanguage(string name = default(string), string iso6391Name = default(string), double? score = default(double?))
{
Name = name;
Iso6391Name = iso6391Name;
Score = score;
CustomInit();
}

/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();

/// <summary>
/// Gets or sets long name of a detected language (e.g. English,
/// French).
/// </summary>
[JsonProperty(PropertyName = "name")]
public string Name { get; set; }

/// <summary>
/// Gets or sets a two letter representation of the detected language
/// according to the ISO 639-1 standard (e.g. en, fr).
/// </summary>
[JsonProperty(PropertyName = "iso6391Name")]
public string Iso6391Name { get; set; }

/// <summary>
/// Gets or sets a confidence score between 0 and 1. Scores close to 1
/// indicate 100% certainty that the identified language is true.
/// </summary>
[JsonProperty(PropertyName = "score")]
public double? Score { get; set; }

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
// <auto-generated>
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>

namespace Microsoft.Azure.CognitiveServices.Language.TextAnalytics.Models
{
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;

public partial class EntitiesBatchResultItemV2dot1
{
/// <summary>
/// Initializes a new instance of the EntitiesBatchResultItemV2dot1
/// class.
/// </summary>
public EntitiesBatchResultItemV2dot1()
{
CustomInit();
}

/// <summary>
/// Initializes a new instance of the EntitiesBatchResultItemV2dot1
/// class.
/// </summary>
/// <param name="id">Unique document identifier.</param>
/// <param name="entities">Recognized entities in the document.</param>
public EntitiesBatchResultItemV2dot1(string id = default(string), IList<EntityRecordV2dot1> entities = default(IList<EntityRecordV2dot1>))
{
Id = id;
Entities = entities;
CustomInit();
}

/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();

/// <summary>
/// Gets unique document identifier.
/// </summary>
[JsonProperty(PropertyName = "id")]
public string Id { get; private set; }

/// <summary>
/// Gets recognized entities in the document.
/// </summary>
[JsonProperty(PropertyName = "entities")]
public IList<EntityRecordV2dot1> Entities { get; private set; }

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
// <auto-generated>
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>

namespace Microsoft.Azure.CognitiveServices.Language.TextAnalytics.Models
{
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;

public partial class EntitiesBatchResultV2dot1
{
/// <summary>
/// Initializes a new instance of the EntitiesBatchResultV2dot1 class.
/// </summary>
public EntitiesBatchResultV2dot1()
{
CustomInit();
}

/// <summary>
/// Initializes a new instance of the EntitiesBatchResultV2dot1 class.
/// </summary>
public EntitiesBatchResultV2dot1(IList<EntitiesBatchResultItemV2dot1> documents = default(IList<EntitiesBatchResultItemV2dot1>), IList<ErrorRecord> errors = default(IList<ErrorRecord>))
{
Documents = documents;
Errors = errors;
CustomInit();
}

/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();

/// <summary>
/// </summary>
[JsonProperty(PropertyName = "documents")]
public IList<EntitiesBatchResultItemV2dot1> Documents { get; private set; }

/// <summary>
/// </summary>
[JsonProperty(PropertyName = "errors")]
public IList<ErrorRecord> Errors { get; private set; }

}
}
Loading