The Multiple Layer Search tab houses the most comprehensive search in
.Similarly to the
tab, it has a query menu, which allows you to go back to the previous queries you have made during that ongoing session. Also the mode / is the same as the one contained in the tab.The first new element is the
button. Clicking this button will clear all the strings entered in order to make a query.Besides, a new option has been included into the menu containing all the different types of matches (i.e. substring match, exact match, regular expression): variable match. As the name says, it has to do with mathematical variables, and it can be used every time you want to search for two or more annotations, contained in two or more different tiers, reporting the same text and/or the same time alignment. See the example in the figure below.
The buttons
and enables you to constrict the minimal and maximal temporal duration of each result (please note in the window below that it says "Enter a Minimal/Maximal Duration for the complete pattern", which means that if you have filled in all the three strings, you will have to enter the whole duration, and not the duration of one single annotation). When you click on one of the buttons, a dialogue window appears:
Here you can enter the minimal and/or maximal duration as the
total number of milliseconds or in the form of
hours:minutes:seconds.milliseconds. A value of 0 milliseconds or
00:00:00.000 yields as undefined. Searching for annotations with a
maximum duration being less then the minimum duration is impossible.
Hence, entering conflicting values results in an error message saying
that the combination is impossible. After entering a correct duration,
this will be displayed in the corresponding button.
The buttons
and give a dialogue window similar to the one seen above. They allow you to restrict the annotations in the results so that they begin after a certain time and end before a certain time. Entering a time that is higher than the time results in an error message saying that the query made is impossible. After entering a correct time, this will be displayed in the corresponding button.Beneath all the buttons and functions discussed above, you will find a table consisting of white and green fields. Search strings are entered in the white fields, while a green field between two non-empty white fields must contain a constraint.
The fields on one row have to do with the search strings and constraints that have to be matched by annotations contained in one tier. The reason for having three rows in the query table is that the search engine may find annotations contained in three tiers as one hit. Furthermore, it is possible to restrict the search to one type of tier for each row by choosing the appropriate option in the pull-down menu on the right of each row.
Let us first take a look at search strings and constraints in one row. If you enter two search strings in two white fields separated by a green field, you must fill in that green field, i.e. choose a constraint. Double clicking on the green field will open a context menu offering the following constraints:
: between the annotations containing the two search strings, there must be exactly N annotations.
: between the annotations containing the two search strings, there must be more than N annotations.
: between the annotations containing the two search strings, there must be less than N annotations.
: between the annotations containing the two search strings, there must be exactly X milliseconds.
: between the annotations containing the two search strings, there must be more than X milliseconds.
: between the annotations containing the two search strings, there must be less than X milliseconds.
: there are no constraints between the annotations.
: it clears the constraint previously chosen.
When you click on
and there is an empty constraint between two non-empty search string fields, you will get an error message. You will also get an error message if there is an empty search string field and empty constraint fields between two non-empty search string fields.As we saw earlier, the search mechanism on this tab can construct a query within up to three tiers. Besides the constraints on the annotations present in one tier, you can also apply constraints on annotations contained in different tiers. This means that, taking into consideration the constraints entered in the green fields, the search engine will look for annotations which are contained in different tiers, and which match the search strings entered in two (or three) different rows of the query table.
As you can see in the figure above, besides choosing the type of tier, you can also choose among the following options, which are contained in the green drop down menus in between the tier types menus:
Must be in same file: by choosing this option Trova will search for two tiers belonging to the same annotation file, but without a specified relationship between them.
Must be parent and child: by choosing this option Trova will search for two tiers, one being child of the other. Please note that if you look at the annotations in the Timeline view mode in Annex, the parent tier is generally located in the lower positions, whereas when it comes to make a query, it has to go in the top search strings.
Must have same parent: by choosing this option Trova will search for two sibling tiers, which means they belong to the same parent tier.
Must have same participant: by choosing this option Trova will search for two (or more) tiers whose content has been orally told by the same person. The identity (and the identifying number) of the participants can be seen on the IMDI Browser page once you have selected the required node(s).
Multiple constraints can be selected from this menu. All you have to do is holding down the Ctrl key on the keyboard while selecting the needed items.
Double clicking the green field between two search strings opens a context menu with the following constraints:
: the begin time and end time of both annotations are the same;
: part of both annotations overlap;
before the begin time and end time of the annotation matching the upper search string;
: the begin time and end time of the annotation matching the lower search string lieafter the begin time and end time of the annotation matching the upper search string;
: the begin time and end time of the annotation matching the lower search string lie: the begin time of the annotation matching the lower search string lies before the begin time of the annotation matching the upper search string; and the end time of the annotation matching the lower search string lies after the end time of the annotation matching the upper search string;
: the begin time of the annotation matching the lower search string lies after the begin time of the annotation matching the upper search string; and end time of the annotation matching the lower search string lies before the end time of the annotation matching the upper search string;
: the begin time of the annotation matching one of the search strings lies after the end time of the annotation matching the other search string;
: the begin time of the annotation matching the upper search string must lie exactly X milliseconds before the begin time of the annotation matching the lower search string;
: the begin time of the annotation matching the upper search string must lie less than X milliseconds before the begin time of the annotation matching the lower search string;
: the begin time of the annotation matching the upper search string must lie more than X milliseconds before the begin time of the annotation matching the lower search string;
: the begin time of the annotation matching the upper search string must lie exactly X milliseconds before the end time of the annotation matching the lower search string;
: the begin time of the annotation matching the upper search string must lie less than X milliseconds before the end time of the annotation matching the lower search string;
: the begin time of the annotation matching the upper search string must lie more than X milliseconds before the end time of the annotation matching the lower search string;
: the end time of the annotation matching the upper search string must lie exactly X milliseconds before the begin time of the annotation matching the lower search string;
: the end time of the annotation matching the upper search string must lie less than X milliseconds before the begin time of the annotation matching the lower search string;
: the end time of the annotation matching the upper search string must lie more than X milliseconds before the begin time of the annotation matching the lower search string;
: the end time of the annotation matching the upper search string must lie exactly X milliseconds before the end time of the annotation matching the lower search string;
: the end time of the annotation matching the upper search string must lie less than X milliseconds before the end time of the annotation matching the lower search string;
: the end time of the annotation matching the upper search string must lie more than X milliseconds before the end time of the annotation matching the lower search string;
: there are no constraints between the annotations or the tiers.
: it clears the constraint previously chosen.
Because the search mechanism offers the possibility to search for patterns in three tiers and there are possibly three search strings per tier, the search results also consist of nine elements per hit. The results are presented in the form of a table. In the figure below you can see an example of a query and its results. The upper row is the parent tier, the middle row is the English gloss tier, and the lower row is the Portuguese gloss tier.
Here in the Multiple Layer Search you can sort out the tier lists in two ways: 1) alphabetically; 2) by number of matches (the matches are presented in a decreasing order). In both cases, the tiers will be ordered as follows: tier type, tier name, participant (and annotator, if present).
In addition, on the right of the Font menu there is an option called Show time alignment, which appears ONLY when the search has been made over TWO (or more) different tiers. Once you have checked this option, you will see, above each one of the results, two blue bars (graphically representing the time span of the annotations searched) plus the begin and end time of the annotations, and their duration in milliseconds. See figure below.
As soon as this option is checked, another drop down menu will open up, named Scale, with the item Stretch to fit as default option. The latter means, on the one hand, that the two blue bars will stretch as much as the page allows them to, and on the other hand that each of the result will show its own begin and end time, and its own duration time in milliseconds. If you change the scale to, for example, 10 seconds, you will see that the two bars will have changed their length accordingly (thus making the visualisation easier and quicker), that all the results will report a complete duration of ten seconds, and that the end time of the annotations will correspond to the begin time plus ten seconds. See figure below.
Finally, on the left of the option Show Time Alignment, you can click on Info View Options and decide what has to be shown or hidden in the balloon appearing when hovering over the results, in the purple column next to the results, or above the results (i.e. the time options), simply by checking or unchecking the (un)required information. See figure below.
If you would like to use both
and in one query, use the option. In places where you would like to have an exact match use the ^ and $ signs to match the beginning and the end of a string (e.g. ^of$), otherwise just enter a word for the substring match.Wild card. Instead of using
the #
as in the , you can use the regular expression
.+
to indicate any character (the dot) one or
more times (the plus sign). The (...)
construction on the other hand can be used in the in the same way as described in section
1.2.
One final, but not less important, remark concerns the placing of relatively restrictive search strings. As we saw earlier, the hierarchy of the rows in the query does not reflect the hierarchy in the data. While this is perfectly true, we advise you to place restrictive search strings in the left most field on in the upper most row possible and the least restrictive search string in the right most field of the lowest row possible. The reason for this is the order in which the search engine considers the search strings in the query. If it finds a restrictive search string it can filter out all the other possibilities, but if it finds a less restrictive search string it has to consider all the matches of this search string. Because of this, the search might take much more time if the non-restrictive strings are placed before the restrictive ones.