and-bible icon indicating copy to clipboard operation
and-bible copied to clipboard

Search results with statistics

Open tuomas2 opened this issue 3 years ago • 4 comments

Closes #2049

tuomas2 avatar Jan 19 '22 17:01 tuomas2

  • [ ] Search activity does not have defaults set (Whole Bible, All words should be set by default)

tuomas2 avatar May 07 '22 07:05 tuomas2

This code needs plenty of love (I thought the label filtering code didn't need much work but you did a lot on it... so I shudder to think what there is for this). I don't have any problems with the code - it has been bug free for me over the last 6 months. Things to do:

  • [ ] Do the search in a different thread. At present it locks the interface so long searches are too slow.
  • [ ] Display the results progressively. The first results can be shown almost immediately because the search itself is fast. It is the retrieval of the entire verse and the parsing of those verses that is slow.
  • [ ] Maybe find a better way to parse the results. Parsing is needed to work out the word stats. That is, it needs to look at the text of every verse, search for the Strongs number (or word), work out what words it applies to, create a list of those words and count their uses etc
  • [ ] The 'Verses' and 'Books' totals can be displayed immediately but the 'Words' total must be delayed until all the verses have been parsed. So indicate that the Word total is incomplete (perhaps '1+' which updates as the words are found)
  • [ ] 'Show key words only' is not implemented. A strongs search will often show a LOT of word variations. My idea was to consolidate those words as much as possible. The plan was to look through the list for all single words longer than 3 characters. Then, if that single word is used elsewhere, collapse the other hits into that word. For example, H7641 gives 'among the ears of grain, branches, ears, ears of grain, of grain, the ears'. My approach would reduce the results to 'ears, branches, of grain' which is more useful from a statistics perspective. Some strongs search results give a crazy long list of words. I feel this would give reasonable results 90% of the time.

agrogers avatar May 07 '22 08:05 agrogers

Yes, I wanted to keep the old way so i could easily go back and look at how it worked. But it is not needed.... except if someone hates the new search and just wants the simple old search results back. If the results with Statistics works as fast as the old search then there is no need for both.

agrogers avatar May 20 '22 06:05 agrogers

I took new strings from here to develop already, so that this can be included easily even after 4.1 release if this is not ready before that.

I will leave this now waiting for the mentioned improvements (anyone is free to contribute).

tuomas2 avatar May 26 '22 08:05 tuomas2

I have implemented the 'Show key words only' now. Done very little testing on it. Will do that over the next few weeks. It's rudimentary but seems to give good results. image image

agrogers avatar Nov 12 '22 14:11 agrogers