Smaws_Client_Comprehend.DetectEntitiesDetects named entities in input text when you use the pre-trained model. Detects custom entities if you have a custom entity recognition model.
When detecting named entities using the pre-trained model, use plain text as the input. For more information about named entities, see Entities in the Comprehend Developer Guide.
When you use a custom entity recognition model, you can input plain text or you can upload a single-page input document (text, PDF, Word, or image).
If the system detects errors while processing a page in the input document, the API response includes an entry in Errors for each error.
If the system detects a document-level error in your input document, the API returns an InvalidRequestException error response. For details about this exception, see Errors in semi-structured documents in the Comprehend Developer Guide.
val error_to_string :
[ Smaws_Lib.Protocols.AwsJson.error
| `InternalServerException of Types.internal_server_exception
| `InvalidRequestException of Types.invalid_request_exception
| `ResourceUnavailableException of Types.resource_unavailable_exception
| `TextSizeLimitExceededException of Types.text_size_limit_exceeded_exception
| `UnsupportedLanguageException of Types.unsupported_language_exception ] ->
stringval request :
'http_type Smaws_Lib.Context.t ->
Types.detect_entities_request ->
(Types.detect_entities_response,
[> Smaws_Lib.Protocols.AwsJson.error
| `InternalServerException of Types.internal_server_exception
| `InvalidRequestException of Types.invalid_request_exception
| `ResourceUnavailableException of Types.resource_unavailable_exception
| `TextSizeLimitExceededException of
Types.text_size_limit_exceeded_exception
| `UnsupportedLanguageException of Types.unsupported_language_exception ])
Stdlib.resultval request_with_metadata :
'http_type Smaws_Lib.Context.t ->
Types.detect_entities_request ->
(Types.detect_entities_response Smaws_Lib.Response.t,
[> Smaws_Lib.Protocols.AwsJson.error
| `InternalServerException of Types.internal_server_exception
| `InvalidRequestException of Types.invalid_request_exception
| `ResourceUnavailableException of Types.resource_unavailable_exception
| `TextSizeLimitExceededException of
Types.text_size_limit_exceeded_exception
| `UnsupportedLanguageException of Types.unsupported_language_exception ]
* Smaws_Lib.Response.metadata)
Stdlib.result