[jsword-devel] StrongNumber in indexing
DM Smith
dmsmith at crosswire.org
Fri Jan 4 14:07:30 MST 2013
H00 is not a valid Strong's number. The modules that have it should be re-done. Do you know which are the problem modules?
The problem with allowing H00 is that it will not find an entry in a Strong's dictionary and will get the nearest one. Which is better? An error filling the console or confusing the user?
I don't mind changing the regex to be simpler, but it should not create further problems.
The part at the end is an optional extension. We have a module in the wings that has it.
In Him,
DM
On Jan 4, 2013, at 3:34 PM, Chris Burrell <chris at burrell.me.uk> wrote:
> Hi
>
> Can I suggest a fix to the StrongNumberFilter, which currently relies on
> org.crosswire.jsword.book.study.StrongsNumber
>
> The regular expression used to match the Strong number is:
> private static final Pattern STRONGS_PATTERN = Pattern.compile("([GgHh])0*([1-9][0-9]*)!?([A-Za-z]+)?");
>
> Unfortunately, some texts use H00 as a strong number to indicate that the tagged word is in 2 places (i.e. this is only the first part of the tag).
>
> The above expression causes huge amounts of Logging to be output to the console.
>
> I suggest we change it to something like
>
> [GgHh][0-9]+
>
> Also, what's the stuff at the end of the regex? Haven't come across any like that...
>
> Chris
>
> _______________________________________________
> jsword-devel mailing list
> jsword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/jsword-devel
More information about the jsword-devel
mailing list