PDA

View Full Version : Enabling hit counting in the command line



DavidR
01-15-2012, 01:13 PM
I'm looking for all the occurrences of "right," "righteous," and "righteousness" (but not "right hand") in the Psalms. On the command line, I enter the following search term: ('right*)!('hand). This returns a result of 126 verses with (according to the figure at the bottom of the Search Window) 131 hits. But in the Stats tab of the Analysis Window, I can only get verse counts, not hit counts. When I try to get a hit count, I get this message:

"When this search was performed, only verses were counted. To count matches, redo the search as a phrase search, or enable hit counting in the GSE or Command Line. Note that stats generated from the USE Tab do not count matches (for performance reasons)."

But how do I "enable hit counting in the ... Command Line"? In Command Line Search Options, I have "Always compute hits for command line searches" checked. It doesn't matter, though, whether I have that on or off, or whether I have "Include NOTs in Search Window hits" or "Compute Search Window hits by permutation" turned on or off. I always get the above message.

I have BW 9, but this also happened in v. 8 and (I think) earlier versions as well. Is there any way to get the Stats tab to show hit-related statistics with this type of search?

J Kendall
01-16-2012, 04:47 AM
David,

You need to set this up as a phrase search. If you use 'right* !hand, hit counting will work.

John
--
John Kendall
Cardiff
Wales

DavidR
01-16-2012, 09:28 AM
You need to set this up as a phrase search. If you use 'right* !hand, hit counting will work.


I'm afraid this doesn't work for me. I did this search (even copied and pasted from your message to the command line), and still couldn't get any hit-related stats; I just got the same message as before.

I wasn't aware that this form of search, without the parentheses, was possible. There's always more to learn about BibleWorks, so thanks for this example. But it still tells me that the search is only counting verses, not matches.

In fact, I find that with even the simplest kind of search (I've tried 'right, .right, and ;right), I get this same message when I try to get hit-related statistics in the Stats tab. It's not clear to me what the message means by a "phrase search." I would have thought that this was a search using ' at the beginning of the search term. But neither that nor any other form of search that I can figure out gives me anything but verse statistics. No hit stats, just the mysterious message.

J Kendall
01-16-2012, 09:45 AM
David,

I'm completely puzzled. It works for me, as you can see below.

John

944

DavidR
01-16-2012, 10:04 AM
Thanks. Good to know that it does work somehow, but now even more frustrating. And as I say, I've had this problem back through a couple of versions of BW. Anyone from BW staff able to offer a thought? John, can you let me know how you have your Command Line Search Options set up?

J Kendall
01-16-2012, 10:11 AM
John, can you let me know how you have your Command Line Search Options set up?

See the screengrab below.

John

945

DavidR
01-16-2012, 10:24 AM
Thanks once again, John. I duplicated your settings and tried several searches, with the same results as before. There must be some other setting somewhere that I'm missing. I hope some of the BW staff may be able to enlighten me.

It must be near tea time in Cardiff. Thanks for your help, and enjoy your evening! :)

Jim Wert
01-20-2012, 01:20 PM
I'm afraid this doesn't work for me. I did this search (even copied and pasted from your message to the command line), and still couldn't get any hit-related stats; I just got the same message as before.

I wasn't aware that this form of search, without the parentheses, was possible. There's always more to learn about BibleWorks, so thanks for this example. But it still tells me that the search is only counting verses, not matches.

In fact, I find that with even the simplest kind of search (I've tried 'right, .right, and ;right), I get this same message when I try to get hit-related statistics in the Stats tab. It's not clear to me what the message means by a "phrase search." I would have thought that this was a search using ' at the beginning of the search term. But neither that nor any other form of search that I can figure out gives me anything but verse statistics. No hit stats, just the mysterious message.

David, when I first read this thread I tried to replicate your results, and could not. I got the same results that John got. But today when I went into BW(9) the results of that investigation were showing, with your frustrating message. I tried simple searches, and still got the message.
Now the BW command line is a very complex critter, since it has to decide whether the user is setting the search version, a display version, limits, or doing one of a bunch of different kinds of searches (I've probably missed at least several of the things that can be done on the command line). So when BW starts to get confused by commands on the command line, I suspect that some of the working storage used to handle commands has gotten messed up (likely some pointers or indices got clobbered). A frequently recommended cure is to delete your ini file, which seems to force BW to reinitialize a bunch of stuff. But then you lose all your settings, and, at least in BW8 if you have BW do the deletion, it also gets rid of all your context files, so you lose all of those neat tabs on the left. (I haven't tried ini deletion in BW9 because I've been able to get around it another way so far.)
So I try to get BW9 to clean itself up thusly:

Hold down shift key, click on BW9 icon, holding shift until the "BibleWorks Trouple-Shooting Options" window shows up.
Under "Option 1" select "Rebuild Version Data" (This is to get BW to reinitialize stuff without messing up any settings I don't want clobbered. It is the least invasive of the available options.)
Click on "Perform the selected options and run BibleWorks".

After I did this, I could again replicate John's results.

For the following, I did the searches in NRS, with limit Psa

I would like to point out that John's query was a little different than yours.

Your original query "('right*)!('hand)", if I understand correctly, will give you all verses that have "right*" except for the verses that also have "hand" somewhere in the verse. Thus you would miss a verse if it said something like: "The righteousness ... hand" (According to the "Main Window Status Bar" this query found 126 verses, 1 form, and 131 hits. The stats look right, except for the number of form(s)) This query missed Psa 45:4, Psa 118:15.

John's query "'right* !hand" is looking for a two word phrase, the second word of which is anything other than "hand". If "right*" is the last word of a verse, it will not be found. (According to the "Main Window Status Bar" this query found 116 verses, 3 forms, and 120 hits.) This query missed Ps. 1:5, Ps. 14:5, Ps. 17:2, Ps. 37:17 ,Ps. 69:28, Ps. 72:3, Ps. 89:16, Ps. 109:6, Ps. 112:4, Ps. 119:172, Ps. 143:1, Ps. 145:7, Ps. 146:8
Note: this query found Psa 144:11 "right hands", while David's and mine did not. Seems odd to me. Suggests that negation within parentheses has in implied * on the end.

The following query is like David's in that it would exclude any verse with the phrase "right hand" even if there was another "right*" in the verse. But it would include verses that have "righteous hand" or "right ... hand".
"('right*)!('right hand)".
(The results, and stats, are the same as for David's query, so the constructions I was allowing for don't occur in NRS Psalms.)

The good thing about John's search is that the hit statistics are right.
Both your (David's) and my queries display the statistics saying that it is displaying the hit count, when it is actually the verse count.

The disheartening thing about all this is that I haven't come up with a query that will do what you want.
(By the way, I found the Word List Manager exceedingly useful in doing the comparisons).
(Ain't BibleWorks fun?)

--Jim

DavidR
01-20-2012, 05:02 PM
Jim,

Thanks for your ruminations on the search string itself. It looks like it would be difficult to eliminate "right hand" without eliminating verses that have both that and, say, "righteous," such as Ps 118:15. There's probably a way, and I can work on it later on.

ERRONEOUS: I tried doing Rebuild Version Data (thanks for that nifty trick!), to no avail. I still got the same old "only verses were counted" message when I tried to get hit stats.

I'll probably have to try deleting the .ini file (unless I hear something more appealing from BW staff, to whom I've submitted a support request by e-mail). I do keep track of certain important customizations, such as Favorites, in a file separate from the .ini file, so as to be able to copy them in manually when I upgrade to a new version. One of my few complaints about BW is that it does not (as many programs do) preserve user customizations from .ini files during upgrades.

NEWS FLASH! I just realized that when I tried this before I made the rather stupid mistake of doing it while BW was still running, so of course it didn't work. I tried it without BW already running, and it worked. I now get hit statistics. Thanks!

I do note that in the more complex search (with two phrases joined by !), although the line below the search results list says, e.g., 126 verses, 1 form, 131 hits, the hit stats only indicate 126 hits. But with a simpler search term, I do get the accurate number of hits as distinct from verses.

DavidR
01-31-2012, 06:01 PM
I do note that in the more complex search (with two phrases joined by !), although the line below the search results list says, e.g., 126 verses, 1 form, 131 hits, the hit stats only indicate 126 hits. But with a simpler search term, I do get the accurate number of hits as distinct from verses.


Just to finish off this thread, I e-mailed BW customer support, and got a good response from them, including a Graphical Search Engine search file that did the job; and an explanation that "the reason why the Command Line search does not show the stats in the Stats Tab is that the Stats Tab only shows verses for complex queries run on the Command Line. The GSE does not have this restriction, so running a GSE search will yield the proper hits and verses." This explains why the complex search still only showed the number of verses, even if it called them "hits."