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.v2.IAnalyzeEntitiesRequest |
AnalyzeEntitiesRequest message or plain object |
callback |
google.cloud.language.v2.LanguageService.AnalyzeEntitiesCallback |
Node-style callback called with the error, if any, and AnalyzeEntitiesResponse |
Returns:
Type | Description |
---|---|
undefined |
analyzeEntities(request) → {Promise.<google.cloud.language.v2.AnalyzeEntitiesResponse>}
Calls AnalyzeEntities.
Parameters:
Name | Type | Description |
---|---|---|
request |
google.cloud.language.v2.IAnalyzeEntitiesRequest |
AnalyzeEntitiesRequest message or plain object |
Returns:
Type | Description |
---|---|
Promise.<google.cloud.language.v2.AnalyzeEntitiesResponse> |
Promise |
analyzeSentiment(request, callback) → {undefined}
Calls AnalyzeSentiment.
Parameters:
Name | Type | Description |
---|---|---|
request |
google.cloud.language.v2.IAnalyzeSentimentRequest |
AnalyzeSentimentRequest message or plain object |
callback |
google.cloud.language.v2.LanguageService.AnalyzeSentimentCallback |
Node-style callback called with the error, if any, and AnalyzeSentimentResponse |
Returns:
Type | Description |
---|---|
undefined |
analyzeSentiment(request) → {Promise.<google.cloud.language.v2.AnalyzeSentimentResponse>}
Calls AnalyzeSentiment.
Parameters:
Name | Type | Description |
---|---|---|
request |
google.cloud.language.v2.IAnalyzeSentimentRequest |
AnalyzeSentimentRequest message or plain object |
Returns:
Type | Description |
---|---|
Promise.<google.cloud.language.v2.AnalyzeSentimentResponse> |
Promise |
annotateText(request, callback) → {undefined}
Calls AnnotateText.
Parameters:
Name | Type | Description |
---|---|---|
request |
google.cloud.language.v2.IAnnotateTextRequest |
AnnotateTextRequest message or plain object |
callback |
google.cloud.language.v2.LanguageService.AnnotateTextCallback |
Node-style callback called with the error, if any, and AnnotateTextResponse |
Returns:
Type | Description |
---|---|
undefined |
annotateText(request) → {Promise.<google.cloud.language.v2.AnnotateTextResponse>}
Calls AnnotateText.
Parameters:
Name | Type | Description |
---|---|---|
request |
google.cloud.language.v2.IAnnotateTextRequest |
AnnotateTextRequest message or plain object |
Returns:
Type | Description |
---|---|
Promise.<google.cloud.language.v2.AnnotateTextResponse> |
Promise |
classifyText(request, callback) → {undefined}
Calls ClassifyText.
Parameters:
Name | Type | Description |
---|---|---|
request |
google.cloud.language.v2.IClassifyTextRequest |
ClassifyTextRequest message or plain object |
callback |
google.cloud.language.v2.LanguageService.ClassifyTextCallback |
Node-style callback called with the error, if any, and ClassifyTextResponse |
Returns:
Type | Description |
---|---|
undefined |
classifyText(request) → {Promise.<google.cloud.language.v2.ClassifyTextResponse>}
Calls ClassifyText.
Parameters:
Name | Type | Description |
---|---|---|
request |
google.cloud.language.v2.IClassifyTextRequest |
ClassifyTextRequest message or plain object |
Returns:
Type | Description |
---|---|
Promise.<google.cloud.language.v2.ClassifyTextResponse> |
Promise |
moderateText(request, callback) → {undefined}
Calls ModerateText.
Parameters:
Name | Type | Description |
---|---|---|
request |
google.cloud.language.v2.IModerateTextRequest |
ModerateTextRequest message or plain object |
callback |
google.cloud.language.v2.LanguageService.ModerateTextCallback |
Node-style callback called with the error, if any, and ModerateTextResponse |
Returns:
Type | Description |
---|---|
undefined |
moderateText(request) → {Promise.<google.cloud.language.v2.ModerateTextResponse>}
Calls ModerateText.
Parameters:
Name | Type | Description |
---|---|---|
request |
google.cloud.language.v2.IModerateTextRequest |
ModerateTextRequest message or plain object |
Returns:
Type | Description |
---|---|
Promise.<google.cloud.language.v2.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.v2.AnalyzeEntitiesResponse |
<optional> |
AnalyzeEntitiesResponse |
AnalyzeSentimentCallback(error, responseopt)
Callback as used by analyzeSentiment.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
error |
Error | null |
Error, if any |
|
response |
google.cloud.language.v2.AnalyzeSentimentResponse |
<optional> |
AnalyzeSentimentResponse |
AnnotateTextCallback(error, responseopt)
Callback as used by annotateText.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
error |
Error | null |
Error, if any |
|
response |
google.cloud.language.v2.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.v2.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.v2.ModerateTextResponse |
<optional> |
ModerateTextResponse |