gcloud ml language analyze-syntax
Stay organized with collections
Save and categorize content based on your preferences.
- NAME
-
- gcloud ml language analyze-syntax - use Google Cloud Natural Language API to identify linguistic information
- SYNOPSIS
-
-
gcloud ml language analyze-syntax(--content=CONTENT|--content-file=CONTENT_FILE) [--content-type=CONTENT_TYPE; default="plain-text"] [--encoding-type=ENCODING_TYPE; default="utf8"] [--language=LANGUAGE] [GCLOUD_WIDE_FLAG …]
-
- DESCRIPTION
-
Syntactic Analysis extracts linguistic information, breaking up the given text
into a series of sentences and tokens (generally, word boundaries), providing
further analysis on those tokens.
Currently English, Spanish, and Japanese are supported.
- EXAMPLES
-
To analyze syntax in raw content 'They drink.':
gcloudmllanguageanalyze-syntax--content='They drink'To analyze syntax in file 'myfile.txt':
gcloudmllanguageanalyze-syntax--content-file='myfile.txt'To analyze syntax in a remote file 'gs://bucket_name/mycontent.html' for Japanese language using UTF-8 encoding:
gcloudmllanguageanalyze-syntax--content-file='gs://bucket_name/mycontent.html'--content-type=HTML--encoding-type=utf8--language=ja-JP - REQUIRED FLAGS
-
-
Exactly one of these must be specified:
--content=CONTENT- Specify input text on the command line. Useful for experiments, or for extremely short text.
--content-file=CONTENT_FILE-
Specify a local file or Google Cloud Storage (format
gs://bucket/object) file path containing the text to be analyzed. More useful for longer text or data output from another system.
-
Exactly one of these must be specified:
- OPTIONAL FLAGS
-
--content-type=CONTENT_TYPE; default="plain-text"-
Specify the format of the input text.
CONTENT_TYPEmust be one of:html,plain-text. --encoding-type=ENCODING_TYPE; default="utf8"-
The encoding type used by the API to calculate offsets. If set to
none, 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.ENCODING_TYPEmust be one of:none,utf16,utf32,utf8. --language=LANGUAGE-
Specify the language of the input text. If omitted, the server will attempt to
auto-detect. Both ISO (such as
enores) and BCP-47 (such asen-USorja-JP) language codes are accepted.
- 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
$ gcloud helpfor details. - API REFERENCE
-
This command uses the
language/v1API. The full documentation for this API can be found at: https://cloud.google.com/natural-language/ - NOTES
-
These variants are also available:
gcloudalphamllanguageanalyze-syntaxgcloudbetamllanguageanalyze-syntax