[sword-devel] Alternate Versification

Troy A. Griffitts scribe at crosswire.org
Mon Mar 16 12:18:33 MST 2009


Thanks for the review DM.  Appreciate the second set of eyes.

It sounds like you have understood the new code perfectly, save:

the c-tors or the lower level Bible/Commentary drivers now include an 
optional 'versification' parameter when being constructed.  SWMgr reads 
a Versification property from the .conf file if it exists and passes this.

So, when updating osis2mod, when you construct the zText or whatever low 
level driver, you should be able to pass your new argument from the user 
to the c-tor.  This will make the SWModule construct VerseKeys set to 
the correct v11n scheme.  If you have free standing VerseKey objects, 
they should be changed something like:

- VerseKey x;

+ VerseKey *x = module->CreateKey();
...
+ delete x;

Also the step before constructing your low level driver is to call its 
static createModule to initialize an empty set of files.  I have just 
committed the addition of a v11n parameter when you make this call.

I have spent quite a bit of time in imp2vs lately for other work I have 
been doing.  I'll be sure to update this utility to allow for a v11n 
parameter so you can use it as an example, if the above is not clear.

	-Troy.





DM Smith wrote:
> I've been looking at the code regarding Alternate Versification (aka 
> av11n and v11n; I've seen these abbreviations by Troy, Chris and others).
> 
> It looks solid. The purpose of this note is to give it a big thumbs up.
> 
> Basically here is what I see: (Chris, Troy, correct me where I am off 
> base! Please!)
> Today (1.5.11 and earlier) speed is a major consideration and canon.h 
> provides for that. The core functionality of looking up a verse or intro 
> is to convert a verse key into an offset in the module's index. Without 
> going into it in great detail, the module, testament, book and chapter 
> introductions are addressable in the index, as well as each verse.
> 
> In 1.5.12, canon.h no longer includes a fast lookup for this. Instead it 
> includes the KJV versification: books by name, number of chapters and 
> number of verses per chapter. The new VerseMgr takes this and 
> dynamically builds the old lookup table, hiding it behind it's API. The 
> performance hit is taken once each time the program is run for each 
> versification scheme that is requested.
> 
> Chris has taken the CCEL versifications and wrote a perl program that 
> uses them as input to generate the same structure for each versification.
> 
> Currently, the VerseMgr does not know about the different V11Ns. It 
> looks like that is all that is left for it.
> 
> If I am understanding this correctly, this leads me to believe that 
> GenBooks are not going to be used, but rather regular Bible modules. If 
> this is true, it is a boon to commentaries as well, as commentaries are 
> structured internally as Bibles. And it gives us compressed modules. And 
> it gives us the speed of the Bible module (GenBook is very slow in 
> comparison.)
> 
> I had been concerned with GenBooks being used as osis2mod does 
> transformations and the gen book importer did not.
> 
> I think that what is needed is a minor change to osis2mod:
> It will need to instantiate an appropriate VerseMgr (based on a new flag 
> to the program, defaulting to KJV) and the isKJVRef and makeKJVref will 
> need to change to isV11NRef and makeV11NRef.
> 
> Whoo Hoo!!!!
> 
> BTW, it should be easy to implement this in JSword!
> 
> In Him,
>    DM
> 
> 
> 
> _______________________________________________
> 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