Cloud Natural Language v2 API - Class LanguageService.LanguageServiceClient (1.0.0-beta04)

public class LanguageService.LanguageServiceClient : ClientBase<LanguageService.LanguageServiceClient>

Reference documentation and code samples for the Cloud Natural Language v2 API class LanguageService.LanguageServiceClient.

Client for LanguageService

Inheritance

object > ClientBase > ClientBaseLanguageServiceLanguageServiceClient > LanguageService.LanguageServiceClient

Namespace

Google.Cloud.Language.V2

Assembly

Google.Cloud.Language.V2.dll

Constructors

LanguageServiceClient()

protected LanguageServiceClient()

Protected parameterless constructor to allow creation of test doubles.

LanguageServiceClient(CallInvoker)

public LanguageServiceClient(CallInvoker callInvoker)

Creates a new client for LanguageService that uses a custom CallInvoker.

Parameter
Name Description
callInvoker CallInvoker

The callInvoker to use to make remote calls.

LanguageServiceClient(ChannelBase)

public LanguageServiceClient(ChannelBase channel)

Creates a new client for LanguageService

Parameter
Name Description
channel ChannelBase

The channel to use to make remote calls.

LanguageServiceClient(ClientBaseConfiguration)

protected LanguageServiceClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
Name Description
configuration ClientBaseClientBaseConfiguration

The client configuration.

Methods

AnalyzeEntities(AnalyzeEntitiesRequest, CallOptions)

public virtual AnalyzeEntitiesResponse AnalyzeEntities(AnalyzeEntitiesRequest request, CallOptions options)

Finds named entities (currently proper names and common nouns) in the text along with entity types, probability, mentions for each entity, and other properties.

Parameters
Name Description
request AnalyzeEntitiesRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AnalyzeEntitiesResponse

The response received from the server.

AnalyzeEntities(AnalyzeEntitiesRequest, Metadata, DateTime?, CancellationToken)

public virtual AnalyzeEntitiesResponse AnalyzeEntities(AnalyzeEntitiesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Finds named entities (currently proper names and common nouns) in the text along with entity types, probability, mentions for each entity, and other properties.

Parameters
Name Description
request AnalyzeEntitiesRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AnalyzeEntitiesResponse

The response received from the server.

AnalyzeEntitiesAsync(AnalyzeEntitiesRequest, CallOptions)

public virtual AsyncUnaryCall<AnalyzeEntitiesResponse> AnalyzeEntitiesAsync(AnalyzeEntitiesRequest request, CallOptions options)

Finds named entities (currently proper names and common nouns) in the text along with entity types, probability, mentions for each entity, and other properties.

Parameters
Name Description
request AnalyzeEntitiesRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallAnalyzeEntitiesResponse

The call object.

AnalyzeEntitiesAsync(AnalyzeEntitiesRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<AnalyzeEntitiesResponse> AnalyzeEntitiesAsync(AnalyzeEntitiesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Finds named entities (currently proper names and common nouns) in the text along with entity types, probability, mentions for each entity, and other properties.

Parameters
Name Description
request AnalyzeEntitiesRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallAnalyzeEntitiesResponse

The call object.

AnalyzeSentiment(AnalyzeSentimentRequest, CallOptions)

public virtual AnalyzeSentimentResponse AnalyzeSentiment(AnalyzeSentimentRequest request, CallOptions options)

Analyzes the sentiment of the provided text.

Parameters
Name Description
request AnalyzeSentimentRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AnalyzeSentimentResponse

The response received from the server.

AnalyzeSentiment(AnalyzeSentimentRequest, Metadata, DateTime?, CancellationToken)

public virtual AnalyzeSentimentResponse AnalyzeSentiment(AnalyzeSentimentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Analyzes the sentiment of the provided text.

Parameters
Name Description
request AnalyzeSentimentRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AnalyzeSentimentResponse

The response received from the server.

AnalyzeSentimentAsync(AnalyzeSentimentRequest, CallOptions)

public virtual AsyncUnaryCall<AnalyzeSentimentResponse> AnalyzeSentimentAsync(AnalyzeSentimentRequest request, CallOptions options)

Analyzes the sentiment of the provided text.

Parameters
Name Description
request AnalyzeSentimentRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallAnalyzeSentimentResponse

The call object.

AnalyzeSentimentAsync(AnalyzeSentimentRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<AnalyzeSentimentResponse> AnalyzeSentimentAsync(AnalyzeSentimentRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Analyzes the sentiment of the provided text.

Parameters
Name Description
request AnalyzeSentimentRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallAnalyzeSentimentResponse

The call object.

AnnotateText(AnnotateTextRequest, CallOptions)

public virtual AnnotateTextResponse AnnotateText(AnnotateTextRequest request, CallOptions options)

A convenience method that provides all features in one call.

Parameters
Name Description
request AnnotateTextRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AnnotateTextResponse

The response received from the server.

AnnotateText(AnnotateTextRequest, Metadata, DateTime?, CancellationToken)

public virtual AnnotateTextResponse AnnotateText(AnnotateTextRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

A convenience method that provides all features in one call.

Parameters
Name Description
request AnnotateTextRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AnnotateTextResponse

The response received from the server.

AnnotateTextAsync(AnnotateTextRequest, CallOptions)

public virtual AsyncUnaryCall<AnnotateTextResponse> AnnotateTextAsync(AnnotateTextRequest request, CallOptions options)

A convenience method that provides all features in one call.

Parameters
Name Description
request AnnotateTextRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallAnnotateTextResponse

The call object.

AnnotateTextAsync(AnnotateTextRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<AnnotateTextResponse> AnnotateTextAsync(AnnotateTextRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

A convenience method that provides all features in one call.

Parameters
Name Description
request AnnotateTextRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallAnnotateTextResponse

The call object.

ClassifyText(ClassifyTextRequest, CallOptions)

public virtual ClassifyTextResponse ClassifyText(ClassifyTextRequest request, CallOptions options)

Classifies a document into categories.

Parameters
Name Description
request ClassifyTextRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
ClassifyTextResponse

The response received from the server.

ClassifyText(ClassifyTextRequest, Metadata, DateTime?, CancellationToken)

public virtual ClassifyTextResponse ClassifyText(ClassifyTextRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Classifies a document into categories.

Parameters
Name Description
request ClassifyTextRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
ClassifyTextResponse

The response received from the server.

ClassifyTextAsync(ClassifyTextRequest, CallOptions)

public virtual AsyncUnaryCall<ClassifyTextResponse> ClassifyTextAsync(ClassifyTextRequest request, CallOptions options)

Classifies a document into categories.

Parameters
Name Description
request ClassifyTextRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallClassifyTextResponse

The call object.

ClassifyTextAsync(ClassifyTextRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<ClassifyTextResponse> ClassifyTextAsync(ClassifyTextRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Classifies a document into categories.

Parameters
Name Description
request ClassifyTextRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallClassifyTextResponse

The call object.

ModerateText(ModerateTextRequest, CallOptions)

public virtual ModerateTextResponse ModerateText(ModerateTextRequest request, CallOptions options)

Moderates a document for harmful and sensitive categories.

Parameters
Name Description
request ModerateTextRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
ModerateTextResponse

The response received from the server.

ModerateText(ModerateTextRequest, Metadata, DateTime?, CancellationToken)

public virtual ModerateTextResponse ModerateText(ModerateTextRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Moderates a document for harmful and sensitive categories.

Parameters
Name Description
request ModerateTextRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
ModerateTextResponse

The response received from the server.

ModerateTextAsync(ModerateTextRequest, CallOptions)

public virtual AsyncUnaryCall<ModerateTextResponse> ModerateTextAsync(ModerateTextRequest request, CallOptions options)

Moderates a document for harmful and sensitive categories.

Parameters
Name Description
request ModerateTextRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallModerateTextResponse

The call object.

ModerateTextAsync(ModerateTextRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<ModerateTextResponse> ModerateTextAsync(ModerateTextRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Moderates a document for harmful and sensitive categories.

Parameters
Name Description
request ModerateTextRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallModerateTextResponse

The call object.

NewInstance(ClientBaseConfiguration)

protected override LanguageService.LanguageServiceClient NewInstance(ClientBase.ClientBaseConfiguration configuration)

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
Name Description
configuration ClientBaseClientBaseConfiguration
Returns
Type Description
LanguageServiceLanguageServiceClient
Overrides