[sword-devel] Status of av11n conversions

Костя Маслюк kostyamaslyuk at gmail.com
Tue Mar 19 02:54:50 MST 2013


There is code/tool/data set at
http://crosswire.org/~kalemas/work/v11nmapping<https://crosswire.org/%7Ekalemas/work/v11nmapping>
That would be missed link to understand how it works. RefMap2cpp.py is
used to convert v11n description in XML file to data table that you
have been seen in the patch. XML files contain of two parts: full list
of the verses and mapping data for transitions only.

There is also testmappings.exe if you would like to test NRSV John 3,
it probably would work (i remember that in nrsv there are two cases,
but John would need no corrections). You can quickly move along the
module with this, switch active modules with different versification.
Source code is also available.


I use KJVA versification as intermediate, with use of meta space. I did
not encountered with complicated cases of meta space usage so I did not
documented it anywhere.


In NRSV Rev 12.18-19 is necessary for backward transition from KJVA to
NRSV. Rev 12.19 means next chapter first verse.


66, 13, 1, 1, 13, 1, 0,

66 - Rev, 13 - chapter, 1, 1 and 1, 0 means mapping ranges. It is exact
verse if range end is equal to zero or is below range start. In this
case nrsv is range and kjv is exact verse... This is necessary when we
transit from nrsv to vulg, because Rev 12.18-Rev 13.1 is the same, so i do
ranges comparision in KJV to correctly bring NRSV.Rev.13.1 to
VULG.Rev.13.1, because KJV.Rev.13.1 = VULG.Rev.12.18-Rev.13.1

            66,  12,  18,  19,  13,  1,   0,
            66,  13,  1,   1,   13,  1,   0,
Note, there is also different parse order: to KJV we parse backwards from
last to first, from KJV - forward data table parsing (or vice versa, i do
not remember :^).


*Absent Books*
unsigned char mappings_nrsv[] = {
            0,
            66,  12,  18,  19,  13,  1,   0,
            66,  13,  1,   1,   13,  1,   0,
            0
        };
This data contain of two parts, first in Book Names list, NULL terminated,
second is Mapping Rulles List, also NULL terminated. Here Book names is
empty, but for Vulg there is:

unsigned char mappings_vulg[] = {
    'E', 'p', 'J', 'e', 'r', 0,
    'P', 'r', 'A', 'z', 'a', 'r', 0,
    'S', 'u', 's', 0,
    'B', 'e', 'l', 0,
    0,
...

It is absent book names in KJV, necessary to correctly transit with non KJV
v11ns. For example, KJV does not contain PrAzar, but we able to correctly
transit from Synodal to Vulg, because Synodal have following:
<map from="Dan.3.24" to="PrAzar.1.1"/>
<map from="Dan.3.25" to="PrAzar.1.2"/>
<map from="Dan.3.26" to="PrAzar.1.3"/>
...
In cpp data we use book numbers above versification book count: like
refSys.getBookCount() + 1 = "Sus". In Synodal:

unsigned char mappings_synodal[] = {
    'P', 'r', 'A', 'z', 'a', 'r', 0,
    'S', 'u', 's', 0,
    'B', 'e', 'l', 0,
    0,
...
    26,  7,   2,   0,   7,   1,   0,
    79,  3,   24,  0,   1,   1,   0,  35,

We test if 79 is greater than getBookCount(), if so we take last number -
35 as current book and 79 as target book: 79 - getBookCount() = "PrAzar".
Chapter and verse data is used as always.


*Verse Shifting*

    21,  106, 0,   0,   107, 0,   0,
    21,  107, 1,   2,   108, 1,   0,

First line - Vulg Ps.106 = KJV Ps.107, it should be clear.
Second Line: for whole chapter there is only one rule. I only need to
declare expansion or contraction, the rest of the chapter will be shifted,
including meta-versification space. Rules works on chapter level.


In conclusion two things i would add. Probably v11n xmls should be
converted to OSIS format, i have no decision because i do not see
advantages for now. I plan to change cpp rules format to have first number
equal to binary size of the rule, this seem to me good tone and would bring
backward compatibility for if we ever have module supplied versification
with mappings included.

Blessings.


2013/3/19 DM Smith <dmsmith �� crosswire.org>

> Konstantin,
>
> Thanks very much for the work you've done.
>
> I'm trying to understand the data structure. JSword is an independent
> implementation and doesn't use SWORD libraries. So to implement something
> like this, it'll be helpful to understand what the data structures and the
> data means.
>
> If I understand, you are using the KJVA as the common bridge between
> different versifications.
>
> For the NRSV you have the following:
>
> unsigned char mappings_nrsv[] = {
>             0,
>             66,  12,  18,  19,  13,  1,   0,
>             66,  13,  1,   1,   13,  1,   0,
>             0
>         };
>
> If I read this correctly, 66 refers to Revelation (with the books are
> numbered from 1 for Genesis to 66 for Rev as appears in the KJV, and all
> apocryphal books are numbered higher than the canonical ordered as in the
> KJVA).
>
> In the first non-zero row, the 66, 12, 18, 19 means Rev 12:18-19 from the
> NRSV.
>
> And the "13, 1, 0" means Rev 13:1 in the KJV.
>
> So basically, NRSV Rev 12:18-19 is the same as KJV Rev 13:1.
>
> When I look into the NRSV versification in SWORD, I'm seeing that Rev 12
> goes to verse 18. Whereas the KJV goes to verse 17. Where does the 19 come
> in?
>
> The next line has 66, 13, 1, 1 (So NRSV 13:1) maps to 13, 1, 0 (to KJV
> 13:1).
>
> Putting all of this together, KJV 13:1 is NRSV 12:18-13:1.
>
> Curious why is it 66, 13, 1, 1 and not 66, 13, 1, 0?
>
> Am also wondering why there's no entry for John 3. In the NRSV, there are
> 15 verses but in the KJV there are 14. So shouldn't there be a line with:
> 64, 1, 14, 15, 1, 14, 0
>
> I'm sure as I dig into Synodal, I'll have more questions. But I wait until
> I find out whether I'm missing something here.
>
> In Him,
>         DM
>
> On Mar 18, 2013, at 3:24 PM, "Konstantin Maslyuk" <kostyamaslyuk �� gmail.com>
> wrote:
>
> > Hello. There really is done work for av11n conversion support for sword.
> You even may get patch at
> >
> >
> https://gitorious.org/~kalemas/sword-svn-mirrors/kalemas_at_mail_ru-trunk/commit/35a3fc6bde1ccff945d51558d7e21ab1074a4152
> >
> > and use it if you compile libsword for your self. But you also should
> take into account that this feature is not supported officially and would
> be incompatible with future releases of Sword. And there is no known
> schedule for this as this work was not considered for two years.
> >
> > Blessings.
> >
> >
> >
> > Chris Burrell <chris �� burrell.me.uk> писал(а) в своём письме Tue, 12 Mar
> 2013 23:44:36 +0400:
> >
> >> Hi
> >>
> >> I was wondering if someone is working on being able to convert from 1
> >> versification system to another. This very important for being to line
> up
> >> verses and therefore very important to STEP for our interlinears.
> >>
> >> I'm told someone is doing the work for Sword first and then we will
> bring
> >> it across into JSword.
> >>
> >> Is someone working on this? Does anyone know what the status of this
> is? Is
> >> there a target date for when the design will be finalised such that we
> can
> >> implement this in JSword?
> >>
> >> Chris
> >
> >
> > --
> > Написано в почтовом клиенте браузера Opera: http://www.opera.com/mail/
> >
> > _______________________________________________
> > sword-devel mailing list: sword-devel �� crosswire.org
> > http://www.crosswire.org/mailman/listinfo/sword-devel
> > Instructions to unsubscribe/change your settings at above page
>
>
> _______________________________________________
> sword-devel mailing list: sword-devel �� crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page
>
----------- ???????? ????? -----------
???????? ? ??????? HTML ???? ?????????&hellip;
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20130319/6e81fa76/attachment-0001.html>


More information about the sword-devel mailing list