ドキュメントを分析する - Amazon Textract

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

ドキュメントを分析する

Amazon A2I を Amazon Textract ドキュメント分析ワークフローに組み込むには、HumanLoopConfigAnalyzeDocumentオペレーション.

EclipseHumanLoopConfigでヒューマンレビューワークフロー (フロー定義) ARN を指定します。FlowDefinitionArnで、あなたの人間のループに名前を付けてHumanLoopName

Analyze the Document (AWS SDK for Python (Boto3))

次の例では、SDK for Python (Boto3) を使用してanalyze_documentus-west-2. を交換してください。赤、斜体リソースを含むテキスト。詳細については、「」を参照してください。documentAWSSDK for Python (Boto) API リファレンス

client.analyze_document(Document={'S3Object': {"Bucket": "DOC-EXAMPLE-BUCKET", "Name": "document-name.png"}}, HumanLoopConfig={"FlowDefinitionArn":"arn:aws:sagemaker:us-west-2:111122223333:flow-definition/flow-definition-name", "HumanLoopName":"human-loop-name", "DataAttributes":{"ContentClassifiers":["FreeOfPersonallyIdentifiableInformation"|"FreeOfAdultContent",]}}, FeatureTypes=["FORMS"])
Analyze the Document (AWS CLI)

次の例ではを使用しています。AWSコールするCLIanalyze_document。これらの例はAWSCLI バージョン 2. 1つ目は短縮構文で、2番目の構文はJSON構文です。詳細については、「」を参照してください。ドキュメント分析AWS CLIコマンドリファレンス

aws textract analyze-document \ --document '{"S3Object":{"Bucket":"bucket_name","Name":"file_name"}}' \ --human-loop-config HumanLoopName="test",FlowDefinitionArn="arn:aws:sagemaker:eu-west-1:xyz:flow-definition/hl_name",DataAttributes='{ContentClassifiers=["FreeOfPersonallyIdentifiableInformation","FreeOfAdultContent"]}'\ --feature-types '["FORMS"]'
aws textract analyze-document \ --document '{"S3Object":{"Bucket":"bucket_name","Name":"file_name"}}' \ --human-loop-config \ '{"HumanLoopName":"test","FlowDefinitionArn":"arn:aws:sagemaker:eu-west-1:xyz:flow-definition/hl_name","DataAttributes": {"ContentClassifiers":["FreeOfPersonallyIdentifiableInformation","FreeOfAdultContent"]}}' \ --feature-types '["FORMS"]'
注記

—human-loop-config パラメーターには空白文字を使用しないでください。これにより、コードの処理の問題が発生する可能性があります。

このリクエストに対する応答には、次のものが含まれます。HumanLoopActivation出力である。これは、人間のループが作成されたかどうかを示し、もしあれば、その理由を示す。ヒューマンループが作成された場合、このオブジェクトにはHumanLoopArn

の詳細とを使用した例については、AnalyzeDocumentオペレーション、「」を参照してくださいAmazon Textract を使用したドキュメントテキストの分析