Class AnnotateTextResponse (2.12.0rc0)

AnnotateTextResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)

The text annotations response message.

Attributes

NameDescription
sentences MutableSequence[google.cloud.language_v2.types.Sentence]
Sentences in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_document_sentiment.
entities MutableSequence[google.cloud.language_v2.types.Entity]
Entities, along with their semantic information, in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_entities or AnnotateTextRequest.Features.extract_entity_sentiment.
document_sentiment google.cloud.language_v2.types.Sentiment
The overall sentiment for the document. Populated if the user enables AnnotateTextRequest.Features.extract_document_sentiment.
language_code str
The language of the text, which will be the same as the language specified in the request or, if not specified, the automatically-detected language. See [Document.language][] field for more details.
categories MutableSequence[google.cloud.language_v2.types.ClassificationCategory]
Categories identified in the input document.
moderation_categories MutableSequence[google.cloud.language_v2.types.ClassificationCategory]
Harmful and sensitive categories identified in the input document.
language_supported bool
Whether the language is officially supported by all requested features. The API may still return a response when the language is not supported, but it is on a best effort basis.