PDA

View Full Version : Another (seemingly) simple query



vr8ce
01-29-2006, 09:47 PM
Just when I think I grok the command line, I come across another seemingly simple query that I can't seem to handle.

I want verses with Christ but not Jesus and not "the Christ". I started with just the first two, which is easy: .christ !jesus But then I tried adding on the last one, and I can't get there. I've tried several permutations of command lines, but none of them even parse, so I'm obviously far off.

Can an expert or three set me straight and show me the error of my ways? Command line only, please; I really don't grok the GSE. :)

Thanks!

Vince

schvan
01-30-2006, 05:44 AM
(christ)!(jesus)!('the christ)

or more tightly:

('!the christ)!(jesus)

Michael Hanel
01-30-2006, 08:49 AM
(christ).(!jesus)!('the christ)

Anytime you do a NOT query you are going to get strange highlighting, but this seems to get you the verse you want.

Shouldn't it be (christ)!(jesus)!('the christ) instead of what you wrote? (which is the same as schvan said...)

vr8ce
01-31-2006, 12:47 AM
Shouldn't it be (christ)!(jesus)!('the christ) instead of what you wrote? (which is the same as schvan said...)
Several interesting things here. First, I don't see Joe's message in this thread anywhere, so where did your quote come from (idle curiousity). Second, you are correct, the above does the right thing, Joe's includes "Jesus Christ" references, which I didn't want.

Third, and most important, how did you know how to do that? :) Seriously, I didn't know you could have a query without one of the "starting" characters (./'), and there's not a single example in the Help that shows that (in either BW6's or BW7's help file). The form for a single not has a space and a leading ., i.e.
.jesus !christ
Given that, I expected
.jesus !christ !('the christ)
to be close. There's no way I would have known or guessed to do what you did.

MikeT/MikeB, if you've kept up with this thread, it would be nice to have a few examples of this kind in the Help. I know you can't include every type of search, but this is a completely different format than any of those in the Help (at least that I can find), so there's no way for us to "intuit" doing this.

Thanks very much everyone for the examples!

Vince

schvan
01-31-2006, 03:56 AM
Vince,

Page 114 of the BW6 manual has a list of helpful examples (or search for "Command Line Examples" in the help file for the same list). Also skim through all of chapter 3 (either hardcopy or online) to learn the basics.

I think all you were missing was the use of parentheses to combine search results.

For example, the idea you suggested: .christ !jesus !('the christ) is correct, but you just needed to put brackets around the first two. I believe (.christ !jesus) !('the christ) would have returned the same list of verses (although there is a technical difference between the searches). That command tells BW to first find all of the verses with Christ but not Jesus (as your first message pointed out). The last part tells BW to exclude all of the verses from that sublist that have 'the Christ' in them. You essentially had it.

And don't make too much of the missing period. You can leave off leading periods when separating a search in parentheses. Again, Chapter 3 does show examples of this.

For example, I believe (christ)!(jesus)!('the christ) is identical to
(.christ)!(.jesus)!('the christ)

In sum, just skim through Chapter 3 and I think you will find what you need.

Stephen

P.S. You might also find it useful to use the Command Line Assistant to help you build these search commands.

Joe Fleener
01-31-2006, 05:12 AM
Several interesting things here. First, I don't see Joe's message in this thread anywhere, so where did your quote come from (idle curiousity). Second, you are correct, the above does the right thing, Joe's includes "Jesus Christ" references, which I didn't want.

Vince

Sorry Vince - my bad.

After Michael pointed out the error of my ways, I deleted my post. When I deleted it, it asked me a reason for deleting so I thought it would leave some kind of "mark" where my original post was with the reason.

Only after clicking delete did I realize that it was gone, with no "mark."

Oops.

Everything seems to make sense now!

An yes, in the BW 6.0 help file under "Doing Word, Phrase, and Reference Searches" - "The Command Line (CL)" - "Command Line Examples" There are similar examples for English, Greek, and Hebrew.

vr8ce
02-01-2006, 09:15 AM
Page 114 of the BW6 manual has a list of helpful examples (or search for "Command Line Examples" in the help file for the same list). Also skim through all of chapter 3 (either hardcopy or online) to learn the basics. Thanks, but I checked both the BW6 and BW7 help before I posted. There are no examples in either place like this. First, none of the examples on 114-115 are missing the leading character. All the examples have one, even if its in parentheses; sometimes, they have the leading character both in *and* out of parentheses. Second, none of them combine an or search with a phrase search, which was the difficult (syntax wise) part of this, at least for me.


I think all you were missing was the use of parentheses to combine search results.

For example, the idea you suggested: .christ !jesus !('the christ) is correct, but you just needed to put brackets around the first two.

I believe (.christ !jesus) !('the christ) would have returned the same list of verses (although there is a technical difference between the searches). That's part of the reason I think this example (or one like it) would be very useful in the help. Visually (highlighting-wise), (christ)!(jesus)!('the christ) is quite a bit different than (christ)(!jesus)!('the christ). I prefer the former; if possible, I only want to see highlighted what I was searching for.

Also, the ! can't go inside the parentheses for the phrase search. It will do the search, but it gives you an error that it can't find 'the, and the results aren't correct (i.e. don't match the other two queries, it's probably correct for that syntax). So, that's another key point, and another reason to have one of these in the help.


And don't make too much of the missing period. You can leave off leading periods when separating a search in parentheses. Again, Chapter 3 does show examples of this. As I've already indicated, no it doesn't. But perhaps we can get Mike to add one or two.


P.S. You might also find it useful to use the Command Line Assistant to help you build these search commands. I tried that also. I tried it several different ways, but I never got it to build a good query. It will probably will build one, but the fact I did it five or six different ways and didn't get one just means the CL isn't going to save me any time on queries like this. :)

Thanks very much again for your help. I've added an example to my manual. :)

Vince

vr8ce
02-01-2006, 09:21 AM
Sorry Vince - my bad. No problem, I found your reply on the other list. :)


An yes, in the BW 6.0 help file under "Doing Word, Phrase, and Reference Searches" - "The Command Line (CL)" - "Command Line Examples" There are similar examples for English, Greek, and Hebrew. Yes, schvan said that too, but it isn't true. The key here (for me) is the phrase, which requires a very particular syntax for both the or and the phrase, and the difference between including the or's in the parentheses as opposed to out (highlighting just the match vs. the entire verse). See my other reply for more details.

Perhaps it's just that you two are a whole lot smarter than me (well, actually, that's a given), but there's no way for me to intuit from the examples in the manual to this query. I did read the manual, I did look at both the BW6 and BW7 help, and it didn't help me. I'm glad you both figured it out, so you could help me. :)

Thanks again!

Dale A. Brueggemann
02-01-2006, 12:01 PM
Actually, a root problem on this discussion seems to be that BW doesn't implement a logical boolean hierarchy. One would think the search would be as follows:

christ ANDNOT (jesus OR "the christ")
So you would expect that you would enter something like:

.christ !(/(jesus)('the christ))
Of course that also brings up the question of the very syntax that incorporates punctuation marks rather than more immediately clear boolean operators.

This is one of the things I really miss from Accordance--along with a much more intuitive graphics search function than the Advance Search Engine of BW. I find myself trying to figure it out on the command line then exporting to the ASE just to see what it would look like there. I think that says loads about the non-intuitive ASE.

MTan
02-02-2006, 10:28 AM
Our Tech Support Director Charlie ("CharlieBeans") whipped this up (attached). It shows how to do negated phrases in the ASE/GSE. It finds all verses with the word "christ", but not the word "jesus" and not the phrase "the christ".

Hope that helps!
Michael

Ruben Gomez
02-02-2006, 12:09 PM
Actually, a root problem on this discussion seems to be that BW doesn't implement a logical boolean hierarchy. One would think the search would be as follows:
christ ANDNOT (jesus OR "the christ")
So you would expect that you would enter something like:
.christ !(/(jesus)('the christ))
Of course that also brings up the question of the very syntax that incorporates punctuation marks rather than more immediately clear boolean operators.
Dale,

I think you hit a very important point here. Neither of us have invented Boolean logic. It's been there for a loooong time. However, different Bible programs apply it in different ways. This certainly creates some confusion and makes the learning curve somewhat steeper. As for the syntax, I think the problem lies in the apparent arbitrary nature of the Command Line's search syntax. If it were to follow standard regular expressions searches it would be easier, I guess (at least for those already familiar with this widely used syntax).

What I mean is that using the current system of periods, slashes and so on seems to be considerable less intuitive than using the Boolean operators themselves (even though you can get context help when you're building your search). Hope this makes it clearer.

Just thinking aloud,

Rubén Gómez