39 The Graphical Search Engine (GSE) Tutorial

 

 

 GSE Tutorial

 

Some people learn better by doing. The Graphical Search Engine can be complex and intimidating so we provided a few step-by-step examples to help you get started.

 

Lesson 1: Getting familiar with the GSE components

Lesson 2: Building a simple query

Lesson 3: Building a GSE query from the Command Line

Lesson 4: Browsing the results of a GSE query and saving a query to disk

Lesson 5: Loading a query from disk and specifying word order

Lesson 6: Saving query results, reusing the results in another query

Lesson 7: Searching Morphology Using the GSE

Lesson 8: Specifying agreement

 


Lesson 1: Getting familiar with the GSE components

 

The first step in becoming familiar with the Graphical Search Engine is to open a GSE window. To do this proceed as follows:

 

Make sure no text is on the Command Line. You can clear it by clicking on it with the left mouse button and pressing <Esc>. The reason for doing this is we don't want the GSE to be initialized with the Command Line data.

To open a GSE query construction window, click on the  button below the Command Line and select "Graphical Search Engine". Alternatively you can select Search | Graphical Search Engine from the main menu.

 

A GSE window with an empty word box and an empty merge box will be opened up. It will look something like the picture on the left.

Using the GSE to do searches is a matter of creating different kinds of boxes and drawing various kinds of links between them.

 

   You can create three different kinds of boxes, namely word boxes, merge boxes, and agreement boxes. To create a new box all you have to do is click on one of these buttons.

 

   There are also three buttons which can be used to set the mouse mode. This determines mouse behavior as you work with the GSE screen. You can select three modes: (1) selection and dragging mode, (2) word connect mode and (3) ordering mode.

 

 

 

The status area at the bottom of the GSE screen shows you which options are activated. The options can be toggled by double-clicking inside the beveled area.

 

We're done with this window, so close it and proceed to the next lesson.

 


Lesson 2: Building a simple query

 

Now let's build a simple query. Suppose we want to find all verses where the words "faith" and "love" and "the" appear in one verse in the KJV version. This is equivalent to the Command Line query <.faith love the> . The building blocks of all GSE queries are the word box and the merge box. Each word box represents a word or set of words in the query. In this example, we will create one word box for each of the three words. A merge box tells the GSE how you want to combine a set of word boxes. It can be thought of as equivalent to the familiar Boolean operator. A merge box can represent an AND operation, or an OR operation, or a NOT operation. If a set of word boxes are to be AND-ed together, we would connect them to an AND merge box using lines. The final query will look like the idealized picture above.

 

To construct the query proceed as follows:

 

1.       On the Command Line, switch to KJV. Make sure the Command Line is empty.

2.       Open a new GSE query window as you did in the previous lesson (click on the  button). The window will open with one empty word box and one empty merge box.

3.       We need a word box for each word in the query. Press the  button until there are three word boxes on the screen.

4.       Click on the recessed top half of one of the word boxes and wait. When you click on the recessed area make sure the mouse is motionless. Otherwise the text entry area will not open. A white text-entry area will appear.

5.       Type in the word "faith" and press <Enter>.

6.       In the next word box, click on the recessed top half and wait. A text-entry area will appear.

7.       Type in the word "love" and press <Enter>.

8.       In the last word box, click on the recessed top half and wait. A text-entry area will appear.

9.       Type in the word "the" and press <Enter>.

10.    Now we want to connect these word boxes to the merge box (the one with the AND label). Click on the  button to switch the mouse to Connect Mode.

11.    To connect the "faith" word box to the merge box, click on the word box with the left mouse button. While holding down the left mouse button, drag the mouse pointer until it is over the merge box. Release the mouse button. The word box is now connected to the merge box.

12.    Connect the other two word boxes to the merge box. The query window should look like the final Browse Window shown at the beginning of this lesson.

13.    You can move the objects around the screen by switching to selection mode. To do this click on the  button or select | Mode | Select |  from the GSE menu. Then, to move objects around, just click and hold with the left mouse button while you drag the objects.

14.    Now we're ready to run the query. Press the  button. The search will be run and the results will be copied to the Search Window.

15.    Now close the query window. When asked if you want to save the query, say "no".

 


Lesson 3: Building a GSE query from the Command Line

 

In this lesson, we'll build the same query used in lesson 2 using the Search Window Command Line. You'll find this feature helpful as a starting point for building complex queries in the GSE. Any search that can be entered on the Command Line can be exported to the GSE Query Window simply by entering the query on the Command Line and opening the GSE Window. Proceed as follows:

 

1.       Switch to the KJV on the Command Line.

2.       Type ".faith love the", but do not press <Enter>.

3.       Click on the  button below the Command Line and select "Graphical Search Engine".

4.       A GSE window opens, with the query specified on the Command Line. The exported query may not always be formatted to suit your tastes but you can drag the objects around until they look the way you want.

5.       You can now run the query. (Select | Query | Run |  from the menu, or press the  button.

 

Now let's learn about how to save and load queries from disk.

 


Lesson 4: Browsing the results of a GSE query and saving a query to disk

 

GSE searches can be saved to disk and loaded at a later time to be edited or run again. To do that, proceed as follows:

 

1.       Starting with the query window from lesson 3, run the query.

2.       The results of the query will appear in the Search Window, and you can click on verses in the Search Window Results Verse List Box to view them. You can display the search statistics in the Search Statistics Tab in the Analysis Window.

3.       Now, let's save this query to disk.

4.       Select | File | Save |  from the GSE menu or press the  button.

5.       Enter "Tutor1" as the filename and press the Save button.

6.       Now close the query window.


Lesson 5: Loading a query from disk and specifying word order

 

In this lesson, we'll load a query from disk and specify word ordering.

 

1.       Open a GSE query window (if one isn't already open).

2.       Select | File | Open |  from the menu, or press the  button.

3.       Go to the directory where "Tutor1" was saved in the last lesson and open it. The query you saved in the last lesson will now be loaded in the GSE window.

 

The last search that we did found all verses with all three words, irrespective of the order in which they occurred. But we can easily specify the order in which they must occur for a match. This is equivalent to a Command Line phrase search. Specifically, what we will do is create a query that searches for verses where "faith" appears before "love" with at most four words between them, and where the word "the" also appears somewhere in the verse. This query will be equivalent to the Command Line query <('faith *4 love).(.the)>. The final query will look like this picture:

 

To construct this query load the "Tutor1" example as directed above and then proceed as follows:

 

1.       Select | Mode | Order and proximity |  from the menu or click the  button. This sets the mouse mode to specify word ordering. By connecting word boxes in this mode, you specify their positional ordering.

2.       Using the mouse, left-click on the "faith" word box and while holding down the mouse button, drag the mouse pointer over the "love" word box. Release the mouse button and the two word boxes will be connected with an ordering connection. Note that the order in which you make the connection is important.

3.       Double-click on the ordering box that appears between the two word boxes (the one that reads "exactly 0").

4.       In the window that opens click on the "At most" radio button, and enter "4" in the text entry box next to it.

5.       Click on the "Ok" button and then click on "Go" to run the query.

6.       The query window now will look like the final query window shown at the beginning of this lesson.

7.       To save the query, select | File | Save as |  from the menu. Enter "Tutor2" as the filename.

8.       When you are done, close the query window.

 


Lesson 6: Saving query results, reusing the results in another query

 

In this lesson we will save the results of a query (a list of verses), and then plug them back into another query. In a second query, we'll search the results of the <.faith love the> query (which was saved as "Tutor1") for all occurrences of the word "Lord". The final query will look something like the picture below.

 

 To construct the query proceed as follows:

 

1.        Open a new GSE query window and load "Tutor1".

2.       Run the query, and select File | Save Verse List to File. Name the file "Results1".

3.       Close the query Browse Window. Close the query window.

 

Now we will build the second query. In this query we will plug in the results of our first query to form a query that searches the results of the first query for all occurrences of the word "lord".

 

1.        On the Command Line, switch to KJV, and type the following query: <.lord> . Do not press <Enter>.

2.       Open a new GSE query window (you can have more than one open). It will open initialized to the search you just typed on the Command Line.

3.       Add a new word box.

4.       Double-click the word box, and a word box window will open.

5.       In the word box window select the "Verse  list from disk" radio button, then click browse and find the "Results1" file that you created at the beginning of this lesson.

6.       Click the "Ok" button to close this window.

7.       Switch the mouse to connect mode (select | Mode | Connect |  from the menu, or press the  button, or right click with the mouse in the query window and select "Connect" from the context menu).

8.       Connect the word box to the merge box.

9.       Save the query as "Tutor3".

10.    Now you're ready to run the query. Click the "go" button. The Query Window will look something like the picture at the beginning of this lesson.

11.    You can now close the Query Window and proceed to the next lesson.

 


Lesson 7: Searching Morphology Using the GSE

 

Many of the Graphical Search Engine features are designed specifically for morphological analysis of the Greek and Hebrew texts of the Bible. BibleWorks has a number of morphological databases. These are just Bible versions in which each word has been replaced by a construction that contains the lemma and parsing information for the word. You search these databases just like you search any other versions, but the words you look up are constructs made up of a lemma and some appended codes that specify the morphology (parsing information). The only hard part is understanding and using the parsing codes. Fortunately the GSE uses the Command Line Morphology Help. The purpose of this lesson is to introduce you to the GSE Morphology Assistant. We will build a query that finds all verses in the GNM version with the following pattern:

 

any adjective in the nominative case

followed by any noun in the nominative case

followed by any verb

followed by any adjective in the accusative case

followed by any noun in the accusative case

 

In addition, we will allow up to two words between each of these specified words. The final result will look something like the picture below.

 

 

Now we will build the query. Proceed as follows:

 

1.       Switch to GNM at the Command Line.

2.       Open a new GSE query window.

3.       Add word boxes until there are five word boxes in the window.

4.       Connect each word box to the merge box.

5.       Switch to ordering mode and make ordering connections between the word boxes as shown in the illustration at the beginning of the lesson. Make sure the arrows all point in the right direction.

6.       For each ordering connection box, double-click the ordering connection box and click "At most", specifying 2 words.

 

Now we are ready to specify the morphology for an adjective in the nominative case. Proceed as follows:

 

1.       Double-click the first word box in the ordering.

2.       In the word box window that opens, enter * in the "Word" entry space (the wildcard matches any lemma).

3.       Now we are ready to specify the morphology. Enter a @ in the morphology entry space.

4.       This opens the Command Line Morphology Help. Choose the appropriate letters for "adjective" as part of speech, "any code" for type of adjective, "any code" for the subtype, and "nominative" for the case. After that, enter a asterisk ('*') to complete the code and close the Morphology Help.

5.       The morphology string  @a??n*  is now in the morphology entry area. Click "OK" to close the word box window.

6.       In the query window, the word box for the first word now reads
GNM *@a??n*. If you had already known the morphology codes, you could have simply clicked on the word box and typed in the lemma@morphology string.

7.       Now, double-click on the remaining four words, and in the word box window enter the appropriate codes to match the window shown at the beginning of the lesson.

8.       Save the query as "Tutor4". Now you are ready to run the query!

9.       Close the query window when you are finished.

 

Experienced users will note that this relatively simple query could have been constructed by typing

 

 '*@a??n* *2 *@n?n* *2 *@v* *2 *@a??a* *2 *@n?a*

 

on the Search Window Command Line and then opening a GSE query window.

 

Lesson 8: Specifying agreement

 

Now that you are familiar with the GSE query window, we can build a more complicated query using agreement. We will build a query using the "Tutor4" query built in the last lesson, but we will specify that the first noun and adjective must agree in gender and number. We'll also specify that the last adjective and noun must agree with each other in gender and number. Note that this means the two nouns may or may not agree in gender or number. The final query will look something like the idealized picture below.

 

 

1.       Open a new GSE query window and load "Tutor4".

2.       Add an agreement box (select | Insert | Agreement box |  from the menu or press the  button).

3.       With the mouse in Connect mode, connect the "*@a??n*" word box to the agreement box.

4.       Connect the "*@n?n*" word box to the agreement box.

5.       Double-click the agreement box. Select "Gender" and "Number" and then click "OK".

6.       Now do the same thing for the second adjective and second noun, so that your query matches the one in the illustration shown at the beginning of the lesson.

7.       Select | File | Save as |  from the menu and save this query as "Tutor5".

8.       Now you're ready to run the query!

This concludes the introductory tutorials.