[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-18。"],[[["\u003cp\u003eSentiment analysis evaluates user input to discern the dominant subjective opinion, categorizing it as positive, negative, or neutral.\u003c/p\u003e\n"],["\u003cp\u003eSentiment analysis can be requested with each \u003ccode\u003edetectIntent\u003c/code\u003e or \u003ccode\u003estreamingDetectIntent\u003c/code\u003e call through the API by setting \u003ccode\u003eanalyzeQueryTextSentiment\u003c/code\u003e to true, resulting in a \u003ccode\u003esentimentAnalysisResult\u003c/code\u003e in the response.\u003c/p\u003e\n"],["\u003cp\u003eSentiment analysis is not supported in all languages, though a request will not fail if an unsupported language is used, error details will be added to the \u003ccode\u003eQueryResult.diagnostic_info\u003c/code\u003e field.\u003c/p\u003e\n"],["\u003cp\u003eSentiment analysis results can be used in conditions via request-scoped parameters, and can also be enabled for use in the simulator.\u003c/p\u003e\n"]]],[],null,["# Sentiment analysis inspects end-user input\nand identifies the prevailing subjective opinion,\nespecially to determine an end-user's attitude as\npositive, negative, or neutral.\nWhen making a detect intent request,\nyou can specify that sentiment analysis be performed,\nand the response will contain sentiment analysis values.\n\nSupported languages\n-------------------\n\nFor a list of supported languages, see the **sentiment** column on the\n[language reference](/dialogflow/cx/docs/reference/language).\nIf you request sentiment analysis for an unsupported language,\nyour detect intent request does not fail,\nbut the `QueryResult.diagnostic_info` field contains error information.\n\nDetect intent\n-------------\n\nUsing the API, you can request sentiment analysis for each\n`detectIntent` or `streamingDetectIntent` call\nby setting the `analyzeQueryTextSentiment` field to true.\nThe response contains a `sentimentAnalysisResult` field\nwith `score` and `magnitude` values.\n\nUsing sentiment in conditions\n-----------------------------\n\nYou can use sentiment analysis results via the request-scoped parameters when defining a condition.\n\nFor more information, see the [sentiment analysis parameters descriptions](/dialogflow/cx/docs/concept/parameter#request-scoped-sentiment), and\n[Conditions reference](/dialogflow/cx/docs/reference/condition#request-scoped) for how the parameters can be used in conditions.\n\nUsing sentiment in the simulator\n--------------------------------\n\nYou can enable sentiment analysis when using the\n[simulator](/dialogflow/cx/docs/concept/console#simulator-settings)."]]