User Tools

Site Tools


02_browsing:04_queries:04_combined

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
02_browsing:04_queries:04_combined [2022/01/06 14:28]
Simone Ueberwasser
02_browsing:04_queries:04_combined [2022/06/27 09:21] (current)
Line 3: Line 3:
   - The Italian token //io// used by only male informants   - The Italian token //io// used by only male informants
   - Different spelling forms of the German token //was// used as a relative pronoun    - Different spelling forms of the German token //was// used as a relative pronoun 
-  - The French token //est-ce// followed by //que//+  - Occurences of the Italian verb form //sono// preceded by a personal pronoun
  
  
Line 9: Line 9:
   - The first example describes a specific value for a token that is embedded in a message that fulfills specific criteria. We thus have two conditions on different layers (token and message).   - The first example describes a specific value for a token that is embedded in a message that fulfills specific criteria. We thus have two conditions on different layers (token and message).
   - The second example describes a series of spelling variants as they are found on the token level. The same token has to have a specific value as a normalisation and a specific part of speech. We thus look only at tokens but with two different attributes (annotations for lemma and PoS).   - The second example describes a series of spelling variants as they are found on the token level. The same token has to have a specific value as a normalisation and a specific part of speech. We thus look only at tokens but with two different attributes (annotations for lemma and PoS).
-  - In the third example we look only at the layer of tokens, but we look at two different tokens that are in a specific relationship to one another, i.e. one is following the other directly.+  - In the third example we look for a specific token //sono// and for a PoS annotation (personal pronoun) that are in a specific relationship to one another, i.e. one is following the other directly.
  
  
 The queries for these examples are the following: The queries for these examples are the following:
-  - To find //io// written by males, we query for: ''tok="io"& gender = "m"& #2_i_#1''. That reads as: a token with the contents //io// and the gender //m//. The second attribute has to include the first (**_i_**).  +  - To find //io// written by males, we query for: ''tok="io"meta::sex="M"''. That reads as: a token with the contents //io// and the gender //m//.  
-  - In the second example we are looking for different spelling variants for the standard spelling //was//There are two attributes that can be used to this aim. Manually processed messages have the standard spelling in the layer //gloss//, automatically processed messages use the [[01_corpus:02_preprocessing:06_pos|TreeTagger]] annotation //tt_lem// for lemmaIf you are more interested in precision (i.e. if you only want to find samples that are most likely correctly annotated), your best guess is to use the annotation //gloss//. If, on the other hand, you focus on recall (ieyou want as many results as possible even if there might be some wrong annotations) you better use //tt_lem//. The according query would then look like: ''tt_lem=/wastt_pos="PRELS" +  - In the second example we are looking for different spelling variants for the standard spelling //was//We can find these forms as a relative pronoun by using the normalized [[02_browsing:02_layers|layers]] and the [[03_processing:06_pos|PoS annotation]]. In the normalized layer, we are looking for the spelling form //was// regardless of the original respresentationIn the PoS annotation we look for a relative pronounThis results in the query: ''tok="waspos="PRELS" & #1 _=_ #2''We can translate that as: the token has to be //was// and the PoS-Annotation has to be //PRELS// and the two annotations have to be found on the same token //#1 _=_ #2//. Please keep in mind that this is the syntax for subcorpora tagged with TreeTagger. The RFTagger uses a more precise annotation for relative pronouns, e.g. PRO.Rel.Subst.Nom.Sg.Neut. The query would thus look like: ''tok="was" & pos=/PRO.Rel.*/ & #1 _=_ #2''
-& #1_=_#2''If we look at that in detail, we see the lemma //was// as a first attribute and the annotation for the relative pronoun as a second. Those two annotatations are on the same level and have to cover the same token (**_=_**)+  - In the third example we look for two tokens, one directly following the other. Here, we could use one of the normalisations, too, i.e. ''gloss''  or we could use the token. This choice depends on what we want to find. If we want to after the spelling //est-ce que// used by the informant, we query for ''tok=/.../''. If, on the other hand, we want to include unconventional spellings like //sno//, we have to use ''gloss=/.../''. Let us use the first option, which gives us the following query: ''pos="PRO:pers" & tok="sono" & #1 . #2'', which we can read as: a first token has to be a personal pronound and a second one has to be //sono//. The expression ''#1 . #2'' means the first token has to directly precede the second one.
-  - In the third example we look for two tokens, one directly following the other. Here, we could use one of the normalisations, too, i.e. ''mftb_lem'' (the [[01_corpus:02_preprocessing:06_pos|tagger]] used for French) or we could use the token. This choice depends on what we want to find. If we are after the spelling //est-ce que// used by the informant, we query for ''tok=/.../''. If, on the other hand, we want to include unconventional spellings like //sq//, we have to use ''mftb_lem=/.../''. Let us use the first option, which gives us the following query: ''tok="est-ce" & tok="que" & #1 . #2'', which we can read as: a first token //est-ce// and a second token //que//. The expression ''#1 . #2'' means the first token has to directly precede the second one.+
  
-That much for the examples. But how can you remember all of these options? You do not have to, since ANNIS offers you lots of [[02_browsing:04_queries:01_support|support in creation the queries]].+That much for the examples. But how can you remember all of these options? You do not have to, since ANNIS offers you lots of [[02_browsing:05_support|support in creation the queries]].
02_browsing/04_queries/04_combined.1641475739.txt.gz · Last modified: 2022/06/27 09:21 (external edit)