My problem is that textract asynchronous method start_document_analysis, has an option for the type of analysis you want to perform, but when I try to use the "Queries" feature =>
FeatureTypes=[
'TABLES'|'FORMS'|'QUERIES',
],
you would have to pass another parameter with the queries list =>
QueriesConfig={
'Queries': [
{
'Text': 'string',
'Alias': 'string',
'Pages': [
'string',
]
},
]
}
once I pass this parameter, boto3 throws an exception that Queries config is not recognized as one of the parameters accepted, have anyone used this feature with python before ?
3
Answers
You can use by this way:
Hope this will solve your issue
A simpler solution would be to use the
amazon-textract-textractor
package that wraps all this for you and helps you parse the responses. https://aws-samples.github.io/amazon-textract-textractor/index.htmlFor example this calls textract with the Queries, Forms and Tables API all at once:
This calls the asynchronous API for you and will automatically block once you try to retrieve the value that the processing is completed.