[sword-devel] abbreviations.sh (was: Re: linking / testsuite )

Ben Morgan benpmorgan at gmail.com
Wed Apr 22 23:31:34 MST 2009

On Thu, Apr 23, 2009 at 3:42 PM, Jonathan Marsden <jmarsden at fastmail.fm>wrote:

> Earlier, in response to Ben, I wrote:
> > If I have time later tonight, once I have a sword 1.6.0RC2 package out
> > for front end developers to test with, I'll see about creating the 198
> > item single locale test and (if I succeed!) I'll contribute it to the
> > SWORD codebase, just to demonstrate that creating such a test really is
> > in fact doable :)
> Here is abbreviations.sh.  I got an initial set of abbreviations from
> the OSIS User Manual, by cut and paste, and then added (usually) two
> more per book, that I just made up.

> In the process of creating and testing it under 1.6.0RC2 I found a
> surprises.  It may really be a bug, demonstrating to Ben and the team
> the value of this kind of very simple regression test script... or it
> may just reflect my lack of understanding of the intent and workings of
> the SWORD library.

> parsekey 1Ki   does not display I Kings, but I Samuel.  Likewise for 2Ki
> and II Samuel.  Similar behavior is seen for 1Kin, 2Kin, 1King and
> 2King.  Intuitively, this feels incorrect to me.  As some mild degree of
> justification for this, I offer:
>  http://www.biblegateway.com/passage/?search=1Ki
> which does what I would expect -- it displays I Kings.

This is another problem from adding additional ones and needs to be fixed
(specifically,  1 Kingdoms = 1 Samuel). My testing script was only checking
against new books, so it didn't pick this up...

> (A test tool that compares the results of lookups on biblegateway.com
> and using SWORD might be an interesting thing for someone to create, BTW!).
> Observations: There are more abbreviations which I would like to work,
> but which don't seem to, such as Gn for Genesis, SoS for Song of
> Solomon, but I have no real idea if these are "legitimate"
> abbreviations.  I do not claim to be a domain expert on abbreviations :)
>  I am fairly confident that 1Ki *is* an abbreviation for I Kings that I
> have seen and used before, not just on biblegateway.com.
It seems lots of custom ones were dropped during the transition that used to
be there. BPBible has its own english conf file (
so many of the problems others have seen in other frontends do not apply to
it. "I C" (and "II C") is another error case which should be handled, but
this one looks a little more complicated as the data clearly points it to 1
Corinthians - but it never gets there...

Here is the (very simple!) script.  I've assigned copyright to
> CrossWire.  It's a trivial for loop plus a list of abbreviations.  I can
>  create a Jira item for it, and attach the script and a .good file for
> it, if that would be preferred.

Another thing that could be done is to create all possible abbreviations
from the abbreviations file... Anyway, this is a good addition. You have Ez
for Ezekiel and Ezra (but currently it is Ezekiel) and Ze for Zephaniah and
Zechariah (currently Zechariah). Also Phi for Philemon - it goes to
Philippians currently. I've added these to verseparsing.sh with the
conflicting ones removed. It doesn't pass currently, due to the kings

God Bless,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20090423/df805551/attachment-0001.html>

More information about the sword-devel mailing list