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/current/help/man/man1/gcloud_ml_language_classify-text.1
.TH "GCLOUD_ML_LANGUAGE_CLASSIFY\-TEXT" 1



.SH "NAME"
.HP
gcloud ml language classify\-text \- classifies input document into categories



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



.SH "DESCRIPTION"

Classifies input document into categories. Returns a list of categories
representing the document. Only the most relevant categories a document are
returned e.g. if \f5/Science\fR and \f5/Science/Astronomy\fR both apply to a
document, then only the \f5/Science/Astronomy\fR category is returned, as it is
the more specific result.

Currently only English is supported for this feature.



.SH "EXAMPLES"

To classify text in raw content 'Long Political Text.':

.RS 2m
$ gcloud ml language classify\-text \-\-content='Long Political Text.'
.RE

To classify text in file 'myfile.txt':

.RS 2m
$ gcloud ml language classify\-text \-\-content\-file='myfile.txt'
.RE

To classify text in a remote file 'gs://bucket_name/mycontent.html' for Japanese
language:

.RS 2m
$ gcloud ml language classify\-text \e
    \-\-content\-file='gs://bucket_name/mycontent.html' \e
    \-\-content\-type=HTML \-\-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\-\-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 classify\-text
.RE

.RS 2m
$ gcloud beta ml language classify\-text
.RE