0

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')
Bere L.
  • 5
  • 2
  • What are you trying to achieve? Are you referring to AWS Tags or are these some form of hints? – abhinavatAWS Mar 18 '21 at 18:56
  • yes I was referring to AWS Tags for billing... there're other apps that also use comprehend and wanted to know cost per app – Bere L. Mar 18 '21 at 19:43
  • This is not possible today but we're working on this. Stay tuned! Meanwhile, as an alternative, you can have separate AWS accounts per app and combine them under the same AWS Organization. – abhinavatAWS Mar 31 '21 at 16:25

2 Answers2

0

As per the documentation DetectEntities

Only following attributes are supported in the request

{
   "EndpointArn": "string",
   "LanguageCode": "string",
   "Text": "string"
}
samtoddler
  • 8,463
  • 2
  • 26
  • 21
0

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.

abhinavatAWS
  • 111
  • 3