All punctuation is completely discarded at this level.
When a word is typed in a Search Phrase, we simply find that word in the
concordance and see what indexes it appears at in the text. In the above example,
if the user types “the”, we would find that we have indexes 2, 6, and 9.
Using this list, it simply adds ‘1’ to those indexes, which in this example gives 3, 7,
and 10, as that will be the position of the next word. It then looks in the inverse
mapping and sees what words are at those positions. In this example: beginning,
Once it has this list, it alphabetizes them and removes duplicates, and presents
that in the drop list as the possible next words for the phrase you are typing.
There is no guessing as to what comes next. By the time you’ve finished typing,
you know if your word or phrase is found – instantly. It even automatically
knows how many times it’s found, because the number of indexes that is found is
the number of occurrences. It’s that easy.
When you have multiple phrases and have the Search Results restricted to a
Search Scope, it simply looks for the intersection of results by converting these
Normalized Indexes into Relative (Book, Chapter, Verse, Word) Indexes, masking
off the numbers based on the Search Scope, and compares them to see if they are
equal. If they are, it knows that they are found together in the same Search Scope.
For the actual text rendering, the database contains a template of the punctuation
symbols, word position, and markup delimiters (i.e. red-letter, italics, divine
names, pilcrow characters, etc) for the entire King James Bible text verse-by-verse.
That template is parsed and rendered in the Scripture Browser and the Search
Results Verse Preview Mode as Rich Text by converting the markup tags for red-
letter, italics, etc, into HTML and inserting the words for that verse's position.
To do all of the index conversion and calculation magic, the database contains
complete Book, Chapter, Verse, and Word counts at all levels – Testament, Book,
Chapter, and Verse. Using these, it can quickly calculate when given an arbitrary
Word number (or a Normalized Index within the Bible) what the Relative Index or
Book, Chapter, Verse, Word Reference is, and vice versa.
This special way of searching by word is unique to King James Pure Bible
Search and is the very reason why this program was written when there are
already so many Bible Search programs already available.
(*) Note: Version 1 of KJPBS had 12808 Unique Words and Version 2 had 12814
instead of 12838 due to differences in Word Decomposition (see
for more details) and the addition of Colophon and Superscription searches.