77# --------------------------------------------------------------------------
88
99"""
10- FILE: sample_analyze_document_async .py
10+ FILE: sample_analyze_prebuilt_document_async .py
1111
1212DESCRIPTION:
1313 This sample demonstrates how to extract general document information from a document
1414 given through a file.
1515
16- Note that selection marks returned from begin_analyze_document() do not return the text associated with
17- the checkbox. For the API to return this information, build a custom model to analyze the checkbox and its text.
18- See sample_build_model_async.py for more information.
19-
2016USAGE:
21- python sample_analyze_document_async .py
17+ python sample_analyze_prebuilt_document_async .py
2218
2319 Set the environment variables with your own values before running the sample:
2420 1) AZURE_FORM_RECOGNIZER_ENDPOINT - the endpoint to your Cognitive Services resource.
@@ -131,7 +127,7 @@ async def analyze_document():
131127 )
132128 for region in cell .bounding_regions :
133129 print (
134- "...content on page {} is within bounding box '{}'" .format (
130+ "...content on page {} is within bounding box '{}'\n " .format (
135131 region .page_number ,
136132 format_bounding_box (region .bounding_box ),
137133 )
@@ -142,7 +138,7 @@ async def analyze_document():
142138 print ("Entity of category '{}' with sub-category '{}'" .format (entity .category , entity .sub_category ))
143139 print ("...has content '{}'" .format (entity .content ))
144140 print ("...within '{}' bounding regions" .format (format_bounding_region (entity .bounding_regions )))
145- print ("...with confidence {}" .format (entity .confidence ))
141+ print ("...with confidence {}\n " .format (entity .confidence ))
146142
147143 print ("----Key-value pairs found in document----" )
148144 for idx , kv_pair in enumerate (result .key_value_pairs ):
@@ -155,7 +151,7 @@ async def analyze_document():
155151 )
156152 if kv_pair .value :
157153 print (
158- "Value '{}' found within '{}' bounding regions" .format (
154+ "Value '{}' found within '{}' bounding regions\n " .format (
159155 kv_pair .value .content ,
160156 format_bounding_region (kv_pair .value .bounding_regions ),
161157 )
0 commit comments