[sword-devel] load v11n from file

Troy A. Griffitts scribe at crosswire.org
Sat Jul 16 04:10:08 MST 2011

On 16/07/11 12:33, Troy A. Griffitts wrote:
> III) Konstantin clarified/proposed a hybrid system where we still seek
> to define 'canonical' (no pun intended) internal v11ns, but if an
> internal v11n doesn't yet exist for a module, then the module developer
> can provide a private v11n used only for his/her own module.  The
> primary benefit being that  Primary benefit is that module development
> can move forward before internal v11n is supported in engine.

I am basically in agreement with you and acknowledge the benefit for
supporting modules which v11ns not yet established in the engine, but
here is a brief summary of our current situation with its pain, and my
concerns about moving forward with what we've discussed:

I. Currently
  1) We force module developers to choose a v11n.  This is painful for
them, but in their own interest, as it will enable their module to work
within the future utopia of a cross-module equivalent content
reconciliation implementation (CMECRI, pronounced: see-me-cry)

  2) The downside for the module developer is:
    a) their module sometimes has verses concatenated together if they
choose a v11n which doesn't have enough 'slots';
    b) worse, they don't have a v11n yet available to choose

II. If we enable the ability for a module to supply something like
<DataPath>/v11n.conf, which defines a custom v11n, I fear:

  1) PEOPLE WILL ACTUALLY USE IT... always... because they are
shortsightedly of the opinion it is 'right'.
    a) Module developers will never accept I.2.a, but instead will
always define their own v11n so their verses will never be merged with
another verse.
    b) I can see module repositories existing which publish Bibles and
Commentaries which always include a v11n.conf.  We cannot optimize for
this and cannot easily move forward with CMECRI in this hypothetical

    a) for module developers to do the hard work and give us the
information we need about their module, for us to move forward with
CMECRI. e.g., we need to know with which v11n their module best fits,
and we need to know where the exceptions lie.  I realize we can still
ALLOW them to provide this data, but if they are not forced to make
these decisions, like they are currently forced to do, they will not
make these decisions.
    b) for us to continue to define v11n systems.  If we don't need to
define a common denominator v11n for a set of modules before we can
release them, we won't... well, we won't as quickly as we would if we
had to.


Just to be sure we both have the save vision of module v11n utopia, I
think we both have similar desires like:

All the world's v11n systems defined internally in the engine in under
50 v11ns.

CMECRI between any 2 systems.

Module developers have to choose the best match, and provide exceptions,
(which even allows verses to exist which otherwise might be merged, and
which CMECRI takes into account).



> Troy
> On 15/07/11 17:50, Konstantin Maslyuk wrote:
>>> You make a great and convincing case for proceeding down path #2.
>>>>     2. each module may have its own v11n, no dynamic shared v11ns
>>> Path #2, though, disregards our objective to ultimately provide a way to
>>> position Bibles of differing v11ns to the same content.
>>> I would love to forget about trying to enumerate and define
>>> versification systems (I'm sure Chris would as well), and to stop asking
>>> each Bible module maker to pick which system best represents their data.
>>> We currently have 13 systems in our engine.  Eventually we need to
>>> extend VerseMgr with a facility to map these between one another
>>> (possibly your implementation).
>>> You have stated that you have tried with your code
>>>> KJV(A) <-> Synodal <-> Vulg <-> NRSV v11ns
>>> This implies there exists such a thing as a named list of versification
>>> system in our engine (i.e., NOT path #2).
>> Of cource, most common v11ns must be hard coded! I can not understand
>> here why
>> path #2 can not have mixed v11ns: several built-in and several
>> module-supplied.
>> Except without remark that module name with module-supplied v11n can not
>> be same
>> as built-in v11n.
>> This would be problem of bad statement of thoughts, i didn't meant that
>> all modules
>> should have module-supplied v11n. Sorry.
>> I do not see a problem in making mapping through v11n other than KJV,
>> but verse
>> mapping must always be thought built-in v11n. One v11n for mapping would be
>> enought, or one meta-v11n.
>> Though i do not know yet all problem case with v11n mappings, and i know
>> that there
>> are questionable parts of the Scripture, where in one source one chapter
>> should have
>> one content and second source under the same chapter have different
>> content. But in
>> Sword such parts should be known under unified name (even like v1:Esd.34 =
>> metav11n:Esd.110, v2:Esd.34 = metav11n:Esd.34).
>>> If you allow a module developer to bypass naming which versification
>>> system their module uses, you would still somehow like them to define
>>> how it maps to other Bibles.  I don't see how this is practical without
>>> a named set of known v11n system in the engine.
>>> I cannot imagine a module developer ALWAYS defining how their module
>>> maps to every other system.
>> Of course if module maker do not use built-in v11n, he should use
>> module-supplied.
>> In any case #1 or #2 he can take ready binary v11n from repository of
>> av11s (that
>> we must provide in any case) and put within module. Or he can take
>> source file for
>> v11n, edit and convert to binary format, and use this binary file as
>> many times as
>> needed. Of course for engine it will be different v11ns, but this is a
>> pay for order.
>> It is also advantage of external v11ns: we can create and test v11ns
>> separate from
>> engine, and if v11n is popular enough or well tested it can be made
>> built-in, and
>> vice versa.
>> Source for v11n would be just an OSIS file (of course, i'm not sure that
>> this is correct):
>> <div type="book" osisID="Gen">
>>     <chapter osisID="Gen.1">
>>         <verse osisID="Gen.1.1"/>
>>         <verse osisID="Gen.1.2"><reference
>> osisRef="Gen.1.2-Gen.1.3"/></verse>
>>         <verse osisID="Gen.1.3"><reference osisRef="Gen.1.4"/></verse>
>>     </chapter>
>> </div>
>> Or add method VerseMgr::saveVersification(const char *file), that will
>> save static
>> arrays of v11n data in to file. So, module maker should write header
>> file with v11n
>> compile and test it, and then call saveVersification, i would agree it
>> is not trivial.
>>> I can imagine a module maker saying, "I am basically "Synodal", but have
>>> these 5 exceptions, and here is how these 5 exceptions should be handled
>>> in relation to "Synodal."
>>> And then our future mapping system can do it's best with this
>>> information.
>> My mapping system would be flexible with preservation of back
>> compatibility.
>> It is a list of data (rules)
>> 1 1 1 0 1 1 1 2
>> 1 1 2 0 1 1 2 3
>> book/chapter/verse/end_verse/...(same to target)
>> on initialization VerseMgr parses whole data and remembers pointers to
>> the first
>> entry of rule, i would use here magic numbers (245-255) to reserve any
>> kind of
>> specific rules, old version of engine would throw away such rules,
>> because them
>> are not supported.
>> BTW i want to discuss base size for mappings: char, short or int. With
>> char mappings
>> for Synodal it is 1,3 kb, but it is limited up to 255 books/chapter/verses.
>>> But I believe we still need to enumerate a list of officially supported
>>> v11n systems and have module developers choose which one to use.
>> I do not urge to run and make new system for external v11n. Everything
>> should be well
>> discussed and accepted.
>> But for now i see that possibility to load v11n from file would be
>> useful, in process of
>> moving to conception of multiple v11ns. And it is not hard to implement
>> (one function
>> to load v11n from file and add load logic for SWMgr). We do not need
>> tools now.
>>> I'm not happy about the extra work, but do you agree it is necessary?
>> Please, precise what kind of work is necessary now?
>> _______________________________________________
>> 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
> _______________________________________________
> 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

More information about the sword-devel mailing list