schierlm / BibleMultiConverter

Converter written in Java to convert between different Bible program formats
Other
126 stars 32 forks source link

Using BibleMultiConverter to perform versification alignment #52

Closed rainbowoblivion closed 3 years ago

rainbowoblivion commented 3 years ago

Firstly i would like to apologise because i didn't really understand the documentation when it coms to this software so was rather stumped when it came to using it in general... (probably doesn't help that i am not a java developer)

So basically what I was wondering was, if I input a bible (let's say a SWORD or ZefaniaXML bible) that does not follow the KJV canon, is it possible for me to reorder the given bible so as to fix the bible to the KJV canon format.

Take for example Schalter's Bible: At KJV Gen 31:55 that codes to SCH Gen 32:1 and so on. So I'd want SCH 31:55 to read "(32:1) Und Laban stand am Morgen fruh auf, kusste seine Sohne und Tochter segnete sie, ging und kehrte wieder an seinen ort zuruck". I was just wondering if this software could do that with its versifcation tools, and possibly, if not, there is an esay way to do this because I have been searching for a couple of days for a solution and your software is one of the only ones that uses the term Versification.

I did notice on Bible - Offline translations it was able to do this with SWORD bibles but sadly it isn't opensource so i couldn't work it out. I also notice that the BibleMultiTheLife had this same feature however it did it by manually storing the text that way so i couldn't work it out from that either.

Any help would be much appreciated, Jim

schierlm commented 3 years ago

Hello Jim,

while my software can in theory do what you want (remap verses between versifications), you will in practice have a problem finding a versification mapping for your Bible. While some SWORD and a few SoftProjector bibles come with their own versification mappings, it is not all of them, and some have quite poor quality (just mapping excess verses at the end of a chapter to one verse instead of taking movement of chapters between verses into account). Unbound Bible also had a few versification mappings between popular English bibles available, but the project got discontinued.

Also, in case one verse of your input bible maps to more than one verse in the output versification (KJV), the software will not be able to properly split the verse, but instead will either move the whole verse into the first destination verse, or in all of them. It may also write !!![1/2] tags to the verses if you want to manually edit them later.

So in case you cannot find a versification mapping for your input bible, you are out of luck. For comparing bibles, it may help to export the bible into some commercial bible software (the free Basic edition of Logos Bible Software comes with 206 versifications which can also be assigned to imported "personal" bibles. Then create a comparison against KJV and you can see the verse numbers you want next to the KJV verse numbers. However, export of verse comparison is limited to a handful verses at a time, I guess the authors of that commercial software want to also protect their hard work of creating all their versification mappings and commercial Bibles).

Here is an example of what you want, based on GerBoLut SWORD Module. In mods.d\gerbolut.conf you can see it uses Versification=German.

I first extracted the module to work\SWORD directory (note that you may adjust path separators if you are not on Windows).

Then convert the bible text from SWORD to Diffable (intermediate) format:

java -jar BibleMultiConverter-AllInOneEdition.jar SWORD work\SWORD/GerBoLut Diffable work\GerBoLut.txt

Now you will need a versification database that contains at least two versifications and a mapping between them. Luckily there is a simple way to get all known SWORD versifications into a versification database:

java -jar BibleMultiConverter-AllInOneEdition.jar Versification work\db.bmcv import SWORDVersification

Check that the versifications we need are indeed there:

java -jar BibleMultiConverter-AllInOneEdition.jar Versification work\db.bmcv list

After all this, we can now map our bible

java -jar BibleMultiConverter-AllInOneEdition.jar Diffable work\GerBoLut.txt VersificationMappedDiffable work\GerBoLut-KJV.txt work\db.bmcv SWORD_German/SWORD_KJV ReorderVerses ShowNumbers CloneVerses

The output looks like this:

...
Gen 31:53 Der Gott Abrahams und der Gott Nahors und der Gott ihrer Vater sei Richter zwischen uns.
Gen 31:54 Und Jakob schwur ihm bei der Furcht seines Vaters Isaak. Und Jakob opferte auf dem Berge und lud seine Brüderzum Essen. Und da sie gegessen hatten, blieben sie auf dem Berge uber Nacht.
Gen 31:55 <b>(32:1)</> Des Morgens aber stund Laban frühe auf, küssete seine Kinder und Tochter und segnete sie; und zog hin und kam wieder an seinen Ort.
Gen 32:1 <b>(2)</> !!![1/2] Jakob aber zog seinen Weg; und es begegneten ihm die Engel Gottes.!!! <b>(2)</> !!![2/2] Jakob aber zog seinen Weg; und es begegneten ihm die Engel Gottes.!!!
Gen 32:2 <b>(3)</> Und da er sie sah, sprach er: Es sind Gottes Heere; und hiefi dieselbige Statte Mahanaim.
Gen 32:3 <b>(4)</> Jakob aber schickte Boten vor ihm her zu seinem Bruder Esau ins Land Seir, in der Gegend Edom.
Gen 32:4 <b>(5)</> Und befahl ihnen und sprach: Also saget meinem Herrn Esau: Dein Knecht Jakob lafit dir sagen: Ich bin bis daher bei Laban lange aulien gewesen
...
1Sam 20:41 Da der Knabe hineinkam, stund David auf vom Ort gegen Mittag und fiel auf sein Antlitz zur Erde und betete dreimal an; und kusseten sich miteinander und weineten miteinander, David aber am allermeisten.
1Sam 20:42 Und Jonathan sprach zu David: Gehe hin mit Frieden! Was wir beide geschworen haben im Namen des HERRN und gesagt: Der HERR sei zwischen mir und dir, zwischen meinem Samen und deinem Samen, das bleibe ewiglich. <b>(21:1)</> Und Jonathan machte sich auf und kam in die Stadt.
1Sam 21:1 <b>(2)</> David aber kam gen Nobezum Priester Ahimelech. Und Ahimelech entsetzte sich, da er David entgegenging, und sprach zu ihm: Warum kommst du allein und ist kein Mann mit dir?
...
1Sam 21:13 <b>(14)</> Und verstellete seine Gebarde vor ihnen und kollerte unter ihren Handen und stiefi sich an die Türam Tor, und sein Geifer flofi ihm in den Bart.
1Sam 21:14 <b>(15)</> !!![1/2] Da sprach Achis zu seinen Knechten: Siehe, ihr sehet, daß der Mann unsinnig ist; warum habt ihr ihn zu mir gebracht?!!!
1Sam 21:15 !!![2/2] Da sprach Achis zu seinen Knechten: Siehe, ihr sehet, daß der Mann unsinnig ist; warum habt ihr ihn zu mir gebracht?!!! <b>(16)</> Habe ich der Unsinnigen zu wenig, daß ihr diesen herbrachtet, daß er neben mir rasete? Sollte der in mein Haus kommen?
1Sam 22:1 David ging von dannen und entrann in die Hohle Adullam. Da das seine Bruder horeten und das ganze Haus seines Vaters, kamen sie zu ihm hinab daselbst hin.
...

When converting to another output format the <b>...</> will be converted to boldface text. If you don't want that, remove the tags before converting to another format.

Hope that helps :)

rainbowoblivion commented 3 years ago

Wow! That is extremely good, this was virtually perfect for what I wanted, this really helped me creating a PDF of the bilingual bible (KJV & Luther using Python). My only problem was at Isa 64:1, which should be omitted by GerBoLut, yet this export gives it as: !!![2/3] Wir sind gleich wie vorhin, da du nicht uber uns herrschetest, und wir nicht nach deinem Namen genanntwaren. Ach, dati du den Himmel zerrissest und fuhrest herab, dati die Berge vor dir zerflossen,!!! <b>(63:19)</> !!![3/3] Wir sind gleich wie vorhin, da du nicht uber uns herrschetest, und wir nicht nach deinem Namen genanntwaren. Ach, dati du den Himmel zerrissest und fuhrest herab, dati die Berge vor dir zerflossen,!!! Which is the follow-up of Isa 63:19. Other than that, at a glance, it seems all the others are correct.

In other cases where lines are omitted, your software works perfectly, with the lines being omitted like 2 Samuel 19:43, where there is no line and so I can merely skip over it (which is great). It's just this line which causes this issue...

GerBoLut literally reads at 64:1 as wie ein heifi Wasser vom heftigen Feuer versiedet, daß dein Name kund würde unter deinen Feinden, und die Heiden vor dir zittern müftten, which this program correctly realises is actually KJV 64:1; however, it does not just leave a blank space there like Logos 9. Is there an option which can place in omitted lines a blank space or simply not render the line in the Diffable or is that not possible with the SWORD versification?

Thank you for all your help, Jim :)

schierlm commented 3 years ago

Jim,

I am not 100% sure I understand what you are trying to say, but it looks like it is some inaccuracy in the SWORD versification and/or the way how the jSword library is parsing it.

When you run

java -jar BibleMultiConverter-AllInOneEdition.jar Versification work\db.bmcv export ReportHTML work\1.html SWORD_German/SWORD_KJV

You get a report which shows groups, which verses correspond to each other. According to this mapping, the verse Isa 63:19 in the source versifications corresponds to a concatenation of "three" verses of the KJV versification:

When you have the CloneVerses option enabled, as in my example, it will copy this one verse into all "three" verses, therefore getting two copies of it in 64:1. Expecting that you would look at the text and decide how to split it. If you omit the CloneVerses option, it will copy the whole verse into the "first" matching verse and leave the other "two" empty.

So, it is a combination of the versification which maps a verse to another one twice, with the fact that you used the CloneVerses option. I might add a workaround to avoid mapping a verse to another one twice, but it would still result in one copy of the original verse in 63:19 and in 64:1 in case you use the CloneVerses option. In case there is a logical error in the versification, you probably report it to the upstream jsword project :)

rainbowoblivion commented 3 years ago

Thanks very much for all your help, you're right, it seems to be the fault of JSWORD not BibleMultiConverter, thank you for making such an awesome bit of software and helping me with it :)