[sword-devel] Front-ends in which search can find words in the canonical Psalm headings?

David Haslam dfhdfh at protonmail.com
Thu Apr 5 08:01:30 MST 2018


Thanks Troy for all this fine detail.

Is there any way that these special search parameters can be passed to diatheke (as is) ?

Or would diatheke need further enhancing to support search within headings such as Psalm titles?

Best regards, David

Sent from ProtonMail Mobile

On Wed, Apr 4, 2018 at 23:18, Troy A. Griffitts <scribe at crosswire.org> wrote:

> Here's a quick command.  The entry attributes path / search syntax might not be obvious.    Entry attributes key paths are always 3 levels deep + the final segment the value of the attribute.  Empty path segments mean 'any'.  This means find 'Neginoth' in the value of any entry attribute under 'Heading'.
>
> [scribe at localhost cmdline]$ ./search KJV Heading///Neginoth
> [0=================================50===============================100]
>  ======================================================================
> Psalms 4:1
> Psalms 6:1
> Psalms 54:1
> Psalms 55:1
> Psalms 67:1
> Psalms 76:1
>
> Likewise, in any entry attribute:
>
> [scribe at localhost cmdline]$ ./search KJV ///Neginoth
> [0=================================50===============================100]
>  ======================================================================
> Psalms 4:1
> Psalms 6:1
> Psalms 54:1
> Psalms 55:1
> Psalms 67:1
> Psalms 76:1
> Habakkuk 3:19
>
> Or very specifically the first preverse heading of a verse:
>
> [scribe at localhost cmdline]$ ./search KJV Heading/Preverse/0/Neginoth
> [0=================================50===============================100]
>  ======================================================================
> Psalms 4:1
> Psalms 6:1
> Psalms 54:1
> Psalms 55:1
> Psalms 67:1
> Psalms 76:1
>
> Here's the entry attribute dump, output from the 'lookup' example, for Ps.4.1 from the KJV:
>
> [scribe at localhost cmdline]$ ./lookup KJV Ps.4.1
> ==Raw=Entry===============
> Psalms 4:1:
> <div type="x-milestone" subType="x-preverse" sID="pv2"/><title canonical="true" type="psalm"><w lemma="strong:H05329" morph="strongMorph:TH8764">To the chief Musician</w> <w lemma="strong:H05058">on Neginoth</w>, <w lemma="strong:H04210">A Psalm</w> <w lemma="strong:H01732">of David</w>.</title><div type="x-milestone" subType="x-preverse" eID="pv2"/><w lemma="strong:H06030" morph="strongMorph:TH8798">Hear</w> <w lemma="strong:H07121" morph="strongMorph:TH8800">me when I call</w>, <w lemma="strong:H0430">O God</w> <w lemma="strong:H06664">of my righteousness</w>: <w lemma="strong:H07337" morph="strongMorph:TH8689">thou hast enlarged</w> me <transChange type="added">when I was</transChange> <w lemma="strong:H06862">in distress</w>; <w lemma="strong:H02603" morph="strongMorph:TH8798">have mercy</w> <w lemma="strong:H08085" morph="strongMorph:TH8798">upon me, and hear</w> <w lemma="strong:H08605">my prayer</w>.<note type="study"><catchWord>chief…</catchWord>: or, <rdg type="alternative">overseer</rdg></note><note type="study"><catchWord>have…</catchWord>: or, <rdg type="alternative">be gracious unto me</rdg></note>
> ==Render=Entry============
>         .divineName { font-variant: small-caps; }
>         .wordsOfJesus { color: red; }
>         .transChange { font-style: italic; }
>         .transChange.transChange-supplied { font-style: italic; }
>         .transChange.transChange-added { font-style: italic; }
>         .transChange.transChange-tenseChange::before { content: '*'; }
>         .transChange.transChange-tenseChange { font-style: normal; }
>         .transChange:lang(zh) { font-style: normal; text-decoration: dotted underline; }
>         .overline { text-decoration: overline; }
>         .indent1 { margin-left: 1em; }
>         .indent2 { margin-left: 2em; }
>         .indent3 { margin-left: 3em; }
>         .indent4 { margin-left: 4em; }
>         abbr { &:hover{ &:before{ content: attr(title); } } }
>         .small-caps { font-variant: small-caps; }
>         .selah { text-align: right; width: 50%; margin: 0; padding: 0; }
>         .acrostic { text-align: center; }
>         .colophon {font-style: italic; font-size: small; display: block; }
>         .rdg { font-style: italic; }
>         .catchWord {font-style: bold; }
>         .x-p-indent {text-indent: 1em; }
>
> Hear me when I call, O God of my righteousness: thou hast enlarged me <span class="transChange transChange-added">when I was</span> in distress; have mercy upon me, and hear my prayer.
> ==========================
> Entry Attributes:
>
> [ Footnote ]
>     [ 1 ]
>         body = <catchWord>chief…</catchWord>: or, <rdg type="alternative">overseer</rdg>
>         type = study
>     [ 2 ]
>         body = <catchWord>have…</catchWord>: or, <rdg type="alternative">be gracious unto me</rdg>
>         type = study
> [ Heading ]
>     [ 0 ]
>         sID = pv2
>         subType = x-preverse
>         type = x-milestone
>     [ Preverse ]
>         0 = <title canonical="true" type="psalm"><w savlm="strong:H05329">To the chief Musician</w> <w savlm="strong:H05058">on Neginoth</w>, <w savlm="strong:H04210">A Psalm</w> <w savlm="strong:H01732">of David</w>.</title>
>         module->renderText(heading[0]) = <h3 class="title psalm canonical">To the chief Musician on Neginoth, A Psalm of David.</h3>
>
> [ Word ]
>     [ 001 ]
>         Lemma = H05329
>         LemmaClass = strong
>         Morph = TH8764
>         MorphClass = strongMorph
>         PartCount = 1
>         Text = To the chief Musician
>     [ 002 ]
>         Lemma = H05058
>         LemmaClass = strong
>         PartCount = 1
>         Text = on Neginoth
>     [ 003 ]
>         Lemma = H04210
>         LemmaClass = strong
>         PartCount = 1
>         Text = A Psalm
>     [ 004 ]
>         Lemma = H01732
>         LemmaClass = strong
>         PartCount = 1
>         Text = of David
>     [ 005 ]
>         Lemma = H06030
>         LemmaClass = strong
>         Morph = TH8798
>         MorphClass = strongMorph
>         PartCount = 1
>         Text = Hear
>     [ 006 ]
>         Lemma = H07121
>         LemmaClass = strong
>         Morph = TH8800
>         MorphClass = strongMorph
>         PartCount = 1
>         Text = me when I call
>     [ 007 ]
>         Lemma = H0430
>         LemmaClass = strong
>         PartCount = 1
>         Text = O God
>     [ 008 ]
>         Lemma = H06664
>         LemmaClass = strong
>         PartCount = 1
>         Text = of my righteousness
>     [ 009 ]
>         Lemma = H07337
>         LemmaClass = strong
>         Morph = TH8689
>         MorphClass = strongMorph
>         PartCount = 1
>         Text = thou hast enlarged
>     [ 010 ]
>         Lemma = H06862
>         LemmaClass = strong
>         PartCount = 1
>         Text = in distress
>     [ 011 ]
>         Lemma = H02603
>         LemmaClass = strong
>         Morph = TH8798
>         MorphClass = strongMorph
>         PartCount = 1
>         Text = have mercy
>     [ 012 ]
>         Lemma = H08085
>         LemmaClass = strong
>         Morph = TH8798
>         MorphClass = strongMorph
>         PartCount = 1
>         Text = upon me, and hear
>     [ 013 ]
>         Lemma = H08605
>         LemmaClass = strong
>         PartCount = 1
>         Text = my prayer
>
> There are very brief comments on this in the doxygen docs for SWModule::search generated from the source headers.
>
> Experimenting with multiword search on the verse body with SWMgr::setGlobalOption("Headings", "On"), didn't produce the output I would have expected from preverse headings.  Karl is certainly correct here.  This is likely specific to this one special entry attribute type "Preverse".  We strip this out from the rest of the body of the verse and are probably moving it out of the way before we perform the search of the body so an entry attribute search is the best way to find these.  However, other options like Strongs, if they are turned on should return hits from the body of the verse.  Generally speaking, anything that you get from the plaintext output for you options settings is what is searched by the verse body search facility, so with Strongs on, you should be able to search for lemmas as <G1234> or morph (5678), but still I would be more precise and use an entry attribute search: Word//Lemma./G1234/
>
> Hope this helps.
>
> Troy
>
> On 04/04/2018 10:42 AM, Karl Kleinpaste wrote:
>
>> On 04/04/2018 01:33 PM, Karl Kleinpaste wrote:
>>
>>> Doesn't appear to be true, headings on notwithstanding.
>>
>> On the other hand, a search for lemma:H05058 finds "Neginoth" and "song" all over the place.
>> Job 30:9; Psalms 4:1; Psalms 6:1; Psalms 54:1; Psalms 55:1; Psalms 61:1; Psalms 67:1; Psalms 69:12; Psalms 76:1; Psalms 77:6; Isaiah 38:20; Lamentations 3:14; Lamentations 5:14; Habakkuk 3:19
>>
>> _______________________________________________
>> sword-devel mailing list:
>> sword-devel at crosswire.org
>>
>> http://www.crosswire.org/mailman/listinfo/sword-devel
>> Instructions to unsubscribe/change your settings at above page
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20180405/3db1a249/attachment-0001.html>


More information about the sword-devel mailing list