HEX
Server: Apache/2.4.65 (Ubuntu)
System: Linux ielts-store-v2 6.8.0-1036-gcp #38~22.04.1-Ubuntu SMP Thu Aug 14 01:19:18 UTC 2025 x86_64
User: root (0)
PHP: 7.2.34-54+ubuntu20.04.1+deb.sury.org+1
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
Upload Files
File: //snap/google-cloud-cli/396/help/man/man1/gcloud_ml_language_analyze-entity-sentiment.1
.TH "GCLOUD_ML_LANGUAGE_ANALYZE\-ENTITY\-SENTIMENT" 1



.SH "NAME"
.HP
gcloud ml language analyze\-entity\-sentiment \- use Google Cloud Natural Language API to identify entity\-level sentiment



.SH "SYNOPSIS"
.HP
\f5gcloud ml language analyze\-entity\-sentiment\fR (\fB\-\-content\fR=\fICONTENT\fR\ |\ \fB\-\-content\-file\fR=\fICONTENT_FILE\fR) [\fB\-\-content\-type\fR=\fICONTENT_TYPE\fR;\ default="plain\-text"] [\fB\-\-encoding\-type\fR=\fIENCODING_TYPE\fR;\ default="utf8"] [\fB\-\-language\fR=\fILANGUAGE\fR] [\fIGCLOUD_WIDE_FLAG\ ...\fR]



.SH "DESCRIPTION"

Entity level sentiment combines both entity analysis and sentiment analysis and
attempts to determine the sentiment (positive or negative) expressed about
entities within the text.

Currently only English is supported for this feature.



.SH "EXAMPLES"

To analyze entity sentiment in raw content 'puppies':

.RS 2m
$ gcloud ml language analyze\-entity\-sentiment \-\-content='puppies'
.RE

To analyze entity sentiment in file 'myfile.txt':

.RS 2m
$ gcloud ml language analyze\-entity\-sentiment \e
    \-\-content\-file='myfile.txt'
.RE

To analyze entity sentiment in a remote file 'gs://bucket_name/mycontent.html'
for Japanese language using UTF\-8 encoding:

.RS 2m
$ gcloud ml language analyze\-entity\-sentiment \e
    \-\-content\-file='gs://bucket_name/mycontent.html' \e
    \-\-content\-type=HTML \-\-encoding\-type=utf8 \-\-language=ja\-JP
.RE



.SH "REQUIRED FLAGS"

.RS 2m
.TP 2m

Exactly one of these must be specified:


.RS 2m
.TP 2m
\fB\-\-content\fR=\fICONTENT\fR

Specify input text on the command line. Useful for experiments, or for extremely
short text.

.TP 2m
\fB\-\-content\-file\fR=\fICONTENT_FILE\fR

Specify a local file or Google Cloud Storage (format \f5gs://bucket/object\fR)
file path containing the text to be analyzed. More useful for longer text or
data output from another system.


.RE
.RE
.sp

.SH "OPTIONAL FLAGS"

.RS 2m
.TP 2m
\fB\-\-content\-type\fR=\fICONTENT_TYPE\fR; default="plain\-text"

Specify the format of the input text. \fICONTENT_TYPE\fR must be one of:
\fBhtml\fR, \fBplain\-text\fR.

.TP 2m
\fB\-\-encoding\-type\fR=\fIENCODING_TYPE\fR; default="utf8"

The encoding type used by the API to calculate offsets. If set to \f5none\fR,
encoding\-dependent offsets will be set at \-1. This is an optional flag only
used for the entity mentions in results, and does not affect how the input is
read or analyzed. \fIENCODING_TYPE\fR must be one of: \fBnone\fR, \fButf16\fR,
\fButf32\fR, \fButf8\fR.

.TP 2m
\fB\-\-language\fR=\fILANGUAGE\fR

Specify the language of the input text. If omitted, the server will attempt to
auto\-detect. Both ISO (such as \f5en\fR or \f5es\fR) and BCP\-47 (such as
\f5en\-US\fR or \f5ja\-JP\fR) language codes are accepted.


.RE
.sp

.SH "GCLOUD WIDE FLAGS"

These flags are available to all commands: \-\-access\-token\-file, \-\-account,
\-\-billing\-project, \-\-configuration, \-\-flags\-file, \-\-flatten,
\-\-format, \-\-help, \-\-impersonate\-service\-account, \-\-log\-http,
\-\-project, \-\-quiet, \-\-trace\-token, \-\-user\-output\-enabled,
\-\-verbosity.

Run \fB$ gcloud help\fR for details.



.SH "API REFERENCE"

This command uses the \fBlanguage/v1\fR API. The full documentation for this API
can be found at: https://cloud.google.com/natural\-language/



.SH "NOTES"

These variants are also available:

.RS 2m
$ gcloud alpha ml language analyze\-entity\-sentiment
.RE

.RS 2m
$ gcloud beta ml language analyze\-entity\-sentiment
.RE