Comprehend
public struct Comprehend
Client object for interacting with AWS Comprehend service.
Amazon Comprehend is an AWS 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.
-
Undocumented
Declaration
Swift
public let client: AWSClient
-
Initialize the Comprehend client
Declaration
Swift
public init(accessKeyId: String? = nil, secretAccessKey: String? = nil, sessionToken: String? = nil, region: AWSSDKSwiftCore.Region? = nil, endpoint: String? = nil, middlewares: [AWSServiceMiddleware] = [], eventLoopGroupProvider: AWSClient.EventLoopGroupProvider = .useAWSClientShared)
Parameters
accessKeyId
Public access key provided by AWS
secretAccessKey
Private access key provided by AWS
sessionToken
Token provided by STS.AssumeRole() which allows access to another AWS account
region
Region of server you want to communicate with
endpoint
Custom endpoint URL to use instead of standard AWS servers
middlewares
Array of middlewares to apply to requests and responses
eventLoopGroupProvider
EventLoopGroup to use. Use
useAWSClientShared
if the client shall manage its own EventLoopGroup.
-
Determines the dominant language of the input text for a batch of documents. For a list of languages that Amazon Comprehend can detect, see Amazon Comprehend Supported Languages.
Declaration
Swift
public func batchDetectDominantLanguage(_ input: BatchDetectDominantLanguageRequest) -> EventLoopFuture<BatchDetectDominantLanguageResponse>
-
Inspects the text of a batch of documents for named entities and returns information about them. For more information about named entities, see how-entities
Declaration
Swift
public func batchDetectEntities(_ input: BatchDetectEntitiesRequest) -> EventLoopFuture<BatchDetectEntitiesResponse>
-
Detects the key noun phrases found in a batch of documents.
Declaration
Swift
public func batchDetectKeyPhrases(_ input: BatchDetectKeyPhrasesRequest) -> EventLoopFuture<BatchDetectKeyPhrasesResponse>
-
Inspects a batch of documents and returns an inference of the prevailing sentiment, POSITIVE, NEUTRAL, MIXED, or NEGATIVE, in each one.
Declaration
Swift
public func batchDetectSentiment(_ input: BatchDetectSentimentRequest) -> EventLoopFuture<BatchDetectSentimentResponse>
-
Inspects the text of a batch of documents for the syntax and part of speech of the words in the document and returns information about them. For more information, see how-syntax.
Declaration
Swift
public func batchDetectSyntax(_ input: BatchDetectSyntaxRequest) -> EventLoopFuture<BatchDetectSyntaxResponse>
-
Creates a new document classification request to analyze a single document in real-time, using a previously created and trained custom model and an endpoint.
Declaration
Swift
public func classifyDocument(_ input: ClassifyDocumentRequest) -> EventLoopFuture<ClassifyDocumentResponse>
-
Creates a new document classifier that you can use to categorize documents. To create a classifier, you provide a set of training documents that labeled with the categories that you want to use. After the classifier is trained you can use it to categorize a set of labeled documents into the categories. For more information, see how-document-classification.
Declaration
Swift
public func createDocumentClassifier(_ input: CreateDocumentClassifierRequest) -> EventLoopFuture<CreateDocumentClassifierResponse>
-
Creates a model-specific endpoint for synchronous inference for a previously trained custom model
Declaration
Swift
public func createEndpoint(_ input: CreateEndpointRequest) -> EventLoopFuture<CreateEndpointResponse>
-
Creates an entity recognizer using submitted files. After your CreateEntityRecognizer request is submitted, you can check job status using the API.
Declaration
Swift
public func createEntityRecognizer(_ input: CreateEntityRecognizerRequest) -> EventLoopFuture<CreateEntityRecognizerResponse>
-
Deletes a previously created document classifier Only those classifiers that are in terminated states (IN_ERROR, TRAINED) will be deleted. If an active inference job is using the model, a ResourceInUseException will be returned. This is an asynchronous action that puts the classifier into a DELETING state, and it is then removed by a background job. Once removed, the classifier disappears from your account and is no longer available for use.
Declaration
Swift
public func deleteDocumentClassifier(_ input: DeleteDocumentClassifierRequest) -> EventLoopFuture<DeleteDocumentClassifierResponse>
-
Deletes a model-specific endpoint for a previously-trained custom model. All endpoints must be deleted in order for the model to be deleted.
Declaration
Swift
public func deleteEndpoint(_ input: DeleteEndpointRequest) -> EventLoopFuture<DeleteEndpointResponse>
-
Deletes an entity recognizer. Only those recognizers that are in terminated states (IN_ERROR, TRAINED) will be deleted. If an active inference job is using the model, a ResourceInUseException will be returned. This is an asynchronous action that puts the recognizer into a DELETING state, and it is then removed by a background job. Once removed, the recognizer disappears from your account and is no longer available for use.
Declaration
Swift
public func deleteEntityRecognizer(_ input: DeleteEntityRecognizerRequest) -> EventLoopFuture<DeleteEntityRecognizerResponse>
-
Gets the properties associated with a document classification job. Use this operation to get the status of a classification job.
Declaration
Swift
public func describeDocumentClassificationJob(_ input: DescribeDocumentClassificationJobRequest) -> EventLoopFuture<DescribeDocumentClassificationJobResponse>
-
Gets the properties associated with a document classifier.
Declaration
Swift
public func describeDocumentClassifier(_ input: DescribeDocumentClassifierRequest) -> EventLoopFuture<DescribeDocumentClassifierResponse>
-
Gets the properties associated with a dominant language detection job. Use this operation to get the status of a detection job.
Declaration
Swift
public func describeDominantLanguageDetectionJob(_ input: DescribeDominantLanguageDetectionJobRequest) -> EventLoopFuture<DescribeDominantLanguageDetectionJobResponse>
-
Gets the properties associated with a specific endpoint. Use this operation to get the status of an endpoint.
Declaration
Swift
public func describeEndpoint(_ input: DescribeEndpointRequest) -> EventLoopFuture<DescribeEndpointResponse>
-
Gets the properties associated with an entities detection job. Use this operation to get the status of a detection job.
Declaration
Swift
public func describeEntitiesDetectionJob(_ input: DescribeEntitiesDetectionJobRequest) -> EventLoopFuture<DescribeEntitiesDetectionJobResponse>
-
Provides details about an entity recognizer including status, S3 buckets containing training data, recognizer metadata, metrics, and so on.
Declaration
Swift
public func describeEntityRecognizer(_ input: DescribeEntityRecognizerRequest) -> EventLoopFuture<DescribeEntityRecognizerResponse>
-
Gets the properties associated with a key phrases detection job. Use this operation to get the status of a detection job.
Declaration
Swift
public func describeKeyPhrasesDetectionJob(_ input: DescribeKeyPhrasesDetectionJobRequest) -> EventLoopFuture<DescribeKeyPhrasesDetectionJobResponse>
-
Gets the properties associated with a sentiment detection job. Use this operation to get the status of a detection job.
Declaration
Swift
public func describeSentimentDetectionJob(_ input: DescribeSentimentDetectionJobRequest) -> EventLoopFuture<DescribeSentimentDetectionJobResponse>
-
Gets the properties associated with a topic detection job. Use this operation to get the status of a detection job.
Declaration
Swift
public func describeTopicsDetectionJob(_ input: DescribeTopicsDetectionJobRequest) -> EventLoopFuture<DescribeTopicsDetectionJobResponse>
-
Determines the dominant language of the input text. For a list of languages that Amazon Comprehend can detect, see Amazon Comprehend Supported Languages.
Declaration
Swift
public func detectDominantLanguage(_ input: DetectDominantLanguageRequest) -> EventLoopFuture<DetectDominantLanguageResponse>
-
Inspects text for named entities, and returns information about them. For more information, about named entities, see how-entities.
Declaration
Swift
public func detectEntities(_ input: DetectEntitiesRequest) -> EventLoopFuture<DetectEntitiesResponse>
-
Detects the key noun phrases found in the text.
Declaration
Swift
public func detectKeyPhrases(_ input: DetectKeyPhrasesRequest) -> EventLoopFuture<DetectKeyPhrasesResponse>
-
Inspects text and returns an inference of the prevailing sentiment (POSITIVE, NEUTRAL, MIXED, or NEGATIVE).
Declaration
Swift
public func detectSentiment(_ input: DetectSentimentRequest) -> EventLoopFuture<DetectSentimentResponse>
-
Inspects text for syntax and the part of speech of words in the document. For more information, how-syntax.
Declaration
Swift
public func detectSyntax(_ input: DetectSyntaxRequest) -> EventLoopFuture<DetectSyntaxResponse>
-
Gets a list of the documentation classification jobs that you have submitted.
Declaration
Swift
public func listDocumentClassificationJobs(_ input: ListDocumentClassificationJobsRequest) -> EventLoopFuture<ListDocumentClassificationJobsResponse>
-
Gets a list of the document classifiers that you have created.
Declaration
Swift
public func listDocumentClassifiers(_ input: ListDocumentClassifiersRequest) -> EventLoopFuture<ListDocumentClassifiersResponse>
-
Gets a list of the dominant language detection jobs that you have submitted.
Declaration
Swift
public func listDominantLanguageDetectionJobs(_ input: ListDominantLanguageDetectionJobsRequest) -> EventLoopFuture<ListDominantLanguageDetectionJobsResponse>
-
Gets a list of all existing endpoints that you’ve created.
Declaration
Swift
public func listEndpoints(_ input: ListEndpointsRequest) -> EventLoopFuture<ListEndpointsResponse>
-
Gets a list of the entity detection jobs that you have submitted.
Declaration
Swift
public func listEntitiesDetectionJobs(_ input: ListEntitiesDetectionJobsRequest) -> EventLoopFuture<ListEntitiesDetectionJobsResponse>
-
Gets a list of the properties of all entity recognizers that you created, including recognizers currently in training. Allows you to filter the list of recognizers based on criteria such as status and submission time. This call returns up to 500 entity recognizers in the list, with a default number of 100 recognizers in the list. The results of this list are not in any particular order. Please get the list and sort locally if needed.
Declaration
Swift
public func listEntityRecognizers(_ input: ListEntityRecognizersRequest) -> EventLoopFuture<ListEntityRecognizersResponse>
-
Get a list of key phrase detection jobs that you have submitted.
Declaration
Swift
public func listKeyPhrasesDetectionJobs(_ input: ListKeyPhrasesDetectionJobsRequest) -> EventLoopFuture<ListKeyPhrasesDetectionJobsResponse>
-
Gets a list of sentiment detection jobs that you have submitted.
Declaration
Swift
public func listSentimentDetectionJobs(_ input: ListSentimentDetectionJobsRequest) -> EventLoopFuture<ListSentimentDetectionJobsResponse>
-
Lists all tags associated with a given Amazon Comprehend resource.
Declaration
Swift
public func listTagsForResource(_ input: ListTagsForResourceRequest) -> EventLoopFuture<ListTagsForResourceResponse>
-
Gets a list of the topic detection jobs that you have submitted.
Declaration
Swift
public func listTopicsDetectionJobs(_ input: ListTopicsDetectionJobsRequest) -> EventLoopFuture<ListTopicsDetectionJobsResponse>
-
Starts an asynchronous document classification job. Use the operation to track the progress of the job.
Declaration
Swift
public func startDocumentClassificationJob(_ input: StartDocumentClassificationJobRequest) -> EventLoopFuture<StartDocumentClassificationJobResponse>
-
Starts an asynchronous dominant language detection job for a collection of documents. Use the operation to track the status of a job.
Declaration
Swift
public func startDominantLanguageDetectionJob(_ input: StartDominantLanguageDetectionJobRequest) -> EventLoopFuture<StartDominantLanguageDetectionJobResponse>
-
Starts an asynchronous entity detection job for a collection of documents. Use the operation to track the status of a job. This API can be used for either standard entity detection or custom entity recognition. In order to be used for custom entity recognition, the optional EntityRecognizerArn must be used in order to provide access to the recognizer being used to detect the custom entity.
Declaration
Swift
public func startEntitiesDetectionJob(_ input: StartEntitiesDetectionJobRequest) -> EventLoopFuture<StartEntitiesDetectionJobResponse>
-
Starts an asynchronous key phrase detection job for a collection of documents. Use the operation to track the status of a job.
Declaration
Swift
public func startKeyPhrasesDetectionJob(_ input: StartKeyPhrasesDetectionJobRequest) -> EventLoopFuture<StartKeyPhrasesDetectionJobResponse>
-
Starts an asynchronous sentiment detection job for a collection of documents. use the operation to track the status of a job.
Declaration
Swift
public func startSentimentDetectionJob(_ input: StartSentimentDetectionJobRequest) -> EventLoopFuture<StartSentimentDetectionJobResponse>
-
Starts an asynchronous topic detection job. Use the DescribeTopicDetectionJob operation to track the status of a job.
Declaration
Swift
public func startTopicsDetectionJob(_ input: StartTopicsDetectionJobRequest) -> EventLoopFuture<StartTopicsDetectionJobResponse>
-
Stops a dominant language detection job in progress. If the job state is IN_PROGRESS the job is marked for termination and put into the STOP_REQUESTED state. If the job completes before it can be stopped, it is put into the COMPLETED state; otherwise the job is stopped and put into the STOPPED state. If the job is in the COMPLETED or FAILED state when you call the StopDominantLanguageDetectionJob operation, the operation returns a 400 Internal Request Exception. When a job is stopped, any documents already processed are written to the output location.
Declaration
Swift
public func stopDominantLanguageDetectionJob(_ input: StopDominantLanguageDetectionJobRequest) -> EventLoopFuture<StopDominantLanguageDetectionJobResponse>
-
Stops an entities detection job in progress. If the job state is IN_PROGRESS the job is marked for termination and put into the STOP_REQUESTED state. If the job completes before it can be stopped, it is put into the COMPLETED state; otherwise the job is stopped and put into the STOPPED state. If the job is in the COMPLETED or FAILED state when you call the StopDominantLanguageDetectionJob operation, the operation returns a 400 Internal Request Exception. When a job is stopped, any documents already processed are written to the output location.
Declaration
Swift
public func stopEntitiesDetectionJob(_ input: StopEntitiesDetectionJobRequest) -> EventLoopFuture<StopEntitiesDetectionJobResponse>
-
Stops a key phrases detection job in progress. If the job state is IN_PROGRESS the job is marked for termination and put into the STOP_REQUESTED state. If the job completes before it can be stopped, it is put into the COMPLETED state; otherwise the job is stopped and put into the STOPPED state. If the job is in the COMPLETED or FAILED state when you call the StopDominantLanguageDetectionJob operation, the operation returns a 400 Internal Request Exception. When a job is stopped, any documents already processed are written to the output location.
Declaration
Swift
public func stopKeyPhrasesDetectionJob(_ input: StopKeyPhrasesDetectionJobRequest) -> EventLoopFuture<StopKeyPhrasesDetectionJobResponse>
-
Stops a sentiment detection job in progress. If the job state is IN_PROGRESS the job is marked for termination and put into the STOP_REQUESTED state. If the job completes before it can be stopped, it is put into the COMPLETED state; otherwise the job is be stopped and put into the STOPPED state. If the job is in the COMPLETED or FAILED state when you call the StopDominantLanguageDetectionJob operation, the operation returns a 400 Internal Request Exception. When a job is stopped, any documents already processed are written to the output location.
Declaration
Swift
public func stopSentimentDetectionJob(_ input: StopSentimentDetectionJobRequest) -> EventLoopFuture<StopSentimentDetectionJobResponse>
-
Stops a document classifier training job while in progress. If the training job state is TRAINING, the job is marked for termination and put into the STOP_REQUESTED state. If the training job completes before it can be stopped, it is put into the TRAINED; otherwise the training job is stopped and put into the STOPPED state and the service sends back an HTTP 200 response with an empty HTTP body.
Declaration
Swift
public func stopTrainingDocumentClassifier(_ input: StopTrainingDocumentClassifierRequest) -> EventLoopFuture<StopTrainingDocumentClassifierResponse>
-
Stops an entity recognizer training job while in progress. If the training job state is TRAINING, the job is marked for termination and put into the STOP_REQUESTED state. If the training job completes before it can be stopped, it is put into the TRAINED; otherwise the training job is stopped and putted into the STOPPED state and the service sends back an HTTP 200 response with an empty HTTP body.
Declaration
Swift
public func stopTrainingEntityRecognizer(_ input: StopTrainingEntityRecognizerRequest) -> EventLoopFuture<StopTrainingEntityRecognizerResponse>
-
Associates a specific tag with an Amazon Comprehend resource. A tag is a key-value pair that adds as a metadata to a resource used by Amazon Comprehend. For example, a tag with “Sales” as the key might be added to a resource to indicate its use by the sales department.
Declaration
Swift
public func tagResource(_ input: TagResourceRequest) -> EventLoopFuture<TagResourceResponse>
-
Removes a specific tag associated with an Amazon Comprehend resource.
Declaration
Swift
public func untagResource(_ input: UntagResourceRequest) -> EventLoopFuture<UntagResourceResponse>
-
Updates information about the specified endpoint.
Declaration
Swift
public func updateEndpoint(_ input: UpdateEndpointRequest) -> EventLoopFuture<UpdateEndpointResponse>
-
Gets a list of the documentation classification jobs that you have submitted.
Declaration
Swift
public func listDocumentClassificationJobsPaginator(_ input: ListDocumentClassificationJobsRequest, onPage: @escaping (ListDocumentClassificationJobsResponse, EventLoop) -> EventLoopFuture<Bool>) -> EventLoopFuture<Void>
-
Gets a list of the document classifiers that you have created.
Declaration
Swift
public func listDocumentClassifiersPaginator(_ input: ListDocumentClassifiersRequest, onPage: @escaping (ListDocumentClassifiersResponse, EventLoop) -> EventLoopFuture<Bool>) -> EventLoopFuture<Void>
-
Gets a list of the dominant language detection jobs that you have submitted.
Declaration
Swift
public func listDominantLanguageDetectionJobsPaginator(_ input: ListDominantLanguageDetectionJobsRequest, onPage: @escaping (ListDominantLanguageDetectionJobsResponse, EventLoop) -> EventLoopFuture<Bool>) -> EventLoopFuture<Void>
-
Gets a list of the entity detection jobs that you have submitted.
Declaration
Swift
public func listEntitiesDetectionJobsPaginator(_ input: ListEntitiesDetectionJobsRequest, onPage: @escaping (ListEntitiesDetectionJobsResponse, EventLoop) -> EventLoopFuture<Bool>) -> EventLoopFuture<Void>
-
Gets a list of the properties of all entity recognizers that you created, including recognizers currently in training. Allows you to filter the list of recognizers based on criteria such as status and submission time. This call returns up to 500 entity recognizers in the list, with a default number of 100 recognizers in the list. The results of this list are not in any particular order. Please get the list and sort locally if needed.
Declaration
Swift
public func listEntityRecognizersPaginator(_ input: ListEntityRecognizersRequest, onPage: @escaping (ListEntityRecognizersResponse, EventLoop) -> EventLoopFuture<Bool>) -> EventLoopFuture<Void>
-
Get a list of key phrase detection jobs that you have submitted.
Declaration
Swift
public func listKeyPhrasesDetectionJobsPaginator(_ input: ListKeyPhrasesDetectionJobsRequest, onPage: @escaping (ListKeyPhrasesDetectionJobsResponse, EventLoop) -> EventLoopFuture<Bool>) -> EventLoopFuture<Void>
-
Gets a list of sentiment detection jobs that you have submitted.
Declaration
Swift
public func listSentimentDetectionJobsPaginator(_ input: ListSentimentDetectionJobsRequest, onPage: @escaping (ListSentimentDetectionJobsResponse, EventLoop) -> EventLoopFuture<Bool>) -> EventLoopFuture<Void>
-
Gets a list of the topic detection jobs that you have submitted.
Declaration
Swift
public func listTopicsDetectionJobsPaginator(_ input: ListTopicsDetectionJobsRequest, onPage: @escaping (ListTopicsDetectionJobsResponse, EventLoop) -> EventLoopFuture<Bool>) -> EventLoopFuture<Void>
-
Undocumented
See moreDeclaration
Swift
public struct ListDocumentClassificationJobsRequest : AWSShape
extension Comprehend.ListDocumentClassificationJobsRequest: AWSPaginateStringToken
-
Undocumented
See moreDeclaration
Swift
public struct ListDocumentClassifiersRequest : AWSShape
extension Comprehend.ListDocumentClassifiersRequest: AWSPaginateStringToken
-
Undocumented
See moreDeclaration
Swift
public struct ListDominantLanguageDetectionJobsRequest : AWSShape
extension Comprehend.ListDominantLanguageDetectionJobsRequest: AWSPaginateStringToken
-
Undocumented
See moreDeclaration
Swift
public struct ListEntitiesDetectionJobsRequest : AWSShape
extension Comprehend.ListEntitiesDetectionJobsRequest: AWSPaginateStringToken
-
Undocumented
See moreDeclaration
Swift
public struct ListEntityRecognizersRequest : AWSShape
extension Comprehend.ListEntityRecognizersRequest: AWSPaginateStringToken
-
Undocumented
See moreDeclaration
Swift
public struct ListKeyPhrasesDetectionJobsRequest : AWSShape
extension Comprehend.ListKeyPhrasesDetectionJobsRequest: AWSPaginateStringToken
-
Undocumented
See moreDeclaration
Swift
public struct ListSentimentDetectionJobsRequest : AWSShape
extension Comprehend.ListSentimentDetectionJobsRequest: AWSPaginateStringToken
-
Undocumented
See moreDeclaration
Swift
public struct ListTopicsDetectionJobsRequest : AWSShape
extension Comprehend.ListTopicsDetectionJobsRequest: AWSPaginateStringToken
-
Undocumented
See moreDeclaration
Swift
public enum DocumentClassifierMode : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum EndpointStatus : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum EntityType : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum InputFormat : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum JobStatus : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum LanguageCode : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum ModelStatus : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum PartOfSpeechTagType : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum SentimentType : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum SyntaxLanguageCode : String, CustomStringConvertible, Codable