detect_targeted_sentiment
async
¶
detect_targeted_sentiment(
text: CustomerInputString,
language_code: LanguageCode,
*,
config_overrides: Optional[AsyncComprehendClientConfig] = None,
) -> DetectTargetedSentimentResponse
Inspects the input text and returns a sentiment analysis for each entity identified in the text.
For more information about targeted sentiment, see Targeted sentiment in the Amazon Comprehend Developer Guide.
Parameters:
-
text(CustomerInputString) –A UTF-8 text string. The maximum string length is 5 KB.
-
language_code(LanguageCode) –The language of the input documents. Currently, English is the only supported language.
Raises:
-
InternalServerException–An internal server error occurred. Retry your request.
-
InvalidRequestException–The request is invalid.
-
TextSizeLimitExceededException–The size of the input text exceeds the limit. Use a smaller document.
-
UnsupportedLanguageException–Amazon Comprehend can't process the language of the input text. For a list of supported languages, Supported languages in the Comprehend Developer Guide.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_comprehend/_services/async_comprehend.py
2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 | |