Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Help: Putting Strong's Dictionary on SQLite3 Database

259 views
Skip to first unread message

evstevemd

unread,
Nov 30, 2011, 3:49:07 AM11/30/11
to Open Scriptures
Hi,
I'm not sure if this is yet available, but I wanted to put Strongs
(Both Hebrew and Greek) into a dictionary and use it as reference for
the software Iam writting. I tried to understand one I downloaded from
OS and I cannot understand its format and how can I put it in
Database. I want to put it in format

| Strong Number | Greek/Hebrew | Pronounciation | Description
Here is an xample:
H1 | אב | 'âb | awb | A primitive word; father in a literal and
immediate, or figurative and remote application: - chief, (fore-)
father ([-less]), X patrimony, principal. Compare names in “Abi-”|

I need help on how I can convert the files in OpenScripture GitHub
into that format
I'm happy with PHP, Python or C++ in converting
Thanks!

Nathan Smith

unread,
Dec 2, 2011, 12:21:07 AM12/2/11
to openscr...@googlegroups.com
On Wed, Nov 30, 2011 at 12:49 AM, evstevemd <mwinj...@gmail.com> wrote:
> I need help on how I can convert the files in OpenScripture GitHub
> into that format
> I'm happy with PHP, Python or C++ in converting
> Thanks!

I can take a look at writing some Python to do that conversion, but it
will probably be over the weekend.

--
Nathan Smith
http://nathan.smithfam.info/

evstevemd

unread,
Dec 3, 2011, 9:40:34 AM12/3/11
to Open Scriptures
Thanks a Million Nathan,
I will appreciate that!

On Dec 2, 8:21 am, Nathan Smith <nat...@smithfam.info> wrote:

Nathan Smith

unread,
Dec 4, 2011, 6:57:07 PM12/4/11
to openscr...@googlegroups.com
On Sat, Dec 3, 2011 at 6:40 AM, evstevemd <mwinj...@gmail.com> wrote:
> Thanks a Million Nathan,
> I will appreciate that!
>

OK, here is what I've come up with:

https://gitorious.org/biblical-studies/biblical-studies/blobs/raw/master/strongs-sqlite.py

You can checkout the git repo which contains it here:
git://gitorious.org/biblical-studies/biblical-studies.git

This was a bit more than I bargained for. :-) The
strongs-dictionary.xhtml from the Openscriptures strongs repo is good,
but there were two major drawbacks: 1. some of the unicode strings for
Hebrew entries are missing; 2. it lacks transliteration data.

So I decided to get this info from the two source XML files. They had
difference datatypes, so I had to write two different parsers using
xml.sax. The bottom line is that after filling in the proper variables
in the script and running it, you'll have a sqlite database matching
what you requested. I have done very limited QA on it, so let me know
if there are bugs. I put the code under an MIT license so you can
incorporate it if you like. There are actually more data fields than
just description (derivation/exegesis, definition/explanation,
kjv_def/translation in the Hebrew/Greek xml respectively, as well as
some outside those tags in Greek). You can modify the script to pick
those up separately into different database fields if you like (I did
that in one iteration of this script).

Here's the readme:

Requirements:
- Python v2.6 or later

Notes:
- Fill in the appropriate paths for hebrew_xml, greek_xml, db_file, and log_file
- Some strongsref tags in the Greek XML make reference to Strongs
numbers which are not included in the XML file. In those cases the
strongs number is listed in place of the unicode for the reference
lemma (e.g. "G5689").
- Hebrew when viewed in the console may appear LTR, but in text files
and other uses should appear RTL.

John Dyer

unread,
Dec 4, 2011, 10:46:38 PM12/4/11
to openscr...@googlegroups.com
You're a beast Nathan!

http://nathan.smithfam.info/

--
You received this message because you are subscribed to the Google Groups "Open Scriptures" group.
To post to this group, send email to openscr...@googlegroups.com.
To unsubscribe from this group, send email to openscripture...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/openscriptures?hl=en.




--
John Dyer - http://j.hn/

evstevemd

unread,
Dec 5, 2011, 7:58:32 AM12/5/11
to Open Scriptures
I cannot thank you enough Nathan!
How will you like me to acknowledge you in small software I develop?
I would definitely love to add you in thank you list :)

And yes, I will report back any bug!

On Dec 5, 2:57 am, Nathan Smith <nat...@smithfam.info> wrote:


> On Sat, Dec 3, 2011 at 6:40 AM, evstevemd <mwinjili...@gmail.com> wrote:
> > Thanks a Million Nathan,
> > I will appreciate that!
>
> OK, here is what I've come up with:
>

> https://gitorious.org/biblical-studies/biblical-studies/blobs/raw/mas...

evstevemd

unread,
Dec 5, 2011, 8:01:30 AM12/5/11
to Open Scriptures
Hi Nathan,

> - Some strongsref tags in the Greek XML make reference to Strongs
> numbers which are not included in the XML file. In those cases the
> strongs number is listed in place of the unicode for the reference
> lemma (e.g. "G5689").

I cannot make sense of this, would you please explain what it means?
Is something missing?

Nathan Smith

unread,
Dec 5, 2011, 1:25:33 PM12/5/11
to openscr...@googlegroups.com

Yes, basically. I think it may be a mistake in the original Strong's.
The data for G25 has a <strongsref> tag which points to Greek 5689,
but the list only goes to 5624. I checked another online Strong's and
it had the same reference to the missing entry, so the error lies
somewhere "upstream" from our XML source. I don't have a print
Strong's anymore so I could not check up on it. Someone might even be
able to figure out which # is supposed to be referenced there.

As for the acknowledgements, just my name is fine. Thanks.

David Troidl

unread,
Dec 5, 2011, 9:17:20 PM12/5/11
to openscr...@googlegroups.com
Hi,

In my printed Strong's I found the same listing. The 5689 is in normal
type, referring to Hebrew, rather than italics for Greek. The
corresponding Hebrew words seems to fit.

Peace,

David

Nathan Smith

unread,
Dec 6, 2011, 1:09:52 AM12/6/11
to openscr...@googlegroups.com
On Mon, Dec 5, 2011 at 6:17 PM, David Troidl <David...@aol.com> wrote:
> Hi,
>
> In my printed Strong's I found the same listing.  The 5689 is in normal
> type, referring to Hebrew, rather than italics for Greek.  The corresponding
> Hebrew words seems to fit.
>
> Peace,
>
> David

Thanks. I'll check to see if this is correct in version 1.5 and submit
a bug report to Ulrik if not.

David Troidl

unread,
Dec 6, 2011, 8:43:44 AM12/6/11
to openscr...@googlegroups.com
Thank you for mentioning 1.5. I had checked 1.4, but now I see it's
been corrected in 1.5.

evstevemd

unread,
Dec 7, 2011, 9:04:48 AM12/7/11
to Open Scriptures
That is great explanation. So it is only one entry in error?
I have printed copy and I will check in!

On Dec 5, 9:25 pm, Nathan Smith <nat...@smithfam.info> wrote:

Nathan Smith

unread,
Dec 7, 2011, 10:23:35 PM12/7/11
to openscr...@googlegroups.com
On Wed, Dec 7, 2011 at 6:04 AM, evstevemd <mwinj...@gmail.com> wrote:
> That is great explanation. So it is only one entry in error?
> I have printed copy and I will check in!
>

As far as I know, yes. It is corrected in the 1.5 version, so I'll try
running the script against that version.

Nathan Smith

unread,
Dec 10, 2011, 4:33:33 PM12/10/11
to openscr...@googlegroups.com
On Wed, Dec 7, 2011 at 7:23 PM, Nathan Smith <nat...@smithfam.info> wrote:
> On Wed, Dec 7, 2011 at 6:04 AM, evstevemd <mwinj...@gmail.com> wrote:
>> That is great explanation. So it is only one entry in error?
>> I have printed copy and I will check in!
>>
>
> As far as I know, yes. It is corrected in the 1.5 version, so I'll try
> running the script against that version.

I updated the script so that is uses the latest Strongs Greek XML
version 1.5, which has the aforementioned error corrected. Also, I
made the script automatically download the source files, so you don't
have to checkout the OpenScriptures git repo to run it. New code is
here: https://gitorious.org/biblical-studies

evstevemd

unread,
Dec 13, 2011, 4:40:21 AM12/13/11
to Open Scriptures
Thanks Nathan!

On Dec 11, 12:33 am, Nathan Smith <nat...@smithfam.info> wrote:
> On Wed, Dec 7, 2011 at 7:23 PM, Nathan Smith <nat...@smithfam.info> wrote:

Reply all
Reply to author
Forward
0 new messages