Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[formrecognizer] add locale to receipt samples #14292

Merged
merged 2 commits into from
Oct 6, 2020

Conversation

kristapratico
Copy link
Member

No description provided.

@@ -90,10 +90,14 @@ def begin_recognize_receipts(self, receipt, **kwargs):
:keyword int polling_interval: Waiting time between two polls for LRO operations
if no Retry-After header is present. Defaults to 5 seconds.
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword str locale: Locale of the receipt. Supported locales include: en-AU, en-CA, en-GB, en-IN,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: can we include the default at the beginning, i.e. Default is en-US, other supported locales include..., this way the default is more easy to read?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure

@@ -46,7 +46,7 @@ async def recognize_receipts(self):
) as form_recognizer_client:

with open(path_to_sample_forms, "rb") as f:
poller = await form_recognizer_client.begin_recognize_receipts(receipt=f)
poller = await form_recognizer_client.begin_recognize_receipts(receipt=f, locale="en-US")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also sorry for trampling on the reason of this PR, but is it necessary to include locale in the samples, esp since it's a kwarg and we're passing in the default value?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wanted to show how to pass it at least somewhere so added to one of the samples. I don't think it would make sense to use a non-english example, so thought explicitly passing it here wouldn't hurt.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok that's fair

@kristapratico kristapratico merged commit 25e0ffd into Azure:master Oct 6, 2020
@kristapratico kristapratico deleted the receipt-sample branch October 6, 2020 22:00
iscai-msft added a commit that referenced this pull request Oct 7, 2020
…into fr-business-cards

* 'master' of https://github.com/Azure/azure-sdk-for-python: (21 commits)
  Sync eng/common directory with azure-sdk-tools for PR 1052 (#14232)
  [Storage][FileShare]Regenerate code for file tier (#14302)
  [ServiceBus] ServiceBus Operation Timeout Support (#13854)
  Increment package version after release of azure_data_tables (#14309)
  Increment version for textanalytics releases (#14295)
  [formrecognizer] add locale to receipt samples (#14292)
  [form recognizer] add sample business cards to test forms (#14303)
  add back code (#14289)
  update release date (#14291)
  Increment version for search releases (#14290)
  Update Changelog for communication packages (#14268)
  Changelog for azure-identity 1.5.0b2 (#14288)
  [text analytics] changelog add release date, fix wording (#14286)
  Computer Vision 0.7.0 release (#14269)
  SetDevVersion Is Triggering Oddly (#14261)
  Revise get_token docs (#14263)
  Increment version for servicebus releases (#14265)
  redo the dep update (#14264)
  [EventGrid] Prepare for beta3 release (#14262)
  [ServiceBus] b7 release doc fixes (#14247)
  ...
iscai-msft added a commit to iscai-msft/azure-sdk-for-python that referenced this pull request Nov 5, 2020
…into new_polling

* 'master' of https://github.com/Azure/azure-sdk-for-python: (68 commits)
  Pin Deps in "TestOldest" Regression (Azure#14316)
  Sync eng/common directory with azure-sdk-tools for PR 1052 (Azure#14232)
  [Storage][FileShare]Regenerate code for file tier (Azure#14302)
  [ServiceBus] ServiceBus Operation Timeout Support (Azure#13854)
  Increment package version after release of azure_data_tables (Azure#14309)
  Increment version for textanalytics releases (Azure#14295)
  [formrecognizer] add locale to receipt samples (Azure#14292)
  [form recognizer] add sample business cards to test forms (Azure#14303)
  add back code (Azure#14289)
  update release date (Azure#14291)
  Increment version for search releases (Azure#14290)
  Update Changelog for communication packages (Azure#14268)
  Changelog for azure-identity 1.5.0b2 (Azure#14288)
  [text analytics] changelog add release date, fix wording (Azure#14286)
  Computer Vision 0.7.0 release (Azure#14269)
  SetDevVersion Is Triggering Oddly (Azure#14261)
  Revise get_token docs (Azure#14263)
  Increment version for servicebus releases (Azure#14265)
  redo the dep update (Azure#14264)
  [EventGrid] Prepare for beta3 release (Azure#14262)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants