1.3. Multiple Layer Search Tab

The Multiple Layer Search tab houses the most comprehensive search in Trova.

Similarly to the Single Layer Search tab, it has a query History menu, which allows you to go back to the previous queries you have made during that ongoing session. Also the mode case sensitive/case insensitive is the same as the one contained in the Single Layer Search tab.

The first new element is the Reset form 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.

Example Variable Match

Figure 1.8. Example Variable Match


The buttons Minimal Duration and Maximal Duration 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:

Minimal Duration

Figure 1.9. Minimal Duration


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 Begin After and End Before 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 Begin After time that is higher than the End Before 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.

Search string and constraints

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.

Multiple Layer Search

Figure 1.10. Multiple Layer Search


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:

When you click on Find 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:

Double clicking the green field between two search strings opens a context menu with the following constraints:

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.

Results of Multiple Layer Search

Figure 1.11. Results of Multiple Layer Search


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.

Show Time Alignment

Figure 1.12. Show Time Alignment


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.

Time Alignment - adjusted scale

Figure 1.13. Time Alignment - adjusted scale


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.

Info View Options

Figure 1.14. Info View Options


Search hints

If you would like to use both Exact match and Substring match in one query, use the Regular expressionoption. 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 Single Layer Search, you can use the regular expression .+ to indicate any character (the dot) one or more times (the plus sign). The NOT(...) construction on the other hand can be used in the Multiple Layer Search 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.