{"id":13445914,"url":"https://github.com/aws-samples/amazon-textract-response-parser","last_synced_at":"2025-03-21T05:31:23.573Z","repository":{"id":37224787,"uuid":"185843962","full_name":"aws-samples/amazon-textract-response-parser","owner":"aws-samples","description":"Parse JSON response of Amazon Textract","archived":false,"fork":false,"pushed_at":"2024-07-05T15:59:18.000Z","size":17348,"stargazers_count":212,"open_issues_count":27,"forks_count":95,"subscribers_count":15,"default_branch":"master","last_synced_at":"2024-07-15T10:24:46.164Z","etag":null,"topics":["amazon-textract"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aws-samples.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-05-09T17:31:08.000Z","updated_at":"2024-07-31T05:52:14.997Z","dependencies_parsed_at":"2023-02-15T03:00:52.338Z","dependency_job_id":"8cbd9b73-0644-4c12-96fb-cf29bd1c9659","html_url":"https://github.com/aws-samples/amazon-textract-response-parser","commit_stats":{"total_commits":204,"total_committers":23,"mean_commits":8.869565217391305,"dds":0.6029411764705883,"last_synced_commit":"dd1ce01d5c63b394af26510d7df72d58e80d136c"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws-samples%2Famazon-textract-response-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws-samples%2Famazon-textract-response-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws-samples%2Famazon-textract-response-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws-samples%2Famazon-textract-response-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aws-samples","download_url":"https://codeload.github.com/aws-samples/amazon-textract-response-parser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244745712,"owners_count":20503048,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["amazon-textract"],"created_at":"2024-07-31T05:00:41.760Z","updated_at":"2025-03-21T05:31:23.566Z","avatar_url":"https://github.com/aws-samples.png","language":"TypeScript","funding_links":[],"categories":["AI and ML"],"sub_categories":[],"readme":"# Textract Response Parser\n\nYou can use Textract response parser library to easily parse JSON returned by Amazon Textract. The library parses JSON and provides programming language specific constructs to work with different parts of the document. [textractor](https://github.com/aws-samples/amazon-textract-textractor) is an example of a PoC batch processing tool that takes advantage of the Textract response parser library and generates output in multiple formats.\n\n## Python Usage\n\nFor documentation on usage see: [src-python/README.md](src-python/README.md)\n\n## JavaScript/TypeScript Usage\n\nFor documentation on usage see: [src-js/README.md](src-js/README.md)\n\n## C# Usage\n\n### Forms\n\n```csharp\ndocument.Pages.ForEach(page =\u003e {\n    Console.WriteLine(\"Print Lines and Words:\");\n    page.Lines.ForEach(line =\u003e {\n        Console.WriteLine(\"{0}--{1}\", line.Text, line.Confidence);\n        line.Words.ForEach(word =\u003e {\n            Console.WriteLine(\"{0}--{1}\", word.Text, word.Confidence);\n        });\n    });\n    Console.WriteLine(\"Print Fields:\");\n    page.Form.Fields.ForEach(f =\u003e {\n        Console.WriteLine(\"Field: Key: {0}, Value {1}\", f.Key, f.Value);\n    });\n    Console.WriteLine(\"Get Field by Key:\");\n    var key = \"Phone Number:\";\n    var field = page.Form.GetFieldByKey(key);\n    if(field != null) {\n        Console.WriteLine(\"Field: Key: {0}, Value: {1}\", field.Key, field.Value);\n    }\n});\n```\n\n### Tables\n\n```csharp\ndocument.Pages.ForEach(page =\u003e {\n    page.Tables.ForEach(table =\u003e {\n        var r = 0;\n        table.Rows.ForEach(row =\u003e {\n            r++;\n            var c = 0;\n            row.Cells.ForEach(cell =\u003e {\n                c++;\n                Console.WriteLine(\"Table [{0}][{1}] = {2}--{3}\", r, c, cell.Text, cell.Confidence);\n            });\n        });\n    });\n});\n```\n\nCheck out the `src-csharp` folder for instructions on how to run [.NET Core C#](src-csharp/readme.md) samples\n\n## Other Resources\n\n- [Large scale document processing with Amazon Textract - Reference Architecture](https://github.com/aws-samples/amazon-textract-serverless-large-scale-document-processing)\n- [Batch processing tool](https://github.com/aws-samples/amazon-textract-textractor)\n- [Code samples](https://github.com/aws-samples/amazon-textract-code-samples)\n\n## License Summary\n\nThis sample code is made available under the Apache License V2.0 license. See the LICENSE file.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faws-samples%2Famazon-textract-response-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faws-samples%2Famazon-textract-response-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faws-samples%2Famazon-textract-response-parser/lists"}