Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion sdk/formrecognizer/azure-ai-formrecognizer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,8 @@ print("Last modified: {}".format(model.last_modified))
print("Recognized fields:")
# looping through the submodels, which contains the fields they were trained on
for submodel in model.models:
print("We have recognized the following fields: {}".format(
print("The submodel with form type '{}' has recognized the following fields: {}".format(
submodel.form_type,
", ".join([label for label in submodel.fields])
))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,9 @@ async def recognize_content(self):
))
# [END recognize_content_async]
for line_idx, line in enumerate(content.lines):
print("Line # {} has text '{}' within bounding box '{}'".format(
print("Line # {} has word count '{}' and text '{}' within bounding box '{}'".format(
line_idx,
len(line.words),
line.text,
format_bounding_box(line.bounding_box)
))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ async def train_model_with_labels(self):
# looping through the submodels, which contains the fields they were trained on
# The labels are based on the ones you gave the training document.
for submodel in model.models:
print("...The submodel has accuracy '{}'".format(submodel.accuracy))
print("...The submodel with form type {} has accuracy '{}'".format(submodel.form_type, submodel.accuracy))
for name, field in submodel.fields.items():
print("...The model found field '{}' to have name '{}' with an accuracy of {}".format(
name, field.name, field.accuracy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ async def train_model_without_labels(self):
print("Recognized fields:")
# Looping through the submodels, which contains the fields they were trained on
for submodel in model.models:
print("...The submodel has form type '{}'".format(submodel.form_type))
for name, field in submodel.fields.items():
print("...The model found field '{}' to have label '{}'".format(
name, field.label
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,9 @@ def recognize_content(self):
))
# [END recognize_content]
for line_idx, line in enumerate(content.lines):
print("Line # {} has text '{}' within bounding box '{}'".format(
print("Line # {} has word count '{}' and text '{}' within bounding box '{}'".format(
line_idx,
len(line.words),
line.text,
format_bounding_box(line.bounding_box)
))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def train_model_with_labels(self):
# looping through the submodels, which contains the fields they were trained on
# The labels are based on the ones you gave the training document.
for submodel in model.models:
print("...The submodel has accuracy '{}'".format(submodel.accuracy))
print("...The submodel with form type {} has accuracy '{}'".format(submodel.form_type, submodel.accuracy))
for name, field in submodel.fields.items():
print("...The model found field '{}' to have name '{}' with an accuracy of {}".format(
name, field.name, field.accuracy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ def train_model_without_labels(self):
print("Recognized fields:")
# Looping through the submodels, which contains the fields they were trained on
for submodel in model.models:
print("...The submodel has form type '{}'".format(submodel.form_type))
for name, field in submodel.fields.items():
print("...The model found field '{}' to have label '{}'".format(
name, field.label
Expand Down