2023:Read Zone (Value Extractor): Difference between revisions

From Grooper Wiki
No edit summary
Tag: Reverted
No edit summary
Tag: Reverted
Line 11: Line 11:
* [[Media:2023 Wiki Read-Zone Batches.zip]]
* [[Media:2023 Wiki Read-Zone Batches.zip]]
|}
|}
== Glossary ==
<u><big>'''Batch'''</big></u>: {{#lst:Glossary|Batch}}
<u><big>'''Extract'''</big></u>: {{#lst:Glossary|Extract}}
<u><big>'''Extractor Type'''</big></u>: {{#lst:Glossary|Extractor Type}}
<u><big>'''IP Command'''</big></u>: {{#lst:Glossary|IP Command}}
<u><big>'''OCR Profile'''</big></u>: {{#lst:Glossary|OCR Profile}}
<u><big>'''OCR'''</big></u>: {{#lst:Glossary|OCR}}
<u><big>'''Project'''</big></u>: {{#lst:Glossary|Project}}
<u><big>'''Read Zone'''</big></u>: {{#lst:Glossary|Read Zone}}
<u><big>'''Shape Detection'''</big></u>: {{#lst:Glossary|Shape Detection}}
<u><big>'''Shape Removal'''</big></u>: {{#lst:Glossary|Shape Removal}}
<u><big>'''Value Reader'''</big></u>: {{#lst:Glossary|Value Reader}}


== About ==
== About ==
Line 220: Line 197:


[[File:2023 Read Zone - 2023 02 How To 05 Shape Region 08.png]]
[[File:2023 Read Zone - 2023 02 How To 05 Shape Region 08.png]]
== Glossary ==
<u><big>'''Batch'''</big></u>: {{#lst:Glossary|Batch}}
<u><big>'''Extract'''</big></u>: {{#lst:Glossary|Extract}}
<u><big>'''Extractor Type'''</big></u>: {{#lst:Glossary|Extractor Type}}
<u><big>'''IP Command'''</big></u>: {{#lst:Glossary|IP Command}}
<u><big>'''OCR Profile'''</big></u>: {{#lst:Glossary|OCR Profile}}
<u><big>'''OCR'''</big></u>: {{#lst:Glossary|OCR}}
<u><big>'''Project'''</big></u>: {{#lst:Glossary|Project}}
<u><big>'''Read Zone'''</big></u>: {{#lst:Glossary|Read Zone}}
<u><big>'''Shape Detection'''</big></u>: {{#lst:Glossary|Shape Detection}}
<u><big>'''Shape Removal'''</big></u>: {{#lst:Glossary|Shape Removal}}
<u><big>'''Value Reader'''</big></u>: {{#lst:Glossary|Value Reader}}

Revision as of 10:20, 27 August 2024

This article is about an older version of Grooper.

Information may be out of date and UI elements may have changed.

2025202320212.90

Read Zone is a Value Extractor that allows you to extract text data in a rectangular region (called an "extraction zone" or just "zone") on a document. This can be a fixed zone, extracting text from the same location on a document, or a zone relative to a text value (such as a label) or a shape location on the document.

You may download the ZIP(s) below and upload it into your own Grooper environment (version 2023). The first contains a Project with resources used in examples throughout this article. The second contains one or more Batches of sample documents.

About

Read Zone is useful for extracting data from highly structured documents. If a document's structure is fixed, it's going to have the same fields in the same physical location from one document to the next.


For instance, the Application for Cow Ownership form to the right seems to be a fairly fixed form. We expect the "Birth Date" listed on the first page to be more or less in the same spot for every single Cow Ownership document. The value itself may change, but there's only so much room that this value can take up on the document.


If you can draw a rectangle around the value you want to extract, and the value falls within the boundaries of that rectangle for every single document, extraction may be as simple as just extracting the text in the rectangle's location. This is referred to as "zonal extraction". You draw a zone where the value exists on the page and return the text data falling in the zone.


Read Zone has a few different options for where the box is placed using the Location property. This can be one of four options:

  • Fixed Region
  • Relative Region
  • Text Region
  • Shape Region

The Read Zone extractor can optionally re-process the text data with an OCR Profile. This can be used to perform custom OCR on the extracted text.

The text in the zone can also be itself extracted by a Value Extractor. This allows you to break up the document into a smaller portion and run an extractor on just the zone instead of the full document. Essentially, you use the Read Zone extractor to create a smaller data instance (from the larger document data instance) and use its Value Extractor property to return data from the smaller data instance.

How To

The Location Property

Fixed Region

This option is the simplest to set up. As the name implies, the extraction zone will be fixed on the page. It will stay in the same coordinates for every document. All you need to do is draw the box where you want to extract data.









Relative Region

Instead of setting the extraction zone in a fixed location for every document, the Relative Region mode will anchor the zone to a text label on the document. The extraction zone's position will change relative to the label's position on the document, but will still have the same drawn dimensions.

This option is useful to overcome issues arising during scanning printed documents. Slight variations can occur as to where a value is when printing or scanning a document, even for very structured documents. This can cause problems when drawing a single fixed region for the extraction zone. However, if you can anchor the zone off an extractable text value, the zone's position will shift according to that anchor's position.













Auto Snap

On many documents, such as the Application for Cow Ownership document we have been using in these examples so far, you will have a grid of lines enclosing the data you want to return. This can also be found in things like tables.

Grooper can use these lines as guides to determine what needs to be extracted. You can use this feature by enabling the Auto Snap property.







Text Region

The Text Region option creates an extraction zone using the logical boundaries of an extraction result. This can return all the text falling within the boundaries of the rectangle around the extractor's result.

This can also be configured to provide results in a similar way the Relative Region option does, using text anchors located by an extractor to position the extraction zone's location. This means both methods can be used to position the zone relative to a point from document to document. The main difference is in how the zone is drawn.









Now, it might seem that the Text Region extractor pretty much does the same thing as the Relative Region extractor, but with more steps... and you would be correct. Generally it is more advantageous to use Relative Region, but there is one thing that Text Region can do a little more easily and it involves Auto Snap.



Shape Region

The Shape Region option is extremely similar to the Text Region option. However, instead of using text to anchor the extraction zone, it uses a shape detected from a Shape Detection or Shape Removal IP Command.

This is the least common method used.








Running OCR on a smaller, more specific area can give more accurate results than running OCR on the whole page. We hope to improve the OCR of these stamps by adding an OCR Profile to the Value Reader we are configuring.



Glossary

Batch: inventory_2 Batch nodes are fundamental in Grooper's architecture. They are containers of documents that are moved through workflow mechanisms called settings Batch Processes. Documents and their pages are represented in Batches by a hierarchy of folder Batch Folders and contract Batch Pages.

Extract: export_notes Extract is an Activity that retrieves information from folder Batch Folder documents, as defined by Data Elements in a data_table Data Model. This is how Grooper locates unstructured data on your documents and collects it in a structured, usable format.

Extractor Type:

IP Command: IP Commands specify an image processing (IP) operation (such as image cleanup, format conversion or feature detection) and are used to construct image IP Steps in an IP Profile. IP Commands are configured using an IP Step's Command property.

OCR Profile: library_books OCR Profiles store configuration settings for optical character recognition (OCR). They are used by the Recognize activity to convert images of text on contract Batch Pages into machine-encoded text. OCR Profiles are highly configurable, allowing fine-grained control over how OCR occurs, how pre-OCR image cleanup occurs, and how Grooper's OCR Synthesis occurs. All this works to the end goal of highly accurate OCR text data, which is used to classify documents, extract data and more.

OCR: OCR is stands for Optical Character Recognition. It allows text on paper documents to be digitized, in order to be searched or edited by other software applications. OCR converts typed or printed text from digital images of physical documents into machine readable, encoded text.

Project: package_2 Projects are the primary containers for configuration nodes within Grooper. The Project is where various processing objects such as stacks Content Models, settings Batch Processes, profile objects are stored. This makes resources easier to manage, easier to save, and simplifies how node references are made in a Grooper Repository.

Read Zone: Read Zone is a Value Extractor that allows you to extract text data in a rectangular region (called an "extraction zone" or just "zone") on a document. This can be a fixed zone, extracting text from the same location on a document, or a zone relative to a text value (such as a label) or a shape location on the document.

Shape Detection: Shape Detection is an IP Command that locates shapes on a document that match one or more sample images. Common shapes targeted by this command are stamps, seals, logos or other graphical marks that can serve as triggers for document separation or anchors for data extraction. Shapes The detected shapes' locations are stored as part of page's layout data.

Shape Removal: Shape Removal is an IP Command detects and removes shapes from documents. Common shapes targeted by this command are stamps, seals, logos or other graphical marks that interfere with OCR and/or can serve as triggers for document separation or anchors for data extraction. The detected shapes' locations are stored as part of page's layout data.

Value Reader: quick_reference_all Value Reader nodes define a single data extraction operation. Each Value Reader executes a single Value Extractor configuration. The Value Extractor determines the logic for returning data from a text-based document or page. (Example: Pattern Match is a Value Extractor that returns data using regular expressions).

  • Value Readers are can be used on their own or in conjunction with pin Data Types for more complex data extraction and collation.