Complex Searches 

Search Bucket

The Power of REGEXP

Compare Passages

Search Bucket 

The Search Bucket is a tool which combines the results of two or more searches. Click the 5 links below for examples which demonstrate how to use the  features of the BibleCrawler search bucket.

Combining multiple searches into a “fuzzy phrase search”

Expanding the search scope to chapter level

Combining searches across different databases

Using ‘remove” (logical NOT) to exclude search results

Word Frequency summary by chapter

Consolidating Multiple searches (fuzzy phrase search)

Example: What verses contain any combination of the words וּמָשְׁלֹו מִיָּם עַד־יָם וּמִנָּהָר עַד־אַפְסֵי־אָרֶץ?

Load Zech 9:10 (which is the verse that contains our target phrase). 
Perform a simple lemma search on each of the key words in the phrase (
מֹשֶׁל, יָם, נָהָר, אֶפֶס, and אֶרֶץ )

Click on “Copy to Bucket” on each of the results tabs for the searches on מֹשֶׁל, יָם, נָהָר, אֶפֶס, and אֶרֶץ .
Click on the “Bucket” tab, and click twice on the ‘Count’ column heading to re-sort so that the most number of matches ‘float to the top of the bucket’.

Only Zech 9:10 contains all 5 search terms, but Psalm 72:8 contains 4 of the 5.

Chapter-Level search scope

The previous search only located verses where the target terms were in the same verse.  We can perform the same search and consolidate by chapter to find chapters where some or all of the search terms occur (this is a ‘chapter fuzzy phrase search’).

With the results of the previous search still showing, go to the Bucket tab and click “Empty Bucket”. Then change the Bucket Settings to “Chapter” and “Unique” modes.

Click on each of the five results tabs in turn, and click “Copy to Bucket” on each.
Click on the “Bucket” tab, and click twice on the ‘Count’ column heading to re-sort so that the most number of matches ‘float to the top of the bucket’.

Notice that the chapter mode of the ‘fuzzy phrase search’ has identified Ps 98:3-9 as another possible match, (though on inspection it is clear that Ps 72:8 is a better match because the search terms are in closer proximity.

Combining searches across multiple databases

Example: What verses in the RSV have the word “heaven” when the Hebrew verse has the lemma “שָׁמַיִם”?

Using Gen 1:1, perform a Lemma search on HebLemma='שָׁמַיִם'.  Click “Copy to Bucket” on the results tab.

Perform a phrase search on the RSV for the text “heaven”. Click “Copy to Bucket” on the results tab.

 

Click the “Bucket” tab on the lower tab page area.  The search bucket count column shows 2 were MT שָׁמַיִם  and RSV “heaven” occur in the same verse.

Click on the “Count” column heading.  This will sort the results in ascending numerical order. Click again to re-sort in descending order (i.e. most number of matches to the top).  Metaphorically, the best results ‘float to the top of the bucket’.

 

Using ‘remove” (logical NOT) to exclude search results

Example: What verses in the RSV do NOT have the word “heaven” when the Hebrew verse has the lemma “שָׁמַיִם”?

If you not already done so, complete the preceding search on “שָׁמַיִם” and heaven. 
On the bucket tab, click “Empty Bucket” to clear that combination of results. 
Click on the tab that says    HebLemma='
שָׁמַיִם', and click “Copy to Bucket”.
Click on the tab that says    Versetext LIKE '%heaven%', and click “Remove from Bucket”.
Click on the ‘Bucket’ tab.  The search bucket now displays all 44 instances where the RSV translates “
שָׁמַיִם” with something other than ‘heaven’ (the majority of which are in the phrase “birds of the air”).

Word Frequency By Chapter

The Search Bucket can also be used to count instances of the same search term by chapter

Example: What chapters have a high concentration of the lemma הלל_2 “praise”?)

Go to the Bucket tab – select ‘Chapter’ and ‘All instances’ under Bucket Settings
Display Ps 150:1, and do a lemma search on the first word (search for HebLemma='
הלל_2').
Click ‘Copy to Bucket’.
Click the “Bucket” tab on the lower tab page area, and click twice on the “Count” column heading.

 The Power of REGEXP 

RegExp is short for “regular expression”, and is a very powerful pattern matching language. BibleCrawler has a special RegExp SearchBuilder that guides a user through the steps needed to create a RegExp search on any search field of any installed database.

Creating a RegExp search has 5 steps.
1) Select the Database to query
2) Select the search field (search fields appear once you choose a Database)
3) Add Element(s) to the RegExp search expression
4) ‘Build’ a RegExp – this creates a search expression that can be further edited.
5) Execute

Here is an example search that  finds all instances in the GNT of verbs which are perfect passive participles (the morphcode for this is XPP).
1) select the Database GNT
2) select the field  GNTmorphology
3) Select “Exact Match” and enter the code V  XPP... in the text box. (Note that there are two spaces between the V and the XPP).  Click “Add REGEXP element” to add this to the RegExp Search table
4) Click ‘Build Search Expression’.   This creates the Search statement - GrkMorphology REGEXP 'V XPP\.\.\.'
5) Click Execute.  This search finds 412 instances of a perfect passive participle.

Click on the links below for examples of RegExp Searches.

Hebrew III-Heh verbs in HebLex
Hebrew hollow roots (II – waw/yod) + wildcard morphology
Extend a Lemma search to add a RegExp wildcard Morphology

Hebrew III-Heh verbs
Example Query: List all the III-Heh verbs in the Hebrew Lexicon
Note: the RegExp search pattern needs to have three elements - [Any consonant][Any Consonant][
ה]

1. Select HebLex
2. Select Heblemma
3. Click  Any Hebrew Consonant, then click Add REGEXP Element
    Click  Any Hebrew Consonant, then click Add REGEXP Element
    Click  Exact Match, type in the character
ה  (or its betacode equivalent H), then click Add REGEXP Element
   (this will add the three elements to the search expression table. If you make a mistake, delete the row in the table and  re-add).
4. Click Build Search Expression
5. Click Execute


Hebrew hollow roots (II – waw/yod)

Example: list all ‘hollow roots’ with a 3rd person feminine plural (3fp) morphology in the MT.
This is similar to the last query, except that the middle radical of the Hebrew lemma can be either waw or yod, and the query is combined with a morphology wildcard query.

Note: this query will return no results if you have not installed the MT morphology add-on module.

Part A – hollow root (i.e., either waw or yod in the second root position)
1. Select MT
2. Select HebLemma
3. Click  Any Hebrew Consonant, then click Add REGEXP Element
    Click  Any Combination of one of these characters, type in
וי  (or the betacode equivalent for waw-yod =  WY), then click Add REGEXP Element
    Click Hebrew Consonant, then click Add REGEXP Element
    Click  Exact Match, type in the characters
וי  (or the betacode equivalent for waw-yod =  WY), then click Add REGEXP Element
   (this will add the three elements to the search expression table. If you make a mistake, delete the row in the table and  re-add).
4. Click Build Search Expression

DO NOT click Execute!  The RegExptab should look this this…



We now need to add the second part of the RegExp – the morphology search.

Part B – 3fp morphology  

1. Select HebLex
2. Select HebMorphology
3. Click  Exact Match, and type   v…3fp   then click Add REGEXP Element
4. Click Build Search Expression.  Note that the current search expression has been appended to the part A query.

HebLemma REGEXP '[)BGDHWZX+YKLMNS(PCQR#&$T)][וי]{1,2}[)BGDHWZX+YKLMNS(PCQR#&$T)]' AND HebMorphology REGEXP 'v\.\.3fp'

5. Click Execute

Extend a Lemma search to add a RegExp wildcard Morphology

The concept here is to start with a simple lemma search, then add a RegExp extension.

Type in Gen 1:1 in the BibleRef and Press <Enter>.  Click on the word
בָּרָא and select     Search for HebLemma='ברא_1'.  Use the mouse to highlight the phrase HebLemma='ברא_1' in the search box, and press Ctrl-C to copy this to the clipboard.

Go to Search Tools – Search Builder (RegExp), Click into the Search Expression text box, and press Ctrl –V (paste).

Now add the morphology wildcard to this lemma search

1. Select MT
2. Select HebMorphology
3. Click  Exact Match, and type   v..3..   then click Add REGEXP Element
4. Click Build Search Expression.  Note that the RegExp search has been appended to the existing query.
 5. Click Execute

 

Compare Passages (Hebrew or Greek) 

On the SearchTools menu are two options for Comparing Passages.

Compare Passages (Heb) compares any two passages in the MT to locate all words in common, and displays the passages with matched terms highlighted.

Compare Passages (Grk) compares any two passages in the GNT and/or the LXX to locate all words in common, and then displays the passages with matched terms highlighted.

Compare Passages (Heb) Example

Example: Compare Hab 2:20 and Zech 2:17 (= Zech 2:13 in EVV).

Enter Hab 2:20 as passage1 and Zech 2:17  as passage 2, then click Compare Passages.  Matching words are displayed in a table as follows.

Description: C:\Data\BibleCrawlerNew\help\complexsearches_files\image009.jpg

If you have the MT morphology module installed, common particles (HebMorphology = 'Pa','Po','Pp','Pc', or 'Pr') will be removed automatically.  

It is STRONGLY RECOMMENDED that you review this table before proceeding, and manually delete the rows for very common words.  If you do not do this, every article and conjunction will be highlighted in the search results, which will tend to obscure the more significant matches.  It will also make the passage display process MUCH slower.  To delete a row, click once in the cell in the left-most column, so that the row is highlighted in blue, then press the Delete key on your keyboard.

When you are satisfied that the word table contains only significant matches, click  Show Passages.

Description: C:\Data\BibleCrawlerNew\help\complexsearches_files\image010.jpg

Compare Passages (Grk) Example

Example: Compare Isa 45:23 and Philippians 2:10-11.

Enter Isa 45:23 as passage1 and Phil 2:10-11 as passage 2, then click Compare Passages.  Matching words are displayed in a table as follows.

Description: C:\Data\BibleCrawlerNew\help\complexsearches_files\image011.jpg

It is STRONGLY RECOMMENDED that you review this table before proceeding, and manually delete the rows for very common words.  If you do not do this, every article and conjunction will be highlighted in the search results, which will tend to obscure the more significant matches.  To delete a row, click once in the cell in the left-most column, so that the row is highlighted in blue (as shown above), then press the Delete key on your keyboard.

This is the same search table after common words have been removed.

Description: C:\Data\BibleCrawlerNew\help\complexsearches_files\image012.jpg

Now click on the Show Passages button.

Description: C:\Data\BibleCrawlerNew\help\complexsearches_files\image013.jpg