batch_detect_targeted_sentiment
async
¶
batch_detect_targeted_sentiment(
text_list: CustomerInputStringList,
language_code: LanguageCode,
*,
config_overrides: Optional[AsyncComprehendClientConfig] = None,
) -> BatchDetectTargetedSentimentResponse
Inspects a batch of documents and returns a sentiment analysis for each entity identified in the documents.
For more information about targeted sentiment, see Targeted sentiment in the Amazon Comprehend Developer Guide.
Parameters:
-
text_list(CustomerInputStringList) –A list containing the UTF-8 encoded text of the input documents. The list can contain a maximum of 25 documents. The maximum size of each document is 5 KB.
-
language_code(LanguageCode) –The language of the input documents. Currently, English is the only supported language.
Raises:
-
BatchSizeLimitExceededException–The number of documents in the request exceeds the limit of 25. Try your request again with fewer documents.
-
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
777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 | |