TACT-Web Query: WHEN refinement

The WHEN refinement allows you to select positions in the text where a particular structural condition is true, for example, when the speaker is Romeo.

The following is a partial description of WHEN refinement syntax. For more information, refer to the User's Guide for TACT. An example of WHEN refinement in use is:


lov.* ; when speaker = romeo

Simple WHEN Selection Format

The general format of the basic WHEN selection is:

choose from ; WHEN Ref ID = selection list

The elements are:
choose from
This is the specification for the primary list from which the WHEN specification will choose in order to create a secondary list. The choose from specification is often a word, word list, or regular expression, but it can be created in other ways.
Ref ID
This is the name of the piece of structural information we want to use as the basis of our refinement selection.
selection list
This element tells TACT to include in the resulting list a particular occurrence from the choose from list when the occurrence is found in a context that has the given value(s) for Ref ID.
The selection list format can be:
  • A single name: ... ; WHEN speaker = juliet
  • A list of names (separated by commas): ... ; WHEN speaker = romeo, juliet
  • A range of numbers (if reference is numeric): ... ; WHEN chapter = 10:15
  • If reference is numeric, you can use "<", ">", "<=" and ">=": ... ; WHEN chapter < 15
  • A regular expression: ... ; WHEN speaker = j.*


Web design Alex Stevens, content Geoffrey Rockwell or John Bradley. March 7, 1997