Skip to content

TungstenTransformation/KTScripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kofax Transformation Script Library

A collection of very useful scripts containing various algorithms.
These scripts are provided as-is. There is no guarantee that they will work. You will need to understand them to use them in your projects.
Please use issues for requests, fixes, suggestions, and new scripts you want to share.

Index

Script Locators

Field Formatters

Validation Rules

Zones

Tables

Locator Customization

Database & Dictionary Scripts

Validation Interface Script

  • Fast Table Lassoing demo video and script quickly and interactively select table columns and rows in the Validation Interface

Classification

Pages

Geometry Functions

  • Find a blank space in a document for imprinting a barcode or signature.
  • Calculate Overlaps of fields, zones, rows etc. Fundamental to many geometry algorithms and custom table locators.
  • Find Left Margin of a Page very precise and fuzzy with sub-pixel accuracy for the left margin of a page. Useful for comparing two pages and paragraph detection

OCR scripts

JSON

Functions

  • Field Copy VERY POWERFUL This is the most important KT script! intelligently & recursively copy a field, locator, alternative, subfield, cell, row, xdoc into another. This script will dramitically simplify your own scripts and make them much more readable.
  • File System Get All files, File_Exists, Dir_Exists, File_NameWithoutExtension etc
  • Sorting Alternatives
  • Fuzzy Match Text VERY POWERFUL fuzzy match any two pieces of text. 0%=no match, 100%=exact match
  • IBAN validation
  • JSON PArser fully compliant JSON parser
  • Quicksort VERY POWERFUL sort alternatives fast by confidence, alphabetically, coordinates, page, textline, etc.
  • String Regex *Split a string via regex. eg "2004-12-23" into "2004","12","23"
  • Numbers to Text Convert numbers to text eg "1234" to "one thousand two hundred and thirty four". Useful for checking that numbers match their text form

Output

Integration

Benchmarking

Images

Documents

  • Compare 2 documents POWERFUL script that detects all differences between two documents
  • Text Deskew If a document is not deskewed before or during OCR the textlines can be messed up. This calculates the page skew AFTER OCR and then realigns all the words into their correct text lines.
  • Convert PDF to TIFF VERY POWERFUL convert your PDF samples to TIFF while preserving the Text layer. Speeds locator testing x10 !
  • Gibberish/Nonsense/Bad OCR Detection check if a document is mostly unreadable OCR or corrupted/encrpyted PDF. Useful for language detection as well
  • How to read Russian Invoices

Batches

Project Manipulation

These are advanced scripting techniques to access to project and locator settings via script. This gives you the power to create, delete and edit classses, fields, locators, and almost any setting in the project. This is very dangerous and can destroy your projects. Also note that the Project Builder will not be updated with changes you make to the project and will cause GUI errors. Tread carefully and - you are on your own - don't expect support from Tech Support!