[sword-devel] Versifications and verse order
Greg Hellings
greg.hellings at gmail.com
Wed Jul 3 13:12:49 MST 2013
On Wed, Jul 3, 2013 at 3:11 PM, Greg Hellings <greg.hellings at gmail.com>wrote:
> Chris,
>
>
> On Wed, Jul 3, 2013 at 2: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 understanding is that no, we do not cater to books, chapters or verses
> being out of order. This can be a problem for trying to interweave
> deuterocanonical material in Esther and Daniel depending on how a
> particular text labels those verses and chapters. But I don't remember
> hearing anyone provide concrete examples of this actually happening.
>
>
>>
>> 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
>>
>
> I have written a Python script, available
> http://www.crosswire.org/svn/sword-tools/trunk/versification/av11n.py,
> that compares every available Sword versification to a given OSIS document
> and reports the deviation from that versification. For it, I first
> construct a list of all the refs in a versification, pull out ones that are
> encountered in the document, and report the "missing" ones. Not sure if
> that helps.
>
I mentioned this one specifically because the OSIS file can be a giant
jumbled pile of <verse> elements that don't have to be in any particular
order and our utilities will put all the verses in the same order when they
construct the module.
--Greg
>
> Alternatively, I have
> http://www.crosswire.org/svn/sword-tools/trunk/modules/compare.py which
> compares two installed modules, verse by verse, to see if they are exactly
> identical in text throughout.
>
> Maybe one of those will help inspire your implementation. Or maybe not!
> caveat emptor: they may not have been updated for all the API churn over
> the past few months so things like .Error should be .popError and
> appropriate getter/setter should be recognized.
>
> --Greg
>
>
>>
>> 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.)
>>
>> 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
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20130703/982a5a8f/attachment.html>
More information about the sword-devel
mailing list