cqp:metadata
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
cqp:metadata [2020/04/19 13:13] – [Displaying linguistic annotation] astefanowitsch | cqp:metadata [2024/06/20 13:53] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | **[ [[cqp: | ||
+ | ====== 3d. Metadata ====== | ||
+ | |||
+ | //This section introduces two important ways of working with metadata. It presupposes that you have read [[cqp: | ||
+ | |||
+ | As explained in [[cqp: | ||
+ | |||
+ | <text id=" | ||
+ | |||
+ | When the corpus is compiled, the base name of the tag (in this case, '' | ||
+ | |||
+ | ===== Displaying metadata in the concordance ===== | ||
+ | |||
+ | The simplest way in which we may want to use metadata is to have certain types of information displayed as part of the concordance. This is done using the command '' | ||
+ | |||
+ | set PrintStructures " | ||
+ | |||
+ | When you now run a query like '' | ||
+ | |||
+ | You can also have the Corpus Workbench display more than one type of metadata. For example, to display the text id and the genre, type: | ||
+ | |||
+ | set PrintStructures " | ||
+ | |||
+ | i.e., list the metadata attributes that you want displayed, separated by whitespaces. | ||
+ | |||
+ | To turn off the display, simply type | ||
+ | |||
+ | set PrintStructures "" | ||
+ | |||
+ | Your settings for displaying metadata will also be reset to zero when you switch to a different corpus or when you quit CQP. | ||
+ | |||
+ | ===== Displaying metadata without attributes ===== | ||
+ | |||
+ | Recall that there may be metadata that does not have any attribute-value pairs, like ''< | ||
+ | |||
+ | BNC> set PrintStructures " | ||
+ | Warning: | ||
+ | Structure ``p'' | ||
+ | |||
+ | This is because there is nothing that could be displayed at the beginning of the line. However, you may want to display these tags //inside// the concordance line, i.e., at the point where they occur in the text (for example, to see when a new paragraph begins). To do this, you use the '' | ||
+ | |||
+ | show +p | ||
+ | |||
+ | Try it, you will see that occasionally, | ||
+ | |||
+ | show -p | ||
+ | |||
+ | ===== Displaying linguistic annotation ===== | ||
+ | |||
+ | As also discussed in [[cqp: | ||
+ | |||
+ | show +pos | ||
+ | |||
+ | Try it, you will see that for each word in the concordance line, its '' | ||
+ | |||
+ | show -pos | ||
+ | |||
+ | ===== Restricting a search by metadata ===== | ||
+ | |||
+ | A more sophisticated way that you can use metadata is by restricting your search to examples that match a particular value of a metadata attribute. This is done by attaching the command '':: | ||
+ | |||
+ | For example, you may be interested in whether men and women use the word '' | ||
+ | |||
+ | [hw=" | ||
+ | |||
+ | To find only uses of the word //love// produced by women, type the following and hit '' | ||
+ | |||
+ | [hw=" | ||
+ | |||
+ | ===== Summary and outlook ===== | ||
+ | |||
+ | This section has shown you how work with metadata. Building on this, you can look at the following sections in any order: | ||
+ | |||
+ | * [[cqp: | ||
+ | * [[cqp: | ||
+ | * [[cqp: | ||
+ | * [[cqp: | ||
+ | * [[cqp: | ||
+ | * [[cqp: | ||
+ | | ||
+ | **[ Introduction to CQP: [[cqp: |