Contents - Index - Previous - Next


Phrase searching


A Phrase search lets you make a Fast Concordance which keeps all instances of the phrases you specify, rejecting all other words.

To enter phrases, go to the Text menu and choose Configure Phrase search, or open the Make Fast Concordance dialog and press the Edit button next to Phrases.

To make your concordance, open the Make Fast Concordance dialog if it is not already open (go to the File menu and choose Make Fast Concordance from Files or Make Fast Concordance from Clipboard.)  In the Fast Concordance dialog, look at Word Selection Method and ensure Phrases is selected.  Then press the Make Fast Concordance button.

You can enter up to six phrases. Each phrase must be more than one word and can be up to five words long.  There is a separate edit box for each of the five words: don't enter more than one word in any individual edit box.  

If you enter a 'phrase' which is only one word long, it will be ignored. (To search for any number of single words, use the Pick List.)  A phrase where the first (leftmost) edit box is empty will also be ignored.

Words may include the pattern-matching symbols (wildcards)  ?, standing for any one letter, and * , standing for any number of any letters.

Phrase searching provides some of the functionality of regular expressions. Phrase searching is less powerful but easier to use.


Example:

If you make a Fast Concordance to the installed sample file Demo4.txt, selecting phrases, having defined the phrase 

the m* *

the results will show the following phrases in their contexts:
 
the Mathematicks, useful
the Manners and
the Mercy of
the meantime, I

plus five more such phrases.  

(This example assumes that Text -> Special -> Treat upper and lower case separately is not selected.  If it is, you will see a different selection of phrases.)

Hints and Tips
  • When you make a concordance to phrases which include wildcards, the Headword display shows the pattern (including wildcards), and the actual phrase matched is shown in the Context View. 
  • It is best to choose the Centred Context View when working with phrases.
  • If a phrase occurs split between two lines in your source text, it will not appear in full in the Context View if you have chosen the Context Style 'Actual Line'.  In this case you may wish to choose the Context Style 'Selected Length' instead.
  • When using phrases, the option to analyse characters instead of words (Text -> Special) is ignored.
  • If you define a phrase which contains the same elements as another defined phrase, then the order in which they are declared will affect the results.  For example, using the sample file Demo4.txt, try defining the two phrases

    the m* *
    the * of *

    The file happens to contain the expression 'the Mercy of the Waves'.  Here, the first pattern would match 'The Mercy of' and the second pattern would match 'The Mercy of the'.  The expression in the text will be matched only once, and will appear under whichever pattern is declared first in the Phrases dialog.  It follows that if you need accurate counts of phrases, you should declare phrases which do not 'overlap'.

    See also:  
    Proximity searching
    Make Fast Concordance