I want to find all instances of a certain word where another word does not occur before it. For example, I would like to find all instances of Jesus where it does not have the word "Lord" directly before. This search does not work as expected:
Jesus ANDNOT AFTER 1 WORD Lord
This finds verses where the words Jesus and Lord appear, but "Lord" does not appear before "Jesus". It does not find verses like Matt 1:1 where only Jesus appears.
How would I do this search?
You could probably do it using passage lists and subtraction of the results. Search tabs have command "Save as passage list" so you save the results as one PL for all occurrences of Jesus, another for all occurrences of Lord BEFORE 1 word Jesus, and then subtract the two lists by using the Merge > Intersection option in the PL tab.
It would miss any occurrence of Jesus alone without being preceded by Lord which occurred in a verse that ALSO has "Lord Jesus" in it somewhere else. But other than that it should work. Sorry I don't have time to work up a more detailed description of the procedure for you.
How to Ask for Help | Logos Wiki | My Machine Specs | My Blog
Harry Hahne:How would I do this search?
In English (Bible Search):
Jesus -"Lord Jesus"
In Greek (these Morph Searches has the same results):
lemma:Ἰησοῦς ANDNOT (lemma:κύριος BEFORE 1 WORD lemma:Ἰησοῦς)
lemma:Ἰησοῦς ANDNOT (lemma:κύριος BEFORE 1-2 WORDS lemma:Ἰησοῦς)
Noticed John 11:21 is found by these searches where "Jesus" immediately precedes "Lord". In English, Romans 10:9 is found in a variety of translations.
Keep Smiling
Logos Wiki Getting Started Logos 5 Beta
See if this gives you what you're looking for,,
"Jesus" ANDNOT "Lord Jesus"
Darrell: See if this gives you what you're looking for,, "Jesus" ANDNOT "Lord Jesus"
That is equivalent to what KS4J suggested: Jesus -"Lord Jesus"
The minus sign is shorthand for ANDNOT, and you don't need quotation marks around a single word that isn't a phrase.
My answer above was really dumb! I can't believe I didn't think of this, KS4J and Darrell. Thanks.
Rosie Perera:My answer above was really dumb! I can't believe I didn't think of this, KS4J and Darrell. Thanks.
For dumb ideas, glad to be among friends My initial thought was passage list subtraction, then noticed you had already replied. Later had an aha! moment when I realized that
Harry Hahne:Jesus where it does not have the word "Lord" directly before
is equivalent to excluding the phrase "Lord Jesus"; then wondered if minus would work with a phrase for searching (since minus works with dynamic collection rules). Personally learned minus worked in a Bible Search, but does not work with parenthesis in Morph Search so used ANDNOT.
I tried this, but it is not what I want. The problem is that if a verse has both "Jesus" and "Lord Jesus" it will not show up in the search results.
For example if you search for "life" ANDNOT "the life", it will not find 1 John 1:2, since both "life" and "the life" occur.
"jesus" ANDNOT "lord" = 762 verses ESV
ANDNOT "lord jesus" also takes away 'jesus' as well from the phrase the same as you are getting for the "the life", but there will be an instance or two where youy will still get Lord as well, but most are filtered - hey its not perfect, ya'kno..
Harry Hahne: Darrell: See if this gives you what you're looking for,, "Jesus" ANDNOT "Lord Jesus" I tried this, but it is not what I want. The problem is that if a verse has both "Jesus" and "Lord Jesus" it will not show up in the search results.
Back to passage list idea: could create a passage list for Bible Search:
then do a Bible Search for:
Jesus WITHIN 100 WORDS "Lord Jesus"
to find verses where both occur and add to passage list e.g. Acts 19:13 and 1 Peter 1:3 (doubt 1 Corinthians 5:4 nor 2 Thessalonians 1:12 would be added since "Lord Jesus" occurs twice in those verses):
Harry Hahne:For example if you search for "life" ANDNOT "the life", it will not find 1 John 1:2, since both "life" and "the life" occur.
Bit more challenging since Greek usage in 1 John 1:2 is literally "the life" and "the life the eternal" so both uses have the definite article. May try syntax searching later since noticed "the life" are in different primary clauses (PC):
Room4more:"jesus" ANDNOT "lord" = 762 verses ESV
The ANDNOT "lord" excludes Acts 19:13 and 1 Peter 1:3 from search results (since Lord does appear in those verses).
Keep Smiling 4 Jesus :): Harry Hahne:For example if you search for "life" ANDNOT "the life", it will not find 1 John 1:2, since both "life" and "the life" occur. Bit more challenging since Greek usage in 1 John 1:2 is literally "the life" and "the life the eternal" so both uses have the definite article. May try syntax searching later since noticed "the life" are in different primary clauses (PC):
Syntax search can find "the life" and "the life the eternal" separately. With definer being present, syntax search finds life with a definer (often eternal):
KS4J,
Well it is not a bug, I can duplicate the same results from another program that has absolutely nothing in common with L4, So it is what it is.........but still not sure why you would do a search like that, of course I have seen some others that I did not understand why....of cousre no one ever says why, they just say that it doesn't give them the results they seek...?
Here's a way you can find these -- but it may be more trouble than what you care to put out.
First, do a Bible search for "life" (display as "Aligned") and export the results to an Excel file. My search of ESV in the NT found 205 results in 186 vs.
In the Excel file, notice that there are several different columns, one labeled as "preceding context" and one labeled as "hit". Select the column labeled "preceding context" -- Don't select the column header (click in cell under "preceding context", hold shift key down, hit End key, hit Down key)
Copy this selection and paste into Notepad++, a free text editor that understands Regular Expressions.
Click Search -> Replace...
In the dialog, make sure the "Regular Expression" is selected. In the Find box, copy and paste this expression -- (.*)\s(.*\>)
In the Replace box type \2 -- Now Click Replace All
You should be left with the last word of each sentence. Copy these and go back to Excel. Click in the cell under "preceding context" and paste.
Now you can sort on this column and all the hits which have "the" before them will be together. Delete these lines and you have your final results. You can resort again on the Reference column to get Bible books together. I found 192 hits.
Sounds complicated, but once you've done it a time or two it really isn't that bad.
πάντα εἰς δόξαν θεοῦ ποιεῖτε
Harry Hahne: This finds verses where the words Jesus and Lord appear, but "Lord" does not appear before "Jesus". It does not find verses like Matt 1:1 where only Jesus appears. How would I do this search?
One option is a Syntax Search. Caveat: Greek sentences do not align with verse numbering: some verse numbers have more than one Greek sentence (e.g. 1 John 1:2) while some Greek sentences have more than one verse number(e.g. Ephesians 1:3-14 is one Greek sentence). Some word groups within one Greek sentence span verse numbers (e.g. Acts 1:1-2 and 2 Timothy 1:8-10)
First created syntax search to find word groups with "Lord Jesus" (with matching skip levels between word group and group along with highlighting words in search results):
that includes Acts 19:13 "Lord Jesus", followed by searching for word groups that do not have κύριος (Lord):
Acts 19:13 Ἰησοῦς (Jesus) is highlighted in a word group, which does not have "Lord Jesus"
The search results can be saved as a passage list so need to remember some verses have "Lord Jesus" in one word group with "Jesus" in a different word group: e.g. Acts 19:13 plus some word groups span verse numbers: e.g. Acts 1:1-2, 1 Timothy 2:5-6, 2 Timothy 1:8-10, 2 Timothy 1:9-10, Titus 1:1-3, Hebrews 3:1-2, Hebrews 10:19-20, and 1 Peter 1:1-2 (noticed 2 Timothy 1:8-10 has two occurrences of "Jesus" in different word groups so matching skip levels finds "Jesus" a couple times).
Gary O'Neal:Copy this selection and paste into Notepad++, a free text editor that understands Regular Expressions.
An alternative to Notepad++ is using Visual Basic for Applications (VBA) to expose Excel's regular expression support => http://www.dailydoseofexcel.com/archives/2005/08/13/pattern-matching/
Edit: VBA has InStrRev() so could search for last blank in "preceding context" that could return numeric position of last blank within text string (or 0 for not found).
A technical article about Office 2003 includes regular expression examples => http://msdn.microsoft.com/en-us/library/aa159903%28v=office.11%29.aspx
Word 2010 find and replace has wildcard (regular expression) option. Caveat: Word 2010 implementation has practical limits for regular expression matching since encountered some failures (expression too long) while formatting a personal book Bible for Logos 4 => American Standard Version 1901 - Personal Bible without Chapter and Verse #'s
Keep Smiling 4 Jesus :):
Just a quick check and noticed that this search doesn't return either Rom. 1:1 or 1:4. My 'complicated' search method above returned 862 hits and yours shows 827 so there's not many that are being missed.
Gary O'Neal:Just a quick check and noticed that this search doesn't return either Rom. 1:1 or 1:4. My 'complicated' search method above returned 862 hits and yours shows 827 so there's not many that are being missed.
Personally living and learning Romans 1:1-7 is one Greek sentence, which has one word group that spans Romans 1:1-6 that contains the lemma κύριος (Lord)
Observation: Romans 1:4 has Jesus Christ our Lord, which is a variation of "Lord Jesus" from genitive use of the Lord (of us = our) modifying Jesus and Christ.
Modified Syntax Search to find Acts 19:13 and Romans 1:1 (also learned Logos 4.5b on Mac lacks not symbol for visual display along with duplicating syntax search since was open and modified in two Logos 4.5b installations at the same time):
Keep Smiling 4 Jesus :):Syntax search can find "the life" and "the life the eternal" separately.
I am aware that syntax searches can do this type of search in Greek or Hebrew. But there are times I want to do this in English. Even for Greek and Hebrew, syntax searches are also time consuming to set up and it is easy to make a mistake without even knowing it.
Harry Hahne: Keep Smiling 4 Jesus :):Syntax search can find "the life" and "the life the eternal" separately. I am aware that syntax searches can do this type of search in Greek or Hebrew. But there are times I want to do this in English. Even for Greek and Hebrew, syntax searches are also time consuming to set up and it is easy to make a mistake without even knowing it.
Yes this may be true, but it gives KS4J something to do during the day…..
Concur syntax search can be time consuming to set up; personally had several attempts that found nothing (until changed vertical arrangement of lemma's). Also appreciate easy to make a mistake. Likewise learning that "is not present" has some nuances for syntax searching.
Thankful for many friendly forum discussions about Logos Bible Software: have learned a lot plus have a lot to learn (personally amazed at amount of learning this year).