Open edrogers opened 1 month ago
Thank you for your feedback. Tagging and routing to the team member best able to assist.
@edrogers Thanks for your contact!
This is the documentation of DocumentKeyValuePair
class: https://learn.microsoft.com/en-us/python/api/azure-ai-formrecognizer/azure.ai.formrecognizer.documentkeyvaluepair?view=azure-python#attributes
key
and confidence
properties are required, value
could be None
.
Hi @edrogers. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue.
Ah, thanks for this clarification & link to the documentation @YalinLi0312!
So, this means the first if-statement is unnecessary (since key is a required property), but the second if-statement is important since kv_pair.value
may be None. Is my understanding correct?
If so, would you be willing to review/accept a pull request that removes the first if-statement?
Hi @edrogers , sure thing, we would review your PR and welcome any contributions. Thanks in advance! One more thing you may don't know for this sample - you can update the sample_analyze_general_documents.py
and use the snippet in README.md
.
Hi @edrogers. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue.
Hi @edrogers, we're sending this friendly reminder because we haven't heard back from you in 7 days. We need more information about this issue to help address it. Please be sure to give us your input. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!
The documentation for Azure Form Recognizer includes example snippets on usage. (Many thanks to @kristapratico, @catalinaperalta, and @maririos for working to add those in #20996 and #29193!)
In those snippets is a pair of if-statements:
if kv_pair.key:
here andif kv_pair.value
here. Is there any chance that either ofkv_pair.key
orkv_pair.value
will come back "falsy" or missing?If so, is there somewhere in the documentation that could help me understand the usage of key-value pairs that are missing either the key, the value, or both?
(On the other hand, if they'll never be missing, could those conditionals be removed?)