Documentation

What's up, Switzerland?

User Tools

Site Tools


02_browsing:04_queries:04_combined_queries

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_queries [2020/04/29 21:35]
83.77.216.186 ↷ Links adapted because of a move operation
02_browsing:04_queries:04_combined_queries [2020/05/11 08:56] (current)
Line 16: Line 16:
   - 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 lemma. If 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 (ie. you 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=/​was/​ & tt_pos="​PRELS"​   - 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 lemma. If 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 (ie. you 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=/​was/​ & tt_pos="​PRELS"​
 & #​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 (**_=_**). & #​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. **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.+  - 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:​04_queries:​01_support|support in creation the queries]].
02_browsing/04_queries/04_combined_queries.txt · Last modified: 2020/05/11 08:56 (external edit)