The TACTweb Query Language

The TACTweb Query Language is very similar to that used in TACT's UseBase program. If you know this specification language, you already know how to specify queries in TACTweb.

The Basics

1. Word forms can be entered directly. To enter more than one form in a query, separate them by commas:
moon, sun (displays occurrences of the words "moon" and "sun")
"when (use a single" to specify a query language reserved word like "when")

2. Use the regular expression notation ".*" to specify a wildcard sequence:
abs.* (displays words beginning with "abs")
.*ent (displays words ending with "ent")
c.*ons (displays words beginning with "c", ending with "ons")
.*ite.* (displays words containing "ite")

To see more on regular expressions, click here.

3. Use the | operator to request a phrase:
my | lov.* (displays phrases beginning with the word "my" and followed immediately by any word starting with "lov")
my | (displays all words that immediately follow the word "my")

The discussion below introduces some variations.

4. Request co-occurrence patterns with the operators "&" or "~":
moon & star.* (displays all occurrences of "moon" that occur near to a word beginning "star")
moon ~ star.* (displays all occurrences of "moon" that do not occur near a "star" word)

For more information about the co-occurrence syntax, click here.

5. Any of the above selection tools can be followed by a "when" refinement:
moon.* ; when speaker = bottom (selects only those words starting with the letters "moon" when spoken by the character "Bottom")

Both the semi-colon and the word "WHEN" are required. For more information, click here.


The TACTweb Query in Detail

All TACTweb selection queries start with some type of initial selection called a source. Some also contain refinements or filters that modify the initial selection. The general form is:

 
<sources> ; <refinements>
 
 

Note that the refinement section is optional, but, if used, must be preceded by a semicolon.

Selection Sources

The source can consist of several selection items separated by commas:

 
source 1 , source 2 , ...
 
 

The following are legal sources:

Selection Refinements

A refinement can follow any source or source group. It begins with a semicolon. More than one refinement can be given -- in which case separate each by a semi-colon:

 
<sources> ; <refinement> ; <refinement> ...
 
 

There are several different refinement operators to choose from. All refinement operators begin with a name, and some are followed by some further specification information.


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