[sword-devel] Versifications and verse order

DM Smith dmsmith at crosswire.org
Thu Jul 4 09:58:19 MST 2013


On Jul 3, 2013, at 3:54 PM, Chris Burrell <chris at burrell.me.uk> wrote:

> Hi
> 
> Do versifications sometimes have different verse orders to each other. 
> 
> Is this something Sword copes with/is intending to cater for?
> 
> My aim is to be able to do a text comparison verse for verse, and so assuming I have the mappings between each verse, can I take two lists and work my way down... In other words
> 
> int i, j = i = 0;
> 
> while(i < passageLength & j < passageLength) {
>   if (v11nA[i] mapsTo v11nB[j]) {
>       output both verses
>   } else {
>     work out with of i & j is behind
>     then i++ (or j++)
>   }
> }
> 
> In the above, i and j only increment and j in particular doesn't jump around. The idea above, is that I can read the passages for v11nA and v11nB up front, and then process sequentially. (as opposed, to currently in JSword, making multiple reads to the backends for each verse.)

This won't work. The arrays can not readily be understood as parallel unless from the same v11n. (Note, we currently have the notion of module level v11n, but some v11ns have the v11n as other, differing only in the OT. JSword splits v11n into OT and NT, but does not make that visible.)

You can iterate over the first, but by mapping have to jump around the second array.

In Him,
	DM

> 
> Yes, there would be duplicates since 1 verse may map to multiple verses, but that's ok I think.
> 
> Chris
> 
> _______________________________________________
> 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