[sword-devel] Scripture Reference Tagging Tool

Chris Little sword-devel@crosswire.org
Wed, 12 Feb 2003 10:23:52 -0700 (MST)


On Wed, 12 Feb 2003, Don A. Elbourne Jr. wrote:

> Is there a scripture reference tagging tool? It seems I remember Chris
> mentioning one once. What I mean is a tool that would suck up an input file,
> recognize verse reference strings like "John 3:16" and wrap some sort of
> ThML/OSIS/whatever markup around it.

Not currently.  There are two parts to the problem:

First is recognizing the reference.  This is generally very difficult
because of the hundreds of ways you can identify a passage, plus the
myriad book abbreviations/names that can be used, plus the different
possibilities for ranges/lists of verses.  I wrote something in Perl to do
this for the Catholic Encyclopedia a while back, but haven't been able to
locate it.  It was extremely specific to that text anyway.  Perl seems 
like the best way handle recognizing references because of its regular 
expression support.

Second, you need to convert the reference to OSIS.  For simple references 
this is pretty simple, but anything with dis-contiguous ranges/lists will 
require that you decide where the parts are located in the reference and 
mark them.  There's a vs2osisref utility in the utilities directory that 
you may use to generate the actual OSIS tags, but it's a long way from a 
complete solution.

This would be a good area for someone looking to have a little project to
work in. :)  If the Perl/regex part could be converted to C, that would be
even better.

--Chris