By using AWS re:Post, you agree to the Terms of Use

Can we get sub categories in standard entity recognition of AWS Comprehend?

1

As per standard entity recognition from AWS Comprehend, it recognizes all currency, numbers, duration as QUANTITY - Is there anyway to get category of the quantity which AWS Comprehend is recognizing?

1 Answer
0

Hello,

Comprehend currently doesn’t support sub-categories. As a bit of background:

These entities:

  • COMMERCIAL_ITEM
  • DATE
  • EVENT
  • LOCATION
  • ORGANIZATION
  • OTHER
  • PERSONAL QUANTITY
  • TITLE

are the sole items we support out of the box for our standard entity recognition APIs.

If you wanted custom entities, those found outside the ones listed above, Comprehend has custom entity recognition where you can train models to recognize specific entities you’re interested in, and run inference against those models. Here’s how you can begin to setup your custom entities.

I noticed Events is another item that had a MONETARY_VALUE entity type, but Events we only support a fixed amount out of the box (along the same line as the list of entities I listed originally). The Events API are generally used for financial events.

The event type also contains a list of arguments that are related to the detected event, and an argument consists of an entity that is related to the detected event. The argument’s role describes the relationship (E.G. who did what, where and when).

If you’re interested in this kind of analysis, then you can use Events instead, but at this moment there isn’t a way to combine the 2 APIs or pick a subset of these types (E.G. combining QUANTITY, from entity recognition, and MONETARY_VALUE, from Events, with a single API call). Events also aren’t real time Synchronous APIs, and is currently only available for asynchronous jobs.

Sources:

https://docs.aws.amazon.com/comprehend/latest/dg/how-entities.html https://docs.aws.amazon.com/comprehend/latest/dg/training-recognizers.html https://docs.aws.amazon.com/comprehend/latest/dg/how-events.html https://aws.amazon.com/blogs/machine-learning/announcing-the-launch-of-amazon-comprehend-events/

SUPPORT ENGINEER
answered 5 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions