mvnForum Homepage


Posted by ChuckMcKnight at Feb 20, 2010 5:55:29 PM
Re: cross-comparing parallel Bible tool idea
Sorry it took me so long to get back to this. As mentioned earlier, my classes are keeping me pretty busy right now.

Anywho, here's the first rough draft of the algorithm. I ended up not doing it in pseudo-code per se, but hopefully it should still be understandable. If anything seems unclear, just ask and I'll try to expound on it.

I also updated the samples page once again, this time actually running through the algorithm I made (previously, I had done the sample page by just looking at the verses and figuring out what seemed to match). The Romans 8 passage stayed exactly the same, and Genesis 2:16 had a slight change in structure, but still works just as well. Esther 8:9, however, had a bit of a hiccup (now underlined in red).

The algorithm will probably need to be adjusted a bit for such cases, and I'm sure we'll probably find quite a few more such anomalies, so this is definately very much a rough draft algorithm.

With all that said, here you go:


Take the verses for each version, and sort them into lists of words - probably delimited by the space character.

Start with just the lists from the first two versions.

Compare the first word from the second version with the first word of the first version to see if they are equivalent.*

- If they are equivalent, move on to the next word in both versions.

- If they are not equivalent, compare the first word from the second version with the second word from the first version to see if they are equivalent.

- - If they are equivalent, move all the words in the second version down the list by one, and insert a filler in the first slot.

- - If they are not equivalent, compare the second word from the second version with the first word from the first version to see if they are equivalent.

- - - If they are equivalent, move all the words in the first version down the list by one, and insert a filler in the first slot.

- - - If they are not equivalent, compare the first word from the second version with the third word from the first version...

- - - - Next compare third from second with first from first, then first from second with fourth from first, then fourth from second with first from first, etc.

- - - - - If, after comparing all the way through verses, there is no equivalent match, simply leave the first words of both versions together and move onto the next word from both versions.

[Post too long. Continued next.]