Send feedback
Class v1.LanguageServiceClient (4.2.9) Stay organized with collections
Save and categorize content based on your preferences.
Version 4.2.9 keyboard_arrow_down
Provides text analysis operations such as sentiment analysis and entity recognition. v1
Package
@google-cloud/language!
Constructors
(constructor)(opts)
constructor
(
opts
?:
ClientOptions
);
Construct an instance of LanguageServiceClient.
Parameter
Properties
apiEndpoint
static
get
apiEndpoint
()
:
string
;
The DNS address for this API service - same as servicePath(), exists for compatibility reasons.
Property Value
auth
auth
:
gax
.
GoogleAuth
;
Property Value
descriptors
descriptors
:
Descriptors
;
Property Value
innerApiCalls
innerApiCalls
:
{
[
name
:
string
]
:
Function
;
};
Property Value
languageServiceStub
languageServiceStub
?:
Promise
< {
[
name
:
string
]
:
Function
;
}>;
Property Value
port
static
get
port
()
:
number
;
The port for this API service.
Property Value
scopes
static
get
scopes
()
:
string
[];
The scopes needed to make gRPC calls for every method defined in this service.
Property Value
servicePath
static
get
servicePath
()
:
string
;
The DNS address for this API service.
Property Value
warn
warn
:
(
code
:
string
,
message
:
string
,
warnType
?:
string
)
=
>
void
;
Property Value
Methods
analyzeEntities(request, options)
analyzeEntities
(
request
?:
protos
.
google
.
cloud
.
language
.
v1
.
IAnalyzeEntitiesRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
language
.
v1
.
IAnalyzeEntitiesResponse
,
protos
.
google
.
cloud
.
language
.
v1
.
IAnalyzeEntitiesRequest
|
undefined
,
{}
|
undefined
]>;
Parameters Name
Description
request
protos. google.cloud.language.v1.IAnalyzeEntitiesRequest
options
CallOptions
Returns
analyzeEntities(request, options, callback)
analyzeEntities
(
request
:
protos
.
google
.
cloud
.
language
.
v1
.
IAnalyzeEntitiesRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
language
.
v1
.
IAnalyzeEntitiesResponse
,
protos
.
google
.
cloud
.
language
.
v1
.
IAnalyzeEntitiesRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Parameters Name
Description
request
protos. google.cloud.language.v1.IAnalyzeEntitiesRequest
options
CallOptions
callback
Callback
<protos. google.cloud.language.v1.IAnalyzeEntitiesResponse
, protos. google.cloud.language.v1.IAnalyzeEntitiesRequest
| null | undefined, {} | null | undefined>
Returns
analyzeEntities(request, callback)
analyzeEntities
(
request
:
protos
.
google
.
cloud
.
language
.
v1
.
IAnalyzeEntitiesRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
language
.
v1
.
IAnalyzeEntitiesResponse
,
protos
.
google
.
cloud
.
language
.
v1
.
IAnalyzeEntitiesRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Parameters Name
Description
request
protos. google.cloud.language.v1.IAnalyzeEntitiesRequest
callback
Callback
<protos. google.cloud.language.v1.IAnalyzeEntitiesResponse
, protos. google.cloud.language.v1.IAnalyzeEntitiesRequest
| null | undefined, {} | null | undefined>
Returns
analyzeEntitySentiment(request, options)
analyzeEntitySentiment
(
request
?:
protos
.
google
.
cloud
.
language
.
v1
.
IAnalyzeEntitySentimentRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
language
.
v1
.
IAnalyzeEntitySentimentResponse
,
(
protos
.
google
.
cloud
.
language
.
v1
.
IAnalyzeEntitySentimentRequest
|
undefined
),
{}
|
undefined
]>;
Parameters Name
Description
request
protos. google.cloud.language.v1.IAnalyzeEntitySentimentRequest
options
CallOptions
Returns
analyzeEntitySentiment(request, options, callback)
analyzeEntitySentiment
(
request
:
protos
.
google
.
cloud
.
language
.
v1
.
IAnalyzeEntitySentimentRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
language
.
v1
.
IAnalyzeEntitySentimentResponse
,
protos
.
google
.
cloud
.
language
.
v1
.
IAnalyzeEntitySentimentRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Parameters Name
Description
request
protos. google.cloud.language.v1.IAnalyzeEntitySentimentRequest
options
CallOptions
callback
Callback
<protos. google.cloud.language.v1.IAnalyzeEntitySentimentResponse
, protos. google.cloud.language.v1.IAnalyzeEntitySentimentRequest
| null | undefined, {} | null | undefined>
Returns
analyzeEntitySentiment(request, callback)
analyzeEntitySentiment
(
request
:
protos
.
google
.
cloud
.
language
.
v1
.
IAnalyzeEntitySentimentRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
language
.
v1
.
IAnalyzeEntitySentimentResponse
,
protos
.
google
.
cloud
.
language
.
v1
.
IAnalyzeEntitySentimentRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Parameters Name
Description
request
protos. google.cloud.language.v1.IAnalyzeEntitySentimentRequest
callback
Callback
<protos. google.cloud.language.v1.IAnalyzeEntitySentimentResponse
, protos. google.cloud.language.v1.IAnalyzeEntitySentimentRequest
| null | undefined, {} | null | undefined>
Returns
analyzeSentiment(request, options)
analyzeSentiment
(
request
?:
protos
.
google
.
cloud
.
language
.
v1
.
IAnalyzeSentimentRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
language
.
v1
.
IAnalyzeSentimentResponse
,
protos
.
google
.
cloud
.
language
.
v1
.
IAnalyzeSentimentRequest
|
undefined
,
{}
|
undefined
]>;
Parameters Name
Description
request
protos. google.cloud.language.v1.IAnalyzeSentimentRequest
options
CallOptions
Returns
analyzeSentiment(request, options, callback)
analyzeSentiment
(
request
:
protos
.
google
.
cloud
.
language
.
v1
.
IAnalyzeSentimentRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
language
.
v1
.
IAnalyzeSentimentResponse
,
protos
.
google
.
cloud
.
language
.
v1
.
IAnalyzeSentimentRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Parameters Name
Description
request
protos. google.cloud.language.v1.IAnalyzeSentimentRequest
options
CallOptions
callback
Callback
<protos. google.cloud.language.v1.IAnalyzeSentimentResponse
, protos. google.cloud.language.v1.IAnalyzeSentimentRequest
| null | undefined, {} | null | undefined>
Returns
analyzeSentiment(request, callback)
analyzeSentiment
(
request
:
protos
.
google
.
cloud
.
language
.
v1
.
IAnalyzeSentimentRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
language
.
v1
.
IAnalyzeSentimentResponse
,
protos
.
google
.
cloud
.
language
.
v1
.
IAnalyzeSentimentRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Parameters Name
Description
request
protos. google.cloud.language.v1.IAnalyzeSentimentRequest
callback
Callback
<protos. google.cloud.language.v1.IAnalyzeSentimentResponse
, protos. google.cloud.language.v1.IAnalyzeSentimentRequest
| null | undefined, {} | null | undefined>
Returns
analyzeSyntax(request, options)
analyzeSyntax
(
request
?:
protos
.
google
.
cloud
.
language
.
v1
.
IAnalyzeSyntaxRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
language
.
v1
.
IAnalyzeSyntaxResponse
,
protos
.
google
.
cloud
.
language
.
v1
.
IAnalyzeSyntaxRequest
|
undefined
,
{}
|
undefined
]>;
Parameters Name
Description
request
protos. google.cloud.language.v1.IAnalyzeSyntaxRequest
options
CallOptions
Returns
analyzeSyntax(request, options, callback)
analyzeSyntax
(
request
:
protos
.
google
.
cloud
.
language
.
v1
.
IAnalyzeSyntaxRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
language
.
v1
.
IAnalyzeSyntaxResponse
,
protos
.
google
.
cloud
.
language
.
v1
.
IAnalyzeSyntaxRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Parameters Name
Description
request
protos. google.cloud.language.v1.IAnalyzeSyntaxRequest
options
CallOptions
callback
Callback
<protos. google.cloud.language.v1.IAnalyzeSyntaxResponse
, protos. google.cloud.language.v1.IAnalyzeSyntaxRequest
| null | undefined, {} | null | undefined>
Returns
analyzeSyntax(request, callback)
analyzeSyntax
(
request
:
protos
.
google
.
cloud
.
language
.
v1
.
IAnalyzeSyntaxRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
language
.
v1
.
IAnalyzeSyntaxResponse
,
protos
.
google
.
cloud
.
language
.
v1
.
IAnalyzeSyntaxRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Parameters Name
Description
request
protos. google.cloud.language.v1.IAnalyzeSyntaxRequest
callback
Callback
<protos. google.cloud.language.v1.IAnalyzeSyntaxResponse
, protos. google.cloud.language.v1.IAnalyzeSyntaxRequest
| null | undefined, {} | null | undefined>
Returns
annotateText(request, options)
annotateText
(
request
?:
protos
.
google
.
cloud
.
language
.
v1
.
IAnnotateTextRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
language
.
v1
.
IAnnotateTextResponse
,
protos
.
google
.
cloud
.
language
.
v1
.
IAnnotateTextRequest
|
undefined
,
{}
|
undefined
]>;
Parameters Name
Description
request
protos. google.cloud.language.v1.IAnnotateTextRequest
options
CallOptions
Returns
annotateText(request, options, callback)
annotateText
(
request
:
protos
.
google
.
cloud
.
language
.
v1
.
IAnnotateTextRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
language
.
v1
.
IAnnotateTextResponse
,
protos
.
google
.
cloud
.
language
.
v1
.
IAnnotateTextRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Parameters Name
Description
request
protos. google.cloud.language.v1.IAnnotateTextRequest
options
CallOptions
callback
Callback
<protos. google.cloud.language.v1.IAnnotateTextResponse
, protos. google.cloud.language.v1.IAnnotateTextRequest
| null | undefined, {} | null | undefined>
Returns
annotateText(request, callback)
annotateText
(
request
:
protos
.
google
.
cloud
.
language
.
v1
.
IAnnotateTextRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
language
.
v1
.
IAnnotateTextResponse
,
protos
.
google
.
cloud
.
language
.
v1
.
IAnnotateTextRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Parameters Name
Description
request
protos. google.cloud.language.v1.IAnnotateTextRequest
callback
Callback
<protos. google.cloud.language.v1.IAnnotateTextResponse
, protos. google.cloud.language.v1.IAnnotateTextRequest
| null | undefined, {} | null | undefined>
Returns
classifyText(request, options)
classifyText
(
request
?:
protos
.
google
.
cloud
.
language
.
v1
.
IClassifyTextRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
cloud
.
language
.
v1
.
IClassifyTextResponse
,
protos
.
google
.
cloud
.
language
.
v1
.
IClassifyTextRequest
|
undefined
,
{}
|
undefined
]>;
Parameters Name
Description
request
protos. google.cloud.language.v1.IClassifyTextRequest
options
CallOptions
Returns
classifyText(request, options, callback)
classifyText
(
request
:
protos
.
google
.
cloud
.
language
.
v1
.
IClassifyTextRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
cloud
.
language
.
v1
.
IClassifyTextResponse
,
protos
.
google
.
cloud
.
language
.
v1
.
IClassifyTextRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Parameters Name
Description
request
protos. google.cloud.language.v1.IClassifyTextRequest
options
CallOptions
callback
Callback
<protos. google.cloud.language.v1.IClassifyTextResponse
, protos. google.cloud.language.v1.IClassifyTextRequest
| null | undefined, {} | null | undefined>
Returns
classifyText(request, callback)
classifyText
(
request
:
protos
.
google
.
cloud
.
language
.
v1
.
IClassifyTextRequest
,
callback
:
Callback<protos
.
google
.
cloud
.
language
.
v1
.
IClassifyTextResponse
,
protos
.
google
.
cloud
.
language
.
v1
.
IClassifyTextRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
Parameters Name
Description
request
protos. google.cloud.language.v1.IClassifyTextRequest
callback
Callback
<protos. google.cloud.language.v1.IClassifyTextResponse
, protos. google.cloud.language.v1.IClassifyTextRequest
| null | undefined, {} | null | undefined>
Returns
close()
close
()
:
Promise<void>
;
Terminate the gRPC channel and close the client.
The client will no longer be usable and all future behavior is undefined.
Returns Type
Description
Promise
<void>
{Promise} A promise that resolves when the client is closed.
getProjectId()
getProjectId
()
:
Promise<string>
;
Returns
getProjectId(callback)
getProjectId
(
callback
:
Callback<string
,
undefined
,
undefined
> )
:
void
;
Parameter Name
Description
callback
Callback
<string, undefined, undefined>
Returns
initialize()
initialize
()
:
Promise
< {
[
name
:
string
]
:
Function
;
}>;
Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.
You can await on this method if you want to make sure the client is initialized.
Returns Type
Description
Promise
<{
[name: string]: Function
;
}>
{Promise} A promise that resolves to an authenticated service stub.
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License
, and code samples are licensed under the Apache 2.0 License
. For details, see the Google Developers Site Policies
. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-09-04 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,[]]