Help in using TACT query

We suggest that you print this page for easy reference. (You may need to click on this frame first.) Please let us know if you need any other information or would like to make suggestions.

Old Norse Character Set

Here are the instructions for producing Old Norse characters that do not exist in English. You can type the characters as instructed or simply copy and paste the characters you need! (If you are using Unix and other operating systems, please let us know how to do this, and we will put it on this page!) Note that for these characters, TACT search is case-sensitive.

Windows users: the numbers below refer to the numeric keypad with Num Lock on. Do not omit the preceding "0".

MacOS users: if the characers are not displaying correctly, see our Note to MacOS users. The instructions here will work only during Web browsing.

The following characters are used at this TACTweb site. (Please read the instructions above.)

Windows Capital Windows Small Mac Capital Mac Small
Þ/þ Alt-0222 Alt-0254 Shift-Option-5 Shift-Option-6
Ð/ð Alt-0208 Alt-0240 Shift-Option-3 Shift-Option-4
Á/á Alt-0193 Alt-0225 Option-e followed by the letter
É/é Alt-0201 Alt-0233
Í/í Alt-0205 Alt-0237
Ó/ó Alt-0211 Alt-0243
Ú/ú Alt-0218 Alt-0250
Ý/ý Alt-0221 Alt-0253 Option-t Shift-Option-7
Ö/ö Alt-0214 Alt-0246 Option-u followed by the letter
Ü/ü Alt-0220 Alt-0252
Æ/æ Alt-0198 Alt-0230 Shift-Option-' Option-'
Å/å Alt-0197 Alt-0229 Shift-Option-a Option-a
Ø/ø Alt-0216 Alt-0248 Shift-Option-o Option-o

The following characters are not used at this site, but may be used at other TACTweb sites.

Windows Capital Windows Small Mac Capital Mac Small
Ä/ä Alt-0196 Alt-0228 Option-u followed by the letter
Ë/ë Alt-0203 Alt-0235
Ï/ï Alt-0207 Alt-0239
ÿ Alt-0255 n/a
À/à Alt-0192 Alt-0224 Option-` followed by the letter
È/è Alt-0200 Alt-0232
Ì/ì Alt-0204 Alt-0236
Ò/ò Alt-0210 Alt-0242
Ù/ù Alt-0217 Alt-0249
Â/â Alt-0194 Alt-0226 Option-i followed by the letter
Ê/ê Alt-0202 Alt-0234
Î/î Alt-0206 Alt-0238
Ô/ô Alt-0212 Alt-0244
Û/û Alt-0219 Alt-0251
Ã/ã Alt-0195 Alt-0227 Option-n followed by the letter
Õ/õ Alt-0213 Alt-0245
Ñ/ñ Alt-0209 Alt-0241
Ç/ç Alt-0199 Alt-0231 Shift-Option-c Option-c
ß Alt-0223 Option-s

Reference Variables

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.

TACTweb Query: Regular Expressions

Regular Expressions can be specified (a) as a source in a selection criteria statement, (b) as a refinement, or (c) as a part of a WHEN selection. In the first two instances it selects word types in the last case it selects values for structural references.

Format is a string of letters or diacritics with special characters that have special meanings interspersed. In the following, the term "word letter" means letter or diacritic. Special characters are:

Regular Expression Examples

b.t
Any three-letter word beginning with the letter "b" and ending with the letter "t".
b.*t
Any word of any length beginning with the letter "b" and ending with "t".
ba...
Any five letter word beginning with the sequence "ba".
.[bt].
Any three-letter word containing, as the middle letter, the letter "b" or "t".
[~bt].
Any three-letter word containing, as the middle letter, any letter BUT the letters "b" or "t".
.*b.*
Any word containing the letter "b" in any position.
.*ing
Any word ending with the letter sequence "ing".
.*lov.*
Any word containing the letter sequence "lov".

TACTweb Query: Co-occurrences

Use the co-occurrence operators when you wish to select positions where two or more words happen near to each other. Co-occurrence operators always produce a list of positions in the text -- they can never generate a list of words.

There are three co-occurrence operators. To use, replace "<item1>" and "<item2>" with a subordinate rule (such as a regular expression).

<item1> & <item2>
The resulting list will contain positions where item1 occurs that also have an occurrence of item2 within the range of text controlled by the context. The context is specified in the "Config Context" section of the Autosection rule window (see below). This is the and operation.
<item1> ~ <item2>
The resulting list will contain positions where item1 occur that do not have an occurrence of item2 within the range of text controlled by the context. The context is specified in the "Config Context" section of the Autosection rule window (see below). This is the exclusion operation.

Items within the list can be a word from the vocabulary, a regular expression, a category name, or many other basic selection rule types. In addition, an item may be any further subordinate co-occurrence selection criteria. In this case, the subordinate criteria must be surrounded by brackets "(" and ")".

Co-occurance Examples

Two simple examples:

Metro.* ~ Toronto.*
This rule will select positions in the text showing all occurrences of the word beginning with the letters "METRO" that doesn't have a word beginning with "TORONTO" nearby.
a & the
This rule will select all occurrences of "a" that occur within the given Config context in association with occurrences of "the".

TACTweb Query: FREQ Selection

Use the FREQ selection operator when you want to select words based on frequency of occurrence. When used as a source (e.g. "FREQ 5"), FREQ selects words based on their frequency in the entire text. When used as a refinement (e.g. "l.* ; FREQ 5", words are selected according to their number of occurrences in the given list.

You give numbers to use as criteria for frequency selection. The forms are:

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 and John Bradley. March 7, 1997