SAGA Parser Tag Extraction Canonical Workflow
Introduction
The SAGA Parser Tag Extraction Canonical Workflow extracts tags created by the SAGA Parser from the document and puts them in a new document field that can be configured by the user.
The SAGA Parser Tag Extraction Canonical Workflow has 3 main stages: one stage for the workflow configuration, one for the SAGA Parser generation, and one stage for the actual processing of the SAGA Parser tags. It also has an optional stage to perform text extraction if the content has not been extracted already.
For the instructions below, please request and reference the following files:
“workflow_saga parser tag extraction canonical workflow_export.aspire”
Workflow configuration
Each Canonical Workflow has a configuration script where initialization variables can be set or changed according to the needs of the client. This script is always at the very beginning of the workflow stages.
The SAGA Parser stage needs to be configured before the SAGA Parser Tag Extraction Canonical Workflow can be used.
Tags that are required from the extraction need to be specified in the “Tags” field of the “Properties” section of the SAGA Parser stage.
And also, the Elasticsearch or OpenSearch server with the location of the SAGA indexes that the SAGA Parser is going to use has to be configured under the “Saga Advanced” section of the SAGA Parser stage.
This Canonical Workflow makes no use of external JARs, so we don’t need to add any of them to the “External Resources” section of the processing stage.
Configuration Variables
tags_field_name
This is the sole configuration variable for the workflow. The processing stage will add the resulting tags in the field defined here.
Expected Input
Job input
No job input variables are required.
Job variable name | Job variable description |
Document Input
Document variable name | Document variable description |
Workflow output
Job Output
No job output is expected.
Job variable name | Job variable description |
Document Output
Document variable name | Document variable description |
[USER_DEFINED_FIELD_NAME] | The user can define the name where the extracted SAGA Parser tags will be stored. The field will contain a list with the type of tag and the actual match. |
Here we can see how the output looks in the document:
And here is a formatted version of that same output:
Limitations
SAGA Parser
This workflow works based on the output of the SAGA Parser, so any issue with the parser will be reflected in the results of the workflow itself.
Errors and Troubleshooting
No data is shown in the defined field for tags
Data results from the workflow are directly affected by the SAGA Parser results. Check the document’s sagaMatches.content.lexItems field that is being generated by the SAGA Parser stage and check if it has data.
Done!
Your workflow is now configured and ready to be used.