Google Cloud Natural Language v1 API - Class LanguageServiceClientImpl (3.5.0)

public sealed class LanguageServiceClientImpl : LanguageServiceClient

Reference documentation and code samples for the Google Cloud Natural Language v1 API class LanguageServiceClientImpl.

LanguageService client wrapper implementation, for convenient use.

Inheritance

object > LanguageServiceClient > LanguageServiceClientImpl

Namespace

Google.Cloud.Language.V1

Assembly

Google.Cloud.Language.V1.dll

Remarks

Provides text analysis operations such as sentiment analysis and entity recognition.

Constructors

LanguageServiceClientImpl(LanguageServiceClient, LanguageServiceSettings, ILogger)

public LanguageServiceClientImpl(LanguageService.LanguageServiceClient grpcClient, LanguageServiceSettings settings, ILogger logger)

Constructs a client wrapper for the LanguageService service, with the specified gRPC client and settings.

Parameters
NameDescription
grpcClientLanguageServiceLanguageServiceClient

The underlying gRPC client.

settingsLanguageServiceSettings

The base LanguageServiceSettings used within this client.

loggerILogger

Optional ILogger to use within this client.

Properties

GrpcClient

public override LanguageService.LanguageServiceClient GrpcClient { get; }

The underlying gRPC LanguageService client

Property Value
TypeDescription
LanguageServiceLanguageServiceClient
Overrides

Methods

AnalyzeEntities(AnalyzeEntitiesRequest, CallSettings)

public override AnalyzeEntitiesResponse AnalyzeEntities(AnalyzeEntitiesRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestAnalyzeEntitiesRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
AnalyzeEntitiesResponse

The RPC response.

Overrides

AnalyzeEntitiesAsync(AnalyzeEntitiesRequest, CallSettings)

public override Task<AnalyzeEntitiesResponse> AnalyzeEntitiesAsync(AnalyzeEntitiesRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestAnalyzeEntitiesRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskAnalyzeEntitiesResponse

A Task containing the RPC response.

Overrides

AnalyzeEntitySentiment(AnalyzeEntitySentimentRequest, CallSettings)

public override AnalyzeEntitySentimentResponse AnalyzeEntitySentiment(AnalyzeEntitySentimentRequest request, CallSettings callSettings = null)

Finds entities, similar to [AnalyzeEntities][google.cloud.language.v1.LanguageService.AnalyzeEntities] in the text and analyzes sentiment associated with each entity and its mentions.

Parameters
NameDescription
requestAnalyzeEntitySentimentRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
AnalyzeEntitySentimentResponse

The RPC response.

Overrides

AnalyzeEntitySentimentAsync(AnalyzeEntitySentimentRequest, CallSettings)

public override Task<AnalyzeEntitySentimentResponse> AnalyzeEntitySentimentAsync(AnalyzeEntitySentimentRequest request, CallSettings callSettings = null)

Finds entities, similar to [AnalyzeEntities][google.cloud.language.v1.LanguageService.AnalyzeEntities] in the text and analyzes sentiment associated with each entity and its mentions.

Parameters
NameDescription
requestAnalyzeEntitySentimentRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskAnalyzeEntitySentimentResponse

A Task containing the RPC response.

Overrides

AnalyzeSentiment(AnalyzeSentimentRequest, CallSettings)

public override AnalyzeSentimentResponse AnalyzeSentiment(AnalyzeSentimentRequest request, CallSettings callSettings = null)

Analyzes the sentiment of the provided text.

Parameters
NameDescription
requestAnalyzeSentimentRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
AnalyzeSentimentResponse

The RPC response.

Overrides

AnalyzeSentimentAsync(AnalyzeSentimentRequest, CallSettings)

public override Task<AnalyzeSentimentResponse> AnalyzeSentimentAsync(AnalyzeSentimentRequest request, CallSettings callSettings = null)

Analyzes the sentiment of the provided text.

Parameters
NameDescription
requestAnalyzeSentimentRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskAnalyzeSentimentResponse

A Task containing the RPC response.

Overrides

AnalyzeSyntax(AnalyzeSyntaxRequest, CallSettings)

public override AnalyzeSyntaxResponse AnalyzeSyntax(AnalyzeSyntaxRequest request, CallSettings callSettings = null)

Analyzes the syntax of the text and provides sentence boundaries and tokenization along with part of speech tags, dependency trees, and other properties.

Parameters
NameDescription
requestAnalyzeSyntaxRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
AnalyzeSyntaxResponse

The RPC response.

Overrides

AnalyzeSyntaxAsync(AnalyzeSyntaxRequest, CallSettings)

public override Task<AnalyzeSyntaxResponse> AnalyzeSyntaxAsync(AnalyzeSyntaxRequest request, CallSettings callSettings = null)

Analyzes the syntax of the text and provides sentence boundaries and tokenization along with part of speech tags, dependency trees, and other properties.

Parameters
NameDescription
requestAnalyzeSyntaxRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskAnalyzeSyntaxResponse

A Task containing the RPC response.

Overrides

AnnotateText(AnnotateTextRequest, CallSettings)

public override AnnotateTextResponse AnnotateText(AnnotateTextRequest request, CallSettings callSettings = null)

A convenience method that provides all the features that analyzeSentiment, analyzeEntities, and analyzeSyntax provide in one call.

Parameters
NameDescription
requestAnnotateTextRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
AnnotateTextResponse

The RPC response.

Overrides

AnnotateTextAsync(AnnotateTextRequest, CallSettings)

public override Task<AnnotateTextResponse> AnnotateTextAsync(AnnotateTextRequest request, CallSettings callSettings = null)

A convenience method that provides all the features that analyzeSentiment, analyzeEntities, and analyzeSyntax provide in one call.

Parameters
NameDescription
requestAnnotateTextRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskAnnotateTextResponse

A Task containing the RPC response.

Overrides

ClassifyText(ClassifyTextRequest, CallSettings)

public override ClassifyTextResponse ClassifyText(ClassifyTextRequest request, CallSettings callSettings = null)

Classifies a document into categories.

Parameters
NameDescription
requestClassifyTextRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
ClassifyTextResponse

The RPC response.

Overrides

ClassifyTextAsync(ClassifyTextRequest, CallSettings)

public override Task<ClassifyTextResponse> ClassifyTextAsync(ClassifyTextRequest request, CallSettings callSettings = null)

Classifies a document into categories.

Parameters
NameDescription
requestClassifyTextRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskClassifyTextResponse

A Task containing the RPC response.

Overrides

ModerateText(ModerateTextRequest, CallSettings)

public override ModerateTextResponse ModerateText(ModerateTextRequest request, CallSettings callSettings = null)

Moderates a document for harmful and sensitive categories.

Parameters
NameDescription
requestModerateTextRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
ModerateTextResponse

The RPC response.

Overrides

ModerateTextAsync(ModerateTextRequest, CallSettings)

public override Task<ModerateTextResponse> ModerateTextAsync(ModerateTextRequest request, CallSettings callSettings = null)

Moderates a document for harmful and sensitive categories.

Parameters
NameDescription
requestModerateTextRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskModerateTextResponse

A Task containing the RPC response.

Overrides