User Tools

Site Tools


02_browsing:04_queries:01_support

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
02_browsing:04_queries:01_support [2020/04/22 10:34] simone02_browsing:04_queries:01_support [2022/06/27 09:21] (current) – external edit 127.0.0.1
Line 10: Line 10:
 Figure 1: Starting the query builder Figure 1: Starting the query builder
  
-It comes in two flavors, as you can see. You can use the "General (TigerSearch like) function, which is a bit more demanding or you can use the "Word sequences and meta information" function. To switch between these two functions, just press the arrow down.+It comes in two flavors, as you can see. You can use the "General (TigerSearch like)function, which is a bit more demanding or you can use the "Word sequences and meta information" function. To switch between these two functions, just press the arrow down.
  
 Let us first look at the "Word sequences and meta information" function. This function helps you build queries per (sub-)corpus, so when you first open it, all sections have a button "initialize". When you press this button, the tool looks for available fields and options for the (sub-)corpus that you have selected at that moment. When you switch corpora, you have to re-initialize the tool by closing its tab and starting it anew. Let us first look at the "Word sequences and meta information" function. This function helps you build queries per (sub-)corpus, so when you first open it, all sections have a button "initialize". When you press this button, the tool looks for available fields and options for the (sub-)corpus that you have selected at that moment. When you switch corpora, you have to re-initialize the tool by closing its tab and starting it anew.
  
-The tool is set up into five different sections, which we will discuss in more detail in the following. +The tool is set up into different sections, which we will discuss in more detail in the following.
-tok="ora" & tt_pos="NOM" & tok="siamo" +
-& age_range = "18-24" +
-& #1_=_#2 +
-& #2 . #3 +
-& #4_i_#1 +
-& #4_i_#3+
  
-The first four sections describe the string that you want to query. They all can be found in the section //Linguistic sequence// in the query builder. Figure 2 shows the following query: 
  
-  - A token with the part of speech PRELS +==== Linguistic sequence ==== 
-  - This same token has to have the value //was// as an additional property +In the first section you define the sequence of tokens and their attributes that you want to query forFigure 2 represents the following query:
-  - The token //was// as a PRELS has to be followed by a token with the value //me// +
-  - The token //me// has to follow directly, i.e. with no other tokens in between the two tokens+
  
-As you can see in figure 2, properties that apply to the same token are listed below each other (and in figure 2), while sequences of tokens are listed in a horizontal line (and in figure 2).  +  - A first token with the value //ora// 
 +  - The same token has to have the part of speech annotation ''tt_pos="NOM"'' 
 +  - A second token with the value //siamo// has to followed follow the first one. 
 +  - The second token has to follow the first one directly, i.e. with no other tokens in between. 
 + 
 +As you can see in Figure 2, properties that apply to the same token are listed below each other (01 and 02 in Figure 2), while sequences of tokens are listed in a horizontal line (01 and 03 in Figure 2). In order to add more attributes to a specific token, you press the ''+'' below the token (04 in Figure 2). If you want to add another token to the query, press the button ''Add'' to the right of the last token  (05 in Figure 2).
  
 {{ :02_browsing:04_queries:queryexample1.png?600 |}} {{ :02_browsing:04_queries:queryexample1.png?600 |}}
-Figure 2: The query "was (part of speech: PRELSme" built with word sequence builder.+Figure 2: The query "//ora// (part of speech: //NOM//followed by //siamo//" built up with the Word sequence Builder.
  
-However, there are different way in which tokens can follow each other in a sequence, since a token can follow another directly (with no other token in between) or indirectly with one or several other tokens in between. This option is represented by the rectangle in figure 2 and explained in more detail in figure 3, where ''.2'' stands for a token that is preceding another one with one token in between, ''.1,2'' represents a token that is directly preceding or with one token in between, ''.*'' represents a token that is indirectly preceding, this with any number of tokens in between and ''.'' represents a token that is directly preceding.+The option of defining the sequence of words in more detail is represented by the rectangle 06 in Figure 2 and explained in more detail in Figure 3, where ''.2'' stands for a token that is preceding another one with one token in between, ''.1,2'' represents a token that is directly preceding or with one token in between, ''.*'' represents a token that is indirectly preceding, this with any number of tokens in betweenand ''.'' represents a token that is directly preceding.
  
 {{ :02_browsing:04_queries:queryexample2.png?600 |}} {{ :02_browsing:04_queries:queryexample2.png?600 |}}
 Figure 3: Describing different options for the sequence of tokens Figure 3: Describing different options for the sequence of tokens
  
-Once you have defined these attributes, you can click on //Create AQL Query// below and your query is created in the query field to the left of the Query Builder as you can see in figure 2.+==== Scope and Meta information ==== 
 +In the section below the //Linguistic sequence// (part 07 in Figure 2) you can add additional options to your query that pertain to the whole message or the whole chat as listed in section [[02_browsing:04_queries:05_fields|2.4.5 Fields available]]
  
-In the fields below you can add additional annotations from the layers messages and chats. These will be added you the query you defined above. As you can see in figure 4, the resulting query is rather complex and thus justifies the use of the query builder. 
  
-{{ :02_browsing:04_queries:queryexample3.png?600 |}} +==== Toolbar ==== 
-Figure 4: complex query from different layers.+When clicking ''Create AQL Query'' in the section //Toolbar//, your query is created (number 08 in Figure 2). Additional functions in this section are ''Clear the Query Builder'', which is used if you want to start anew with your query and ''Refresh Query Builder'', which you have to click if you decide to select another sub-corpus for your query. 
  
 ===== Query Builder. General (TigerSearch like) ===== ===== Query Builder. General (TigerSearch like) =====
-This type of query builder focuses on relationships between entities. It basically works as follows: you select an entity (ie. the value of the token) and then select another entity (eg. the part of speech that this tokens is to have) and then link the two via a relationship. Figure shows how this example is constructed.+This type of query builder focuses on relationships between entities. It basically works as follows: you select an entity (ie. the value of the token) and then select another entity (eg. the part of speech that this tokens is to have) and then link the two via a relationship. Figure shows how this example works.
  
 {{ :02_browsing:04_queries:queryexample4.png?600 |}} {{ :02_browsing:04_queries:queryexample4.png?600 |}}
-Figure 5: Building a query by selecting a relationship between entities +Figure 4: Building a query by selecting a relationship between entities
- +
-To work with this query builder, you first select all the nodes ("Add node") required for your query (i.e. the value of the token and the PoS in the example). You then add an edge, i.e. a relationship between these two entities (e.g. different types of precedence, inclusion, overlap etc.) and dock the selected entity to the other one. +
  
-**NB: you cannot have isolated identitiesthey all have to be linked via edges**.+To work with this query builderyou first select all the nodes (''Add node'' in Figure 4) required for your query (i.e. the value of the token and the PoS in the example). You then add an edge, i.e. a relationship between these two entities by clicking on the button ''Edge'' on one of your tokens. All other tokens that you have added now show a button ''Dock'', which you can click to create an relationship between these two tokens. As can be seen inFigure 4, ten different relationships can be created.
  
  
02_browsing/04_queries/01_support.1587544486.txt.gz · Last modified: 2022/06/27 09:21 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki