Date post: | 21-Jan-2018 |
Category: |
Technology |
Upload: | abbyy-usa |
View: | 591 times |
Download: | 32 times |
ABBYY TechnologySummit2017
© ABBYY Confidential
ABBYY NAHQ, 2017
FlexiCapture Technical Track
FlexiCapture Scripting
ABBYY NAHQ, 2017
Glenn Rosenthal
© ABBYY Confidential
Scripting - Agenda
• Overview of advanced integration
• Components not discussed previously
• Case studies
© ABBYY Confidential 3
Overview of Advanced Integration
• Discussed at the 2016 ABBYY Technology Summit
© ABBYY Confidential 4
o Batch Scripting (at the Scanning Station)
o Event Handler Scripts
o Custom Workflow Script Stages
o Stage Tools
o Rule Scripts
o Export Scripts
What Else Is There?
• Auto-Correct Scripts
• Custom Recognition Scripts
• Data Set Update Scripts
• Data Set Validation Scripts
• FlexiLayout Scripting
• Document Set Scripts
© ABBYY Confidential 5
Auto-Correct Scripts
• Similar to Rule Scripts, in both functionality and timing– An automated way to correct the values of fields
– May be run triggered each time the value changes
• However, not exactly the same as Rule Scripts– Work on one field alone
– Easily configured to launch only when the value is first retrieved
© ABBYY Confidential 6
Auto-Correct Scripts
© ABBYY Confidential 7
• From the field property window, click on the “Data” tab
• Click on the “Edit” button under Autocorrect Options
• Check “Use script” and click on “Edit”
Custom Recognition Scripts
• Define a custom recognition algorithm, for fields which have regions
• Can use on text fields, checkmarks, and checkmark groups
• Two parameters:– FieldRegion
– Result
© ABBYY Confidential 8
Data Set Scripts
• What is a Data Set?
© ABBYY Confidential 9
• What is a Data Set?– A local copy of a table from an external data source
– Saved as part of the Document Definition
– Faster access during validation
• What is a Data Set?– A local copy of a table from an external data source
– Saved as part of the Document Definition
– Faster access during validation
– Most frequently, but not necessarily a database table or view
• Data Set Update Scripts– Method for adding records into a dataset
• Data Set Validation Scripts– Validates each record in a dataset
– Script is run when• A Data Set is updated
• A Data Set is manually checked
• A Record is manually added or edited
Data Set Scripts
© ABBYY Confidential 10
• Do you all know what FlexiLayout is? (Please tell me you do.)• FlexiLayout Scripts allows you to get even more specific with the methods used to find items in the layout
– Advanced Pre-Search Relations help define search constraints and search areas
– Advanced Post-Search Relations help define the hypothesis for the item
FlexiLayout Scripts
© ABBYY Confidential 11
• Reduce the search area
FlexiLayout: Advanced Pre-Search Relations
© ABBYY Confidential 12
RightOf: 200dt;
Below: 200dt;
LeftOf: PageRect.Right - 500dt;
Above: PageRect.YCenter - 100dt;
If bcIDNum.IsFound then
RightOf: bcIDNum.Right;
• DontFind – Do not bother looking for an item
FlexiLayout: Advanced Pre-Search Relations
© ABBYY Confidential 13
if not stFieldLabel.IsFound then dontfind;
• Optional – Change an item from required to optional
• Nearest – Find the item nearest to a point or itemNearest: PageRight;
Nearest: stLabel;
• Regions, Rectangles, and Search Areas
if stQ1.IsNull then {
Optional: 1,1;
dontfind;
}
• FuzzyQuality– Calculates a penalty coefficient
– Multiplied to the element hypothesis
– Determines whether the item found is the most fitting
FlexiLayout: Advanced Post-Search Relations
© ABBYY Confidential 14
FuzzyQuality: Rect.XCenter - PageRect.XCenter, {-10000,0,0,50000} * dt;
– The further off center the object is, the greater the penalty, and less likely the correct item found
– The penalty grows faster when the item is to the left of the middle of the page
FlexiLayout: Advanced Post-Search Relations
© ABBYY Confidential 15
FuzzyQuality: Rect.XCenter - PageRect.XCenter, {-10000,0,0,50000} * dt;
Document Set Scripts
• Assembly Script for Document Sets
© ABBYY Confidential 16
• Number of different functions– Assemble document set based on field value
– Change the inventory, based on field values
– Compare fields across documents
• What are Document Sets?
Case Studies
© ABBYY Confidential
Case Study: VIN Auto-Correction
• Goal: Read Vehicle Identification Numbers from Titles
• Problem: 17 alpha-numeric character strings
Reading difficult (font, background, image quality)
• Need: Improve the accuracy
• Solution: Using VIN formatting rules and some assumptions,
FlexiCapture could replace characters with more
likely replacements
© ABBYY Confidential 18
Case Study: VIN Auto-Correction
• Formatting Examples:– Ninth character is a check digit (0 – 9, X)
– Last five characters are numeric characters
• Assumption Examples:– First character indicates the country
• More likely to have a car from the United States (“1”) than from China (“L”)
– First characters indicate the manufactures• If the first character is “Y” (Finland or France), more likely the second character is a
“K”, “T”, “S” (Saab) or “V” (Volvo)
© ABBYY Confidential 19
Case Study: VIN Auto-Correction
© ABBYY Confidential 20
Case Study: Page Re-assembly
• Problem: Documents in a batch need to be merged together
when they have the same field value.
Documents are not in any order.
© ABBYY Confidential 21
• Solution: Assembly script to group documents together
Case Study: Page Re-assembly
© ABBYY Confidential 22
Case Study: Building an Address Region
• Problem: Trying to locate the define an entire address
in FlexiLayout, but components are scattered.
Plus, a label is in the way.
© ABBYY Confidential 23
• Solution: FlexiLayout Pre-Search to assemble the region
Case Study: Building an Address Region
© ABBYY Confidential 24
Case Study: Building an Address Region
© ABBYY Confidential 25
SUITE 100
Case Study: Building an Address Region
© ABBYY Confidential 26