abbyy flexicapture 12: scripting at #abbyysummit17

26
ABBYY Technology Summit 2017 © ABBYY Confidential ABBYY NAHQ, 2017 FlexiCapture Technical Track

Upload: abbyy-usa

Post on 21-Jan-2018

590 views

Category:

Technology


32 download

TRANSCRIPT

Page 1: ABBYY FlexiCapture 12: Scripting at #ABBYYSummit17

ABBYY TechnologySummit2017

© ABBYY Confidential

ABBYY NAHQ, 2017

FlexiCapture Technical Track

Page 2: ABBYY FlexiCapture 12: Scripting at #ABBYYSummit17

FlexiCapture Scripting

ABBYY NAHQ, 2017

Glenn Rosenthal

© ABBYY Confidential

Page 3: ABBYY FlexiCapture 12: Scripting at #ABBYYSummit17

Scripting - Agenda

• Overview of advanced integration

• Components not discussed previously

• Case studies

© ABBYY Confidential 3

Page 4: ABBYY FlexiCapture 12: Scripting at #ABBYYSummit17

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

Page 5: ABBYY FlexiCapture 12: Scripting at #ABBYYSummit17

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

Page 6: ABBYY FlexiCapture 12: Scripting at #ABBYYSummit17

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

Page 7: ABBYY FlexiCapture 12: Scripting at #ABBYYSummit17

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”

Page 8: ABBYY FlexiCapture 12: Scripting at #ABBYYSummit17

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

Page 9: ABBYY FlexiCapture 12: Scripting at #ABBYYSummit17

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

Page 10: ABBYY FlexiCapture 12: Scripting at #ABBYYSummit17

• 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

Page 11: ABBYY FlexiCapture 12: Scripting at #ABBYYSummit17

• 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

Page 12: ABBYY FlexiCapture 12: Scripting at #ABBYYSummit17

• 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;

Page 13: ABBYY FlexiCapture 12: Scripting at #ABBYYSummit17

• 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;

}

Page 14: ABBYY FlexiCapture 12: Scripting at #ABBYYSummit17

• 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

Page 15: ABBYY FlexiCapture 12: Scripting at #ABBYYSummit17

FlexiLayout: Advanced Post-Search Relations

© ABBYY Confidential 15

FuzzyQuality: Rect.XCenter - PageRect.XCenter, {-10000,0,0,50000} * dt;

Page 16: ABBYY FlexiCapture 12: Scripting at #ABBYYSummit17

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?

Page 17: ABBYY FlexiCapture 12: Scripting at #ABBYYSummit17

Case Studies

© ABBYY Confidential

Page 18: ABBYY FlexiCapture 12: Scripting at #ABBYYSummit17

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

Page 19: ABBYY FlexiCapture 12: Scripting at #ABBYYSummit17

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

Page 20: ABBYY FlexiCapture 12: Scripting at #ABBYYSummit17

Case Study: VIN Auto-Correction

© ABBYY Confidential 20

Page 21: ABBYY FlexiCapture 12: Scripting at #ABBYYSummit17

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

Page 22: ABBYY FlexiCapture 12: Scripting at #ABBYYSummit17

Case Study: Page Re-assembly

© ABBYY Confidential 22

Page 23: ABBYY FlexiCapture 12: Scripting at #ABBYYSummit17

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

Page 24: ABBYY FlexiCapture 12: Scripting at #ABBYYSummit17

Case Study: Building an Address Region

© ABBYY Confidential 24

Page 25: ABBYY FlexiCapture 12: Scripting at #ABBYYSummit17

Case Study: Building an Address Region

© ABBYY Confidential 25

SUITE 100

Page 26: ABBYY FlexiCapture 12: Scripting at #ABBYYSummit17

Case Study: Building an Address Region

© ABBYY Confidential 26