beautypg.com

Analyze the matches and output results, Figure 5-30. dosearches function – Kofax INDICIUS 6.0 User Manual

Page 77

background image

Configuring Recognition

Getting Started Guide (Free-Form)

71

Function

DoSearches()

Dim

lret

'*** Search: Date ***

lret

=

Textread.DoSearch

("Date", "TextRead1", "MCAnchor_Date", "MCTarget_Date")

If

lret < 0

Then

Recog.LogMessage

"TextRead.DoSearch failed for search: Date. Error code:" & lret, 1

DoSearches = lret

Exit Function

End If

'*** Search: AccountNo ***

lret

=

Textread.DoSearch

("AccountNo", "TextRead1", "MCAnchor_AccountNo", "MCTarget_AccountNo")

If

lret < 0

Then

Recog.LogMessage

"TextRead.DoSearch failed for search: AccountNo. Error code:" & lret, 1

DoSearches = lret

Exit Function

End If

'*** Search: TransferDate ***

lret

=

Textread.DoSearch

("TransferDate", "TextRead1", "MCAnchor_TransferDate", "MCTarget_TransferDate")

If

lret < 0

Then

Recog.LogMessage

"TextRead.DoSearch failed for search: TransferDate. Error code:" & lret, 1

DoSearches = lret

Exit Function

End If

'*** Search: ZipCode ***

lret

=

Textread.DoSearch

("ZipCode", "TextRead1", "MCAnchor_ZipCode", "MCTarget_ZipCode")

If

lret < 0

Then

Recog.LogMessage

"TextRead.DoSearch failed for search: ZipCode. Error code:" & lret, 1

DoSearches = lret

Exit Function

End If

End Function

Figure 5-30. DoSearches Function

Analyze the Matches and Output Results

Once the search has been done the number of matches found is retrieved. If a single
match is found this is output as a confident field value. If more than one match is
found the first match is output but is flagged as unconfident so it can be reviewed in
Completion. This behavior can be altered if different rules are required for a solution.
The data is output to new fields, created according to the name of the search.

The code in Figure 5-31 is repeated for each search.