The ENTITY action uses Amazon Comprehend to identify and analyze entities within text and documents.
Use this action to extract information such as people, organizations, locations, dates from unstructured content. The action supports standard entity recognition, custom entity recognition, PII detection, and custom document classification.
The connector automatically determines the most appropriate Amazon Comprehend processing method based on the type of analysis being performed, the size of the submitted content, and whether the content is supplied as text or files. For larger documents, the connector automatically switches to asynchronous processing and uses Amazon S3 to manage temporary processing files. The connector also detects the document language before performing analysis. If the detected language is not supported by the requested Amazon Comprehend operation, a configured fallback language is used.
The input parameters of the action are:
| Parameter | Type | Required | Description |
|---|---|---|---|
| confidenceLevel | String | Optional | The minimum confidence score required for an extracted entity to be included in the results. Specify a value between 0 and 1. Example: 0.95. |
| customRecognizerArn | String | Optional | The Amazon Resource Name (ARN) of a custom Amazon Comprehend entity recognizer. If not specified, the connector uses the value configured through AWS_COMPREHEND_CUSTOM_RECOGNIZER_ARN, if available. Otherwise, standard entity recognition is performed. |
| file | Array<content>, Content | Optional | The document to analyze. If multiple content objects are provided, only the first file is processed. File variables are typically populated by content actions or content-based trigger events. |
| maxEntities | Integer | Optional | The maximum number of entities to return in the analysis results. Example: 5. |
| mediaType | String | Optional | The media type of the content provided through the file parameter. Example: application/pdf or application/octet-stream. |
| text | String | Optional | The raw text content to analyze. |
| timeout | Integer | Optional | The maximum time, in milliseconds, that the connector waits for the analysis operation to complete. Example: 910000. |
The output parameters of the action are:
| Parameter | Type | Required | Description |
|---|---|---|---|
| aiResponse | JSON | Optional | The text analysis results formatted using the AIS standard schema. This output provides a normalized representation of the extracted information that can be consumed by other AI-enabled components and processes. |
| awsResponse | JSON | Optional | The complete response returned by Amazon Comprehend. The contents depend on the type of analysis performed and may include entities, confidence scores, classification information, and other analysis metadata. |
| entities | JSON | Optional | The entities detected during analysis. The returned data may include entity types, extracted values, confidence scores, and positional information returned by Amazon Comprehend. |