File tree 1 file changed +27
-0
lines changed
1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,34 @@ defmodule AWS.Textract do
71
71
`AnalyzeDocument` is a synchronous operation. To analyze documents
72
72
asynchronously, use `StartDocumentAnalysis`.
73
73
74
+ ## Examples
75
+ case AWS.Client.create("ACCESS_KEY", "SECRET_KEY", "REGION")
76
+ |> AWS.Textract.analyze_document(%{
77
+ "Document" => %{
78
+ "Bytes" =>
79
+ "/folder/file"
80
+ |> File.read!()
81
+ |> Base.encode64()
82
+ },
83
+ "FeatureTypes" => ["TABLES"]
84
+ }) do
85
+ {
86
+ :ok,
87
+ %{
88
+ "AnalyzeDocumentModelVersion" => _,
89
+ "Blocks" => blocks,
90
+ "DocumentMetadata" => _
91
+ } = _results,
92
+ _response
93
+ } ->
94
+ # Process the results
95
+
96
+ error -> error
97
+ end
98
+
99
+
74
100
For more information, see [Document Text Analysis](https://docs.aws.amazon.com/textract/latest/dg/how-it-works-analyzing.html).
101
+
75
102
"""
76
103
def analyze_document ( % Client { } = client , input , options \\ [ ] ) do
77
104
meta = metadata ( )
You can’t perform that action at this time.
0 commit comments