5. What can we search for?

Now that you have learned about the types of display that you can get when you search for a word, it is time to learn about the search capabilities of a text analysis environment like TACTweb. In this section we will look at what you can ask TACTweb to find in a text. We will look at a three of the common search strategies that are used in text analysis. They are: For more detailed information on the syntax of the TACTweb searching language (or query language) see Help on Query Syntax.

5.1 Searching for a List of Words

Often if you are following a theme through a text there is no single word that covers the theme, but a set of words. It is useful then to search for and display the results from a search for a list of words that you have prepared.

In the TACTweb query language you separate the words you are looking for with commas (","). So the query you would enter might look like this if you were looking for words that have to do with seasons:

spring, summer, fall, winter

5.2 Truncation Searching

Often the words we search for are similar, beginning with the same pattern of letters. For example, in the list above, you might want to look not only for "moon" but also for "moons" and "moonlight" without having to type in each variation of the word. Truncation searching allows you to search for all the words that begin with a pattern of letters.

In the TACTweb query language you use the period (".") to specify any character and the asterisk ("*") to tell the system to look for words with any number of following characters.

The query above might look like this if you were looking for words that have to do with the night sky:

star.*, moon.*, heaven.*
You can begin to see how a Word List display can help you identify the words that might make up a larger theme.

The ".*" special characters that we use for truncation searching are part of a language of Regular Expressions that you can use to select word forms based on letter patterns within that word. Click here for more on Regular Expressions.


5.3 Co-occurrence Searches

In the TACTweb environment you can search for the pairs of words to see where they occur together. This is called a Co-occurrence search. This allows you to further refine what you are searching for if you know more than one word in the passage you wanted. It also allows you to study how words are used together.

For example, if you were looking for a phrase where the words "moon" and "man" were used together you would type in the following:

     moon & man
The ampersand ("&") is the special character that tells TACTweb that you want the co-occurrence of the two words on either side.

Query Context

When searching for the co-occurrence of words you can specify how close you want the words to be for the system to flag it. This is called the query context. Setting the query context is a two step process much like setting the context for a Variable Context Display:

  1. First you choose the type of unit that you want to measure the context with. As in the choice for a Variable Context Display you can choose between lines, page.column, scene, speaker, words. Usually you would choose "words" to try to find only co-occurrences where the two words were close.

  2. Then you specify how many of this unit you want before and how many after the found occurrence. For example, you can specify that you want TACTweb to find co-occurrences that take place within 5 words of each other.
For more on Co-occurrence Searches click here.

Phrase Selection - An Alternative Approach

If you wanted to get a list of all the words that are directly before another word you can try searching for the following:
     >| moon
The special characters ">|" tells TACTweb to select all words that are right before the target pattern. If you try moon |> it will give you a list of all the words immediately after the target word.

This is one use of Phrase Selection searching. For more information click here for the Basic Help with the TACTweb Query Language.




[TACTweb Query Form] [Next][TACTweb Home Page]

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