[sword-devel] KJV Genesis 24:67

Mmital mitalmanu at hotmail.com
Sun Jun 11 10:52:27 MST 2006


Hi,

Thank you for taking the time to respond. Sorry I did not make it clear in my past as to what I am trying to do. Basically, my goal is to get a chapter from the KJV module in HTML format, and display it in the internet explorer browser, along with strong's tags.  The HTML seems to be valid for most chapters except that I encountered a problem in Genesis 24:67. The code that I am using in order to get the words and strong's tag in a verse is the same as that in the lookup tool (found in sword-1.5.8\examples\cmdline )

Here is the code that lookup.cpp uses:

int main(int argc, char **argv)
{
	SWMgr manager(0, 0, true, 0, true);
	SWModule *target;
	ModMap::iterator it;

	if (argc != 3) {
		fprintf(stderr, "\nusage: %s <modname> <\"lookup key\">\n"
							 "\tExample: lookup KJV \"James 1:19\"\n\n", argv[0]);
 
		exit(-1);
	}

	it = manager.Modules.find(argv[1]);
	if (it == manager.Modules.end()) {
		fprintf(stderr, "Could not find module [%s].  Available modules:\n", argv[1]);
		for (it = manager.Modules.begin(); it != manager.Modules.end(); it++) {
			fprintf(stderr, "[%s]\t - %s\n", (*it).second->Name(), (*it).second->Description());
		}
		exit(-1);
	}

	manager.setGlobalOption("Headings", "On");

	target = (*it).second;

	target->setKey(argv[2]);

	(const char *)*target;		// force an entry lookup to resolve key so we get the idxbuf entry for the key
	std::cout << (const char *)(SWKey &)*target << ":\n";
//std::cout << target->StripText();
	std::cout << target->getRawEntry();
	std::cout << "\n";
	std::cout << "==========================\n";
	std::cout << "Entry Attributes:\n\n";



AttributeTypeList::iterator i1;
	AttributeList::iterator i2;
	AttributeValue::iterator i3;



 for (i1 = target->getEntryAttributes().begin(); i1 != target->getEntryAttributes().end(); i1++) {
		std::cout << "[ " << i1->first << " ]\n";
		for (i2 = i1->second.begin(); i2 != i1->second.end(); i2++) {
			std::cout << "\t[ " << i2->first << " ]\n";
			for (i3 = i2->second.begin(); i3 != i2->second.end(); i3++) {
				std::cout << "\t\t" << i3->first << " = " << i3->second << "\n";
			}
		}
	}
	std::cout << std::endl;
	return 0;
}


I will try running the above code on KJV2006 module to see if it gives the same problem. Thanks.

Best Regards,
Mmital



  ----- Original Message ----- 
  From: DM Smith 
  To: SWORD Developers' Collaboration Forum 
  Sent: Sunday, June 11, 2006 8:07 AM
  Subject: Re: [sword-devel] KJV Genesis 24:67


  Could you provide a little more information? Which tool is the "lookup tool?"


  The output does not look like the tool is reporting anything that is outside of <w> elements.


  I'm working on fixing the KJV module as it has some encoding problems and some missing 's. Would you check to see if the new module has the same problem.


  You can get a beta of it here:


  www.crosswire.org/~dmsmith/kjv2006


  Just follow the links at the bottom of the page.


  (This beta has only one known problem and that is with the last verse of every book. Some frontends ignore the problem.)






  On Jun 11, 2006, at 1:31 AM, Mmital wrote:


    Hi,

    The lookup tool in Genesis 24:67 gives the following output:

    Genesis 24:67:
    <w lemma="x-Strongs:H03327">And Isaac</w> <w morph="x-StrongsMorph:TH8686" lemma="x-Strongs:H0935">brought her</w> <w lemma="x-Strongs:H0517">into his mother</w> <w lemma="x-Strongs:H08283">Sarah'</w> <w lemma="x-Strongs:H0168">tent</w>, <w morph="x-StrongsMorph:TH8799" lemma="x-Strongs:H03947">and took</w> <w lemma="x-Strongs:H07259">Rebekah</w>, <w lemma="x-Strongs:H0802">and she became his wife</w>; <w morph="x-StrongsMorph:TH8799" lemma="x-Strongs:H0157">and he loved</w> <w lemma="x-Strongs:H03327">her: and Isaac</w> <w morph="x-StrongsMorph:TH8735" lemma="x-Strongs:H05162">was comforted</w> <w lemma="x-Strongs:H0310">after</w> <w lemma="x-Strongs:H0517">his mother'</w> <transChange type="added">death</transChange> .<milestone type="x-p" />
    ==========================
    Entry Attributes:

    [ Word ]
     [ 001 ]
      Lemma = H03327
      LemmaClass = strong
      Text = And Isaac
     [ 002 ]
      Lemma = H0935
      LemmaClass = strong
      Morph = TH8686
      MorphClass = x-StrongsMorph
      Text = brought her
     [ 003 ]
      Lemma = H0517
      LemmaClass = strong
      Text = into his mother
     [ 004 ]
      Lemma = H08283
      LemmaClass = strong
      Text = Sarah'
     [ 005 ]
      Lemma = H0168
      LemmaClass = strong
      Text = tent
     [ 006 ]
      Lemma = H03947
      LemmaClass = strong
      Morph = TH8799
      MorphClass = x-StrongsMorph
      Text = and took
     [ 007 ]
      Lemma = H07259
      LemmaClass = strong
      Text = Rebekah
     [ 008 ]
      Lemma = H0802
      LemmaClass = strong
      Text = and she became his wife
     [ 009 ]
      Lemma = H0157
      LemmaClass = strong
      Morph = TH8799
      MorphClass = x-StrongsMorph
      Text = and he loved
     [ 010 ]
      Lemma = H03327
      LemmaClass = strong
      Text = her: and Isaac
     [ 011 ]
      Lemma = H05162
      LemmaClass = strong
      Morph = TH8735
      MorphClass = x-StrongsMorph
      Text = was comforted
     [ 012 ]
      Lemma = H0310
      LemmaClass = strong
      Text = after
     [ 013 ]
      Lemma = H0517
      LemmaClass = strong
      Text = his mother'



    The last block of text should be "his mother's death". When using a HTML filter to display the text in the browser (with both lemma and morphological tags on), the word 'death' is lost.


    _______________________________________________
    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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.crosswire.org/pipermail/sword-devel/attachments/20060611/ac3d1d97/attachment-0001.html 


More information about the sword-devel mailing list