libZSservicesZSamazonka-comprehendZSamazonka-comprehend
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.Comprehend.DetectEntities

Description

Inspects text for named entities, and returns information about them. For more information, about named entities, see how-entities.

Synopsis

Creating a Request

data DetectEntities Source #

See: newDetectEntities smart constructor.

Constructors

DetectEntities' 

Fields

  • languageCode :: Maybe 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.

  • endpointArn :: Maybe Text

    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.

  • text :: Sensitive Text

    A UTF-8 text string. Each string must contain fewer that 5,000 bytes of UTF-8 encoded characters.

Instances

Instances details
Eq DetectEntities Source # 
Instance details

Defined in Amazonka.Comprehend.DetectEntities

Show DetectEntities Source # 
Instance details

Defined in Amazonka.Comprehend.DetectEntities

Generic DetectEntities Source # 
Instance details

Defined in Amazonka.Comprehend.DetectEntities

Associated Types

type Rep DetectEntities :: Type -> Type #

NFData DetectEntities Source # 
Instance details

Defined in Amazonka.Comprehend.DetectEntities

Methods

rnf :: DetectEntities -> () #

Hashable DetectEntities Source # 
Instance details

Defined in Amazonka.Comprehend.DetectEntities

ToJSON DetectEntities Source # 
Instance details

Defined in Amazonka.Comprehend.DetectEntities

AWSRequest DetectEntities Source # 
Instance details

Defined in Amazonka.Comprehend.DetectEntities

Associated Types

type AWSResponse DetectEntities #

ToHeaders DetectEntities Source # 
Instance details

Defined in Amazonka.Comprehend.DetectEntities

ToPath DetectEntities Source # 
Instance details

Defined in Amazonka.Comprehend.DetectEntities

ToQuery DetectEntities Source # 
Instance details

Defined in Amazonka.Comprehend.DetectEntities

type Rep DetectEntities Source # 
Instance details

Defined in Amazonka.Comprehend.DetectEntities

type Rep DetectEntities = D1 ('MetaData "DetectEntities" "Amazonka.Comprehend.DetectEntities" "libZSservicesZSamazonka-comprehendZSamazonka-comprehend" 'False) (C1 ('MetaCons "DetectEntities'" 'PrefixI 'True) (S1 ('MetaSel ('Just "languageCode") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe LanguageCode)) :*: (S1 ('MetaSel ('Just "endpointArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "text") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Sensitive Text)))))
type AWSResponse DetectEntities Source # 
Instance details

Defined in Amazonka.Comprehend.DetectEntities

newDetectEntities Source #

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.

Constructors

DetectEntitiesResponse' 

Fields

  • entities :: Maybe [Entity]

    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.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Eq DetectEntitiesResponse Source # 
Instance details

Defined in Amazonka.Comprehend.DetectEntities

Show DetectEntitiesResponse Source # 
Instance details

Defined in Amazonka.Comprehend.DetectEntities

Generic DetectEntitiesResponse Source # 
Instance details

Defined in Amazonka.Comprehend.DetectEntities

Associated Types

type Rep DetectEntitiesResponse :: Type -> Type #

NFData DetectEntitiesResponse Source # 
Instance details

Defined in Amazonka.Comprehend.DetectEntities

Methods

rnf :: DetectEntitiesResponse -> () #

type Rep DetectEntitiesResponse Source # 
Instance details

Defined in Amazonka.Comprehend.DetectEntities

type Rep DetectEntitiesResponse = D1 ('MetaData "DetectEntitiesResponse" "Amazonka.Comprehend.DetectEntities" "libZSservicesZSamazonka-comprehendZSamazonka-comprehend" 'False) (C1 ('MetaCons "DetectEntitiesResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "entities") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Entity])) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

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.