[sword-devel] Re: Fw: building indexers.

Troy A. Griffitts sword-devel@crosswire.org
Mon, 20 Dec 1999 13:40:40 -0700


Yeshiah,
	I've been giving your delema some thought and believe that I have a
proper solution in mind instead of a hack.  I will allow you to
'register' a 'compare' method for a lexdict module that will be used
when doing the lookup.  The compare method will take 2 char * (Strings)
and should return same as strcmp (<0 for 1 < 2; >0 for 1 > 2; and 0 for
1 == 2).  The sig should be something like:

int compare(char *value1, char *value2);

This means that the file should be sorted in such a way that:
for (module == TOP; !module.Error(); module++) {
	if (compare(module.KeyText(), (module + 1).KeyText()) > 0)
		fprintf(stderr, "ERROR: %s is greater than %s", module.KeyText(),
(module + 1).KeyText());
}

Does this make sense?  All I need from you is a proper implementation of
the compare method and a properly sorted module.

Any feedback from you or anyone else on this implementation is greatly
appreciated....

	-Troy




Yeshiah Zalman wrote:
> 
> I sorted the file ASCII and now it is worse than before.
> Entries are now in proper Hebrew alphabet order.
> HELP. tHIS IS THE last STAGE OF MY CURRENT DEVELOPEMENT.
> And I just cant figure this out.
> 
> ----- Original Message -----
> From: Troy A. Griffitts <scribe@crosswire.org>
> To: Yeshiah Zalman <shayah@gatecom.com>
> Sent: Friday, December 17, 1999 4:09 AM
> Subject: Re: building indexers.
> 
> > It is VERY necessary that the entries in the concordance are in
> > alphabetical order (according to the computer's strcmp function) as we
> > do a _binary search_ thru the concordance to find an entry.  This is
> > most likely your problem..
> >
> >
> > I'm so proud of you!  You made a project file and got it to compile!
> > You may have successfully modified an indexer-- not a slight task.
> > You'll be a C/C++ expert yet!
> >
> >
> >
> > Yeshiah Zalman wrote:
> > >
> > > OK I tried. i looked at the strongs and created a new hebrew version.BHSELEX.DAT complete with conf file and compiled the
> strongs
> > > indexer using it to create an IDX file for the new bhselex. again I included the font it needs and all the C project files and
> > > reults.
> > >
> > > install this to sword and see that lookups for KNOWN words in the dictionary can not be looked up. You can not even browse
> properly
> > > through the lexicon like you can through the other. OK I TRIED NOW I REALLY NEED HELP!
> > >
> > > ----- Original Message -----
> > > From: Troy A. Griffitts <scribe@crosswire.org>
> > > To: Yeshiah Zalman <shayah@gatecom.com>
> > > Sent: Tuesday, December 14, 1999 1:51 PM
> > > Subject: Re: building indexers.
> > >
> > > > AWESOME.... I really don't know which DLL is required for the hebrew rtf
> > > > component, but I will find out though.  Not sure also what the
> > > > redistribution policy will be on this component.  I guess we could
> > > > distribute it until someone asks us to stop (if it is a problem).  I'll
> > > > look into it and also an index and let ya know.  Have you looked at the
> > > > idx files in the lexdict subdirs.  There may be one in there that might
> > > > be close and only require slight modifications.
> > > >
> > > > -Troy.
> > > >
> > > >
> > > > Yeshiah Zalman wrote:
> > > > >
> > > > > nice, I can do full hevrew text searches and if I change all the windows and listboxes and input boxes to use my webHebrewAD
> > > font
> > > > > and set them all Right2Left. They now work in English AND Hebrew windows with full Hebrew Support.
> > > > >
> > > > > I still need you help compiling the new lexicon.
> > > > > And if you figure out WHICH Windows Control from Hebrew windows will give us Right2Left in English windows...
> > > > >
> > > > > PPPplease!
> > > > >
> > > > > ----- Original Message -----
> > > > > From: Troy A. Griffitts <scribe@crosswire.org>
> > > > > To: Yeshiah Zalman <shayah@gatecom.com>
> > > > > Sent: Sunday, December 12, 1999 2:45 PM
> > > > > Subject: Re: building indexers.
> > > > >
> > > > > > Yeshiah,
> > > > > > OK, I didn't test it, but looking over the code I found a small problem
> > > > > > that would cause some of the symptoms that you are describing.  Toward
> > > > > > the end of the .cpp file there are several open statements that do not
> > > > > > include O_BINARY.  Try '|'ing this flag in and see if this fixes your
> > > > > > problem.
> > > > > >
> > > > > > -Troy.
> > > > > >
> > > > > >
> > > > > >
> > > > > > Yeshiah Zalman wrote:
> > > > > > >
> > > > > > > I have completed an ISO version of Strongs which I hope we will be able to index as a compatable Strongs for my ISO
> Hebrew
> > > > > module
> > > > > > > for lookups.
> > > > > > >
> > > > > > > First we need to get the BHS done.   Any progress on an indexer which will allow changed text without corrupting?
> > > > > > >
> > > > > > > Then on to Strongs.
> > > > > > > you should like it as much as I.
> > > > > > >
> > > > > > > ----- Original Message -----
> > > > > > > From: Troy A. Griffitts <scribe@crosswire.org>
> > > > > > > To: Yeshiah Zalman <shayah@gatecom.com>
> > > > > > > Sent: Tuesday, December 07, 1999 9:23 PM
> > > > > > > Subject: Re: building indexers.
> > > > > > >
> > > > > > > > Yeshiah Zalman wrote:
> > > > > > > > >
> > > > > > > > > good news. I wrote a quick ASM app which from DOS will remove the CR and leave only the LF. So after I make changes
> I
> > > can
> > > > > clean
> > > > > > > the
> > > > > > > > > file for indexing. But we still have a problem with bad indexing. You will want to view the output
> > > > > > > >
> > > > > > > >
> > > > > > > > Assembly?  wow, you are an x86 stud-cheeze ;)  Let me know if I might be
> > > > > > > > able to help with the rest of the problems....
> > > > > > > >
> > > > > > > > -Troy.
> > >
> > >   ------------------------------------------------------------------------
> > >                      Name: BHSLexicon.zip
> > >    BHSLexicon.zip    Type: Zip Compressed Data (application/x-zip-compressed)
> > >                  Encoding: base64
> 
>   ------------------------------------------------------------------------
>                   Name: bhselex.dat
>    bhselex.dat    Type: unspecified type (application/octet-stream)
>               Encoding: base64
> 
>                    Name: bhs_lex.conf
>    bhs_lex.conf    Type: unspecified type (application/octet-stream)
>                Encoding: quoted-printable
> 
>                   Name: bhselex.idx
>    bhselex.idx    Type: unspecified type (application/octet-stream)
>               Encoding: base64