Entities, along with their semantic information, in the input document. Populated if the user enablesAnnotateTextRequest.Features.extract_entitiesorAnnotateTextRequest.Features.extract_entity_sentiment.
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. SeeDocument.languagefield for more details.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Cloud Natural Language V2 Client - Class AnnotateTextResponse (1.0.1)\n\nVersion latestkeyboard_arrow_down\n\n- [1.0.1 (latest)](/php/docs/reference/cloud-language/latest/V2.AnnotateTextResponse)\n- [1.0.0](/php/docs/reference/cloud-language/1.0.0/V2.AnnotateTextResponse)\n- [0.34.3](/php/docs/reference/cloud-language/0.34.3/V2.AnnotateTextResponse)\n- [0.33.0](/php/docs/reference/cloud-language/0.33.0/V2.AnnotateTextResponse)\n- [0.32.7](/php/docs/reference/cloud-language/0.32.7/V2.AnnotateTextResponse)\n- [0.31.3](/php/docs/reference/cloud-language/0.31.3/V2.AnnotateTextResponse)\n- [0.30.2](/php/docs/reference/cloud-language/0.30.2/V2.AnnotateTextResponse)\n- [0.29.0](/php/docs/reference/cloud-language/0.29.0/V2.AnnotateTextResponse)\n- [0.28.5](/php/docs/reference/cloud-language/0.28.5/V2.AnnotateTextResponse) \nReference documentation and code samples for the Cloud Natural Language V2 Client class AnnotateTextResponse.\n\nThe text annotations response message.\n\nGenerated from protobuf message `google.cloud.language.v2.AnnotateTextResponse`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Language \\\\ V2\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getSentences\n\nSentences in the input document. Populated if the user enables\n[AnnotateTextRequest.Features.extract_document_sentiment](/php/docs/reference/cloud-language/latest/V2.AnnotateTextRequest.Features#_Google_Cloud_Language_V2_AnnotateTextRequest_Features__getExtractDocumentSentiment__).\n\n### setSentences\n\nSentences in the input document. Populated if the user enables\n[AnnotateTextRequest.Features.extract_document_sentiment](/php/docs/reference/cloud-language/latest/V2.AnnotateTextRequest.Features#_Google_Cloud_Language_V2_AnnotateTextRequest_Features__getExtractDocumentSentiment__).\n\n### getEntities\n\nEntities, along with their semantic information, in the input document.\n\nPopulated if the user enables\n[AnnotateTextRequest.Features.extract_entities](/php/docs/reference/cloud-language/latest/V2.AnnotateTextRequest.Features#_Google_Cloud_Language_V2_AnnotateTextRequest_Features__getExtractEntities__)\nor\nAnnotateTextRequest.Features.extract_entity_sentiment.\n\n### setEntities\n\nEntities, along with their semantic information, in the input document.\n\nPopulated if the user enables\n[AnnotateTextRequest.Features.extract_entities](/php/docs/reference/cloud-language/latest/V2.AnnotateTextRequest.Features#_Google_Cloud_Language_V2_AnnotateTextRequest_Features__getExtractEntities__)\nor\nAnnotateTextRequest.Features.extract_entity_sentiment.\n\n### getDocumentSentiment\n\nThe overall sentiment for the document. Populated if the user enables\n[AnnotateTextRequest.Features.extract_document_sentiment](/php/docs/reference/cloud-language/latest/V2.AnnotateTextRequest.Features#_Google_Cloud_Language_V2_AnnotateTextRequest_Features__getExtractDocumentSentiment__).\n\n### hasDocumentSentiment\n\n### clearDocumentSentiment\n\n### setDocumentSentiment\n\nThe overall sentiment for the document. Populated if the user enables\n[AnnotateTextRequest.Features.extract_document_sentiment](/php/docs/reference/cloud-language/latest/V2.AnnotateTextRequest.Features#_Google_Cloud_Language_V2_AnnotateTextRequest_Features__getExtractDocumentSentiment__).\n\n### getLanguageCode\n\nThe language of the text, which will be the same as the language specified\nin the request or, if not specified, the automatically-detected language.\n\nSee Document.language field for more details.\n\n### setLanguageCode\n\nThe language of the text, which will be the same as the language specified\nin the request or, if not specified, the automatically-detected language.\n\nSee Document.language field for more details.\n\n### getCategories\n\nCategories identified in the input document.\n\n### setCategories\n\nCategories identified in the input document.\n\n### getModerationCategories\n\nHarmful and sensitive categories identified in the input document.\n\n### setModerationCategories\n\nHarmful and sensitive categories identified in the input document.\n\n### getLanguageSupported\n\nWhether the language is officially supported by all requested features.\n\nThe API may still return a response when the language is not supported, but\nit is on a best effort basis.\n\n### setLanguageSupported\n\nWhether the language is officially supported by all requested features.\n\nThe API may still return a response when the language is not supported, but\nit is on a best effort basis."]]