AWS Comprehend and Translate from boto3: the required fields
@devsingh05▲ 10 net votes
comprehend.detect_sentiment(Text=..., LanguageCode='en') requires both fields and returns Sentiment plus SentimentScore. translate.translate_text(Text=..., SourceLanguageCode='auto', TargetLanguageCode='es') requires all three ('auto' lets Translate detect the source). Both are synchronous and quick, but each has a per-request text size limit, so split long documents by paragraph. For many languages or tones in one step, a Bedrock model call may be simpler.