简体   繁体   中英

add a Tag to AWS Comprehend request

We're using python boto3 to detect entities out of text. Is it possible to add tags such as "product":"x" to the API calls?

comprehend = boto3.client(service_name='comprehend', region_name='us-east-1')
response = comprehend.detect_entities(Text=text, LanguageCode='en')

As per the documentation DetectEntities

Only following attributes are supported in the request

{
   "EndpointArn": "string",
   "LanguageCode": "string",
   "Text": "string"
}

Today, Comprehend only supports Tags for persistent resources such as Custom models and endpoints. Comprehend inference jobs are not persistent and hence, don't support Tags. We'll take the feedback under consideration.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM