For a better understanding of what SAGA is and what the purpose of the UI is, please check out this presentation in Teams.
The UI is pretty simple, it has a main tab selector at the top where you can select which one of the 4 areas you want to work on:
In this section we'll go through the process of creating a couple of tags, add some recognizers to them and finally test how they perform against a dataset. This will give the user a better idea of how the process/flow is when using the SAGA UI.
We currently have an dataset loaded into SAGA about aviation incidents. We will try to identify incidents where a engine gets on fire due to a bird.
One important thing to consider is what stages you want in the pipeline used by the recognizers. The base pipeline usually has some stages to pre-process text before passing it to the recognizers.
As you can see in the following image, we'll use the baseline-pipeline which has the following stages:
We want to identify 3 things:
If those 3 things are present in an incident report then we could say that the incident is about engines getting on fire due to birds.
a. So lets start by creating the {bird} tag:
b. Add 'SimpleRegex' and 'Entity' recognizers to the bird tag:
c. Add the following patterns to the entity recognizer. See the image below to know how to do it. Repeat those steps for each of the following patterns
d. Also add the following regex in the simpleRegex recognizer. ( Note: Steps are very similar to how entities were added in Entity recognizer)
e. Now, do the same for the fire and engine tags:
The idea here is to create a tag that will use {fire}, {engine} and {bird} to identify a concept which is engine got on fire due to birds. For this special tag we'll use the Fragmented recognizer. This is an advanced recognizer that will tag text that contains the other 3 tags in any order of appearance and that are close enough from each other.
a. Create a tag called 'fire-by-bird'. Use similar steps you used to create the other tags.
b. Attach the Fragmented recognizer to the tag
c. Add the following pattern: {fire} {engine} {bird}. Make sure to check the option of 'In Any Order', Max tokens at 16 and min tokens at 4
d. Make sure all of your recognizers of all your tags are using the same pipeline or the pipeline you need it to be. Click on the gear icon in each one of the recognizers to open its settings and check the field 'Base Pipeline':
You are able to test any of your tags using the preview functionality. Let's test the {fire-by-bird} tag. Make sure to click on it in the Tag tree, then enter the following text into the preview textbox: "SEAGULL STRIKE INTO TURBINE ON TAKEOFF. SEVERE VIBRATION, SMOKE AND FLAME."
A dialog with the SAGA graph will be shown. Note how the {bird}, {fire}, {engine} and also the {fire-by-bird} tags have identified the text:
a. Always inside the {fire-by-bird} tag, click on the "Test Run" button and then click the "--- New Test Run ---" option
b. Select the Aviation-Incidents dataset and click on Execute button
c. Click the "Background Processes" tab to check the progress of the run
d. Wait for completion of the test run or just click on the "Open search" button to check the results on the search interface.