Search for one of a fixed set of values
This article explains how to use a dictionary, coupled with searches, to find one of a fixed set of known values. If you aren't familiar with searches, you may find it helpful to read the Searches overview article.
If you wish to identify words on the document that you already have in a list, such as a comma-separated value (CSV) file or database, you can use the Dictionary component to do this.
Drag a Dictionary from the toolbox onto the canvas, and connect it to your field via Provide Results/Parameters.
In the Properties panel, enter the data source details, either the short name of a Data File (which must reside in the same local directory as the FPXLC file), or database connection information.
Using a word finder search
By default a dictionary will search all words in the document text content, but you do have the option to connect an input search.
To do this, drag a Search from the toolbox onto the canvas, and connect it to the dictionary via Provide Results/Parameters.
Leave the Match Within property of the value search as Document, but set the Match Whole Words option to True, since you are by definition looking for complete words.
Set a Regular Expression that identifies words appropriate for your use case. For names this might be:
- [[:alpha:]]{1,17} to return all alphabetic words of a sensible length
- [[:upper:]]{1,17} to return only words printed in upper case. You will need to also set the Case-Sensitive property to True.
- [[:upper:]][[:alpha:]]{1,16} to return only words that are either upper case or 'title case' ie. with the first letter capitalised and the rest lower case. You will need to also set the Case-Sensitive property to True.

Identification of names via a dictionary search - example configuration (click to enlarge)
The search will look in the full document text for a match of the regular expression, and return the set of relevant words as a match.
From there, the set of words will be passed to the dictionary so it can match against the more relevant content.

Identification of names via a dictionary search - example field results (click to enlarge)
Updated almost 3 years ago