Analyze Expense
| textract_analyze_expense | R Documentation |
AnalyzeExpense synchronously analyzes an input document for financially related relationships between text¶
Description¶
analyze_expense synchronously analyzes an input document for
financially related relationships between text.
Information is returned as ExpenseDocuments and seperated as follows:
-
LineItemGroups- A data set containingLineItemswhich store information about the lines of text, such as an item purchased and its price on a receipt. -
SummaryFields- Contains all other information a receipt, such as header information or the vendors name.
Usage¶
textract_analyze_expense(Document)
Arguments¶
Document |
[required] The input document, either as bytes or as an S3 object. You pass image bytes to an Amazon Textract API operation by using the
You pass images stored in an S3 bucket to an Amazon Textract API
operation by using the The AWS Region for the S3 bucket that contains the S3 object must match the AWS Region that you use for Amazon Textract operations. If you use the AWS CLI to call Amazon Textract operations, passing image bytes using the Bytes property isn't supported. You must first upload the document to an Amazon S3 bucket, and then call the operation using the S3Object property. For Amazon Textract to process an S3 object, the user must have permission to access the S3 object. |
Value¶
A list with the following syntax:
list(
DocumentMetadata = list(
Pages = 123
),
ExpenseDocuments = list(
list(
ExpenseIndex = 123,
SummaryFields = list(
list(
Type = list(
Text = "string",
Confidence = 123.0
),
LabelDetection = list(
Text = "string",
Geometry = list(
BoundingBox = list(
Width = 123.0,
Height = 123.0,
Left = 123.0,
Top = 123.0
),
Polygon = list(
list(
X = 123.0,
Y = 123.0
)
),
RotationAngle = 123.0
),
Confidence = 123.0
),
ValueDetection = list(
Text = "string",
Geometry = list(
BoundingBox = list(
Width = 123.0,
Height = 123.0,
Left = 123.0,
Top = 123.0
),
Polygon = list(
list(
X = 123.0,
Y = 123.0
)
),
RotationAngle = 123.0
),
Confidence = 123.0
),
PageNumber = 123,
Currency = list(
Code = "string",
Confidence = 123.0
),
GroupProperties = list(
list(
Types = list(
"string"
),
Id = "string"
)
)
)
),
LineItemGroups = list(
list(
LineItemGroupIndex = 123,
LineItems = list(
list(
LineItemExpenseFields = list(
list(
Type = list(
Text = "string",
Confidence = 123.0
),
LabelDetection = list(
Text = "string",
Geometry = list(
BoundingBox = list(
Width = 123.0,
Height = 123.0,
Left = 123.0,
Top = 123.0
),
Polygon = list(
list(
X = 123.0,
Y = 123.0
)
),
RotationAngle = 123.0
),
Confidence = 123.0
),
ValueDetection = list(
Text = "string",
Geometry = list(
BoundingBox = list(
Width = 123.0,
Height = 123.0,
Left = 123.0,
Top = 123.0
),
Polygon = list(
list(
X = 123.0,
Y = 123.0
)
),
RotationAngle = 123.0
),
Confidence = 123.0
),
PageNumber = 123,
Currency = list(
Code = "string",
Confidence = 123.0
),
GroupProperties = list(
list(
Types = list(
"string"
),
Id = "string"
)
)
)
)
)
)
)
),
Blocks = list(
list(
BlockType = "KEY_VALUE_SET"|"PAGE"|"LINE"|"WORD"|"TABLE"|"CELL"|"SELECTION_ELEMENT"|"MERGED_CELL"|"TITLE"|"QUERY"|"QUERY_RESULT"|"SIGNATURE"|"TABLE_TITLE"|"TABLE_FOOTER"|"LAYOUT_TEXT"|"LAYOUT_TITLE"|"LAYOUT_HEADER"|"LAYOUT_FOOTER"|"LAYOUT_SECTION_HEADER"|"LAYOUT_PAGE_NUMBER"|"LAYOUT_LIST"|"LAYOUT_FIGURE"|"LAYOUT_TABLE"|"LAYOUT_KEY_VALUE",
Confidence = 123.0,
Text = "string",
TextType = "HANDWRITING"|"PRINTED",
RowIndex = 123,
ColumnIndex = 123,
RowSpan = 123,
ColumnSpan = 123,
Geometry = list(
BoundingBox = list(
Width = 123.0,
Height = 123.0,
Left = 123.0,
Top = 123.0
),
Polygon = list(
list(
X = 123.0,
Y = 123.0
)
),
RotationAngle = 123.0
),
Id = "string",
Relationships = list(
list(
Type = "VALUE"|"CHILD"|"COMPLEX_FEATURES"|"MERGED_CELL"|"TITLE"|"ANSWER"|"TABLE"|"TABLE_TITLE"|"TABLE_FOOTER",
Ids = list(
"string"
)
)
),
EntityTypes = list(
"KEY"|"VALUE"|"COLUMN_HEADER"|"TABLE_TITLE"|"TABLE_FOOTER"|"TABLE_SECTION_TITLE"|"TABLE_SUMMARY"|"STRUCTURED_TABLE"|"SEMI_STRUCTURED_TABLE"
),
SelectionStatus = "SELECTED"|"NOT_SELECTED",
Page = 123,
Query = list(
Text = "string",
Alias = "string",
Pages = list(
"string"
)
)
)
)
)
)
)
Request syntax¶
svc$analyze_expense(
Document = list(
Bytes = raw,
S3Object = list(
Bucket = "string",
Name = "string",
Version = "string"
)
)
)