Resource: Document
Represents the input to API methods.
JSON representation |
---|
{ "type": enum ( |
Fields | |
---|---|
type |
Required. If the type is not set or is |
language |
The language of the document (if not specified, the language is automatically detected). Both ISO and BCP-47 language codes are accepted. |
Union field source . The source of the document: a string containing the content or a Google Cloud Storage URI. source can be only one of the following: |
|
content |
The content of the input in string format. Cloud audit logging exempt since it is based on user data. |
gcs |
The Google Cloud Storage URI where the file content is located. This URI must be of the form: gs://bucketName/object_name. For more details, see https://cloud.google.com/storage/docs/reference-uris. NOTE: Cloud Storage object versioning is not supported. |
Type
The document types enum.
Enums | |
---|---|
TYPE_UNSPECIFIED |
The content type is not specified. |
PLAIN_TEXT |
Plain text |
HTML |
HTML |
Methods |
|
---|---|
|
Finds named entities (currently proper names and common nouns) in the text along with entity types, salience, mentions for each entity, and other properties. |
|
Finds entities, similar to AnalyzeEntities in the text and analyzes sentiment associated with each entity and its mentions. |
|
Analyzes the sentiment of the provided text. |
|
Analyzes the syntax of the text and provides sentence boundaries and tokenization along with part of speech tags, dependency trees, and other properties. |
|
A convenience method that provides all the features that analyzeSentiment, analyzeEntities, and analyzeSyntax provide in one call. |
|
Classifies a document into categories. |
|
Moderates a document for harmful and sensitive categories. |