<html><body><div dir="ltr"><span style="font-family: Aptos, Aptos_MSFontService, -apple-system, Roboto, Arial, Helvetica, sans-serif; font-size: 12pt;"></span>That script is what I have used for years witg good effect. Thank you Greg. </div><div id="ms-outlook-mobile-body-separator-line" dir="ltr"><br></div><div id="ms-outlook-mobile-signature">Sent from <a href="https://aka.ms/o0ukef">Outlook for iOS</a></div><div> </div><div id="mail-editor-reference-message-container" class="ms-outlook-mobile-reference-message"><hr style="display: inline-block; width: 98%;"><div id="divRplyFwdMsg" dir="ltr"><span style="font-family: Calibri, sans-serif;"><b>From:</b> sword-devel <sword-devel-bounces@crosswire.org> on behalf of Greg Hellings <greg.hellings@gmail.com><br><b>Sent:</b> Thursday, June 19, 2025 6:41 am<br><b>To:</b> SWORD Developers' Collaboration Forum <sword-devel@crosswire.org><br><b>Subject:</b> Re: [sword-devel] Script to find a best fit v11n</span><div style="font-family: Calibri, sans-serif;"> </div></div><div dir="auto">My script eschews percentages because they seemed relatively pointless to me for measuring a mismatch like this. Instead it gives a count of both Old and New Testament osisIDs that it finds missing and another that it finds unexpectedly for a given versification. If the total of either count is fewer than 100, the IDs for that particular count are printed to the console. It will do this for every registered versification in the version of the library it was compiled against, allowing the user to select whichever one seems best to them based on the results.</div><br><div dir="ltr" class="gmail_attr">On Wed, Jun 18, 2025, 10:25 PM David Haslam <<a href="mailto:dfhdfh@protonmail.com">dfhdfh@protonmail.com</a>> wrote:</div><blockquote style="margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204);"><div dir="auto" class="gmail_quote">It’s not just the number of “missing” verses that should figure in the percentage score, but also the number of verses that get concatenated to the last one in a chapter.</div><div dir="ltr" class="gmail_quote"><br></div><div dir="auto" class="gmail_quote">The differences in v11n for the Psalms will be especially significant for this, in that some v11n renumber many of them. Likewise for the last few chapters in the book of Job.</div><div dir="ltr" class="gmail_quote"><br></div><div dir="auto" class="gmail_quote">Aside: It would be cool to enhance the utility emptyvss by providing a command line option that would ignore books that are not included in the scope parameter in the conf file.</div><div dir="ltr" class="gmail_quote"><br></div><div dir="auto" class="gmail_quote">Regards,</div><div dir="ltr" class="gmail_quote"><br></div><div dir="auto" class="gmail_quote">David</div><div dir="ltr" class="gmail_quote"><br></div><div class="gmail_quote">On Thu, Jun 19, 2025 at 03:18, DM Smith <<a href="mailto:On+Thu,+Jun+19,+2025+at+03:18,+DM+Smith+%3C%3Ca+href=" rel="noreferrer">dmsmith@crosswire.org</a>> wrote:</div><blockquote><div class="gmail_quote">
David,
</div><div class="gmail_quote"><br>
</div><div class="gmail_quote">
Because it only considers the xml, scope is automatically built into it. It is only comparing what is present in the xml with what is part of the av11ns.
</div><div class="gmail_quote"><br>
</div><div class="gmail_quote">
It might be good to add the enumeration of missing verses.
</div><div class="gmail_quote"><br>
</div><div class="gmail_quote">
— DM
</div><div class="gmail_quote"><br>
</div><blockquote><div class="gmail_quote">
On Jun 18, 2025, at 4:02 PM, David Haslam <<a href="mailto:dfhdfh@protonmail.com" rel="noreferrer">dfhdfh@protonmail.com</a>> wrote:
</div><div class="gmail_quote"><br>
</div><div dir="auto" class="gmail_quote">
Does it take account of the Scope key in the .conf file for a less than complete Bible ?
</div><div dir="auto" class="gmail_quote"><br>
</div><div dir="auto" class="gmail_quote">
David
</div><div class="gmail_quote"><br>
</div><div id="m_-4553660002178259517protonmail_mobile_signature_block"><div>
Sent from
<a href="https://proton.me/mail/home" rel="noreferrer">Proton Mail</a> for iOS
</div></div><div class="gmail_quote"><br>
</div><div class="gmail_quote"><br>
</div><div class="gmail_quote">On Wed, Jun 18, 2025 at 20:51, DM Smith <
<a href="mailto:On+Wed,+Jun+18,+2025+at+20:51,+DM+Smith+%3C%3Ca+href=" rel="noreferrer">dmsmith@crosswire.org</a>> wrote:
</div><blockquote><div class="gmail_quote">
Hi,
</div><div class="gmail_quote"><br>
</div><div class="gmail_quote">
Several have commented on how hard it is to test an OSIS xml file against v11ns especially since it goes off into an infinite loop. (I’ve posted a patch that fixes that) But it is still a process of trial and error to find an appropriate v11n.
</div><div class="gmail_quote"><br>
</div><div class="gmail_quote">
So, I’ve been iterating with chatGPT to create a python script to find a best fit v11n. Since I don’t know python, I can’t vouch for the script beyond it worked for a simple test case that had an extra chapter for Genesis and had some extra verses at the end of a chapter in that book.
</div><div class="gmail_quote"><br>
</div><div class="gmail_quote">
I offer it, as a starting place. See the attached file.
</div><div class="gmail_quote"><br>
</div><div class="gmail_quote">
It has a —debug flag.
</div><div class="gmail_quote">
The first argument is expected to be the OSIS xml file.
</div><div class="gmail_quote">
The second argument is optional and gives the location to the include directory of svn/sword/trunk/include with all the canon*.h files. If you don’t supply the argument, it uses the web to load the canon*.h files from
<a href="https://www.crosswire.org/svn/sword/trunk/include" rel="noreferrer">https://www.crosswire.org/svn/sword/trunk/include</a>.
</div><div class="gmail_quote"><br>
</div><div class="gmail_quote">
It will score the fitness of each of the v11ns. It gives the score as a %, but I don’t know what that means. I told it that it should prioritize book matches, then chapter matches and finally verse matches. I don’t know how well it did that scoring. I didn’t test for that.
</div><div class="gmail_quote"><br>
</div><div class="gmail_quote">
The output is alphabetized. If more than one v11n have the same high score, they are listed.
</div><div class="gmail_quote"><br>
</div><div class="gmail_quote">
In His Service,
</div><div class="gmail_quote">DM
</div><div class="gmail_quote"><br>
</div></blockquote><div class="gmail_quote">_______________________________________________
<br>sword-devel mailing list: <a href="mailto:sword-devel@crosswire.org" rel="noreferrer">sword-devel@crosswire.org</a>
<br><a href="http://crosswire.org/mailman/listinfo/sword-devel" rel="noreferrer">http://crosswire.org/mailman/listinfo/sword-devel</a>
<br>Instructions to unsubscribe/change your settings at above page
<br>
</div></blockquote><div dir="ltr" class="gmail_quote"><br></div></blockquote><div class="gmail_quote">_______________________________________________<br>
sword-devel mailing list: <a href="mailto:sword-devel@crosswire.org" rel="noreferrer">sword-devel@crosswire.org</a><br>
<a href="http://crosswire.org/mailman/listinfo/sword-devel" rel="noreferrer noreferrer">http://crosswire.org/mailman/listinfo/sword-devel</a><br>
Instructions to unsubscribe/change your settings at above page<br>
</div></blockquote></div></body></html>