Cloud Natural Language v2 API - Class LanguageServiceClientImpl (1.0.0-beta04)

public sealed class LanguageServiceClientImpl : LanguageServiceClient

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

LanguageService client wrapper implementation, for convenient use.

Inheritance

object > LanguageServiceClient > LanguageServiceClientImpl

Namespace

Google.Cloud.Language.V2

Assembly

Google.Cloud.Language.V2.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
Name Description
grpcClient LanguageServiceLanguageServiceClient

The underlying gRPC client.

settings LanguageServiceSettings

The base LanguageServiceSettings used within this client.

logger ILogger

Optional ILogger to use within this client.

Properties

GrpcClient

public override LanguageService.LanguageServiceClient GrpcClient { get; }

The underlying gRPC LanguageService client

Property Value
Type Description
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, probability, mentions for each entity, and other properties.

Parameters
Name Description
request AnalyzeEntitiesRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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, probability, mentions for each entity, and other properties.

Parameters
Name Description
request AnalyzeEntitiesRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskAnalyzeEntitiesResponse

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
Name Description
request AnalyzeSentimentRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
request AnalyzeSentimentRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskAnalyzeSentimentResponse

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 features in one call.

Parameters
Name Description
request AnnotateTextRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
AnnotateTextResponse

The RPC response.

Overrides

AnnotateTextAsync(AnnotateTextRequest, CallSettings)

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

A convenience method that provides all features in one call.

Parameters
Name Description
request AnnotateTextRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
request ClassifyTextRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
ClassifyTextResponse

The RPC response.

Overrides

ClassifyTextAsync(ClassifyTextRequest, CallSettings)

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

Classifies a document into categories.

Parameters
Name Description
request ClassifyTextRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
request ModerateTextRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
request ModerateTextRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskModerateTextResponse

A Task containing the RPC response.

Overrides