{
"fields": [],
/* define section group containing document's claims */
"sections": [
{
"id": "unprocessed_claims_sections",
/* each section contains unlabeled information.
the labels are at the beginning of the document ("Claims contents")
use the External Range parameter to make these labels
accessible as vertical anchors inside the sections */
"range": {
"externalRange": {
"anchor": "Claim contents",
"stop": "unprocessed claims",
/* Starting from the document beginning, Sensible searches
for one static external range */
"anchorIsAbsolute": true
},
/* include 'claim no' heading above section start for use as anchoring text*/
"offsetY": -0.5,
"anchor": {
/* start looking for claims after first instance of "unprocessed claims" */
"start": {
"text": "unprocessed claims",
"type": "includes",
"isCaseSensitive": true
},
/* each claim section starts with a 9-digit claim number */
"match": {
"type": "regex",
"pattern": "^\\d{10}$"
},
/* stop looking for claims before "total" claims */
"end": {
"type": "startsWith",
"text": "total claims",
"isCaseSensitive": true
}
},
/* each claim ends below "unprocessed claims:".
Optional, prevents last section in group
from extending to end of document */
"stop": {
"type": "includes",
"text": "unprocessed claims:",
"isCaseSensitive": true
}
},
/* return each claim as object containing claim #
and phone # fields */
"fields": [
{
/* for each field,
find the intersection of "Claim [number]"
and on the relevant text in the
claim contents external range,
then adjust width, height, and offsets
till the green box is centered
on the target data */
"id": "claim_number",
"type": "number",
"anchor": {
"match": {
"type": "regex",
"pattern": "Claim \\d",
"flags": "i"
}
},
"method": {
"id": "intersection",
/* anchor on text from the external range */
"verticalAnchor": "Claim number",
"width": 1.5,
"height": 0.5,
"offsetY": 0.35
}
},
{
"id": "claim_date",
"type": "date",
"anchor": {
"match": {
"type": "regex",
"pattern": "Claim \\d",
"flags": "i"
}
},
"method": {
"id": "intersection",
/* anchor on text from the external range */
"verticalAnchor": "Date of claim",
"width": 1.5,
"height": 0.5,
"offsetY": 0.9
}
},
{
"id": "phone_number",
"anchor": {
"match": {
"type": "regex",
"pattern": "Claim \\d",
"flags": "i"
}
},
"method": {
"id": "intersection",
/* anchor on text from the external range */
"verticalAnchor": "Phone number",
"width": 1.5,
"height": 0.5,
"offsetY": 0.7
}
},
/* to illustrate section range, output all text in this section */
{
"id": "_everything_in_this_section",
"method": {
"id": "documentRange",
"includeAnchor": true
},
"anchor": {
"match": {
"type": "first"
}
}
}
]
}
]
}