[sword-devel] Synodal versification & IBT modules?
Troy A. Griffitts
scribe at crosswire.org
Sun May 12 21:30:08 MST 2013
We have the first part already in the API:
SWModule::hasEntry(const SWKey *)
What sort of use cases do we have to build further API calls on this?
On 05/12/2013 07:11 PM, DM Smith wrote:
> Once that is written, the worst case for analysis is a book that is entirely absent. Basically, when you find something from a book, you don't need to look any further in the book and go to the next.
> On May 12, 2013, at 10:06 PM, DM Smith <dmsmith at crosswire.org> wrote:
>> JSword (Java) is quite different from SWORD (C++). But I'll give you an overview. Each module has a similar structure. There is an index file where slots have records indicating offset and size into a data file. For a Bible module, each slot represents a verse.
>> If the size is 0 then that indexed location is empty. A compressed module is slightly more complicated. The index consists of two parts. But the idea is the same. If the length of the data is 0, then it is empty.
>> Basically if you look at the chain of calls to get the raw text of a verse, it digs down and at some point it gets the data size. Our code merely bails once it gets the data size.
>> I can point you to our Java code, if you like, but I don't know how much that'd help.
>> In Him,
>> On May 12, 2013, at 9:53 PM, Nic Carter <niccarter at mac.com> wrote:
>>> Hi DM,
>>> On 12/05/2013, at 7:40 AM, DM Smith <dmsmith at crosswire.org> wrote:
>>>> Chris Burrell added some code to JSword that allows for the quick determination of whether a verse is present in a module. He is using this in STEP to prune the v11n to only those books, chapters and verses that are actually present. On old slow hardware he reported that it is very fast to analyze an entire module.
>>> Could you please let me know where this is? Would be interesting to look at and see how it performs on a handheld in C++ or Obj-C :)
>>> Thanks heaps, ybic
>>> nic... :)
>>> ps: I don't know the JSword codebase at all, so it may be easier if I'm pointed in the right direction rather than trying to find it :)
>>> sword-devel mailing list: sword-devel at crosswire.org
>>> Instructions to unsubscribe/change your settings at above page
>> sword-devel mailing list: sword-devel at crosswire.org
>> Instructions to unsubscribe/change your settings at above page
> sword-devel mailing list: sword-devel at crosswire.org
> Instructions to unsubscribe/change your settings at above page
More information about the sword-devel