<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div dir="auto">From this comment, I believe the mappings use 1 based book numbers starting with Genesis and continuing up into the New Testament. I think this comment was from Костя in the original code.<br><br><a href="https://git.crosswire.org/main/crosswire-java/-/blob/master/src/org/crosswire/sword/mgr/VersificationMgr.java#L178">https://git.crosswire.org/main/crosswire-java/-/blob/master/src/org/crosswire/sword/mgr/VersificationMgr.java#L178</a><br><br>Since this input format is for humans to easily read, I think you well point to a confusing aspect of the data file. I'll keep it in my mind to change the book attribute to use OSISID book identifiers instead of these numbers. I can fill the underlining data structures with the numbers for quick conversion by looking them up during the loading of the data file. Thanks for the comment.<br><br>Troy</div><br><br><div class="gmail_quote"><div dir="auto">On January 27, 2025 10:06:27 PM GMT+01:00, DM Smith <dmsmith@crosswire.org> wrote:</div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Troy,<div>In your XML file in the mapping section you have book=“25”. To which book does this refer? In the OT and the NT there are books with bookNum=“25”.</div><div>DM<br id="lineBreakAtBeginningOfMessage"><div><br><blockquote type="cite"><div>On Jan 27, 2025, at 11:00 AM, Troy A. Griffitts <scribe@crosswire.org> wrote:</div><br class="Apple-interchange-newline"><div>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<div><p>Hey guys. I recently had to port the mapping work done in
VersificationMgr for use in the VMRCRE and had to fully understand
the scheme and syntax used in the good work done by Костя on this
a few years back.<br>
<br>
It was a bit difficult for me to keep each component straight in
my mind initially so during my port, I created a class with clear
property names to hold each value, and an import format which
makes it clear what values do what. Here are the lines of code
for reference:<br>
<br>
This is the VMRCRE equivelant to a canon.h file (MTNU: the
Masoretic OT + Nestle/Aland NT) and has mappings between the MTNU
and the LXXNU (LXX = Göttingen/Rahlfs) versifications under the
<mappings> section near the end:<br>
<br>
<a class="moz-txt-link-freetext" href="https://crosswire.org/svn/community/trunk/contrib/v11ns/MTNU.xml">https://crosswire.org/svn/community/trunk/contrib/v11ns/MTNU.xml</a></p><p><br>
</p><p>Port of VersificationMgr with class to hold the mappings section:<br>
<br>
<a class="moz-txt-link-freetext" href="https://git.crosswire.org/main/crosswire-java/-/blob/master/src/org/crosswire/sword/mgr/VersificationMgr.java#L233">https://git.crosswire.org/main/crosswire-java/-/blob/master/src/org/crosswire/sword/mgr/VersificationMgr.java#L233</a><br>
</p><p>Hope this is helpful,</p><p>Troy</p><p><br>
</p>
<div class="moz-cite-prefix">On 1/24/25 3:11 PM, DM Smith wrote:<br>
</div>
<blockquote type="cite" cite="mid:57FADB24-BB48-4F16-8A7E-C48EB5E48701@crosswire.org">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<br id="lineBreakAtBeginningOfMessage">
<div><br>
<blockquote type="cite">
<div>On Jan 23, 2025, at 6:40 PM, Arnaud Vié
<a class="moz-txt-link-rfc2396E" href="mailto:unas.zole+avie@gmail.com"><unas.zole+avie@gmail.com></a> wrote:</div>
<br class="Apple-interchange-newline">
<div>
<div dir="ltr"><br>
<div class="gmail_quote gmail_quote_container">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">Le jeu. 23 janv.
2025 à 22:18, Fr Cyrille <<a href="mailto:fr.cyrille@tiberiade.be" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">fr.cyrille@tiberiade.be</a>>
a écrit :<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div> So I think that for versifications, catholic
catholic2 and LXX there is no mapping (which
would explain some of the problems I've had
displaying in parallel?).<br>
In the other v11n files I see an entry by
instance in vulg:<br>
unsigned char mappings_vulg[] = {<br>
<br>
If someone can explain or give me a
documentation to understand how it works, and if
this is where the mapping takes place, I'd like
to work on it. Especially as it should be
possible to use Arnaud's work?<br>
</div>
</blockquote>
</div>
</blockquote>
<div><br>
</div>
<div>
<div>You're correct Cyrille, the mapping data is in
this char array defined with the versifications in
the canon_*.h files.</div>
<div>This array is injected (for the versifications
which have one) and decoded within
versificationmgr.cpp.</div>
<div><br>
</div>
<div>The format of this char array is really obscure
though, and it's completely different from the
format of mappings used in jsword (which is a lot
clearer and a lot easier to edit and maintain).<br>
</div>
<div>From what I understand in the code ("// parse
mappings" section of the loadFromSBook method in
versificationmgr.cpp) and the canon_vulg.h example :</div>
</div>
</div>
</div>
</div>
</blockquote>
<div><br>
</div>
SWORD is built for speed. The format is a C string (characters
followed by a null). SWORD’s format is meant to be obscure to
force the use of SWORD and JSword as the mechanism to read SWORD
modules.</div>
<div><br>
</div>
<div>JSword is meant to be in lock step with the formats of SWORD.
WRT the mapping files, these were developed independently and at
the same time. I deemed it too hard at the time to bring JSword
back into alignment w SWORD’s format. JSword’s format is human
readable, external, easily maintainable and is read when needed.</div>
<div><br>
</div>
<div>
<blockquote type="cite">
<div>
<div dir="ltr">
<div class="gmail_quote gmail_quote_container">
<div>
<div><br>
</div>
<div>1.<br>
</div>
<div>The array starts with a sequence of book names,
which are the books present in this bible and absent
from KJV.</div>
<div>Each such name is a sequence of letters followed
by a null character serving as delimiter.<br>
</div>
<div>In canon_vulg, thoses are the <br>
'E', 'p', 'J', 'e', 'r', 0,<br>
'P', 'r', 'A', 'z', 'a', 'r', 0,<br>
'S', 'u', 's', 0,<br>
'B', 'e', 'l', 0,</div>
<div><br>
</div>
<div>2. Then, you have an additional null character
indicating the end of that first section - the rest
of the array is encoded completely differently.</div>
<div><br>
</div>
<div>3. The rest of the array is meant to be split in
sequences of 7 numbers, each such 7-number sequence
corresponding to a mapping rule.<br>
</div>
<div>For example, this is a mapping rule :</div>
<div>21, 4, 9, 10, 4, 8, 0,</div>
<div><br>
</div>
<div>First digit indicates the book (index in the
sequence of books, starting at 1). In vulg, book 21
is Psalms.</div>
<div>The next 3 digits indicate the destination of the
mapping. "4,9,10" corresponds to chapter 4, verses 9
to 10.<br>
</div>
<div>The final 3 digits are the source of the mapping.
"4,8,0" corresponds to chapter 4, verse 8 alone.</div>
<div>So this rule I used as example denotes that
verses Ps 4:9-10 of KJV are mapped to Ps 4:8 in
Vulg.<br>
</div>
<div>Which corresponds indeed to one rule that is
present in the jsword mapping file.</div>
<div><br>
</div>
<div><br>
</div>
<div>I guess I could try to build a converter to
export the jsword mapping properties files into this
format, so that we could indeed add the Catholic and
Catholic2 mappings that I spent hours building for
the AndBible jsword fork.</div>
</div>
</div>
</div>
</div>
</blockquote>
<div><br>
</div>
That would be greatly appreciated!</div>
<div><br>
<blockquote type="cite">
<div>
<div dir="ltr">
<div class="gmail_quote gmail_quote_container">
<div>
<div><br>
</div>
<div>But going forward, for maintaining
versifications, it would be a lot better to have a
central way of defining all our versifications and
all their mappings in an easily readable and
editable format (maybe the one defined by the
Copenhagen Alliance, cf <a href="https://github.com/Copenhagen-Alliance/versification-specification/blob/master/versification-mappings/json-schema/versification_schema.json" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">https://github.com/Copenhagen-Alliance/versification-specification/blob/master/versification-mappings/json-schema/versification_schema.json</a>
), serving as a source of truth for both sword and
jsword. Because even just looking at this Vulg
versifications, the mapping have vastly diverged
between sword and jsword...</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<div><br>
</div>
<div>IIRC, the mapping of deuterocanonical material I don’t think
was ever completed.</div>
<div><br>
<blockquote type="cite">
<div>
<div dir="ltr">
<div class="gmail_quote gmail_quote_container">
<div>
<div><br>
</div>
<div>Even if we don't go as far as implementing the
full modular versification system that I would like
to build, if at the very least we could have a
central, easy-to-maintain place to manage all our
versifications, and then could easily export them to
both sword and jsword, that would be a huge step
forward.</div>
</div>
</div>
</div>
</div>
</blockquote>
<div><br>
</div>
I think Chris Little developed an external format that would
build the canon_*.h files. I don’t remember if there was
something like this that was developed for mappings.</div>
<div><br>
<blockquote type="cite">
<div>
<div dir="ltr">
<div class="gmail_quote gmail_quote_container">
<div>
<div><br>
</div>
<div>Regards,</div>
<div><br>
</div>
<div>Arnaud</div>
</div>
<div> </div>
</div>
</div>
_______________________________________________<br>
sword-devel mailing list: <a class="moz-txt-link-abbreviated" href="mailto:sword-devel@crosswire.org">sword-devel@crosswire.org</a><br>
<a class="moz-txt-link-freetext" href="http://crosswire.org/mailman/listinfo/sword-devel">http://crosswire.org/mailman/listinfo/sword-devel</a><br>
Instructions to unsubscribe/change your settings at above
page<br>
</div>
</blockquote>
</div>
<br>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre wrap="" class="moz-quote-pre">_______________________________________________
sword-devel mailing list: <a class="moz-txt-link-abbreviated" href="mailto:sword-devel@crosswire.org">sword-devel@crosswire.org</a>
<a class="moz-txt-link-freetext" href="http://crosswire.org/mailman/listinfo/sword-devel">http://crosswire.org/mailman/listinfo/sword-devel</a>
Instructions to unsubscribe/change your settings at above page
</pre>
</blockquote>
</div>
_______________________________________________<br>sword-devel mailing list: sword-devel@crosswire.org<br>http://crosswire.org/mailman/listinfo/sword-devel<br>Instructions to unsubscribe/change your settings at above page<br></div></blockquote></div><br></div></blockquote></div><div dir="auto"><div class='k9mail-signature'>-- <br>Sent from my Android device with K-9 Mail. Please excuse my brevity.</div></div></body></html>