diff --git a/python/01-detect-text-local.py b/python/01-detect-text-local.py index 4102b36..bcf418e 100755 --- a/python/01-detect-text-local.py +++ b/python/01-detect-text-local.py @@ -1,7 +1,7 @@ import boto3 # Document -documentName = "simple-document-image.jpg" +documentName = "IMG_20240529_124037.jpg" # Read document content with open(documentName, 'rb') as document: diff --git a/python/02-detect-text-s3.py b/python/02-detect-text-s3.py index 1bc2ec0..377af0e 100755 --- a/python/02-detect-text-s3.py +++ b/python/02-detect-text-s3.py @@ -2,7 +2,7 @@ # Document s3BucketName = "ki-textract-demo-docs" -documentName = "simple-document-image.jpg" +documentName = "IMG_20240529_124037.jpg" # Amazon Textract client textract = boto3.client('textract') @@ -16,6 +16,7 @@ } }) + #print(response) # Print detected text diff --git a/python/03-reading-order.py b/python/03-reading-order.py index e4263b6..bd76009 100755 --- a/python/03-reading-order.py +++ b/python/03-reading-order.py @@ -1,7 +1,7 @@ import boto3 # Document -documentName = "two-column-image.jpg" +documentName = "IMG_20240529_124037.jpg" # Amazon Textract client textract = boto3.client('textract') diff --git a/python/04-nlp-comprehend.py b/python/04-nlp-comprehend.py index 783d9af..fa7eda8 100755 --- a/python/04-nlp-comprehend.py +++ b/python/04-nlp-comprehend.py @@ -1,7 +1,7 @@ import boto3 # Document -documentName = "simple-document-image.jpg" +documentName = "IMG_20240529_124037.jpg" # Amazon Textract client textract = boto3.client('textract') diff --git a/python/05-nlp-medical.py b/python/05-nlp-medical.py index c6d3cb1..f39cab2 100644 --- a/python/05-nlp-medical.py +++ b/python/05-nlp-medical.py @@ -1,7 +1,7 @@ import boto3 # Document -documentName = "medical-notes.png" +documentName = "IMG_20240529_124037.jpg" # Amazon Textract client textract = boto3.client('textract') @@ -25,11 +25,11 @@ text = text + " " + item["Text"] # Amazon Comprehend client -comprehend = boto3.client('comprehendmedical') +comprehend = boto3.client('comprehendservicereport') # Detect medical entities entities = comprehend.detect_entities(Text=text) -print("\nMedical Entities\n========") +print("\nService Reports\n========") for entity in entities["Entities"]: print("- {}".format(entity["Text"])) print (" Type: {}".format(entity["Type"])) diff --git a/python/06-translate.py b/python/06-translate.py index badf45e..73674e1 100755 --- a/python/06-translate.py +++ b/python/06-translate.py @@ -1,7 +1,7 @@ import boto3 # Document -documentName = "simple-document-image.jpg" +documentName = "IMG_20240529_124037.jpg" # Amazon Textract client textract = boto3.client('textract') diff --git a/python/07-search.py b/python/07-search.py index e2a3feb..c15a992 100644 --- a/python/07-search.py +++ b/python/07-search.py @@ -37,7 +37,7 @@ def indexDocument(bucketName, objectName, text): # Document s3BucketName = "ki-textract-demo-docs" -documentName = "simple-document-image.jpg" +documentName = "IMG_20240529_124037.jpg" # Amazon Textract client textract = boto3.client('textract') @@ -62,4 +62,4 @@ def indexDocument(bucketName, objectName, text): indexDocument(s3BucketName, documentName, text) -# You can view index documents in Kibana Dashboard \ No newline at end of file +# You can view index documents in Kibana Dashboard diff --git a/python/08-forms.py b/python/08-forms.py index 818e137..6259cae 100644 --- a/python/08-forms.py +++ b/python/08-forms.py @@ -2,7 +2,7 @@ from trp import Document # Document -documentName = "employmentapp.png" +documentName = "IMG_20240529_124037.jpg" # Amazon Textract client textract = boto3.client('textract') diff --git a/python/IMG_20240529_124037.jpg b/python/IMG_20240529_124037.jpg new file mode 100644 index 0000000..588717e Binary files /dev/null and b/python/IMG_20240529_124037.jpg differ diff --git a/python/IMG_20240529_124054.jpg b/python/IMG_20240529_124054.jpg new file mode 100644 index 0000000..c475dfa Binary files /dev/null and b/python/IMG_20240529_124054.jpg differ diff --git a/python/IMG_20240529_124115.jpg b/python/IMG_20240529_124115.jpg new file mode 100644 index 0000000..03bef8b Binary files /dev/null and b/python/IMG_20240529_124115.jpg differ diff --git a/python/IMG_20240529_124126.jpg b/python/IMG_20240529_124126.jpg new file mode 100644 index 0000000..e32951f Binary files /dev/null and b/python/IMG_20240529_124126.jpg differ diff --git a/python/IMG_20240529_124136.jpg b/python/IMG_20240529_124136.jpg new file mode 100644 index 0000000..0825bf5 Binary files /dev/null and b/python/IMG_20240529_124136.jpg differ diff --git a/python/IMG_20240529_124146.jpg b/python/IMG_20240529_124146.jpg new file mode 100644 index 0000000..81088f1 Binary files /dev/null and b/python/IMG_20240529_124146.jpg differ diff --git a/python/IMG_20240529_124154.jpg b/python/IMG_20240529_124154.jpg new file mode 100644 index 0000000..ffcfe90 Binary files /dev/null and b/python/IMG_20240529_124154.jpg differ diff --git a/python/IMG_20240529_124204.jpg b/python/IMG_20240529_124204.jpg new file mode 100644 index 0000000..dc35658 Binary files /dev/null and b/python/IMG_20240529_124204.jpg differ diff --git a/python/IMG_20240529_124217.jpg b/python/IMG_20240529_124217.jpg new file mode 100644 index 0000000..6a47e8d Binary files /dev/null and b/python/IMG_20240529_124217.jpg differ diff --git a/python/IMG_20240529_124227.jpg b/python/IMG_20240529_124227.jpg new file mode 100644 index 0000000..ee20759 Binary files /dev/null and b/python/IMG_20240529_124227.jpg differ diff --git a/python/IMG_20240529_124235.jpg b/python/IMG_20240529_124235.jpg new file mode 100644 index 0000000..c6d608b Binary files /dev/null and b/python/IMG_20240529_124235.jpg differ diff --git a/python/queries/Clone b/python/queries/Clone new file mode 100644 index 0000000..77cf56a --- /dev/null +++ b/python/queries/Clone @@ -0,0 +1,2 @@ +git clone https://github.com/Svasti/forked-repository.git +cd forked-repository