npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@datafire/amazonaws_textract

v5.0.0

Published

DataFire integration for Amazon Textract

Downloads

5

Readme

@datafire/amazonaws_textract

Client library for Amazon Textract

Installation and Usage

npm install --save @datafire/amazonaws_textract
let amazonaws_textract = require('@datafire/amazonaws_textract').create({
  accessKeyId: "",
  secretAccessKey: "",
  region: ""
});

.then(data => {
  console.log(data);
});

Description

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

Actions

AnalyzeDocument

amazonaws_textract.AnalyzeDocument({
  "Document": null,
  "FeatureTypes": null
}, context)

Input

  • input object
    • Document required
      • Bytes
      • S3Object
        • Bucket
        • Name
        • Version
    • FeatureTypes required
    • HumanLoopConfig
      • DataAttributes
      • FlowDefinitionArn required
      • HumanLoopName required

Output

DetectDocumentText

amazonaws_textract.DetectDocumentText({
  "Document": null
}, context)

Input

  • input object
    • Document required
      • Bytes
      • S3Object
        • Bucket
        • Name
        • Version

Output

GetDocumentAnalysis

amazonaws_textract.GetDocumentAnalysis({
  "JobId": null
}, context)

Input

  • input object
    • JobId required
    • MaxResults
    • NextToken

Output

GetDocumentTextDetection

amazonaws_textract.GetDocumentTextDetection({
  "JobId": null
}, context)

Input

  • input object
    • JobId required
    • MaxResults
    • NextToken

Output

StartDocumentAnalysis

amazonaws_textract.StartDocumentAnalysis({
  "DocumentLocation": null,
  "FeatureTypes": null
}, context)

Input

  • input object
    • ClientRequestToken
    • DocumentLocation required
      • S3Object
        • Bucket
        • Name
        • Version
    • FeatureTypes required
    • JobTag
    • KMSKeyId
    • NotificationChannel
      • RoleArn required
      • SNSTopicArn required
    • OutputConfig
      • S3Bucket required
      • S3Prefix

Output

StartDocumentTextDetection

amazonaws_textract.StartDocumentTextDetection({
  "DocumentLocation": null
}, context)

Input

  • input object
    • ClientRequestToken
    • DocumentLocation required
      • S3Object
        • Bucket
        • Name
        • Version
    • JobTag
    • KMSKeyId
    • NotificationChannel
      • RoleArn required
      • SNSTopicArn required
    • OutputConfig
      • S3Bucket required
      • S3Prefix

Output

Definitions

AccessDeniedException

AnalyzeDocumentRequest

  • AnalyzeDocumentRequest object
    • Document required
      • Bytes
      • S3Object
        • Bucket
        • Name
        • Version
    • FeatureTypes required
    • HumanLoopConfig
      • DataAttributes
      • FlowDefinitionArn required
      • HumanLoopName required

AnalyzeDocumentResponse

  • AnalyzeDocumentResponse object
    • AnalyzeDocumentModelVersion
    • Blocks
    • DocumentMetadata
      • Pages
    • HumanLoopActivationOutput

BadDocumentException

Block

  • Block object: A Block represents items that are recognized in a document within a group of pixels close to each other. The information returned in a Block object depends on the type of operation. In text detection for documents (for example DetectDocumentText), you get information about the detected words and lines of text. In text analysis (for example AnalyzeDocument), you can also get information about the fields, tables, and selection elements that are detected in the document. An array of Block objects is returned by both synchronous and asynchronous operations. In synchronous operations, such as DetectDocumentText, the array of Block objects is the entire set of results. In asynchronous operations, such as GetDocumentAnalysis, the array is returned over one or more responses. For more information, see How Amazon Textract Works.
    • BlockType
    • ColumnIndex
    • ColumnSpan
    • Confidence
    • EntityTypes
    • Geometry
      • BoundingBox
        • Height
        • Left
        • Top
        • Width
      • Polygon
    • Id
    • Page
    • Relationships
    • RowIndex
    • RowSpan
    • SelectionStatus
    • Text
    • TextType

BlockList

  • BlockList array

BlockType

  • BlockType string (values: KEY_VALUE_SET, PAGE, LINE, WORD, TABLE, CELL, SELECTION_ELEMENT)

BoundingBox

  • BoundingBox object: The bounding box around the detected page, text, key-value pair, table, table cell, or selection element on a document page. The left (x-coordinate) and top (y-coordinate) are coordinates that represent the top and left sides of the bounding box. Note that the upper-left corner of the image is the origin (0,0). The top and left values returned are ratios of the overall document page size. For example, if the input image is 700 x 200 pixels, and the top-left coordinate of the bounding box is 350 x 50 pixels, the API returns a left value of 0.5 (350/700) and a top value of 0.25 (50/200). The width and height values represent the dimensions of the bounding box as a ratio of the overall document page dimension. For example, if the document page size is 700 x 200 pixels, and the bounding box width is 70 pixels, the width returned is 0.1.
    • Height
    • Left
    • Top
    • Width

ClientRequestToken

  • ClientRequestToken string

ContentClassifier

  • ContentClassifier string (values: FreeOfPersonallyIdentifiableInformation, FreeOfAdultContent)

ContentClassifiers

DetectDocumentTextRequest

  • DetectDocumentTextRequest object
    • Document required
      • Bytes
      • S3Object
        • Bucket
        • Name
        • Version

DetectDocumentTextResponse

  • DetectDocumentTextResponse object
    • Blocks
    • DetectDocumentTextModelVersion
    • DocumentMetadata
      • Pages

Document

  • Document object: The input document, either as bytes or as an S3 object. You pass image bytes to an Amazon Textract API operation by using the Bytes property. For example, you would use the Bytes property to pass a document loaded from a local file system. Image bytes passed by using the Bytes property must be base64 encoded. Your code might not need to encode document file bytes if you're using an AWS SDK to call Amazon Textract API operations. You pass images stored in an S3 bucket to an Amazon Textract API operation by using the S3Object property. Documents stored in an S3 bucket don't need to be base64 encoded. The AWS Region for the S3 bucket that contains the S3 object must match the AWS Region that you use for Amazon Textract operations. If you use the AWS CLI to call Amazon Textract operations, passing image bytes using the Bytes property isn't supported. You must first upload the document to an Amazon S3 bucket, and then call the operation using the S3Object property. For Amazon Textract to process an S3 object, the user must have permission to access the S3 object.
    • Bytes
    • S3Object
      • Bucket
      • Name
      • Version

DocumentLocation

  • DocumentLocation object: The Amazon S3 bucket that contains the document to be processed. It's used by asynchronous operations such as StartDocumentTextDetection. The input document can be an image file in JPEG or PNG format. It can also be a file in PDF format.
    • S3Object
      • Bucket
      • Name
      • Version

DocumentMetadata

  • DocumentMetadata object: Information about the input document.
    • Pages

DocumentTooLargeException

EntityType

  • EntityType string (values: KEY, VALUE)

EntityTypes

ErrorCode

  • ErrorCode string

FeatureType

  • FeatureType string (values: TABLES, FORMS)

FeatureTypes

Float

  • Float number

FlowDefinitionArn

  • FlowDefinitionArn string

Geometry

  • Geometry object: Information about where the following items are located on a document page: detected page, text, key-value pairs, tables, table cells, and selection elements.
    • BoundingBox
      • Height
      • Left
      • Top
      • Width
    • Polygon

GetDocumentAnalysisRequest

  • GetDocumentAnalysisRequest object
    • JobId required
    • MaxResults
    • NextToken

GetDocumentAnalysisResponse

  • GetDocumentAnalysisResponse object
    • AnalyzeDocumentModelVersion
    • Blocks
    • DocumentMetadata
      • Pages
    • JobStatus
    • NextToken
    • StatusMessage
    • Warnings

GetDocumentTextDetectionRequest

  • GetDocumentTextDetectionRequest object
    • JobId required
    • MaxResults
    • NextToken

GetDocumentTextDetectionResponse

  • GetDocumentTextDetectionResponse object
    • Blocks
    • DetectDocumentTextModelVersion
    • DocumentMetadata
      • Pages
    • JobStatus
    • NextToken
    • StatusMessage
    • Warnings

HumanLoopActivationConditionsEvaluationResults

  • HumanLoopActivationConditionsEvaluationResults string

HumanLoopActivationOutput

  • HumanLoopActivationOutput object: Shows the results of the human in the loop evaluation. If there is no HumanLoopArn, the input did not trigger human review.

HumanLoopActivationReason

  • HumanLoopActivationReason string

HumanLoopActivationReasons

HumanLoopArn

  • HumanLoopArn string

HumanLoopConfig

  • HumanLoopConfig object: Sets up the human review workflow the document will be sent to if one of the conditions is met. You can also set certain attributes of the image before review.
    • DataAttributes
    • FlowDefinitionArn required
    • HumanLoopName required

HumanLoopDataAttributes

  • HumanLoopDataAttributes object: Allows you to set attributes of the image. Currently, you can declare an image as free of personally identifiable information and adult content.

HumanLoopName

  • HumanLoopName string

HumanLoopQuotaExceededException

IdList

IdempotentParameterMismatchException

ImageBlob

  • ImageBlob string

InternalServerError

InvalidJobIdException

InvalidKMSKeyException

InvalidParameterException

InvalidS3ObjectException

JobId

  • JobId string

JobStatus

  • JobStatus string (values: IN_PROGRESS, SUCCEEDED, FAILED, PARTIAL_SUCCESS)

JobTag

  • JobTag string

KMSKeyId

  • KMSKeyId string

LimitExceededException

MaxResults

  • MaxResults integer

NonEmptyString

  • NonEmptyString string

NotificationChannel

  • NotificationChannel object: The Amazon Simple Notification Service (Amazon SNS) topic to which Amazon Textract publishes the completion status of an asynchronous document operation, such as StartDocumentTextDetection.
    • RoleArn required
    • SNSTopicArn required

OutputConfig

  • OutputConfig object: Sets whether or not your output will go to a user created bucket. Used to set the name of the bucket, and the prefix on the output file.
    • S3Bucket required
    • S3Prefix

Pages

PaginationToken

  • PaginationToken string

Percent

  • Percent number

Point

  • Point object: The X and Y coordinates of a point on a document page. The X and Y values that are returned are ratios of the overall document page size. For example, if the input document is 700 x 200 and the operation returns X=0.5 and Y=0.25, then the point is at the (350,50) pixel coordinate on the document page. An array of Point objects, Polygon, is returned by DetectDocumentText. Polygon represents a fine-grained polygon around detected text. For more information, see Geometry in the Amazon Textract Developer Guide.
    • X
    • Y

Polygon

ProvisionedThroughputExceededException

Relationship

  • Relationship object: Information about how blocks are related to each other. A Block object contains 0 or more Relation objects in a list, Relationships. For more information, see Block. The Type element provides the type of the relationship for all blocks in the IDs array.

RelationshipList

RelationshipType

  • RelationshipType string (values: VALUE, CHILD, COMPLEX_FEATURES)

RoleArn

  • RoleArn string

S3Bucket

  • S3Bucket string

S3Object

  • S3Object object: The S3 bucket name and file name that identifies the document. The AWS Region for the S3 bucket that contains the document must match the Region that you use for Amazon Textract operations. For Amazon Textract to process a file in an S3 bucket, the user must have permission to access the S3 bucket and file.
    • Bucket
    • Name
    • Version

S3ObjectName

  • S3ObjectName string

S3ObjectVersion

  • S3ObjectVersion string

SNSTopicArn

  • SNSTopicArn string

SelectionStatus

  • SelectionStatus string (values: SELECTED, NOT_SELECTED)

StartDocumentAnalysisRequest

  • StartDocumentAnalysisRequest object
    • ClientRequestToken
    • DocumentLocation required
      • S3Object
        • Bucket
        • Name
        • Version
    • FeatureTypes required
    • JobTag
    • KMSKeyId
    • NotificationChannel
      • RoleArn required
      • SNSTopicArn required
    • OutputConfig
      • S3Bucket required
      • S3Prefix

StartDocumentAnalysisResponse

  • StartDocumentAnalysisResponse object
    • JobId

StartDocumentTextDetectionRequest

  • StartDocumentTextDetectionRequest object
    • ClientRequestToken
    • DocumentLocation required
      • S3Object
        • Bucket
        • Name
        • Version
    • JobTag
    • KMSKeyId
    • NotificationChannel
      • RoleArn required
      • SNSTopicArn required
    • OutputConfig
      • S3Bucket required
      • S3Prefix

StartDocumentTextDetectionResponse

  • StartDocumentTextDetectionResponse object
    • JobId

StatusMessage

  • StatusMessage string

String

  • String string

TextType

  • TextType string (values: HANDWRITING, PRINTED)

ThrottlingException

UInteger

  • UInteger integer

UnsupportedDocumentException

Warning

  • Warning object: A warning about an issue that occurred during asynchronous text analysis (StartDocumentAnalysis) or asynchronous document text detection (StartDocumentTextDetection).

Warnings