Skip to content

Commit

Permalink
rename and updates
Browse files Browse the repository at this point in the history
  • Loading branch information
catalinaperalta committed Sep 30, 2021
1 parent a11eb8d commit b916705
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
# --------------------------------------------------------------------------

"""
FILE: sample_analyze_general_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.
USAGE:
python sample_analyze_general_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.
Expand Down Expand Up @@ -127,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),
)
Expand All @@ -138,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):
Expand All @@ -151,7 +151,7 @@ async def analyze_document():
)
if kv_pair.value:
print(
"\nValue '{}' found within '{}' bounding regions".format(
"Value '{}' found within '{}' bounding regions\n".format(
kv_pair.value.content,
format_bounding_region(kv_pair.value.bounding_regions),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
# --------------------------------------------------------------------------

"""
FILE: sample_analyze_general_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.
USAGE:
python sample_analyze_general_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.
Expand Down Expand Up @@ -123,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),
)
Expand All @@ -134,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:
Expand All @@ -147,7 +147,7 @@ def analyze_document():
)
if kv_pair.value:
print(
"\nValue '{}' found within '{}' bounding regions".format(
"Value '{}' found within '{}' bounding regions\n".format(
kv_pair.value.content,
format_bounding_region(kv_pair.value.bounding_regions),
)
Expand Down

0 comments on commit b916705

Please sign in to comment.