Re: Searching for entity attributes

"Troy A. Griffitts" <[email protected]>
Newsgroups gmane.comp.literature.sword.devel
Message-ID <[email protected]>
Yes, we could add in some logic to call strongsPad during the search loop so a Strongs entry in every Bible gets normalized before compare.

I haven't run into this so often because my front ends usually add this feature as an interface by clicking on an existing word in a Bible with an option "find other occurrences of this Greek word" and I search for the Strongs number as it is formatted in that Bible.



On May 6, 2024 13:17:38 GMT-03:00, "David "Judah's Shadow" Blue" <[email protected]> wrote:
>On Friday, May 3, 2024 6:00:59 PM EDT Troy A. Griffitts wrote:
>> Have a look in sword/examples/cmdline/search.cpp  We have comments near
>> the top how to do a strongs search with entry attributes, and you can
>> experiment easily in there.
>> 
>> https://crosswire.org/svn/sword/trunk/examples/cmdline/search.cpp
>
>Ok, I've got it working...sort of. So here's where we run into the 0 padding 
>issue from the OSHB thread, when I search for, say, alpha in the NASGreek 
>lexicon one of the results is 05598 (omega, which matches because it has the 
>word alphabet in the entry). If I then search for G05598 in the NASB I get no 
>results. However, if I search for G5598 I get results. So what appears to be 
>happening is that the NASGreek module is returning a padded 0 (either encoded 
>that way of via the SWLD::strongsPad method I'm not sure which) but the NASB 
>module doesn't have the padding in its attributes. And from what came up in 
>the OSHB thread, there isn't a consistent way of encoding the numbers in the 
>bible modules, and SWLD::strongsPad isn't being invoked in the search on the 
>lemmas.
>
>I only knew to strip the padded 0 off because I used diatheke to see how the 
>numbers were encoded in the module. So, there isn't a way for my users to know 
>if they need to include the leading 0 from the lexicon module or not in their 
>search. Unless I'm missing something.
>
>
>_______________________________________________
>sword-devel mailing list: [email protected]
>http://crosswire.org/mailman/listinfo/sword-devel
>Instructions to unsubscribe/change your settings at above page

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

_______________________________________________
sword-devel mailing list: [email protected]
http://crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.