[sword-devel] Versification comparison script (was Re: osis2mod unhappy with New Testament osisIDs)
Greg Hellings
greg.hellings at gmail.com
Wed Jul 13 17:11:24 MST 2011
On Wed, Jul 13, 2011 at 10:08 AM, David Haslam <dfhmch at googlemail.com> wrote:
> Actually, we could do with a neat script that can take any OSIS source text,
> and fingerprint it to all the v11ns that we already support.
> Would save a lot of hassle working out where the differences are, and
> deciding whether we have a v11n that is a close enough match to make a
> module.
I accept your challenge. For those of you with the ability to build
and install the Python bindings, you will find an (our first, in fact)
example Python script named av11n.py. It does as you suggest for an
OSIS file. As prerequisites you will need the Python module "Sword"
from the library and the Python module "pyquery." I don't know if
Ubuntu has pyquery, but Fedora does so I suppose Ubuntu does or soon
will and it is part of the PyPI so you should be able to EasyInstall
it.
Just invoke it with the name of an OSIS file and hopefully it will
take care of the rest. Sample output is as follows
$ av11n.py kjvfull.xml
Opening kjvfull.xml
Fetching a list of versifications
Fetching a list of OSIS IDs
Checking Catholic
There are 4530 OT IDs and 3 NT IDs in the versification which
are not in your file.
There are 132 OT IDs and 1 NT IDs in your file which do not
appear in the versification.
Checking Catholic2
There are 4638 OT IDs and 3 NT IDs in the versification which
are not in your file.
There are 132 OT IDs and 1 NT IDs in your file which do not
appear in the versification.
Checking German
There are 203 OT IDs and 2 NT IDs in the versification which
are not in your file.
There are 133 OT IDs and 2 NT IDs in your file which do not
appear in the versification.
Checking KJV
Your file has all the references in this versification
Your file has no extra references
Checking KJVA
There are 5717 OT IDs and 0 NT IDs in the versification which
are not in your file.
Your file has no extra references
Checking Leningrad
There are 202 OT IDs and 0 NT IDs in the versification which
are not in your file.
There are 8091 OT IDs and 0 NT IDs in your file which do not
appear in the versification.
Checking Luther
There are 4800 OT IDs and 2 NT IDs in the versification which
are not in your file.
There are 133 OT IDs and 2 NT IDs in your file which do not
appear in the versification.
Checking MT
There are 202 OT IDs and 0 NT IDs in the versification which
are not in your file.
There are 8091 OT IDs and 0 NT IDs in your file which do not
appear in the versification.
Checking NRSV
There are 0 OT IDs and 2 NT IDs in the versification which are
not in your file.
Your file has no extra references
Checking NRSVA
There are 6687 OT IDs and 2 NT IDs in the versification which
are not in your file.
Your file has no extra references
Checking Synodal
There are 6777 OT IDs and 4 NT IDs in the versification which
are not in your file.
There are 778 OT IDs and 6 NT IDs in your file which do not
appear in the versification.
Checking SynodalP
There are 841 OT IDs and 4 NT IDs in the versification which
are not in your file.
There are 778 OT IDs and 6 NT IDs in your file which do not
appear in the versification.
Checking Vulg
There are 5512 OT IDs and 1442 NT IDs in the versification
which are not in your file.
There are 794 OT IDs and 7 NT IDs in your file which do not
appear in the versification.
If I mixed it up somewhere, please holler. If we really need it, this
functionality can be expanded to also read from plain-text files or
imp files or the like.
--Greg
>
> David
>
>
> --
> View this message in context: http://sword-dev.350566.n4.nabble.com/osis2mod-unhappy-with-New-Testament-osisIDs-tp3663231p3665275.html
> Sent from the SWORD Dev mailing list archive at Nabble.com.
>
> _______________________________________________
> 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