LanguageService

google.cloud.language.v1beta2. LanguageService

Represents a LanguageService

Constructor

new LanguageService(rpcImpl, requestDelimitedopt, responseDelimitedopt)

Constructs a new LanguageService service.

Parameters:
Name Type Attributes Default Description
rpcImpl $protobuf.RPCImpl

RPC implementation

requestDelimited boolean <optional>
false

Whether requests are length-delimited

responseDelimited boolean <optional>
false

Whether responses are length-delimited

Extends

  • $protobuf.rpc.Service

Methods

analyzeEntities(request, callback) → {undefined}

Calls AnalyzeEntities.

Parameters:
Name Type Description
request google.cloud.language.v1beta2.IAnalyzeEntitiesRequest

AnalyzeEntitiesRequest message or plain object

callback google.cloud.language.v1beta2.LanguageService.AnalyzeEntitiesCallback

Node-style callback called with the error, if any, and AnalyzeEntitiesResponse

Returns:
Type Description
undefined

analyzeEntities(request) → {Promise.<google.cloud.language.v1beta2.AnalyzeEntitiesResponse>}

Calls AnalyzeEntities.

Parameters:
Name Type Description
request google.cloud.language.v1beta2.IAnalyzeEntitiesRequest

AnalyzeEntitiesRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.language.v1beta2.AnalyzeEntitiesResponse>

Promise

analyzeEntitySentiment(request, callback) → {undefined}

Calls AnalyzeEntitySentiment.

Parameters:
Name Type Description
request google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest

AnalyzeEntitySentimentRequest message or plain object

callback google.cloud.language.v1beta2.LanguageService.AnalyzeEntitySentimentCallback

Node-style callback called with the error, if any, and AnalyzeEntitySentimentResponse

Returns:
Type Description
undefined

analyzeEntitySentiment(request) → {Promise.<google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse>}

Calls AnalyzeEntitySentiment.

Parameters:
Name Type Description
request google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest

AnalyzeEntitySentimentRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse>

Promise

analyzeSentiment(request, callback) → {undefined}

Calls AnalyzeSentiment.

Parameters:
Name Type Description
request google.cloud.language.v1beta2.IAnalyzeSentimentRequest

AnalyzeSentimentRequest message or plain object

callback google.cloud.language.v1beta2.LanguageService.AnalyzeSentimentCallback

Node-style callback called with the error, if any, and AnalyzeSentimentResponse

Returns:
Type Description
undefined

analyzeSentiment(request) → {Promise.<google.cloud.language.v1beta2.AnalyzeSentimentResponse>}

Calls AnalyzeSentiment.

Parameters:
Name Type Description
request google.cloud.language.v1beta2.IAnalyzeSentimentRequest

AnalyzeSentimentRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.language.v1beta2.AnalyzeSentimentResponse>

Promise

analyzeSyntax(request, callback) → {undefined}

Calls AnalyzeSyntax.

Parameters:
Name Type Description
request google.cloud.language.v1beta2.IAnalyzeSyntaxRequest

AnalyzeSyntaxRequest message or plain object

callback google.cloud.language.v1beta2.LanguageService.AnalyzeSyntaxCallback

Node-style callback called with the error, if any, and AnalyzeSyntaxResponse

Returns:
Type Description
undefined

analyzeSyntax(request) → {Promise.<google.cloud.language.v1beta2.AnalyzeSyntaxResponse>}

Calls AnalyzeSyntax.

Parameters:
Name Type Description
request google.cloud.language.v1beta2.IAnalyzeSyntaxRequest

AnalyzeSyntaxRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.language.v1beta2.AnalyzeSyntaxResponse>

Promise

annotateText(request, callback) → {undefined}

Calls AnnotateText.

Parameters:
Name Type Description
request google.cloud.language.v1beta2.IAnnotateTextRequest

AnnotateTextRequest message or plain object

callback google.cloud.language.v1beta2.LanguageService.AnnotateTextCallback

Node-style callback called with the error, if any, and AnnotateTextResponse

Returns:
Type Description
undefined

annotateText(request) → {Promise.<google.cloud.language.v1beta2.AnnotateTextResponse>}

Calls AnnotateText.

Parameters:
Name Type Description
request google.cloud.language.v1beta2.IAnnotateTextRequest

AnnotateTextRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.language.v1beta2.AnnotateTextResponse>

Promise

classifyText(request, callback) → {undefined}

Calls ClassifyText.

Parameters:
Name Type Description
request google.cloud.language.v1beta2.IClassifyTextRequest

ClassifyTextRequest message or plain object

callback google.cloud.language.v1beta2.LanguageService.ClassifyTextCallback

Node-style callback called with the error, if any, and ClassifyTextResponse

Returns:
Type Description
undefined

classifyText(request) → {Promise.<google.cloud.language.v1beta2.ClassifyTextResponse>}

Calls ClassifyText.

Parameters:
Name Type Description
request google.cloud.language.v1beta2.IClassifyTextRequest

ClassifyTextRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.language.v1beta2.ClassifyTextResponse>

Promise

moderateText(request, callback) → {undefined}

Calls ModerateText.

Parameters:
Name Type Description
request google.cloud.language.v1beta2.IModerateTextRequest

ModerateTextRequest message or plain object

callback google.cloud.language.v1beta2.LanguageService.ModerateTextCallback

Node-style callback called with the error, if any, and ModerateTextResponse

Returns:
Type Description
undefined

moderateText(request) → {Promise.<google.cloud.language.v1beta2.ModerateTextResponse>}

Calls ModerateText.

Parameters:
Name Type Description
request google.cloud.language.v1beta2.IModerateTextRequest

ModerateTextRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.language.v1beta2.ModerateTextResponse>

Promise

(static) create(rpcImpl, requestDelimitedopt, responseDelimitedopt) → {LanguageService}

Creates new LanguageService service using the specified rpc implementation.

Parameters:
Name Type Attributes Default Description
rpcImpl $protobuf.RPCImpl

RPC implementation

requestDelimited boolean <optional>
false

Whether requests are length-delimited

responseDelimited boolean <optional>
false

Whether responses are length-delimited

Returns:
Type Description
LanguageService

RPC service. Useful where requests and/or responses are streamed.

Type Definitions

AnalyzeEntitiesCallback(error, responseopt)

Callback as used by analyzeEntities.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.language.v1beta2.AnalyzeEntitiesResponse <optional>

AnalyzeEntitiesResponse

AnalyzeEntitySentimentCallback(error, responseopt)

Callback as used by analyzeEntitySentiment.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse <optional>

AnalyzeEntitySentimentResponse

AnalyzeSentimentCallback(error, responseopt)

Callback as used by analyzeSentiment.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.language.v1beta2.AnalyzeSentimentResponse <optional>

AnalyzeSentimentResponse

AnalyzeSyntaxCallback(error, responseopt)

Callback as used by analyzeSyntax.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.language.v1beta2.AnalyzeSyntaxResponse <optional>

AnalyzeSyntaxResponse

AnnotateTextCallback(error, responseopt)

Callback as used by annotateText.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.language.v1beta2.AnnotateTextResponse <optional>

AnnotateTextResponse

ClassifyTextCallback(error, responseopt)

Callback as used by classifyText.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.language.v1beta2.ClassifyTextResponse <optional>

ClassifyTextResponse

ModerateTextCallback(error, responseopt)

Callback as used by moderateText.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.language.v1beta2.ModerateTextResponse <optional>

ModerateTextResponse