avatarAkashkhurana

Free AI web copilot to create summaries, insights and extended knowledge, download it at here

8247

Abstract

<span class="hljs-string">"UPI/311742716390/ibrow/manishadalgl108/Axis Bank L"</span>, <span class="hljs-string">""</span>, <span class="hljs-string">"0.00"</span>, <span class="hljs-string">"50.00"</span>, <span class="hljs-string">""</span>, <span class="hljs-string">""</span>, <span class="hljs-string">"12,104.54 Cr"</span> ], [ <span class="hljs-string">"28-04-2023"</span>, <span class="hljs-string">"UPI/311837265908/UPl/gitanjalitomar3/IDBI Bank Lim"</span>, <span class="hljs-string">""</span>, <span class="hljs-string">"0.00"</span>, <span class="hljs-string">"2,500.00"</span>, <span class="hljs-string">""</span>, <span class="hljs-string">""</span>, <span class="hljs-string">"14,604.54 Cr"</span> ], [ <span class="hljs-string">"29-04-2023"</span>, <span class="hljs-string">"UPI/348534613156/UPI/tomar.neelam198/CICI Bank/IC"</span>, <span class="hljs-string">""</span>, <span class="hljs-string">"0.00"</span>, <span class="hljs-string">"1,500.00"</span>, <span class="hljs-string">""</span>, <span class="hljs-string">""</span>, <span class="hljs-string">"16,104.54 Cr"</span> ], [ <span class="hljs-string">"29-04-2023"</span>, <span class="hljs-string">"UPI/311976589335/Return/8460610589@ybl/Karur Vysyo"</span>, <span class="hljs-string">""</span>, <span class="hljs-string">"0.00"</span>, <span class="hljs-string">"5,000.00"</span>, <span class="hljs-string">""</span>, <span class="hljs-string">""</span>, <span class="hljs-string">"21,104.54 Cr"</span> ], [ <span class="hljs-string">""</span>, <span class="hljs-string">"Page Total:"</span>, <span class="hljs-string">""</span>, <span class="hljs-string">"27,600.00"</span>, <span class="hljs-string">"13,680.00"</span>, <span class="hljs-string">"0.00"</span>, <span class="hljs-string">"0.00"</span>, <span class="hljs-string">"21,104.54 Cr"</span> ] ] ]</pre></div><p id="de86">With traditional OCR solutions, keys and values are extracted as simple text,which makes it tricky to map with hard-coded rules and to maintain that for each update.</p><p id="b56d"><b>Let us start step by step:</b></p><h1 id="20b5">1. Command line app</h1><p id="3a99">Let’s create a small command line app that scans a file and outputs a JSON result.</p><div id="36e2"><pre><span class="hljs-meta prompt_"> </span><span class="language-bash"><span class="hljs-built_in">mkdir</span> textract-lab</span> <span class="hljs-meta prompt_"> </span><span class="language-bash"><span class="hljs-built_in">cd</span> textract-lab && yarn init</span> <span class="hljs-meta prompt_"> </span><span class="language-bash"><span class="hljs-built_in">touch</span> index.js</span> <span class="hljs-meta prompt_"> </span><span class="language-bash">yarn add commander aws-sdk lodash</span></pre></div><p id="b347">We have created a directory and initialized our node.js app, created an entry file index.js , added our command line helper commander plus the sdk of Amazon web services (aws-sdk), and lodash.</p><p id="05df">Next open up index.js and paste the following code:</p><div id="4b57"><pre><span class="hljs-keyword">const</span> program = <span class="hljs-built_in">require</span>(<span class="hljs-string">"commander"</span>); program.<span class="hljs-title function_">version</span>(<span class="hljs-string">"0.0.1"</span>).<span class="hljs-title function_">description</span>(<span class="hljs-string">"Textract Lab"</span>); program .<span class="hljs-title function_">command</span>(<span class="hljs-string">"scan <filePath>"</span>) .<span class="hljs-title function_">alias</span>(<span class="hljs-string">"s"</span>) .<span class="hljs-title function_">description</span>(<span class="hljs-string">"scans a file"</span>) .<span class="hljs-title function_">action</span>(<span class="hljs-function"><span class="hljs-params">filePath</span> =></span> { <span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(filePath); }); program.<span class="hljs-title function_">parse</span>(process.<span class="hljs-property">argv</span>);</pre></div><p id="3d72">We have added a new command to our system that accepts a single argument: the filePath of the file we want to scan. Currently, this command simply logs the filePath that has been passed. <b>Try to execute it:</b></p><div id="968a"><pre> node index.js scan HelloFromNode</pre></div><p id="7312">It should log HelloFromNode.</p><h1 id="c131">2. Setting Up Your Amazon Account</h1><p id="1469">To use AWS Textract, you’ll need to set up an AWS account and create an IAM user. Follow these steps to get started:</p><p id="eb9d">First, create an AWS account by visiting the AWS Management Console. Click on “Create a new AWS account” and follow the on-screen instructions to complete the registration process.</p><p id="db1c">Next, create and configure an IAM user by following the official AWS Textract guide. Ensure the IAM user has the necessary permissions to use Textract.</p><p id="2fc3">By setting up your AWS account and configuring an IAM user, you’ll be ready to utilize the features of AWS Textract.</p><h1 id="5f9c">3. AWS Config</h1><p id="fc0b">Create a config file that contains your aws configuration:</p><div id="93fb"><pre><span class="hljs-meta prompt_"> </span><span class="language-bash"><span class="hljs-built_in">touch</span> config.js</span></pre></div><p id="655d">Open config.js and paste the following (insert your keys plus the region)</p><div id="4bcb"><pre><span class="hljs-variable language_">module</span>.<span class="hljs-property">exports</span> = { <span class="hljs-attr">awsAccesskeyID</span>: <span class="hljs-string">""</span>, <span class="hljs-attr">awsSecretAccessKey</span>: <span class="hljs-string">""</span>, <span class="hljs-attr">awsRegion</span>: <span class="hljs-string">""</span> };</pre></div><h1 id="7f80">4. Doc Scanner</h1><p id="ce3e">Create a new file textUtils.js</p><div id="b153"><pre><span class="hljs-keyword">const</span> _ = <span class="hljs-built_in">require</span>(<span class="hljs-string">"lodash"</span>); <span class="hljs-keyword">const</span> aws = <span class="hljs-built_in">require</span>(<span class="hljs-string">"aws-sdk"</span>); <span class="hljs-keyword">const</span> config = <span class="hljs-built_in">require</span>(<span class="hljs-string">"./config"</span>);

aws.<span class="hljs-property">config</span>.<span class="hljs-title function_">update</span>({ <span class="hljs-attr">accessKeyId</span>: config.<span class="hljs-property">awsAccesskeyID</span>, <span class="hljs-attr">secretAccessKey</span>: config.<span class="hljs-property">awsSecretAccessKey</span>, <span class="hljs-attr">region</span>: config.<span class="hljs-property">awsRegion</span> });

<span class="hljs-keyword">const</span> textract = <span class="hljs-keyword">new</span> aws.<span class="hljs-title class_">Textract</span>();

<span class="hljs-comment">// Function to get text from result using blocksMap</span> <span class="hljs-keyword">const</span> <span class="hljs-title function_">getText</span> = (<span class="hljs-params">result, blocksMap</span>) => { <span class="hljs-keyword">let</span> text = <span class="hljs-string">""</span>;

<span class="hljs-keyword">if</span> (_.<span class="hljs-title function_">has</span>(result, <span class="hljs-string">"Relationships"</span>)) { result.<span class="hljs-property">Relationships</span>.<span class="hljs-title function_">forEach</span>(<span class="hljs-function"><span class="hljs-params">relationship</span> =></span> { <span class="hljs-keyword">if</span> (relationship.<span class="hljs-property">Type</span> === <span class="hljs-string">"CHILD"</span>) { relationship.<span class="hljs-property">Ids</span>.<span class="hljs-title function_">forEach</span>(<span class="hljs-function"><span class="hljs-params">childI

Options

d</span> =></span> { <span class="hljs-keyword">const</span> word = blocksMap[childId]; <span class="hljs-keyword">if</span> (word.<span class="hljs-property">BlockType</span> === <span class="hljs-string">"WORD"</span>) { text += <span class="hljs-string"><span class="hljs-subst">${word.Text}</span> </span>; } <span class="hljs-keyword">if</span> (word.<span class="hljs-property">BlockType</span> === <span class="hljs-string">"SELECTION_ELEMENT"</span>) { <span class="hljs-keyword">if</span> (word.<span class="hljs-property">SelectionStatus</span> === <span class="hljs-string">"SELECTED"</span>) { text += <span class="hljs-string">X </span>; } } }); } }); }

<span class="hljs-keyword">return</span> text.<span class="hljs-title function_">trim</span>(); };

<span class="hljs-comment">// Function to extract table data</span> <span class="hljs-keyword">const</span> <span class="hljs-title function_">extractTables</span> = blocks => { <span class="hljs-keyword">const</span> blocksMap = {}; <span class="hljs-keyword">const</span> tableBlocks = [];

blocks.<span class="hljs-title function_">forEach</span>(<span class="hljs-function"><span class="hljs-params">block</span> =></span> { blocksMap[block.<span class="hljs-property">Id</span>] = block; <span class="hljs-keyword">if</span> (block.<span class="hljs-property">BlockType</span> === <span class="hljs-string">"TABLE"</span>) { tableBlocks.<span class="hljs-title function_">push</span>(block); } });

<span class="hljs-keyword">const</span> tables = [];

tableBlocks.<span class="hljs-title function_">forEach</span>(<span class="hljs-function"><span class="hljs-params">tableBlock</span> =></span> { <span class="hljs-keyword">const</span> table = []; <span class="hljs-keyword">if</span> (tableBlock.<span class="hljs-property">Relationships</span>) { tableBlock.<span class="hljs-property">Relationships</span>.<span class="hljs-title function_">forEach</span>(<span class="hljs-function"><span class="hljs-params">relationship</span> =></span> { <span class="hljs-keyword">if</span> (relationship.<span class="hljs-property">Type</span> === <span class="hljs-string">"CHILD"</span>) { relationship.<span class="hljs-property">Ids</span>.<span class="hljs-title function_">forEach</span>(<span class="hljs-function"><span class="hljs-params">childId</span> =></span> { <span class="hljs-keyword">const</span> cell = blocksMap[childId]; <span class="hljs-keyword">if</span> (cell.<span class="hljs-property">BlockType</span> === <span class="hljs-string">"CELL"</span>) { <span class="hljs-keyword">const</span> rowIndex = cell.<span class="hljs-property">RowIndex</span> - <span class="hljs-number">1</span>; <span class="hljs-keyword">const</span> colIndex = cell.<span class="hljs-property">ColumnIndex</span> - <span class="hljs-number">1</span>; <span class="hljs-keyword">const</span> text = <span class="hljs-title function_">getText</span>(cell, blocksMap);

          <span class="hljs-keyword">if</span> (!table[rowIndex]) {
            table[rowIndex] = [];
          }
          table[rowIndex][colIndex] = text;
        }
      });
    }
  });
}
tables.<span class="hljs-title function_">push</span>(table);

});

<span class="hljs-keyword">return</span> tables; };

<span class="hljs-variable language_">module</span>.<span class="hljs-property">exports</span> = <span class="hljs-keyword">async</span> buffer => { <span class="hljs-keyword">const</span> params = { <span class="hljs-title class_">Document</span>: { <span class="hljs-title class_">Bytes</span>: buffer }, <span class="hljs-title class_">FeatureTypes</span>: [<span class="hljs-string">"TABLES"</span>] };

<span class="hljs-keyword">const</span> request = textract.<span class="hljs-title function_">analyzeDocument</span>(params); <span class="hljs-keyword">const</span> data = <span class="hljs-keyword">await</span> request.<span class="hljs-title function_">promise</span>();

<span class="hljs-keyword">if</span> (data && data.<span class="hljs-property">Blocks</span>) { <span class="hljs-keyword">const</span> tables = <span class="hljs-title function_">extractTables</span>(data.<span class="hljs-property">Blocks</span>); <span class="hljs-keyword">return</span> tables; } <span class="hljs-keyword">return</span> <span class="hljs-literal">undefined</span>; };</pre></div><h1 id="78ff">Now edit your index.js</h1><div id="ee78"><pre><span class="hljs-keyword">const</span> { <span class="hljs-title class_">Command</span> } = <span class="hljs-built_in">require</span>(<span class="hljs-string">"commander"</span>); <span class="hljs-keyword">const</span> fs = <span class="hljs-built_in">require</span>(<span class="hljs-string">"fs"</span>); <span class="hljs-keyword">const</span> textractScan = <span class="hljs-built_in">require</span>(<span class="hljs-string">"./textractUtils"</span>);

<span class="hljs-keyword">const</span> program = <span class="hljs-keyword">new</span> <span class="hljs-title class_">Command</span>();

program .<span class="hljs-title function_">version</span>(<span class="hljs-string">"0.0.1"</span>) .<span class="hljs-title function_">description</span>(<span class="hljs-string">"Textract Lab"</span>);

program .<span class="hljs-title function_">command</span>(<span class="hljs-string">"scan <filePath>"</span>) .<span class="hljs-title function_">alias</span>(<span class="hljs-string">"s"</span>) .<span class="hljs-title function_">description</span>(<span class="hljs-string">"scans a file"</span>) .<span class="hljs-title function_">action</span>(<span class="hljs-keyword">async</span> (filePath) => { <span class="hljs-keyword">try</span> { <span class="hljs-keyword">const</span> data = fs.<span class="hljs-title function_">readFileSync</span>(filePath); <span class="hljs-keyword">const</span> results = <span class="hljs-keyword">await</span> <span class="hljs-title function_">textractScan</span>(data); <span class="hljs-variable language_">console</span>.<span class="hljs-title function_">log</span>(<span class="hljs-string">"Extracted Tables:"</span>, <span class="hljs-title class_">JSON</span>.<span class="hljs-title function_">stringify</span>(results, <span class="hljs-literal">null</span>, <span class="hljs-number">2</span>)); } <span class="hljs-keyword">catch</span> (error) { <span class="hljs-variable language_">console</span>.<span class="hljs-title function_">error</span>(<span class="hljs-string">"Error reading file or scanning:"</span>, error); } });

program.<span class="hljs-title function_">parse</span>(process.<span class="hljs-property">argv</span>);</pre></div><h1 id="8c0e">5. Testing</h1><p id="ad4e">Execute the following:</p><div id="1f37"><pre>$ node index.js scan /path-to-your-file/form-example.pdf</pre></div><p id="097e">You should see the expected output.</p><h1 id="95b9">Conclusion</h1><p id="bb32">Amazon Textract offers a powerful, user-friendly solution for extracting data from images and PDFs, making it an invaluable tool for automating document processing tasks. Built on Amazon’s advanced, highly scalable deep-learning technology, Textract ensures reliable and efficient performance without requiring any machine-learning expertise. Its simple, easy-to-use APIs allow developers to integrate image and document analysis capabilities into their applications seamlessly. As Textract continuously learns from new data, it improves over time, providing increasingly accurate and efficient results. Whether you’re dealing with invoices, receipts, or other documents, Amazon Textract simplifies the process of extracting structured information, streamlining your workflows and enhancing productivity.</p><p id="c060">You can find the example project <a href="https://github.com/IamAkash12/extracting_table_data_using_textract">here</a>.</p></article></body>

Extract table data from any document using Amazon Textract in Node.jsđŸ«Ą

Amazon Textract is a sophisticated service that automatically extracts text and data from scanned documents. Beyond simple optical character recognition (OCR), it can identify the contents of fields in forms and information stored in tables.

This functionality is particularly valuable in scenarios where data extraction from tables is necessary. Leveraging machine learning, Amazon Textract can significantly reduce the need for manual data entry, providing a more accurate and efficient alternative to hard-coded form reading rules.

A real world scenario: Our target is to read an document with table and extract all the data in a meaningful way, here’s an example pdf:

test.pdf

An ideal output would be:

Extracted Tables: [
    [
    //Table 1
      [
        "Type of Account",
        "Account Number",
        "Balance (INR)",
        "MICR",
        "IFSC",
        "Nomination"
      ],
      [
        "Current",
        "346705500927",
        "21,104.54 Cr",
        "380229048",
        "ICIC0003467",
        "Registered"
      ],
      [
        "",
        "TOTAL",
        "21,104.54 Cr",
        "",
        "",
        ""
      ]
    ],
    //Table 2
    [
      [
        "Date",
        "Particulars",
        "Chq.No.",
        "Withdrawals",
        "Deposits",
        "Autosweep",
        "Reverse Sweep",
        "Balance(INR)"
      ],
      [
        "01-04-2023",
        "B/F",
        "",
        "",
        "",
        "",
        "",
        "35,024.54 Cr"
      ],
      [
        "01-04-2023",
        "UPI/309156907090/UPl/navyagidwani93@/State Bank Of",
        "",
        "0.00",
        "50.00",
        "",
        "",
        "35,074.54 Cr"
      ],
      [
        "03-04-2023",
        "JPI/309237383577/Payment from Ph/dinesh.vaghela./P",
        "",
        "0.00",
        "1,000.00",
        "",
        "",
        "36,074.54 Cr"
      ],
      [
        "04-04-2023",
        "UPI/346096197728/UPl/ankupatel2011@o/State Bank Of",
        "",
        "0.00",
        "700.00",
        "",
        "",
        "36,774.54 Cr"
      ],
      [
        "05-04-2023",
        "MMTAMPS/309508062190/loan/SHAH /KVBL0002212",
        "",
        "6,000.00",
        "0.00",
        "",
        "",
        "30,774.54 Cr"
      ],
      [
        "06-04-2023",
        "MMT/IMPS/309619314667/chainpayment/SHAH /KVBL",
        "",
        "3,000.00",
        "0.00",
        "",
        "",
        "27,774.54 Cr"
      ],
      [
        "10-04-2023",
        "MMT/IMPS/309914919173/SHAH/KVBL0002212",
        "",
        "15,600.00",
        "0.00",
        "",
        "",
        "12,174.54 Cr"
      ],
      [
        "10-04-2023",
        "EMS/001182247606/PRUDENTIALMF_71__187681801",
        "",
        "3,000.00",
        "0.00",
        "",
        "",
        "9,174.54 Cr"
      ],
      [
        "14-04-2023",
        "UPI310463142929/UPl/sejalbaria95@ok/State Bank Of",
        "",
        "0.00",
        "50.00",
        "",
        "",
        "9,224.54 Cr"
      ],
      [
        "18-04-2023",
        "UPI/310868054591/UPI/tiwarimonika550/Punjab Nation",
        "",
        "0.00",
        "2,390.00",
        "",
        "",
        "11,614.54 Cr"
      ],
      [
        "22-04-2023",
        "UPI/311256956611/Paymentfrom Ph/8359034375@ybl/St",
        "",
        "0.00",
        "90.00",
        "",
        "",
        "11,704.54 Cr"
      ],
      [
        "24-04-2023",
        "UPI/311457820967/UPl/aartipanchal.01/Bank of India",
        "",
        "0.00",
        "350.00",
        "",
        "",
        "12,054.54 Cr"
      ],
      [
        "27-04-2023",
        "UPI/311742716390/ibrow/manishadalgl108/Axis Bank L",
        "",
        "0.00",
        "50.00",
        "",
        "",
        "12,104.54 Cr"
      ],
      [
        "28-04-2023",
        "UPI/311837265908/UPl/gitanjalitomar3/IDBI Bank Lim",
        "",
        "0.00",
        "2,500.00",
        "",
        "",
        "14,604.54 Cr"
      ],
      [
        "29-04-2023",
        "UPI/348534613156/UPI/tomar.neelam198/CICI Bank/IC",
        "",
        "0.00",
        "1,500.00",
        "",
        "",
        "16,104.54 Cr"
      ],
      [
        "29-04-2023",
        "UPI/311976589335/Return/8460610589@ybl/Karur Vysyo",
        "",
        "0.00",
        "5,000.00",
        "",
        "",
        "21,104.54 Cr"
      ],
      [
        "",
        "Page Total:",
        "",
        "27,600.00",
        "13,680.00",
        "0.00",
        "0.00",
        "21,104.54 Cr"
      ]
    ]
  ]

With traditional OCR solutions, keys and values are extracted as simple text,which makes it tricky to map with hard-coded rules and to maintain that for each update.

Let us start step by step:

1. Command line app

Let’s create a small command line app that scans a file and outputs a JSON result.

$ mkdir textract-lab
$ cd textract-lab && yarn init
$ touch index.js
$ yarn add commander aws-sdk lodash

We have created a directory and initialized our node.js app, created an entry file index.js , added our command line helper commander plus the sdk of Amazon web services (aws-sdk), and lodash.

Next open up index.js and paste the following code:

const program = require("commander");
program.version("0.0.1").description("Textract Lab");
program
.command("scan <filePath>")
.alias("s")
.description("scans a file")
.action(filePath => {
console.log(filePath);
});
program.parse(process.argv);

We have added a new command to our system that accepts a single argument: the filePath of the file we want to scan. Currently, this command simply logs the filePath that has been passed. Try to execute it:

$ node index.js scan HelloFromNode

It should log HelloFromNode.

2. Setting Up Your Amazon Account

To use AWS Textract, you’ll need to set up an AWS account and create an IAM user. Follow these steps to get started:

First, create an AWS account by visiting the AWS Management Console. Click on “Create a new AWS account” and follow the on-screen instructions to complete the registration process.

Next, create and configure an IAM user by following the official AWS Textract guide. Ensure the IAM user has the necessary permissions to use Textract.

By setting up your AWS account and configuring an IAM user, you’ll be ready to utilize the features of AWS Textract.

3. AWS Config

Create a config file that contains your aws configuration:

$ touch config.js

Open config.js and paste the following (insert your keys plus the region)

module.exports = {
awsAccesskeyID: "",
awsSecretAccessKey: "",
awsRegion: ""
};

4. Doc Scanner

Create a new file textUtils.js

const _ = require("lodash");
const aws = require("aws-sdk");
const config = require("./config");

aws.config.update({
  accessKeyId: config.awsAccesskeyID,
  secretAccessKey: config.awsSecretAccessKey,
  region: config.awsRegion
});

const textract = new aws.Textract();

// Function to get text from result using blocksMap
const getText = (result, blocksMap) => {
  let text = "";

  if (_.has(result, "Relationships")) {
    result.Relationships.forEach(relationship => {
      if (relationship.Type === "CHILD") {
        relationship.Ids.forEach(childId => {
          const word = blocksMap[childId];
          if (word.BlockType === "WORD") {
            text += `${word.Text} `;
          }
          if (word.BlockType === "SELECTION_ELEMENT") {
            if (word.SelectionStatus === "SELECTED") {
              text += `X `;
            }
          }
        });
      }
    });
  }

  return text.trim();
};

// Function to extract table data
const extractTables = blocks => {
  const blocksMap = {};
  const tableBlocks = [];

  blocks.forEach(block => {
    blocksMap[block.Id] = block;
    if (block.BlockType === "TABLE") {
      tableBlocks.push(block);
    }
  });

  const tables = [];

  tableBlocks.forEach(tableBlock => {
    const table = [];
    if (tableBlock.Relationships) {
      tableBlock.Relationships.forEach(relationship => {
        if (relationship.Type === "CHILD") {
          relationship.Ids.forEach(childId => {
            const cell = blocksMap[childId];
            if (cell.BlockType === "CELL") {
              const rowIndex = cell.RowIndex - 1;
              const colIndex = cell.ColumnIndex - 1;
              const text = getText(cell, blocksMap);

              if (!table[rowIndex]) {
                table[rowIndex] = [];
              }
              table[rowIndex][colIndex] = text;
            }
          });
        }
      });
    }
    tables.push(table);
  });

  return tables;
};

module.exports = async buffer => {
  const params = {
    Document: {
      Bytes: buffer
    },
    FeatureTypes: ["TABLES"]
  };

  const request = textract.analyzeDocument(params);
  const data = await request.promise();

  if (data && data.Blocks) {
    const tables = extractTables(data.Blocks);
    return tables;
  }
  return undefined;
};

Now edit your index.js

const { Command } = require("commander");
const fs = require("fs");
const textractScan = require("./textractUtils");

const program = new Command();

program
  .version("0.0.1")
  .description("Textract Lab");

program
  .command("scan <filePath>")
  .alias("s")
  .description("scans a file")
  .action(async (filePath) => {
    try {
      const data = fs.readFileSync(filePath);
      const results = await textractScan(data);
      console.log("Extracted Tables:", JSON.stringify(results, null, 2));
    } catch (error) {
      console.error("Error reading file or scanning:", error);
    }
  });

program.parse(process.argv);

5. Testing

Execute the following:

$ node index.js scan /path-to-your-file/form-example.pdf

You should see the expected output.

Conclusion

Amazon Textract offers a powerful, user-friendly solution for extracting data from images and PDFs, making it an invaluable tool for automating document processing tasks. Built on Amazon’s advanced, highly scalable deep-learning technology, Textract ensures reliable and efficient performance without requiring any machine-learning expertise. Its simple, easy-to-use APIs allow developers to integrate image and document analysis capabilities into their applications seamlessly. As Textract continuously learns from new data, it improves over time, providing increasingly accurate and efficient results. Whether you’re dealing with invoices, receipts, or other documents, Amazon Textract simplifies the process of extracting structured information, streamlining your workflows and enhancing productivity.

You can find the example project here.

Nodejs
AWS
Amazon Textract
JavaScript
Json
Recommended from ReadMedium