AWSTextract

@interface AWSTextract

Amazon Textract detects and analyzes text in documents and converts it into machine-readable text. This is the API reference documentation for Amazon Textract.

  • The service configuration used to instantiate this service client.

    Warning

    Once the client is instantiated, do not modify the configuration object. It may cause unspecified behaviors.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) AWSServiceConfiguration *configuration

    Swift

    var configuration: UnsafeMutablePointer<Int32> { get }
  • Returns the singleton service client. If the singleton object does not exist, the SDK instantiates the default service client with defaultServiceConfiguration from [AWSServiceManager defaultServiceManager]. The reference to this object is maintained by the SDK, and you do not need to retain it manually.

    For example, set the default service configuration in - application:didFinishLaunchingWithOptions:

    Swift

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
       let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId")
       let configuration = AWSServiceConfiguration(region: .USEast1, credentialsProvider: credentialProvider)
       AWSServiceManager.default().defaultServiceConfiguration = configuration
    
       return true
    

    }

    Objective-C

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
         AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1
                                                                                                         identityPoolId:@"YourIdentityPoolId"];
         AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1
                                                                              credentialsProvider:credentialsProvider];
         [AWSServiceManager defaultServiceManager].defaultServiceConfiguration = configuration;
    
         return YES;
     }
    

    Then call the following to get the default service client:

    Swift

    let Textract = AWSTextract.default()
    

    Objective-C

    AWSTextract *Textract = [AWSTextract defaultTextract];
    

    Declaration

    Objective-C

    + (nonnull instancetype)defaultTextract;

    Swift

    class func `default`() -> Self

    Return Value

    The default service client.

  • Creates a service client with the given service configuration and registers it for the key.

    For example, set the default service configuration in - application:didFinishLaunchingWithOptions:

    Swift

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
       let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId")
       let configuration = AWSServiceConfiguration(region: .USWest2, credentialsProvider: credentialProvider)
       AWSTextract.register(with: configuration!, forKey: "USWest2Textract")
    
       return true
    

    }

    Objective-C

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
        AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1
                                                                                                        identityPoolId:@"YourIdentityPoolId"];
        AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSWest2
                                                                             credentialsProvider:credentialsProvider];
    
        [AWSTextract registerTextractWithConfiguration:configuration forKey:@"USWest2Textract"];
    
        return YES;
    }
    

    Then call the following to get the service client:

    Swift

    let Textract = AWSTextract(forKey: "USWest2Textract")
    

    Objective-C

    AWSTextract *Textract = [AWSTextract TextractForKey:@"USWest2Textract"];
    

    Warning

    After calling this method, do not modify the configuration object. It may cause unspecified behaviors.

    Declaration

    Objective-C

    + (void)registerTextractWithConfiguration:(id)configuration
                                       forKey:(nonnull NSString *)key;

    Swift

    class func register(withConfiguration configuration: Any!, forKey key: String)

    Parameters

    configuration

    A service configuration object.

    key

    A string to identify the service client.

  • Retrieves the service client associated with the key. You need to call + registerTextractWithConfiguration:forKey: before invoking this method.

    For example, set the default service configuration in - application:didFinishLaunchingWithOptions:

    Swift

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
       let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId")
       let configuration = AWSServiceConfiguration(region: .USWest2, credentialsProvider: credentialProvider)
       AWSTextract.register(with: configuration!, forKey: "USWest2Textract")
    
       return true
    

    }

    Objective-C

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
        AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1
                                                                                                        identityPoolId:@"YourIdentityPoolId"];
        AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSWest2
                                                                             credentialsProvider:credentialsProvider];
    
        [AWSTextract registerTextractWithConfiguration:configuration forKey:@"USWest2Textract"];
    
        return YES;
    }
    

    Then call the following to get the service client:

    Swift

    let Textract = AWSTextract(forKey: "USWest2Textract")
    

    Objective-C

    AWSTextract *Textract = [AWSTextract TextractForKey:@"USWest2Textract"];
    

    Declaration

    Objective-C

    + (nonnull instancetype)TextractForKey:(nonnull NSString *)key;

    Swift

    convenience init(forKey key: String)

    Parameters

    key

    A string to identify the service client.

    Return Value

    An instance of the service client.

  • Removes the service client associated with the key and release it.

    Warning

    Before calling this method, make sure no method is running on this client.

    Declaration

    Objective-C

    + (void)removeTextractForKey:(nonnull NSString *)key;

    Swift

    class func remove(forKey key: String)

    Parameters

    key

    A string to identify the service client.

  • Analyzes an input document for relationships between detected items.

    The types of information returned are as follows:

    • Words and lines that are related to nearby lines and words. The related information is returned in two Block objects each of type KEY_VALUE_SET: a KEY Block object and a VALUE Block object. For example, Name: Ana Silva Carolina contains a key and value. Name: is the key. Ana Silva Carolina is the value.

    • Table and table cell data. A TABLE Block object contains information about a detected table. A CELL Block object is returned for each cell in a table.

    • Selectable elements such as checkboxes and radio buttons. A SELECTION_ELEMENT Block object contains information about a selectable element.

    • Lines and words of text. A LINE Block object contains one or more WORD Block objects.

    You can choose which type of analysis to perform by specifying the FeatureTypes list.

    The output is returned in a list of BLOCK objects.

    AnalyzeDocument is a synchronous operation. To analyze documents asynchronously, use StartDocumentAnalysis.

    For more information, see Document Text Analysis.

    See

    AWSTextractAnalyzeDocumentRequest

    See

    AWSTextractAnalyzeDocumentResponse

    Declaration

    Objective-C

    - (id)analyzeDocument:(nonnull AWSTextractAnalyzeDocumentRequest *)request;

    Swift

    func analyzeDocument(_ request: AWSTextractAnalyzeDocumentRequest) -> Any!

    Parameters

    request

    A container for the necessary parameters to execute the AnalyzeDocument service method.

    Return Value

    An instance of AWSTask. On successful execution, task.result will contain an instance of AWSTextractAnalyzeDocumentResponse. On failed execution, task.error may contain an NSError with AWSTextractErrorDomain domain and the following error code: AWSTextractErrorInvalidParameter, AWSTextractErrorInvalidS3Object, AWSTextractErrorUnsupportedDocument, AWSTextractErrorDocumentTooLarge, AWSTextractErrorBadDocument, AWSTextractErrorAccessDenied, AWSTextractErrorProvisionedThroughputExceeded, AWSTextractErrorInternalServer, AWSTextractErrorThrottling.

  • Analyzes an input document for relationships between detected items.

    The types of information returned are as follows:

    • Words and lines that are related to nearby lines and words. The related information is returned in two Block objects each of type KEY_VALUE_SET: a KEY Block object and a VALUE Block object. For example, Name: Ana Silva Carolina contains a key and value. Name: is the key. Ana Silva Carolina is the value.

    • Table and table cell data. A TABLE Block object contains information about a detected table. A CELL Block object is returned for each cell in a table.

    • Selectable elements such as checkboxes and radio buttons. A SELECTION_ELEMENT Block object contains information about a selectable element.

    • Lines and words of text. A LINE Block object contains one or more WORD Block objects.

    You can choose which type of analysis to perform by specifying the FeatureTypes list.

    The output is returned in a list of BLOCK objects.

    AnalyzeDocument is a synchronous operation. To analyze documents asynchronously, use StartDocumentAnalysis.

    For more information, see Document Text Analysis.

    See

    AWSTextractAnalyzeDocumentRequest

    See

    AWSTextractAnalyzeDocumentResponse

    Declaration

    Objective-C

    - (void)analyzeDocument:(nonnull AWSTextractAnalyzeDocumentRequest *)request
          completionHandler:
              (void (^_Nullable)(AWSTextractAnalyzeDocumentResponse *_Nullable,
                                 NSError *_Nullable))completionHandler;

    Swift

    func analyzeDocument(_ request: AWSTextractAnalyzeDocumentRequest, completionHandler: ((AWSTextractAnalyzeDocumentResponse?, Error?) -> Void)? = nil)

    Parameters

    request

    A container for the necessary parameters to execute the AnalyzeDocument service method.

    completionHandler

    The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSTextractErrorDomain domain and the following error code: AWSTextractErrorInvalidParameter, AWSTextractErrorInvalidS3Object, AWSTextractErrorUnsupportedDocument, AWSTextractErrorDocumentTooLarge, AWSTextractErrorBadDocument, AWSTextractErrorAccessDenied, AWSTextractErrorProvisionedThroughputExceeded, AWSTextractErrorInternalServer, AWSTextractErrorThrottling.

  • Detects text in the input document. Amazon Textract can detect lines of text and the words that make up a line of text. The input document must be an image in JPG or PNG format. DetectDocumentText returns the detected text in an array of Block objects.

    Each document page has as an associated Block of type PAGE. Each PAGE Block object is the parent of LINE Block objects that represent the lines of detected text on a page. A LINE Block object is a parent for each word that makes up the line. Words are represented by Block objects of type WORD.

    DetectDocumentText is a synchronous operation. To analyze documents asynchronously, use StartDocumentTextDetection.

    For more information, see Document Text Detection.

    See

    AWSTextractDetectDocumentTextRequest

    See

    AWSTextractDetectDocumentTextResponse

    Declaration

    Objective-C

    - (id)detectDocumentText:
        (nonnull AWSTextractDetectDocumentTextRequest *)request;

    Swift

    func detectDocumentText(_ request: AWSTextractDetectDocumentTextRequest) -> Any!

    Parameters

    request

    A container for the necessary parameters to execute the DetectDocumentText service method.

    Return Value

    An instance of AWSTask. On successful execution, task.result will contain an instance of AWSTextractDetectDocumentTextResponse. On failed execution, task.error may contain an NSError with AWSTextractErrorDomain domain and the following error code: AWSTextractErrorInvalidParameter, AWSTextractErrorInvalidS3Object, AWSTextractErrorUnsupportedDocument, AWSTextractErrorDocumentTooLarge, AWSTextractErrorBadDocument, AWSTextractErrorAccessDenied, AWSTextractErrorProvisionedThroughputExceeded, AWSTextractErrorInternalServer, AWSTextractErrorThrottling.

  • Detects text in the input document. Amazon Textract can detect lines of text and the words that make up a line of text. The input document must be an image in JPG or PNG format. DetectDocumentText returns the detected text in an array of Block objects.

    Each document page has as an associated Block of type PAGE. Each PAGE Block object is the parent of LINE Block objects that represent the lines of detected text on a page. A LINE Block object is a parent for each word that makes up the line. Words are represented by Block objects of type WORD.

    DetectDocumentText is a synchronous operation. To analyze documents asynchronously, use StartDocumentTextDetection.

    For more information, see Document Text Detection.

    See

    AWSTextractDetectDocumentTextRequest

    See

    AWSTextractDetectDocumentTextResponse

    Declaration

    Objective-C

    - (void)
        detectDocumentText:(nonnull AWSTextractDetectDocumentTextRequest *)request
         completionHandler:
             (void (^_Nullable)(AWSTextractDetectDocumentTextResponse *_Nullable,
                                NSError *_Nullable))completionHandler;

    Swift

    func detectDocumentText(_ request: AWSTextractDetectDocumentTextRequest, completionHandler: ((AWSTextractDetectDocumentTextResponse?, Error?) -> Void)? = nil)

    Parameters

    request

    A container for the necessary parameters to execute the DetectDocumentText service method.

    completionHandler

    The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSTextractErrorDomain domain and the following error code: AWSTextractErrorInvalidParameter, AWSTextractErrorInvalidS3Object, AWSTextractErrorUnsupportedDocument, AWSTextractErrorDocumentTooLarge, AWSTextractErrorBadDocument, AWSTextractErrorAccessDenied, AWSTextractErrorProvisionedThroughputExceeded, AWSTextractErrorInternalServer, AWSTextractErrorThrottling.

  • Gets the results for an Amazon Textract asynchronous operation that analyzes text in a document.

    You start asynchronous text analysis by calling StartDocumentAnalysis, which returns a job identifier (JobId). When the text analysis operation finishes, Amazon Textract publishes a completion status to the Amazon Simple Notification Service (Amazon SNS) topic that’s registered in the initial call to StartDocumentAnalysis. To get the results of the text-detection operation, first check that the status value published to the Amazon SNS topic is SUCCEEDED. If so, call GetDocumentAnalysis, and pass the job identifier (JobId) from the initial call to StartDocumentAnalysis.

    GetDocumentAnalysis returns an array of Block objects. The following types of information are returned:

    • Words and lines that are related to nearby lines and words. The related information is returned in two Block objects each of type KEY_VALUE_SET: a KEY Block object and a VALUE Block object. For example, Name: Ana Silva Carolina contains a key and value. Name: is the key. Ana Silva Carolina is the value.

    • Table and table cell data. A TABLE Block object contains information about a detected table. A CELL Block object is returned for each cell in a table.

    • Selectable elements such as checkboxes and radio buttons. A SELECTION_ELEMENT Block object contains information about a selectable element.

    • Lines and words of text. A LINE Block object contains one or more WORD Block objects.

    Use the MaxResults parameter to limit the number of blocks returned. If there are more results than specified in MaxResults, the value of NextToken in the operation response contains a pagination token for getting the next set of results. To get the next page of results, call GetDocumentAnalysis, and populate the NextToken request parameter with the token value that’s returned from the previous call to GetDocumentAnalysis.

    For more information, see Document Text Analysis.

    See

    AWSTextractGetDocumentAnalysisRequest

    See

    AWSTextractGetDocumentAnalysisResponse

    Declaration

    Objective-C

    - (id)getDocumentAnalysis:
        (nonnull AWSTextractGetDocumentAnalysisRequest *)request;

    Swift

    func getDocumentAnalysis(_ request: AWSTextractGetDocumentAnalysisRequest) -> Any!

    Parameters

    request

    A container for the necessary parameters to execute the GetDocumentAnalysis service method.

    Return Value

    An instance of AWSTask. On successful execution, task.result will contain an instance of AWSTextractGetDocumentAnalysisResponse. On failed execution, task.error may contain an NSError with AWSTextractErrorDomain domain and the following error code: AWSTextractErrorInvalidParameter, AWSTextractErrorAccessDenied, AWSTextractErrorProvisionedThroughputExceeded, AWSTextractErrorInvalidJobId, AWSTextractErrorInternalServer, AWSTextractErrorThrottling.

  • Gets the results for an Amazon Textract asynchronous operation that analyzes text in a document.

    You start asynchronous text analysis by calling StartDocumentAnalysis, which returns a job identifier (JobId). When the text analysis operation finishes, Amazon Textract publishes a completion status to the Amazon Simple Notification Service (Amazon SNS) topic that’s registered in the initial call to StartDocumentAnalysis. To get the results of the text-detection operation, first check that the status value published to the Amazon SNS topic is SUCCEEDED. If so, call GetDocumentAnalysis, and pass the job identifier (JobId) from the initial call to StartDocumentAnalysis.

    GetDocumentAnalysis returns an array of Block objects. The following types of information are returned:

    • Words and lines that are related to nearby lines and words. The related information is returned in two Block objects each of type KEY_VALUE_SET: a KEY Block object and a VALUE Block object. For example, Name: Ana Silva Carolina contains a key and value. Name: is the key. Ana Silva Carolina is the value.

    • Table and table cell data. A TABLE Block object contains information about a detected table. A CELL Block object is returned for each cell in a table.

    • Selectable elements such as checkboxes and radio buttons. A SELECTION_ELEMENT Block object contains information about a selectable element.

    • Lines and words of text. A LINE Block object contains one or more WORD Block objects.

    Use the MaxResults parameter to limit the number of blocks returned. If there are more results than specified in MaxResults, the value of NextToken in the operation response contains a pagination token for getting the next set of results. To get the next page of results, call GetDocumentAnalysis, and populate the NextToken request parameter with the token value that’s returned from the previous call to GetDocumentAnalysis.

    For more information, see Document Text Analysis.

    See

    AWSTextractGetDocumentAnalysisRequest

    See

    AWSTextractGetDocumentAnalysisResponse

    Declaration

    Objective-C

    - (void)
        getDocumentAnalysis:(nonnull AWSTextractGetDocumentAnalysisRequest *)request
          completionHandler:
              (void (^_Nullable)(AWSTextractGetDocumentAnalysisResponse *_Nullable,
                                 NSError *_Nullable))completionHandler;

    Swift

    func getDocumentAnalysis(_ request: AWSTextractGetDocumentAnalysisRequest, completionHandler: ((AWSTextractGetDocumentAnalysisResponse?, Error?) -> Void)? = nil)

    Parameters

    request

    A container for the necessary parameters to execute the GetDocumentAnalysis service method.

    completionHandler

    The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSTextractErrorDomain domain and the following error code: AWSTextractErrorInvalidParameter, AWSTextractErrorAccessDenied, AWSTextractErrorProvisionedThroughputExceeded, AWSTextractErrorInvalidJobId, AWSTextractErrorInternalServer, AWSTextractErrorThrottling.

  • Gets the results for an Amazon Textract asynchronous operation that detects text in a document. Amazon Textract can detect lines of text and the words that make up a line of text.

    You start asynchronous text detection by calling StartDocumentTextDetection, which returns a job identifier (JobId). When the text detection operation finishes, Amazon Textract publishes a completion status to the Amazon Simple Notification Service (Amazon SNS) topic that’s registered in the initial call to StartDocumentTextDetection. To get the results of the text-detection operation, first check that the status value published to the Amazon SNS topic is SUCCEEDED. If so, call GetDocumentTextDetection, and pass the job identifier (JobId) from the initial call to StartDocumentTextDetection.

    GetDocumentTextDetection returns an array of Block objects.

    Each document page has as an associated Block of type PAGE. Each PAGE Block object is the parent of LINE Block objects that represent the lines of detected text on a page. A LINE Block object is a parent for each word that makes up the line. Words are represented by Block objects of type WORD.

    Use the MaxResults parameter to limit the number of blocks that are returned. If there are more results than specified in MaxResults, the value of NextToken in the operation response contains a pagination token for getting the next set of results. To get the next page of results, call GetDocumentTextDetection, and populate the NextToken request parameter with the token value that’s returned from the previous call to GetDocumentTextDetection.

    For more information, see Document Text Detection.

    See

    AWSTextractGetDocumentTextDetectionRequest

    See

    AWSTextractGetDocumentTextDetectionResponse

    Declaration

    Objective-C

    - (id)getDocumentTextDetection:
        (nonnull AWSTextractGetDocumentTextDetectionRequest *)request;

    Swift

    func getDocumentTextDetection(_ request: AWSTextractGetDocumentTextDetectionRequest) -> Any!

    Parameters

    request

    A container for the necessary parameters to execute the GetDocumentTextDetection service method.

    Return Value

    An instance of AWSTask. On successful execution, task.result will contain an instance of AWSTextractGetDocumentTextDetectionResponse. On failed execution, task.error may contain an NSError with AWSTextractErrorDomain domain and the following error code: AWSTextractErrorInvalidParameter, AWSTextractErrorAccessDenied, AWSTextractErrorProvisionedThroughputExceeded, AWSTextractErrorInvalidJobId, AWSTextractErrorInternalServer, AWSTextractErrorThrottling.

  • Gets the results for an Amazon Textract asynchronous operation that detects text in a document. Amazon Textract can detect lines of text and the words that make up a line of text.

    You start asynchronous text detection by calling StartDocumentTextDetection, which returns a job identifier (JobId). When the text detection operation finishes, Amazon Textract publishes a completion status to the Amazon Simple Notification Service (Amazon SNS) topic that’s registered in the initial call to StartDocumentTextDetection. To get the results of the text-detection operation, first check that the status value published to the Amazon SNS topic is SUCCEEDED. If so, call GetDocumentTextDetection, and pass the job identifier (JobId) from the initial call to StartDocumentTextDetection.

    GetDocumentTextDetection returns an array of Block objects.

    Each document page has as an associated Block of type PAGE. Each PAGE Block object is the parent of LINE Block objects that represent the lines of detected text on a page. A LINE Block object is a parent for each word that makes up the line. Words are represented by Block objects of type WORD.

    Use the MaxResults parameter to limit the number of blocks that are returned. If there are more results than specified in MaxResults, the value of NextToken in the operation response contains a pagination token for getting the next set of results. To get the next page of results, call GetDocumentTextDetection, and populate the NextToken request parameter with the token value that’s returned from the previous call to GetDocumentTextDetection.

    For more information, see Document Text Detection.

    See

    AWSTextractGetDocumentTextDetectionRequest

    See

    AWSTextractGetDocumentTextDetectionResponse

    Declaration

    Objective-C

    - (void)getDocumentTextDetection:
                (nonnull AWSTextractGetDocumentTextDetectionRequest *)request
                   completionHandler:
                       (void (^_Nullable)(
                           AWSTextractGetDocumentTextDetectionResponse *_Nullable,
                           NSError *_Nullable))completionHandler;

    Swift

    func getDocumentTextDetection(_ request: AWSTextractGetDocumentTextDetectionRequest, completionHandler: ((AWSTextractGetDocumentTextDetectionResponse?, Error?) -> Void)? = nil)

    Parameters

    request

    A container for the necessary parameters to execute the GetDocumentTextDetection service method.

    completionHandler

    The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSTextractErrorDomain domain and the following error code: AWSTextractErrorInvalidParameter, AWSTextractErrorAccessDenied, AWSTextractErrorProvisionedThroughputExceeded, AWSTextractErrorInvalidJobId, AWSTextractErrorInternalServer, AWSTextractErrorThrottling.

  • Starts asynchronous analysis of an input document for relationships between detected items such as key and value pairs, tables, and selection elements.

    StartDocumentAnalysis can analyze text in documents that are in JPG, PNG, and PDF format. The documents are stored in an Amazon S3 bucket. Use DocumentLocation to specify the bucket name and file name of the document.

    StartDocumentAnalysis returns a job identifier (JobId) that you use to get the results of the operation. When text analysis is finished, Amazon Textract publishes a completion status to the Amazon Simple Notification Service (Amazon SNS) topic that you specify in NotificationChannel. To get the results of the text analysis operation, first check that the status value published to the Amazon SNS topic is SUCCEEDED. If so, call GetDocumentAnalysis, and pass the job identifier (JobId) from the initial call to StartDocumentAnalysis.

    For more information, see Document Text Analysis.

    See

    AWSTextractStartDocumentAnalysisRequest

    See

    AWSTextractStartDocumentAnalysisResponse

    Declaration

    Objective-C

    - (id)startDocumentAnalysis:
        (nonnull AWSTextractStartDocumentAnalysisRequest *)request;

    Swift

    func startDocumentAnalysis(_ request: AWSTextractStartDocumentAnalysisRequest) -> Any!

    Parameters

    request

    A container for the necessary parameters to execute the StartDocumentAnalysis service method.

    Return Value

    An instance of AWSTask. On successful execution, task.result will contain an instance of AWSTextractStartDocumentAnalysisResponse. On failed execution, task.error may contain an NSError with AWSTextractErrorDomain domain and the following error code: AWSTextractErrorInvalidParameter, AWSTextractErrorInvalidS3Object, AWSTextractErrorUnsupportedDocument, AWSTextractErrorDocumentTooLarge, AWSTextractErrorBadDocument, AWSTextractErrorAccessDenied, AWSTextractErrorProvisionedThroughputExceeded, AWSTextractErrorInternalServer, AWSTextractErrorIdempotentParameterMismatch, AWSTextractErrorThrottling, AWSTextractErrorLimitExceeded.

  • Starts asynchronous analysis of an input document for relationships between detected items such as key and value pairs, tables, and selection elements.

    StartDocumentAnalysis can analyze text in documents that are in JPG, PNG, and PDF format. The documents are stored in an Amazon S3 bucket. Use DocumentLocation to specify the bucket name and file name of the document.

    StartDocumentAnalysis returns a job identifier (JobId) that you use to get the results of the operation. When text analysis is finished, Amazon Textract publishes a completion status to the Amazon Simple Notification Service (Amazon SNS) topic that you specify in NotificationChannel. To get the results of the text analysis operation, first check that the status value published to the Amazon SNS topic is SUCCEEDED. If so, call GetDocumentAnalysis, and pass the job identifier (JobId) from the initial call to StartDocumentAnalysis.

    For more information, see Document Text Analysis.

    See

    AWSTextractStartDocumentAnalysisRequest

    See

    AWSTextractStartDocumentAnalysisResponse

    Declaration

    Objective-C

    - (void)startDocumentAnalysis:
                (nonnull AWSTextractStartDocumentAnalysisRequest *)request
                completionHandler:
                    (void (^_Nullable)(
                        AWSTextractStartDocumentAnalysisResponse *_Nullable,
                        NSError *_Nullable))completionHandler;

    Swift

    func startDocumentAnalysis(_ request: AWSTextractStartDocumentAnalysisRequest, completionHandler: ((AWSTextractStartDocumentAnalysisResponse?, Error?) -> Void)? = nil)

    Parameters

    request

    A container for the necessary parameters to execute the StartDocumentAnalysis service method.

    completionHandler

    The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSTextractErrorDomain domain and the following error code: AWSTextractErrorInvalidParameter, AWSTextractErrorInvalidS3Object, AWSTextractErrorUnsupportedDocument, AWSTextractErrorDocumentTooLarge, AWSTextractErrorBadDocument, AWSTextractErrorAccessDenied, AWSTextractErrorProvisionedThroughputExceeded, AWSTextractErrorInternalServer, AWSTextractErrorIdempotentParameterMismatch, AWSTextractErrorThrottling, AWSTextractErrorLimitExceeded.

  • Starts the asynchronous detection of text in a document. Amazon Textract can detect lines of text and the words that make up a line of text.

    StartDocumentTextDetection can analyze text in documents that are in JPG, PNG, and PDF format. The documents are stored in an Amazon S3 bucket. Use DocumentLocation to specify the bucket name and file name of the document.

    StartTextDetection returns a job identifier (JobId) that you use to get the results of the operation. When text detection is finished, Amazon Textract publishes a completion status to the Amazon Simple Notification Service (Amazon SNS) topic that you specify in NotificationChannel. To get the results of the text detection operation, first check that the status value published to the Amazon SNS topic is SUCCEEDED. If so, call GetDocumentTextDetection, and pass the job identifier (JobId) from the initial call to StartDocumentTextDetection.

    For more information, see Document Text Detection.

    See

    AWSTextractStartDocumentTextDetectionRequest

    See

    AWSTextractStartDocumentTextDetectionResponse

    Declaration

    Objective-C

    - (id)startDocumentTextDetection:
        (nonnull AWSTextractStartDocumentTextDetectionRequest *)request;

    Swift

    func startDocumentTextDetection(_ request: AWSTextractStartDocumentTextDetectionRequest) -> Any!

    Parameters

    request

    A container for the necessary parameters to execute the StartDocumentTextDetection service method.

    Return Value

    An instance of AWSTask. On successful execution, task.result will contain an instance of AWSTextractStartDocumentTextDetectionResponse. On failed execution, task.error may contain an NSError with AWSTextractErrorDomain domain and the following error code: AWSTextractErrorInvalidParameter, AWSTextractErrorInvalidS3Object, AWSTextractErrorUnsupportedDocument, AWSTextractErrorDocumentTooLarge, AWSTextractErrorBadDocument, AWSTextractErrorAccessDenied, AWSTextractErrorProvisionedThroughputExceeded, AWSTextractErrorInternalServer, AWSTextractErrorIdempotentParameterMismatch, AWSTextractErrorThrottling, AWSTextractErrorLimitExceeded.

  • Starts the asynchronous detection of text in a document. Amazon Textract can detect lines of text and the words that make up a line of text.

    StartDocumentTextDetection can analyze text in documents that are in JPG, PNG, and PDF format. The documents are stored in an Amazon S3 bucket. Use DocumentLocation to specify the bucket name and file name of the document.

    StartTextDetection returns a job identifier (JobId) that you use to get the results of the operation. When text detection is finished, Amazon Textract publishes a completion status to the Amazon Simple Notification Service (Amazon SNS) topic that you specify in NotificationChannel. To get the results of the text detection operation, first check that the status value published to the Amazon SNS topic is SUCCEEDED. If so, call GetDocumentTextDetection, and pass the job identifier (JobId) from the initial call to StartDocumentTextDetection.

    For more information, see Document Text Detection.

    See

    AWSTextractStartDocumentTextDetectionRequest

    See

    AWSTextractStartDocumentTextDetectionResponse

    Declaration

    Objective-C

    - (void)
        startDocumentTextDetection:
            (nonnull AWSTextractStartDocumentTextDetectionRequest *)request
                 completionHandler:
                     (void (^_Nullable)(
                         AWSTextractStartDocumentTextDetectionResponse *_Nullable,
                         NSError *_Nullable))completionHandler;

    Swift

    func startDocumentTextDetection(_ request: AWSTextractStartDocumentTextDetectionRequest, completionHandler: ((AWSTextractStartDocumentTextDetectionResponse?, Error?) -> Void)? = nil)

    Parameters

    request

    A container for the necessary parameters to execute the StartDocumentTextDetection service method.

    completionHandler

    The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. error - An error object that indicates why the request failed, or nil if the request was successful. On failed execution, error may contain an NSError with AWSTextractErrorDomain domain and the following error code: AWSTextractErrorInvalidParameter, AWSTextractErrorInvalidS3Object, AWSTextractErrorUnsupportedDocument, AWSTextractErrorDocumentTooLarge, AWSTextractErrorBadDocument, AWSTextractErrorAccessDenied, AWSTextractErrorProvisionedThroughputExceeded, AWSTextractErrorInternalServer, AWSTextractErrorIdempotentParameterMismatch, AWSTextractErrorThrottling, AWSTextractErrorLimitExceeded.