You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
090-comprehend: Replace placeholder 'Your text here' with interesting example text
103-textract: Lead with local file method, S3 as secondary option
103-textract: Script checks for prereq bucket stack before creating one
105-rekognition: Use repo sample image, remove Python image generation step
sample-images/: Add placeholder images (to be replaced with real samples)
Copy file name to clipboardExpand all lines: tuts/090-amazon-comprehend-gs/amazon-comprehend-gs.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,14 +10,14 @@ This tutorial shows you how to use the Amazon Comprehend real-time analysis APIs
10
10
## Step 1: Detect the dominant language
11
11
12
12
```bash
13
-
aws comprehend detect-dominant-language --text "Your text here" \
13
+
aws comprehend detect-dominant-language --text "Amazon Web Services provides cloud computing services that help businesses scale and innovate faster. Customers love the reliability and breadth of services available." \
aws comprehend detect-sentiment --text "Your text here" --language-code en \
20
+
aws comprehend detect-sentiment --text "Amazon Web Services provides cloud computing services that help businesses scale and innovate faster. Customers love the reliability and breadth of services available." --language-code en \
@@ -26,14 +26,14 @@ aws comprehend detect-sentiment --text "Your text here" --language-code en \
26
26
Identifies people, places, organizations, dates, and other entity types.
27
27
28
28
```bash
29
-
aws comprehend detect-entities --text "Your text here" --language-code en \
29
+
aws comprehend detect-entities --text "Amazon Web Services provides cloud computing services that help businesses scale and innovate faster. Customers love the reliability and breadth of services available." --language-code en \
aws comprehend detect-key-phrases --text "Your text here" --language-code en \
36
+
aws comprehend detect-key-phrases --text "Amazon Web Services provides cloud computing services that help businesses scale and innovate faster. Customers love the reliability and breadth of services available." --language-code en \
Copy file name to clipboardExpand all lines: tuts/103-amazon-textract-gs/amazon-textract-gs.md
+20-36Lines changed: 20 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,34 +8,30 @@ This tutorial shows you how to upload a document image to Amazon S3, use Amazon
8
8
- Python 3 installed (used to generate a sample PNG image)
9
9
- Permissions for `s3:CreateBucket`, `s3:PutObject`, `s3:DeleteObject`, `s3:DeleteBucket`, `textract:DetectDocumentText`, and `textract:AnalyzeDocument`
10
10
11
-
## Step 1: Create a sample document image
11
+
## Step 1: Use the sample document image
12
12
13
-
Generate a minimal PNG image to use as a test document. In practice, you would use a scanned document or photograph containing text.
13
+
This tutorial includes a sample document image at `../../sample-images/sample-document.png`. Copy it to your working directory:
This creates a blank white PNG. Textract won't find text in it, but it demonstrates the API calls. Replace it with a real document to see text extraction in action.
29
+
The `Bytes` option is useful for quick tests or when you don't want to upload to S3 first. The document size limit for synchronous operations is 10 MB.
30
+
31
+
## Step 3: Upload to S3 (alternative method)
32
+
33
+
If you want to use S3 instead of local file bytes, upload the image to a bucket. If the tutorial prereq bucket stack is deployed, use that bucket. Otherwise create one.
37
34
38
-
## Step 2: Upload the document to S3
39
35
40
36
Create an S3 bucket and upload the sample image.
41
37
@@ -52,7 +48,7 @@ echo "Uploaded to s3://$BUCKET_NAME/sample.png"
52
48
53
49
Textract reads documents directly from S3. For `us-east-1`, omit the `--create-bucket-configuration` parameter.
`detect-document-text` returns `LINE` and `WORD` blocks. Each block includes the detected text and a confidence score. With the blank sample image, no text lines are returned.
`analyze-document` goes beyond text detection. With `FORMS`, it identifies key-value pairs (like form fields). With `TABLES`, it identifies rows and columns. You can request both features in a single call.
75
71
76
-
## Step 5: Detect text from local file bytes
77
-
78
-
Send the document directly as base64-encoded bytes instead of referencing S3.
The `Bytes` option is useful for quick tests or when you don't want to upload to S3 first. The document size limit for synchronous operations is 10 MB.
87
-
88
72
## Cleanup
89
73
90
74
Delete the S3 bucket and its contents, then remove the temporary directory.
Copy file name to clipboardExpand all lines: tuts/105-amazon-rekognition-gs/amazon-rekognition-gs.md
+4-24Lines changed: 4 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,35 +7,15 @@ In this tutorial, you use the AWS CLI to analyze images with Amazon Rekognition.
7
7
## Prerequisites
8
8
9
9
- AWS CLI installed and configured with appropriate permissions.
10
-
- Python 3 (to generate the sample image).
11
10
- An IAM principal with permissions for `rekognition:DetectLabels`, `rekognition:DetectText`, `s3:CreateBucket`, `s3:PutObject`, `s3:DeleteObject`, and `s3:DeleteBucket`.
12
11
13
-
## Step 1: Create a sample image
12
+
## Step 1: Use the sample image
14
13
15
-
Generate a 100×100 gradient PNG using Python. The gradient gives Rekognition color data to analyze.
14
+
This tutorial includes a sample photo at `../../sample-images/sample-photo.png`. Copy it to your working directory:
0 commit comments