-
Notifications
You must be signed in to change notification settings - Fork 38
Description
I'm using textricator form to extract text fields that in a short stretch of the input PDFs occur in varying orders (field1-field2-field3 or field1-field3-field2 or field3-field1-field 2; ...).
A state with multiple conditions is iterated through to go through all states of the variedly-ordered fields, eight such fields plus an exit and a loop condition.
When none of the conditions but the next field after these fields match, iteration stops and the machine moves to that state.
At least, that's what it's supposed to do. It does not fully work. In different PDFs it skips fields, but different fields in different PDFs. Why?
- All condition regexs were checked in LibreOffice search to find the fields in the corresponding
textricator textCSV files. - Literal texts were copied over from the CSV files.
- All condition coordinates were double checked to match in all PDF variations. Before, I already had filtered the CSV for each field and collected all extant coordinates (usually
ulx) to formulate a match. - YamlLint tells me that the YAML is well formed.
Am I overlooking something basic? Could there be a bug that causes skips in a lenghty 'condition:... nextState:...` sequence?
states:
state-before-loop:
include: false
transitions:
-
condition: true # ( 1 = 1 )
nextState: search-loop
search-loop:
include: false
transitions:
-
condition: field-1
nextState: field-1
-
condition: field-2
nextState: field-2
-
condition: field-3
nextState: field-3
...
-
condition: next-state-after-loop # now we have left the varied-order fields
nextState: next-state-after-loop # and exit the loop
-
condition: search-loop # and if not
nextState: search-loop # search again
field-1:
transitions:
-
condition: true
nextState: search-loop
field-2:
transitions:
-
condition: true
nextState: search-loop
field-3
-
condition: true
nextState: search-loop
...
next-state-after-loop
-
condition: proceed
nextState: proceed
...