Reference documentation and code samples for the Natural Language V1beta2 API class Google::Cloud::Language::V1beta2::AnnotateTextResponse.
The text annotations response message.
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#categories
def categories() -> ::Array<::Google::Cloud::Language::V1beta2::ClassificationCategory>
Returns
- (::Array<::Google::Cloud::Language::V1beta2::ClassificationCategory>) — Categories identified in the input document.
#categories=
def categories=(value) -> ::Array<::Google::Cloud::Language::V1beta2::ClassificationCategory>
Parameter
- value (::Array<::Google::Cloud::Language::V1beta2::ClassificationCategory>) — Categories identified in the input document.
Returns
- (::Array<::Google::Cloud::Language::V1beta2::ClassificationCategory>) — Categories identified in the input document.
#document_sentiment
def document_sentiment() -> ::Google::Cloud::Language::V1beta2::Sentiment
Returns
- (::Google::Cloud::Language::V1beta2::Sentiment) — The overall sentiment for the document. Populated if the user enables AnnotateTextRequest.Features.extract_document_sentiment.
#document_sentiment=
def document_sentiment=(value) -> ::Google::Cloud::Language::V1beta2::Sentiment
Parameter
- value (::Google::Cloud::Language::V1beta2::Sentiment) — The overall sentiment for the document. Populated if the user enables AnnotateTextRequest.Features.extract_document_sentiment.
Returns
- (::Google::Cloud::Language::V1beta2::Sentiment) — The overall sentiment for the document. Populated if the user enables AnnotateTextRequest.Features.extract_document_sentiment.
#entities
def entities() -> ::Array<::Google::Cloud::Language::V1beta2::Entity>
Returns
- (::Array<::Google::Cloud::Language::V1beta2::Entity>) — Entities, along with their semantic information, in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_entities.
#entities=
def entities=(value) -> ::Array<::Google::Cloud::Language::V1beta2::Entity>
Parameter
- value (::Array<::Google::Cloud::Language::V1beta2::Entity>) — Entities, along with their semantic information, in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_entities.
Returns
- (::Array<::Google::Cloud::Language::V1beta2::Entity>) — Entities, along with their semantic information, in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_entities.
#language
def language() -> ::String
Returns
- (::String) — 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.
#language=
def language=(value) -> ::String
Parameter
- value (::String) — 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.
Returns
- (::String) — 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.
#sentences
def sentences() -> ::Array<::Google::Cloud::Language::V1beta2::Sentence>
Returns
- (::Array<::Google::Cloud::Language::V1beta2::Sentence>) — Sentences in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_syntax.
#sentences=
def sentences=(value) -> ::Array<::Google::Cloud::Language::V1beta2::Sentence>
Parameter
- value (::Array<::Google::Cloud::Language::V1beta2::Sentence>) — Sentences in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_syntax.
Returns
- (::Array<::Google::Cloud::Language::V1beta2::Sentence>) — Sentences in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_syntax.
#tokens
def tokens() -> ::Array<::Google::Cloud::Language::V1beta2::Token>
Returns
- (::Array<::Google::Cloud::Language::V1beta2::Token>) — Tokens, along with their syntactic information, in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_syntax.
#tokens=
def tokens=(value) -> ::Array<::Google::Cloud::Language::V1beta2::Token>
Parameter
- value (::Array<::Google::Cloud::Language::V1beta2::Token>) — Tokens, along with their syntactic information, in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_syntax.
Returns
- (::Array<::Google::Cloud::Language::V1beta2::Token>) — Tokens, along with their syntactic information, in the input document. Populated if the user enables AnnotateTextRequest.Features.extract_syntax.