openapi: 3.0.0
info:
version: '2017-11-27'
x-release: v4
title: 'Amazon Comprehend #X Amz Target=Comprehend 20171127.BatchDetectDominantLanguage #X Amz Target=Comprehend 20171127.BatchDetectDominantLanguage #X Amz Target=Comprehend 20171127.CreateEntityRecognizer API'
description: Amazon Comprehend is an Amazon Web Services service for gaining insight into the content of documents. Use these actions to determine the topics contained in your documents, the topics they discuss, the predominant sentiment expressed in them, the predominant language used, and more.
x-logo:
url: https://twitter.com/awscloud/profile_image?size=original
backgroundColor: '#FFFFFF'
termsOfService: https://aws.amazon.com/service-terms/
contact:
name: Mike Ralphson
email: mike.ralphson@gmail.com
url: https://github.com/mermade/aws2openapi
x-twitter: PermittedSoc
license:
name: Apache 2.0 License
url: http://www.apache.org/licenses/
x-providerName: amazonaws.com
x-serviceName: comprehend
x-aws-signingName: comprehend
x-origin:
- contentType: application/json
url: https://raw.githubusercontent.com/aws/aws-sdk-js/master/apis/comprehend-2017-11-27.normal.json
converter:
url: https://github.com/mermade/aws2openapi
version: 1.0.0
x-apisguru-driver: external
x-apiClientRegistration:
url: https://portal.aws.amazon.com/gp/aws/developer/registration/index.html?nc2=h_ct
x-apisguru-categories:
- cloud
x-preferred: true
servers:
- url: http://comprehend.{region}.amazonaws.com
variables:
region:
description: The AWS region
enum:
- us-east-1
- us-east-2
- us-west-1
- us-west-2
- us-gov-west-1
- us-gov-east-1
- ca-central-1
- eu-north-1
- eu-west-1
- eu-west-2
- eu-west-3
- eu-central-1
- eu-south-1
- af-south-1
- ap-northeast-1
- ap-northeast-2
- ap-northeast-3
- ap-southeast-1
- ap-southeast-2
- ap-east-1
- ap-south-1
- sa-east-1
- me-south-1
default: us-east-1
description: The Amazon Comprehend multi-region endpoint
- url: https://comprehend.{region}.amazonaws.com
variables:
region:
description: The AWS region
enum:
- us-east-1
- us-east-2
- us-west-1
- us-west-2
- us-gov-west-1
- us-gov-east-1
- ca-central-1
- eu-north-1
- eu-west-1
- eu-west-2
- eu-west-3
- eu-central-1
- eu-south-1
- af-south-1
- ap-northeast-1
- ap-northeast-2
- ap-northeast-3
- ap-southeast-1
- ap-southeast-2
- ap-east-1
- ap-south-1
- sa-east-1
- me-south-1
default: us-east-1
description: The Amazon Comprehend multi-region endpoint
- url: http://comprehend.{region}.amazonaws.com.cn
variables:
region:
description: The AWS region
enum:
- cn-north-1
- cn-northwest-1
default: cn-north-1
description: The Amazon Comprehend endpoint for China (Beijing) and China (Ningxia)
- url: https://comprehend.{region}.amazonaws.com.cn
variables:
region:
description: The AWS region
enum:
- cn-north-1
- cn-northwest-1
default: cn-north-1
description: The Amazon Comprehend endpoint for China (Beijing) and China (Ningxia)
security:
- hmac: []
tags:
- name: '#X Amz Target=Comprehend 20171127.CreateEntityRecognizer'
paths:
/#X-Amz-Target=Comprehend_20171127.CreateEntityRecognizer:
parameters:
- $ref: '#/components/parameters/X-Amz-Content-Sha256'
- $ref: '#/components/parameters/X-Amz-Date'
- $ref: '#/components/parameters/X-Amz-Algorithm'
- $ref: '#/components/parameters/X-Amz-Credential'
- $ref: '#/components/parameters/X-Amz-Security-Token'
- $ref: '#/components/parameters/X-Amz-Signature'
- $ref: '#/components/parameters/X-Amz-SignedHeaders'
post:
operationId: CreateEntityRecognizer
description: 'Creates an entity recognizer using submitted files. After your CreateEntityRecognizer request is submitted, you can check job status using the DescribeEntityRecognizer API. '
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/CreateEntityRecognizerResponse'
examples:
CreateEntityRecognizer200Example:
summary: Default CreateEntityRecognizer 200
x-microcks-default: true
value:
EntityRecognizerArn: example
'480':
description: InvalidRequestException
content:
application/json:
schema:
$ref: '#/components/schemas/InvalidRequestException'
examples:
CreateEntityRecognizer480Example:
summary: Default CreateEntityRecognizer 480
x-microcks-default: true
value: example
'481':
description: ResourceInUseException
content:
application/json:
schema:
$ref: '#/components/schemas/ResourceInUseException'
examples:
CreateEntityRecognizer481Example:
summary: Default CreateEntityRecognizer 481
x-microcks-default: true
value: example
'482':
description: TooManyTagsException
content:
application/json:
schema:
$ref: '#/components/schemas/TooManyTagsException'
examples:
CreateEntityRecognizer482Example:
summary: Default CreateEntityRecognizer 482
x-microcks-default: true
value: example
'483':
description: TooManyRequestsException
content:
application/json:
schema:
$ref: '#/components/schemas/TooManyRequestsException'
examples:
CreateEntityRecognizer483Example:
summary: Default CreateEntityRecognizer 483
x-microcks-default: true
value: example
'484':
description: ResourceLimitExceededException
content:
application/json:
schema:
$ref: '#/components/schemas/ResourceLimitExceededException'
examples:
CreateEntityRecognizer484Example:
summary: Default CreateEntityRecognizer 484
x-microcks-default: true
value: example
'485':
description: UnsupportedLanguageException
content:
application/json:
schema:
$ref: '#/components/schemas/UnsupportedLanguageException'
examples:
CreateEntityRecognizer485Example:
summary: Default CreateEntityRecognizer 485
x-microcks-default: true
value: example
'486':
description: KmsKeyValidationException
content:
application/json:
schema:
$ref: '#/components/schemas/KmsKeyValidationException'
examples:
CreateEntityRecognizer486Example:
summary: Default CreateEntityRecognizer 486
x-microcks-default: true
value: example
'487':
description: InternalServerException
content:
application/json:
schema:
$ref: '#/components/schemas/InternalServerException'
examples:
CreateEntityRecognizer487Example:
summary: Default CreateEntityRecognizer 487
x-microcks-default: true
value: example
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateEntityRecognizerRequest'
parameters:
- name: X-Amz-Target
in: header
required: true
schema:
type: string
enum:
- Comprehend_20171127.CreateEntityRecognizer
summary: Amazon Comprehend Create Entity Recognizer
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
tags:
- '#X Amz Target=Comprehend 20171127.CreateEntityRecognizer'
components:
schemas:
IamRoleArn:
type: string
pattern: arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+
minLength: 20
maxLength: 2048
LanguageCode:
type: string
enum:
- en
- es
- fr
- de
- it
- pt
- ar
- hi
- ja
- ko
- zh
- zh-TW
SecurityGroupId:
type: string
pattern: '[-0-9a-zA-Z]+'
minLength: 1
maxLength: 32
EntityTypesListItem:
type: object
required:
- Type
properties:
Type:
allOf:
- $ref: '#/components/schemas/EntityTypeName'
- description: '
An entity type within a labeled training dataset that Amazon Comprehend uses to train a custom entity recognizer.
Entity types must not contain the following invalid characters: \n (line break), \\n (escaped line break, \r (carriage return), \\r (escaped carriage return), \t (tab), \\t (escaped tab), space, and , (comma).
' description: An entity type within a labeled training dataset that Amazon Comprehend uses to train a custom entity recognizer. KmsKeyValidationException: {} EntityTypeName: type: string pattern: ^(?![^\n\r\t,]*\\n|\\r|\\t)[^\n\r\t,]+$ maxLength: 64 SubnetId: type: string pattern: '[-0-9a-zA-Z]+' minLength: 1 maxLength: 32 AugmentedManifestsListItem: type: object required: - S3Uri - AttributeNames properties: S3Uri: allOf: - $ref: '#/components/schemas/S3Uri' - description: The Amazon S3 location of the augmented manifest file. Split: allOf: - $ref: '#/components/schemas/Split' - description:The purpose of the data you've provided in the augmented manifest. You can either train or test this data. If you don't specify, the default is train.
TRAIN - all of the documents in the manifest will be used for training. If no test documents are provided, Amazon Comprehend will automatically reserve a portion of the training documents for testing.
TEST - all of the documents in the manifest will be used for testing.
AttributeNames: allOf: - $ref: '#/components/schemas/AttributeNamesList' - description:The JSON attribute that contains the annotations for your training documents. The number of attribute names that you specify depends on whether your augmented manifest file is the output of a single labeling job or a chained labeling job.
If your file is the output of a single labeling job, specify the LabelAttributeName key that was used when the job was created in Ground Truth.
If your file is the output of a chained labeling job, specify the LabelAttributeName key for one or more jobs in the chain. Each LabelAttributeName key provides the annotations from an individual job.
AnnotationDataS3Uri: allOf: - $ref: '#/components/schemas/S3Uri' - description: The S3 prefix to the annotation files that are referred in the augmented manifest file. SourceDocumentsS3Uri: allOf: - $ref: '#/components/schemas/S3Uri' - description: The S3 prefix to the source files (PDFs) that are referred to in the augmented manifest file. DocumentType: allOf: - $ref: '#/components/schemas/AugmentedManifestsDocumentTypeFormat' - description:The type of augmented manifest. PlainTextDocument or SemiStructuredDocument. If you don't specify, the default is PlainTextDocument.
PLAIN_TEXT_DOCUMENT A document type that represents any unicode text that is encoded in UTF-8.
SEMI_STRUCTURED_DOCUMENT A document type with positional and structural context, like a PDF. For training with Amazon Comprehend, only PDFs are supported. For inference, Amazon Comprehend support PDFs, DOCX and TXT.
ID for the Amazon Web Services Key Management Service (KMS) key that Amazon Comprehend uses to encrypt data on the storage volume attached to the ML compute instance(s) that process the analysis job. The VolumeKmsKeyId can be either of the following formats:
KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"
Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
ID for the KMS key that Amazon Comprehend uses to encrypt trained custom models. The ModelKmsKeyId can be either of the following formats:
KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"
Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
The JSON resource-based policy to attach to your custom entity recognizer model. You can use this policy to allow another Amazon Web Services account to import your custom model.
Provide your JSON as a UTF-8 encoded string without line breaks. To provide valid JSON for your policy, enclose the attribute names and values in double quotes. If the JSON body is also enclosed in double quotes, then you must escape the double quotes that are inside the policy:
"{\"attribute\": \"value\", \"attribute\": [\"value\"]}"
To avoid escaping quotes, you can use single quotes to enclose the policy and double quotes to enclose the JSON names and values:
''{"attribute": "value", "attribute": ["value"]}''
The format of your training data:
COMPREHEND_CSV: A CSV file that supplements your training documents. The CSV file contains information about the custom entities that your trained model will detect. The required format of the file depends on whether you are providing annotations or an entity list.
If you use this value, you must provide your CSV file by using either the Annotations or EntityList parameters. You must provide your training documents by using the Documents parameter.
AUGMENTED_MANIFEST: A labeled dataset that is produced by Amazon SageMaker Ground Truth. This file is in JSON lines format. Each line is a complete JSON object that contains a training document and its labels. Each label annotates a named entity in the training document.
If you use this value, you must provide the AugmentedManifests parameter in your request.
If you don''t specify a value, Amazon Comprehend uses COMPREHEND_CSV as the default.
The entity types in the labeled training data that Amazon Comprehend uses to train the custom entity recognizer. Any entity types that you don''t specify are ignored.
A maximum of 25 entity types can be used at one time to train an entity recognizer. Entity types must not contain the following invalid characters: \n (line break), \\n (escaped line break), \r (carriage return), \\r (escaped carriage return), \t (tab), \\t (escaped tab), space, and , (comma).
' Documents: allOf: - $ref: '#/components/schemas/EntityRecognizerDocuments' - description:The S3 location of the folder that contains the training documents for your custom entity recognizer.
This parameter is required if you set DataFormat to COMPREHEND_CSV.
A list of augmented manifest files that provide training data for your custom model. An augmented manifest file is a labeled dataset that is produced by Amazon SageMaker Ground Truth.
This parameter is required if you set DataFormat to AUGMENTED_MANIFEST.