Hello @Sriramsubramaniyan Nadarajan , Thanks for using Microsoft Q&A Platform.
Here is the python SDK sample code for the general document model. You can use the below code snippet to generate the key-value pairs along with the confidence scores as per your requirement. You can access the full sample code in the GitHub here: https://github.com/Azure/azure-sdk-for-python/tree/azure-ai-formrecognizer_3.3.0/sdk/formrecognizer/azure-ai-formrecognizer/samples
print("----Key-value pairs found in document----")
for kv_pair in result.key_value_pairs:
if kv_pair.key:
print(
"Key '{}' found within '{}' bounding regions".format(
kv_pair.key.content,
format_bounding_region(kv_pair.key.bounding_regions),
)
)
if kv_pair.value:
print(
"Value '{}' found within '{}' bounding regions".format(
kv_pair.value.content,
format_bounding_region(kv_pair.value.bounding_regions),
)
)
print("confidence score:{} % \n".format(kv_pair.confidence*100))
I hope this helps.
Regards,
Vasavi
-Please kindly accept the answer and vote 'yes' if you feel helpful to support the community, thanks.