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
#batch_detect_sentiment(options = {}) ⇒ Types::BatchDetectSentimentResponseInspects a batch of documents and returns an inference of the prevailing sentiment, POSITIVE
, NEUTRAL
, MIXED
, or NEGATIVE
, in each one.
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.
#classify_document(options = {}) ⇒ Types::ClassifyDocumentResponseCreates a new document classification request to analyze a single document in real-time, using a previously created and trained custom model and an endpoint.
#create_document_classifier(options = {}) ⇒ Types::CreateDocumentClassifierResponseCreates 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.
#create_endpoint(options = {}) ⇒ Types::CreateEndpointResponseCreates a model-specific endpoint for synchronous inference for a previously trained custom model
#create_entity_recognizer(options = {}) ⇒ Types::CreateEntityRecognizerResponseCreates an entity recognizer using submitted files. After your CreateEntityRecognizer
request is submitted, you can check job status using the API.
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.
#delete_endpoint(options = {}) ⇒ StructDeletes a model-specific endpoint for a previously-trained custom model. All endpoints must be deleted in order for the model to be deleted.
#delete_entity_recognizer(options = {}) ⇒ StructDeletes 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.
#describe_endpoint(options = {}) ⇒ Types::DescribeEndpointResponseGets the properties associated with a specific endpoint. Use this operation to get the status of an endpoint.
#describe_entity_recognizer(options = {}) ⇒ Types::DescribeEntityRecognizerResponseProvides details about an entity recognizer including status, S3 buckets containing training data, recognizer metadata, metrics, and so on.
#detect_pii_entities(options = {}) ⇒ Types::DetectPiiEntitiesResponseInspects the input text for entities that contain personally identifiable information (PII) and returns information about them.
#detect_sentiment(options = {}) ⇒ Types::DetectSentimentResponseInspects text and returns an inference of the prevailing sentiment (POSITIVE
, NEUTRAL
, MIXED
, or NEGATIVE
).
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.
#start_entities_detection_job(options = {}) ⇒ Types::StartEntitiesDetectionJobResponseStarts 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.
Starts an asynchronous key phrase detection job for a collection of documents. Use the operation to track the status of a job.
#start_sentiment_detection_job(options = {}) ⇒ Types::StartSentimentDetectionJobResponseStarts an asynchronous sentiment detection job for a collection of documents. use the operation to track the status of a job.
#start_topics_detection_job(options = {}) ⇒ Types::StartTopicsDetectionJobResponseStarts an asynchronous topic detection job. Use the DescribeTopicDetectionJob
operation to track the status of a job.
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.
#stop_entities_detection_job(options = {}) ⇒ Types::StopEntitiesDetectionJobResponseStops 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.
#stop_key_phrases_detection_job(options = {}) ⇒ Types::StopKeyPhrasesDetectionJobResponseStops 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.
#stop_sentiment_detection_job(options = {}) ⇒ Types::StopSentimentDetectionJobResponseStops 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.
#stop_training_document_classifier(options = {}) ⇒ StructStops 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.
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.
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.
#untag_resource(options = {}) ⇒ StructRemoves a specific tag associated with an Amazon Comprehend resource.
#update_endpoint(options = {}) ⇒ StructUpdates information about the specified endpoint.
#wait_until(waiter_name, params = {}) {|waiter| ... } ⇒ BooleanWaiters polls an API operation until a resource enters a desired state.
Basic UsageWaiters will poll until they are succesful, they fail by entering a terminal state, or until a maximum number of attempts are made.
# polls in a loop, sleeping between attempts client.waiter_until(waiter_name, params)
ConfigurationYou can configure the maximum number of polling attempts, and the delay (in seconds) between each polling attempt. You configure waiters by passing a block to #wait_until:
# poll for ~25 seconds
client.wait_until(...) do |w|
w.max_attempts = 5
w.delay = 5
end
Callbacks
You can be notified before each polling attempt and before each delay. If you throw :success
or :failure
from these callbacks, it will terminate the waiter.
started_at = Time.now
client.wait_until(...) do |w|
# disable max attempts
w.max_attempts = nil
# poll for 1 hour, instead of a number of attempts
w.before_wait do |attempts, response|
throw :failure if Time.now - started_at > 3600
end
end
Handling Errors
When a waiter is successful, it returns true
. When a waiter fails, it raises an error. All errors raised extend from Waiters::Errors::WaiterFailed.
begin
client.wait_until(...)
rescue Aws::Waiters::Errors::WaiterFailed
# resource did not enter the desired state in time
end
#waiter_names ⇒ Array<Symbol>
Returns the list of supported waiters. The following table lists the supported waiters and the client method they call:
Waiter Name Client Method Default Delay: Default Max Attempts:RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4