[jsword-devel] Normalizing Bible names

Chris Burrell chris at burrell.me.uk
Wed Feb 6 13:11:44 MST 2013


There are 2990 occurences of Full=\s*$

Presumably we want to delete the shorthand and alt if we're also deleting
the Full Name.
Chris



On 6 February 2013 19:31, DM Smith <dmsmith at crosswire.org> wrote:

> There are two problems here. The one you identified and that Romans
> resolves to Tobias.
>
> The lookup needs to be tweaked a bit to look first at NT names, then OT
> names and finally at other names. It should also be able to answer
> regarding a v11n.
>
> In a BibleNames file:
> The long name  should never be blank.
> The short name can be blank when the long name is supplied. (I think that
> is expected and should load the long name into the field. But not sure.)
> The alt should be blank when there are not alternates for that language
> for that Bible book.
>
> There is a fix in Jira for the code. It requires an argument for
> startsWith to have length. I think it is from Martin. I haven't gotten
> around to applying it. It is as you suggest.
>
> In Him,
>         DM
>
> On Feb 6, 2013, at 2:21 PM, Chris Burrell <chris at burrell.me.uk> wrote:
>
> > Hello
> >
> > I have an issue with the normalizing which is supposed to fallback to
> English as I understand it. Unfortunately, when I give Romans from a
> Russian Locale, I'm getting an IllegalArgument exception, because it's
> resolving to Tobias, which isn't in the KJV system
> >
> > Here are my values when entering BookName#match(String normalizedName).
> >
> > longName      "" (id=302)
> > normalizedLongName    "" (id=302)
> > normalizedShortName   "" (id=302)
> > shortName     "" (id=302)
> > normalizedName        "romans" (id=298)
> >
> >
> > As you can see the issue is with the line:
> >
> >         if (normalizedShortName.startsWith(normalizedName) ||
> normalizedName.startsWith(normalizedShortName)) {
> >             return true;
> >         }
> > which then matches the second part.
> >
> > The reason for this is that Tobias is a blank field in the BibleNames.
> As a result, we fall in and match it.
> >
> > My suggested fix to this, would be to start by removing all blank Bible
> names from the language files. Alternatively, which would be less work, we
> could check that the normalized names are not blank!
> >
> > Chris
> >
> >
> > _______________________________________________
> > jsword-devel mailing list
> > jsword-devel at crosswire.org
> > http://www.crosswire.org/mailman/listinfo/jsword-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/jsword-devel/attachments/20130206/700c1efd/attachment-0001.html>


More information about the jsword-devel mailing list