Key-Value Processor
FormX provides a way to find a 'Value' by describing its 'Key' appearance.
What is a Key-Value pattern
FormX offers a powerful Key-Value pattern matching feature that allows users to extract specific data from text. With this feature, users can easily find a particular value based on its surrounding text, which is referred to as a "Key." This documentation will guide you through the steps of using Key-Value pattern matching in FormX.
Key-Value Pattern Matching
Key-Value pattern matching is a technique used to find and extract data from text by identifying a specific pattern. In FormX, users can define their own Key-Value pairs to search for specific values in the text. For example, if you are looking for an ID number on a receipt, which is always printed on the right side of the word "ID:", you can create a Key-Value pair with "ID:" as the label, and leave the position field unchanged as its default is "right".
Enabling Fuzzy Search
To increase the accuracy of the Key-Value pattern matching feature, users can enable fuzzy search. Fuzzy search allows for variations in the text, so if the text is slightly different from what was entered, the system can still recognize it. For example, if the text on the receipt reads "ID No:", instead of "ID:", fuzzy search will still recognize it as a match.
Applying Regular Expression
Another way to increase accuracy is by applying regular expression. Regular expression is a sequence of characters that define a search pattern. By applying regular expression, users can search for more complex patterns of text. For example, if you are looking for an email address in the text value, you can apply a regular expression pattern that matches the standard format of an email address.
How to set up a Key-Value processor
To set up a Key-Value processor in FormX, navigate to the "Custom Extraction Items" section located under "Document" on the right bar. Select "Key-Value" from the list and click on "Add New Extraction Item" to create a new Key-Value processor. You can give it a name for reference in the JSON response.
Configuring the Key-Value Processor
After creating the Key-Value processor, click on "Settings" to configure the processor. In the top section, you can define the keys using regular expressions or enable individual fuzzy search. This is particularly useful when the keys vary in format in different documents.
In the lower section, you can define the position where the value can be found with respect to the "Key." You can also apply regular expression to the targeted value to further refine the search pattern.
Updated over 1 year ago