[sword-devel] Morphology tags in the SWORD engine with the HTML filters
niccarter at mac.com
Wed Feb 17 02:25:25 MST 2010
Hi team :)
I'm currently implementing morphology tags at the same time as Strong's in PocketSword & I have a question about the HTML filters.
for THML (thmlhtmlhref.cpp)
we have "passagestudy.jsp?action=showMorph&type=Greek&value=%s" (line 178)
so, the "type" is hardcoded to "Greek".
for GBF (gbfhtmlhref.cpp)
we have "passagestudy.jsp?action=showMorph&type=Greek&value=" (line 207)
so, the "type" is hardcoded to "Greek".
for OSIS (the one we're mostly interested in now-a-days: osishtmlhref.cpp)
we have "passagestudy.jsp?action=showMorph&type=%s&value=%s" (line 150)
so, the "type" is variable, with an example from the KJV being: "passagestudy.jsp?action=showMorph&type=robinson%3AN-ASN&value=N-ASN"
[note: %3A is the URL encoding of the ":" character, as this is coming from the OSIS w tag, where morph="robinson:N-ASN" is found, so we are simply passing through the "morph" attribute to the "type" attribute in this html link, after running it through URL::encode().]
http://www.crosswire.org/wiki/OSIS_Bibles#Marking_with_Morphology is also a good place to read up on this, from an OSIS point of view.
http://n4.nabble.com/new-morphology-td354696.html#a354696 has a previous thread about Morphology tags
http://n4.nabble.com/KJV-OT-morphology-td351093.html#a351093 mentions OT Morph tags & how they were broken back then (are they still? if the situation is still the same today, then that may help answer question #1 & some of #2!)
http://n4.nabble.com/Fwd-GnomeSword-developers-Hebrew-WLC-Text-with-Strongs-numbers-and-Morphology-td358831.html#a358831 mentions that there was no Hebrew Morphological Analysis Codes module as of March 2009, is that still the case? (that may also help answer question #1?)
Given all of the above:
1) do we only support Morphology of Greek words? Looking in the KJV (OSIS), it seems they appear in the OT (hence, also for Hebrew words), and the "type" attribute is "strongMorph". For example, "passagestudy.jsp?action=showMorph&type=strongMorph%3ATH8804&value=TH8804" from Micah 1:16 (from the word "captivity", with the Strong's Hebrew Number of 01540).
2) should the OSIS version, above, have the "type" attribute actually being "robinson" (in the KJV example above) rather than "robinson%3AN-ASN"? or should it instead be hard-coded to be "Greek" like with the THML & GBF versions? I'm assuming it should be "robinson", given that's what the OSIS module says... so I'm guessing that the "strongMorph", found in question #1 is actually referring to a non-public (or non-existing?) module that has the Hebrew Morphology.
3) do other front-ends simply assume that we only call the "showMorph" action on Greek words & hence ignore the "type" attribute? Or do they (as I am currently thinking of doing) treat "Greek" to use a module with "Feature=GreekParse" & showMorph actions that start with "robinson" or "packard" to also be Greek & anything else to be Hebrew? Or do they treat "Greek" as Greek & anything else they parse the "type" attribute until they get to the ":" & then try to use that module, falling back to an error dialogue if that module isn't installed?
4) I am assuming that any module with "Feature=GreekParse" in it is able to handle Greek Morphology codes, so when we encounter a "showMorph" with a "type" containing "robinson", do we NEED to use the "robinson" module (which is the technically correct thing to do) or can I allow the user to select any module they have installed which has the "GreekParse" feature in it (the same as we do with Strong's Numbers)? But, then, linking with question #1, there is no equivalent for "Feature=HebrewParse"? at least, I can't find any modules from the CrossWire or CrossWire Beta repos with that in it?
ok, I think that's about it! I enjoy trying to figure out fun SWORD things (well, now I do -- at first it was overwhelming, but I was learning the SWORD APIs & the CocoaTouch APIs & Obj-C all at the same time!), but I'd love clarification on this before I code it :)
Thanks heaps for even reading this far. If you have read this far and can actually understand it all, you deserve a medal & you're probably also equipped enough to answer all my questions! ;) :)
PocketSword Developer - an iPhone Bible Study app
More information about the sword-devel