Download The IMS Corpus Workbench: Corpus Query Processor (CQP)
Transcript
Chapter 5 Access to structural information CQP supports the access to two kinds of structural information with respect to corpora: predened structures (structural annotations) and ad hoc structures (results of earlier queries). 5.1 Predened structures As we have seen in section 4.1.6, the unrestricted use of the wild card operator for corpus sequences does not make much sense, since it produces unintuitive results: "give" []* "up"; ... 132633: <give the department ample power to block undesirable deals . .TXT .PP For years , a strict regimen governed the staff meetings at Nissan Motor Co. 's technical center in Tokyo 's western suburbs . .PP Employees wore identification badges listing not only their names but also their dates of hire . No one could voice an opinion until everybody with more seniority had spoken first , so younger employees -- often the most enthusiastic and innovative -- seldom spoke up> In section 4.1.7, a number of ways have been shown how the span of a match can be restricted. In the case that a corpus has been structurally annotated, the restrictions can refer to the these annotations. (The kind of annotations which a corpus provides can be checked by the info command, see section 2.2 and by the show command, see section 2.4.6.) 5.1.1 Use of structural tags in regular expressions Since the Penn Treebank corpus is annotated with sentence boundaries (structural tag s), we can check, for example, which conjunctions (CC) occur at the beginning of a sentence: <s> [pos="CC"]; Or, we can nd out what kind of punctuation is used at the end of sentences: 34