[sword-devel] Bible book introductions
DM Smith
dmsmith at crosswire.org
Mon Jun 3 08:33:08 MST 2013
My reply to Chris L's post was a bit snide. Sorry. (I actually don't have a problem with NoParagraphs as a feature, but would rather discuss it here first.)
Regarding Scope. Most of our front-ends (SWORD and JSword) present modules that only contain the NT as if they have an OT as well. Fortunately, that is an easy check. If the OT files are missing then it is NT only. (And visa-versa).
But as we get more and more minority language modules that do not contain an entire testament because it is a long term work in progress, it'd be nice to handle that well.
The problem for a front-end and the engine is that there is no efficient way to verify the presence of a book but to check all of its verses. The reason for this is that the dat file contains the sequential data from the input file, which is allowed to be out of order. The append feature of our importers, which provides for a module to be constructed incrementally, allows for this to happen quite easily.
It might be best practice to have all the verses in the proper order in the dat file, but it is not at all required by SWORD engine and as such, the front-end and the engine cannot assume that it is the case. Worst case to determine that only Psalms is present in the OT, one has to check nearly every verse in the OT.
It is efficient to determine whether a book or chapter has content (just quit looking once a verse is found at the desired level) but it is quite hard to determine whether a book or chapter is entirely missing.
To do the check each time the answer is needed is not appropriate. Thus some kind of cache is needed. The conf (or augment conf) seems like the right place to do the caching.
On Jun 3, 2013, at 10:23 AM, "Troy A. Griffitts" <scribe at crosswire.org> wrote:
> I don't recall ever hearing of "NoParagraphs". But I am old now and quite possibly could have forgotten.
>
> The push back on my side of this is from the desire to:
>
> a) keep the .conf generation only as complex as needed, and
> b) avoid the possibilities for inconsistencies.
>
> SWORD accumulates toggleable features from all installed modules and presents them from:
> SWMgr::getGlobalOptions()
>
> This will only return a list of available options from installed modules, even if the software supports more options.
>
> In the frontends I have written, I call this method, and typically present an application toolbar for global toggling of these features. Many frontends decide that their user might want to toggle these features on a per-module basis, instead of globally, and while my preference is otherwise, I am happy to have frontends which support both methodologies.
>
> I am not happy to have computed values in the .conf file. This makes independent module publishing more difficult. I've already reluctantly gone down that road for "InstallSize", which if not present merely has the side-effect of saying something like "Unknown" in the installer. If we start writing code which depends upon computed values and the publisher forgets to add "Feature=Headings" in the .conf file-- making it inconsistent with what actually is in the module, what are the results?
>
> I am not sure I am convinced of a need to precompute the existence of all possible OSIS tags within a document that a frontend might wish to expose user features against-- which is the logical end to this request.
>
> The Feature tags which exist were added for specific use cases.
>
> Select your preferred Greek Lexicon: [ modules(@Feature=GreekDef) ]
> Select your preferred Hebrew Lexicon: [ modules(@Feature=HebrewDef) ]
> Select your preferred Chinese Glossary: [ modules(@Lang=zh, at Feature=Glossary ]
>
> etc.
>
>
> The OptionFilter tags are used by a publisher to state that they would like a user to be able to toggle certain features within their module. These are what register option for the getGlobalOptions mentioned above.
>
> Troy
>
>
>
>
>
>
>
> Troy
>
>
> On 06/03/2013 02:55 PM, DM Smith wrote:
>> I saw that Scope was yanked from the wiki with a comment that it had been rejected. I really don't remember it being rejected. I just remember that the discussion never went anywhere so it was dropped. I documented the desire of that discussion by putting an entry into the wiki. Even if engine support is given for determining this by examining a module, it will be far slower than having a declaration in the conf. On phones (low powered devices), such discovery is much too expensive and needs to be cached on a per module basis so that it is not recomputed.
>>
>> I still think that it is very needed. I'm getting tired of how such discussions go.
>>
>> I'm not at all clear why NoParagraphs was added as a Feature for the frontends to use. I don't remember any discussion of it here. I don't see the need for it. A frontend can examine each and every verse to see if there is paragraphing or other such structural elements that imply paragraphing. I have no intention of using it for the KJV. At least not without community discussion and buy-in.
>>
>> How is NoParagraphs any different than NoIntroductions (or Introductions) !!!!!
>>
>> In Him,
>> DM Smith
>>
>> On Jun 2, 2013, at 5:47 PM, Chris Little <chrislit at crosswire.org> wrote:
>>
>>> On 6/2/2013 9:23 AM, Chris Burrell wrote:
>>>> Hi
>>>>
>>>> Some books have Bible introductions. Can I suggest adding a flag to the
>>>> conf file to indicate this is the case? In the similar mindset as a
>>>> previous post, I'd prefer being able to query the conf file for features
>>>> of a particular module rather than having to read part of the module and
>>>> hope for that particular book/chapter to have an introduction. A yes/no
>>>> flag in the .conf file would be helpful.
>>>>
>>>> (In particular, I have in mind the book introductions that are part of
>>>> the ESV text). But no doubt other modules will also (or in the future
>>>> will also) have the same aspects.
>>>>
>>>> Chris
>>> I would say no. This doesn't add anything.
>>>
>>> Identifying that a module possesses introductions at some level does not indicate that it possesses all of the introductions at that level. Accordingly, knowing that a module possesses introductions still requires checking for non-empty contents in order to know that a particular introduction is non-empty.
>>>
>>> This is along the lines of the request for a Scope .conf entry, which was already rejected. Whatever solution is used for that case can also be used for introductions.
>>>
>>> --Chris
>>>
>>>
>>> _______________________________________________
>>> sword-devel mailing list: sword-devel at crosswire.org
>>> http://www.crosswire.org/mailman/listinfo/sword-devel
>>> Instructions to unsubscribe/change your settings at above page
>>
>> _______________________________________________
>> sword-devel mailing list: sword-devel at crosswire.org
>> http://www.crosswire.org/mailman/listinfo/sword-devel
>> Instructions to unsubscribe/change your settings at above page
>
>
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page
More information about the sword-devel
mailing list