diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/async_samples/sample_analyze_document_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/async_samples/sample_analyze_prebuilt_document_async.py similarity index 92% rename from sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/async_samples/sample_analyze_document_async.py rename to sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/async_samples/sample_analyze_prebuilt_document_async.py index 35392e9917f0..cd77e07fab21 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/async_samples/sample_analyze_document_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/async_samples/sample_analyze_prebuilt_document_async.py @@ -7,18 +7,14 @@ # -------------------------------------------------------------------------- """ -FILE: sample_analyze_document_async.py +FILE: sample_analyze_prebuilt_document_async.py DESCRIPTION: This sample demonstrates how to extract general document information from a document given through a file. - Note that selection marks returned from begin_analyze_document() do not return the text associated with - the checkbox. For the API to return this information, build a custom model to analyze the checkbox and its text. - See sample_build_model_async.py for more information. - USAGE: - python sample_analyze_document_async.py + python sample_analyze_prebuilt_document_async.py Set the environment variables with your own values before running the sample: 1) AZURE_FORM_RECOGNIZER_ENDPOINT - the endpoint to your Cognitive Services resource. @@ -131,7 +127,7 @@ async def analyze_document(): ) for region in cell.bounding_regions: print( - "...content on page {} is within bounding box '{}'".format( + "...content on page {} is within bounding box '{}'\n".format( region.page_number, format_bounding_box(region.bounding_box), ) @@ -142,7 +138,7 @@ async def analyze_document(): print("Entity of category '{}' with sub-category '{}'".format(entity.category, entity.sub_category)) print("...has content '{}'".format(entity.content)) print("...within '{}' bounding regions".format(format_bounding_region(entity.bounding_regions))) - print("...with confidence {}".format(entity.confidence)) + print("...with confidence {}\n".format(entity.confidence)) print("----Key-value pairs found in document----") for idx, kv_pair in enumerate(result.key_value_pairs): @@ -155,7 +151,7 @@ async def analyze_document(): ) if kv_pair.value: print( - "Value '{}' found within '{}' bounding regions".format( + "Value '{}' found within '{}' bounding regions\n".format( kv_pair.value.content, format_bounding_region(kv_pair.value.bounding_regions), ) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/sample_analyze_document.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/sample_analyze_prebuilt_document.py similarity index 92% rename from sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/sample_analyze_document.py rename to sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/sample_analyze_prebuilt_document.py index 21f96b83e607..47141b26be86 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/sample_analyze_document.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/sample_analyze_prebuilt_document.py @@ -7,18 +7,14 @@ # -------------------------------------------------------------------------- """ -FILE: sample_analyze_document.py +FILE: sample_analyze_prebuilt_document.py DESCRIPTION: This sample demonstrates how to extract general document information from a document given through a file. - Note that selection marks returned from begin_analyze_document() do not return the text associated with - the checkbox. For the API to return this information, build a custom model to analyze the checkbox and its text. - See sample_build_model.py for more information. - USAGE: - python sample_analyze_document.py + python sample_analyze_prebuilt_document.py Set the environment variables with your own values before running the sample: 1) AZURE_FORM_RECOGNIZER_ENDPOINT - the endpoint to your Cognitive Services resource. @@ -127,7 +123,7 @@ def analyze_document(): ) for region in cell.bounding_regions: print( - "...content on page {} is within bounding box '{}'".format( + "...content on page {} is within bounding box '{}'\n".format( region.page_number, format_bounding_box(region.bounding_box), ) @@ -138,7 +134,7 @@ def analyze_document(): print("Entity of category '{}' with sub-category '{}'".format(entity.category, entity.sub_category)) print("...has content '{}'".format(entity.content)) print("...within '{}' bounding regions".format(format_bounding_region(entity.bounding_regions))) - print("...with confidence {}".format(entity.confidence)) + print("...with confidence {}\n".format(entity.confidence)) print("----Key-value pairs found in document----") for kv_pair in result.key_value_pairs: @@ -151,7 +147,7 @@ def analyze_document(): ) if kv_pair.value: print( - "Value '{}' found within '{}' bounding regions".format( + "Value '{}' found within '{}' bounding regions\n".format( kv_pair.value.content, format_bounding_region(kv_pair.value.bounding_regions), )