Skip to content

Commit 99e019f

Browse files
committed
Update examples
1 parent fc87aae commit 99e019f

14 files changed

+52
-52
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
![Textractor](https://raw.githubusercontent.com/aws-samples/amazon-textract-textractor/5716c52e8a39c063f43e058e1637e4984a4b2da4/docs/source/textractor_cropped.png)
22

3-
[![Tests](https://github.com/aws-samples/amazon-textract-textractor/actions/workflows/tests.yml/badge.svg)](https://github.com/aws-samples/amazon-textract-textractor/actions/workflows/tests.yml) [![Documentation](https://github.com/aws-samples/amazon-textract-textractor/actions/workflows/documentation.yml/badge.svg)](https://aws-samples.github.io/amazon-textract-textractor/) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
3+
[![Tests](https://github.com/aws-samples/amazon-textract-textractor/actions/workflows/tests.yml/badge.svg)](https://github.com/aws-samples/amazon-textract-textractor/actions/workflows/tests.yml) [![Documentation](https://github.com/aws-samples/amazon-textract-textractor/actions/workflows/documentation.yml/badge.svg)](https://aws-samples.github.io/amazon-textract-textractor/) [![PyPI version](https://badge.fury.io/py/amazon-textract-textractor.svg)](https://pypi.org/project/amazon-textract-textractor/) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
44

55
**Textractor** is a python package created to seamlessly work with [Amazon Textract](https://docs.aws.amazon.com/textract/latest/dg/what-is.html) a document intelligence service offering text recognition, table extraction, form processing, and much more. Whether you are making a one-off script or a complex distributed document processing pipeline, Textractor makes it easy to use Textract.
66

@@ -65,9 +65,9 @@ document.tables[0].to_excel("output.xlsx")
6565
### Analyze ID
6666

6767
```py
68-
document = extractor.analyze_id(file_source="tests/fixtures/fake_id.jpg")
68+
document = extractor.analyze_id(file_source="tests/fixtures/fake_id.png")
6969
print(document.identity_documents[0].get("FIRST_NAME"))
70-
# 'FAKEID'
70+
# 'MARIA'
7171
```
7272

7373
### Receipt processing (Analyze Expense)

docs/source/notebooks/exporting_form_data.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"document = extractor.start_document_analysis(\n",
4545
" # Here we pass a Pillow image instead of path. This changes nothing as\n",
4646
" # Textractor supports most input types.\n",
47-
" file_source=Image.open(\"../../../tests/fixtures/invoice1.png\"),\n",
47+
" file_source=Image.open(\"../../../tests/fixtures/form.png\"),\n",
4848
" # We specify the features that we want, here, we only want keys and values\n",
4949
" # therefore we use TextractFeatures.FORMS.\n",
5050
" features=[TextractFeatures.FORMS],\n",

docs/source/notebooks/going_further.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"\n",
3737
"extractor = Textractor(profile_name=\"default\")\n",
3838
"# This path assumes that you are running the notebook from docs/source/notebooks\n",
39-
"document = extractor.analyze_expense(file_source=\"../../../tests/fixtures/invoice1.png\")"
39+
"document = extractor.analyze_expense(file_source=\"../../../tests/fixtures/form.png\")"
4040
]
4141
},
4242
{

docs/source/notebooks/interfacing_with_trp2.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"\n",
3232
"extractor = Textractor(profile_name=\"default\")\n",
3333
"# This path assumes that you are running the notebook from docs/source/notebooks\n",
34-
"document = extractor.detect_document_text(\"../../../tests/fixtures/invoice1.png\")"
34+
"document = extractor.detect_document_text(\"../../../tests/fixtures/form.png\")"
3535
]
3636
},
3737
{

docs/source/notebooks/simple_ocr.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"\n",
4040
"extractor = Textractor(profile_name=\"default\")\n",
4141
"# This path assumes that you are running the notebook from docs/source/notebooks\n",
42-
"document = extractor.detect_document_text(\"../../../tests/fixtures/invoice1.png\")"
42+
"document = extractor.detect_document_text(\"../../../tests/fixtures/form.png\")"
4343
]
4444
},
4545
{
@@ -121,7 +121,7 @@
121121
"extractor = Textractor(profile_name=\"default\")\n",
122122
"# This path assumes that you are running the notebook from docs/source/notebooks\n",
123123
"document = extractor.start_document_text_detection(\n",
124-
" \"../../../tests/fixtures/invoice1.png\",\n",
124+
" \"../../../tests/fixtures/form.png\",\n",
125125
" s3_upload_path=\"s3://textract-ocr/temp/\",\n",
126126
")"
127127
]

docs/source/notebooks/using_analyze_id.ipynb

Lines changed: 21 additions & 21 deletions
Large diffs are not rendered by default.

docs/source/notebooks/visualizing_results.ipynb

Lines changed: 15 additions & 15 deletions
Large diffs are not rendered by default.

tests/fixtures/fake_id.jpg

-157 KB
Binary file not shown.

tests/fixtures/fake_id.png

205 KB
Loading

tests/fixtures/invoice1.png

-2.76 MB
Binary file not shown.

0 commit comments

Comments
 (0)