Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Inspects text for named entities, and returns information about them. For more information, about named entities, see how-entities.
Synopsis
- data DetectEntities = DetectEntities' {}
- newDetectEntities :: Text -> DetectEntities
- detectEntities_languageCode :: Lens' DetectEntities (Maybe LanguageCode)
- detectEntities_endpointArn :: Lens' DetectEntities (Maybe Text)
- detectEntities_text :: Lens' DetectEntities Text
- data DetectEntitiesResponse = DetectEntitiesResponse' {
- entities :: Maybe [Entity]
- httpStatus :: Int
- newDetectEntitiesResponse :: Int -> DetectEntitiesResponse
- detectEntitiesResponse_entities :: Lens' DetectEntitiesResponse (Maybe [Entity])
- detectEntitiesResponse_httpStatus :: Lens' DetectEntitiesResponse Int
Creating a Request
data DetectEntities Source #
See: newDetectEntities
smart constructor.
DetectEntities' | |
|
Instances
Create a value of DetectEntities
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:languageCode:DetectEntities'
, detectEntities_languageCode
- The language of the input documents. You can specify any of the primary
languages supported by Amazon Comprehend. All documents must be in the
same language.
If your request includes the endpoint for a custom entity recognition model, Amazon Comprehend uses the language of your custom model, and it ignores any language code that you specify here.
$sel:endpointArn:DetectEntities'
, detectEntities_endpointArn
- The Amazon Resource Name of an endpoint that is associated with a custom
entity recognition model. Provide an endpoint if you want to detect
entities by using your own custom model instead of the default model
that is used by Amazon Comprehend.
If you specify an endpoint, Amazon Comprehend uses the language of your custom model, and it ignores any language code that you provide in your request.
$sel:text:DetectEntities'
, detectEntities_text
- A UTF-8 text string. Each string must contain fewer that 5,000 bytes of
UTF-8 encoded characters.
Request Lenses
detectEntities_languageCode :: Lens' DetectEntities (Maybe LanguageCode) Source #
The language of the input documents. You can specify any of the primary languages supported by Amazon Comprehend. All documents must be in the same language.
If your request includes the endpoint for a custom entity recognition model, Amazon Comprehend uses the language of your custom model, and it ignores any language code that you specify here.
detectEntities_endpointArn :: Lens' DetectEntities (Maybe Text) Source #
The Amazon Resource Name of an endpoint that is associated with a custom entity recognition model. Provide an endpoint if you want to detect entities by using your own custom model instead of the default model that is used by Amazon Comprehend.
If you specify an endpoint, Amazon Comprehend uses the language of your custom model, and it ignores any language code that you provide in your request.
detectEntities_text :: Lens' DetectEntities Text Source #
A UTF-8 text string. Each string must contain fewer that 5,000 bytes of UTF-8 encoded characters.
Destructuring the Response
data DetectEntitiesResponse Source #
See: newDetectEntitiesResponse
smart constructor.
DetectEntitiesResponse' | |
|
Instances
newDetectEntitiesResponse Source #
Create a value of DetectEntitiesResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:entities:DetectEntitiesResponse'
, detectEntitiesResponse_entities
- A collection of entities identified in the input text. For each entity,
the response provides the entity text, entity type, where the entity
text begins and ends, and the level of confidence that Amazon Comprehend
has in the detection.
If your request uses a custom entity recognition model, Amazon Comprehend detects the entities that the model is trained to recognize. Otherwise, it detects the default entity types. For a list of default entity types, see how-entities.
$sel:httpStatus:DetectEntitiesResponse'
, detectEntitiesResponse_httpStatus
- The response's http status code.
Response Lenses
detectEntitiesResponse_entities :: Lens' DetectEntitiesResponse (Maybe [Entity]) Source #
A collection of entities identified in the input text. For each entity, the response provides the entity text, entity type, where the entity text begins and ends, and the level of confidence that Amazon Comprehend has in the detection.
If your request uses a custom entity recognition model, Amazon Comprehend detects the entities that the model is trained to recognize. Otherwise, it detects the default entity types. For a list of default entity types, see how-entities.
detectEntitiesResponse_httpStatus :: Lens' DetectEntitiesResponse Int Source #
The response's http status code.