Examples
Notes
Parameters
Examples
The following image shows that without the Deskew preprocessor, extraction from a skewed document fails. The Region method returns null, because the targeted date range is in an unexpected position (to the left of the anchor,tenure) rather than in the expected position (below):
To solve this problem:
- Define three widely spaced points in a well-aligned example of this document type: The following image shows using the displayed coordinates of a line to define the X and Y parameters for one of three Fixed Point parameters:
For more information about choosing points, see Best Practices.
- Check the Deskew preprocessor against the skewed example to reveal a remaining problem:
The remaining problem is that the Deskew Preprocessor doesn’t merge lines that were split by the skew. As a result, the region starts at the middle of the word “tenure” instead of the middle of the complete line “White house tenure”. Since the new start shifts the region to the right, the region misses the first year of the date range and returns -1963.
- To fix this problem, apply a Merge Lines preprocessor after the Deskew preprocessor:
Now Sensible captures the full date range, because the region starts at the middle of the complete line “White house tenure”.
Try out this example in the Sensible app using the following documents and config:
This example uses the following config:
JSON
Notes
Page transformation preprocessors See the following table for preprocessors that correct page transformations:
Tips for viewing skewed documents
To view the deskewed document in the Sensible app, click the document, then click the eye (👁) icon:
This visual representation of how the Sensible app deskews documents can be useful for authoring or troubleshooting deskew preprocessors and configs.
Fixed Points tips
- Click on a line in the document pane in the Sensible app to view line coordinates for defining the Fixed Points.
- Choose text anchors for Fixed Points that form as large a triangle as possible, ideally at three corners of the document. Choosing the best points can take trial and error.
- For the Match parameter, choose
"type": "startsWith"or"type": "endsWith"to avoid problems with lines split by skew. If you choose"endsWith", then also define"start:right". You can also define a Merge Lines preprocessor to clean up oversplit lines. - For the aligned reference document, choose a slightly enlarged version of the document so that the Fixed Points triangle is large. The Deskew preprocessor corrects scaling for smaller skewed images.

