Sefaria / Sefaria-SQL

Converts Sefaria-Export to SQL database
22 stars 14 forks source link

All but Torah, Writings, and Prophets created in db #5

Closed akivamier closed 6 years ago

akivamier commented 6 years ago

Hey this is awesome work!

  1. there is no script/links directory
  2. the database populates just about everything except (the most important) Torah, Writings, and Prophets

Are these known issues?

Thanks again for this wonderful json to SQLite for Sefaria!

akivamier commented 6 years ago

I found the issue with the Tanakh not writing to the database. On line 221 of SQLite.java you have tempLine = lines.get(i+1) this skips over the valid TNK books but gets most of the rest. if the code is changed to lines.get(i), the TNK paths are correct.

akivamier commented 6 years ago

UPDATE: This only gets the Hebrew versions... any idea on how to adjust the algorithm to get the english also?

akivamier commented 6 years ago

So if you remove ../../JPS from the text files. You get the English with lines.get(i+1). KOOL! I have 3 databases, but I have just about everything now, I think. Hope this helps. Won't make a pull request because I didn't fix anything. I would however, delete ../../JPS from the text files as that path does not exist.... Thanks again!

nsantacruz commented 6 years ago

Glad you figured it out! JPS is actually the one and only text in our library with a copyright so it's not distributed with the rest of our texts. Glad you found a way around it.

Out of curiosity, what are you working on? We're glad to help.

akivamier commented 6 years ago

Thank's for the quick reply! I'm working on an app that let's students learn to translate from scratch where they enter translation, meanings and root data word per word. On another page, however, I want the selected word (from the first page) to "look-up" the word details in the left pane and have a Reference pane on the right that shows other places in Torah where the word is used. If the user selects a reference, it will display the word's containing chapter in the middle panel. Other features are planned. I am well underway but have been parsing the raw JSON. Now that I have the data in databases this will give me a much higher chance to succeed. (THANK YOU!)

If Sefaria had a "concordance / cross-reference" feature there would be no need for my app. In fact I have not found one Jewish/Rabbinical resource that provides this kind of information whether in printed or digital form. This is my motivation. Do you know of any such works?

nsantacruz commented 6 years ago

sounds like a great project. I don't know of any translating app like it. Feel free to email us if you need help. dev@sefaria.org