[sword-devel] demo TEI modules

Chris Little chrislit at crosswire.org
Tue Sep 18 21:57:45 MST 2007

DM Smith wrote:
> I've got some work to do on JSword to get them to display properly in 
> BibleDesktop. Currently it is using a "plain text" filter. And the 
> performance is terrible, because of how JSword slurps the entire module 
> to display the entire list of words. I didn't see any TEI to HTML 
> filters in Sword, so I guess there is some work to do there too.

Yeah, I probably just did TEI to RTF. It should be fairly trivial to 
translate that to HTML, though. Or it might even be easier to just write 
something new based on the OSIS filter.

> I was a bit surprised by the collation of some of the words. Any word 
> with an accent is collated "out of order". For example Ā is sorted after 
> Y (there are no words beginning with Z) in the Anglo-Saxon Dictionary.
> It appears that it is comparing the bytes and not the characters (let 
> alone the code points of the characters).
> Also, TEI entry and entryFree and superEntry tags define the attribute 
> "key" to be used to control the collation of the words. Can this be 
> leveraged?

Sword stores LD entries in byte-sorted order and uses that order for 
lookup--I believe with a basic binary search. There's no way around that 
with the current driver. It's also confused (because of the binary 
search) by entries with identical key values.

Greater flexibility (such as keeping words in the order of the original) 
would come by doing LD modules as GenBooks (with some code to allow 
interface via the LD methods).

> Related, when doing a lookup should we allow lookup without the diacritics?

It would be good to offer that as an option.


More information about the sword-devel mailing list