22 ms·
Structured Bible Data API in Multiple Translations
- cosmotic 5y agoHere's some more data, although likely to the contrary purpose of the OP: https://github.com/bibviz/bibviz https://github.com/bibviz/bibviz and the hosted output https://philb61.github.io/ https://philb61.github.io/
- TOMDM 5y agoThe OP had me wondering why anyone would use that instead of just downloading the data and serving it locally. This is much more interesting though
- smitty1e 5y agoClients are cheap, but administering the server is Yet Another Mouth To Feed (YAMTF).
- jakecyr 5y agoGathering all of the different translations in a structured format can take a lot of time which is what gave me the inspiration to remove that step from anyone wanting to create an application with a more comprehensive set of data.
- pgeorgi 5y agoWhat's missing on http://crosswire.org/sword/modules/ModDisp.jsp?modType=Bibles http://crosswire.org/sword/modules/ModDisp.jsp?modType=Bible... or https://sourceforge.net/projects/zefania-sharp/files/Bibles/ https://sourceforge.net/projects/zefania-sharp/files/Bibles/?
- arthurcolle 5y agoCan I send a POST request for prayer? What's the SLA for that
- gregjor 5y agoWhy not train GPT-2 or 3 with these texts, so we can get AI commentary and maybe some new scripture? I’m curious how a neural network will reconcile different versions of the Creation and Christ’s birth. If GPT can simulate someone’s girlfriend maybe it can simulate Augustine or Aquinas.
- bobsmooth 5y ago"Therefore God called upon his angels to come and to save the earth and her inhabitants from destruction. And they did so. And God said, “Let every creature breathe safe by the Spirit of the Lord through Jesus Christ, that his spirit may be like unto this day.” And God called upon the angels and promised them." https://medium.com/@ysaw/gpt-2-writes-bible-verses-b642113d4b58 https://medium.com/@ysaw/gpt-2-writes-bible-verses-b642113d4... It's pretty good.
- gregjor 5y agoCool. I’ll stop working on my pitch deck.
- chrismorgan 5y agoAs one who cares deeply about the Bible, my comment upon it is that it’s super inaccurate in style and doctrine, and very clearly draws considerably upon extrabiblical sources. As simple examples, the Old Testament section (whose faults are more obvious than the Synoptic Gospels section) talks of Jesus, who wasn’t yet born; treats “Satan” in a way that is clearly inspired by Christian writings from hundreds of years after Jesus, entirely unsupported in the Old Testament (the concept of a supernatural devil as part of their religion is largely just not found in the Old Testament, it being introduced after the exile; if you look for “satan” transliterated in the Old Testament, you tend to only find it in 1 Chronicles 21:1, Job 1–2 and Zechariah 3:1–2, and “devil” is nowhere at all in the Old Testament) and not really supported by the New Testament either; talks of the Holy Ghost and kingdom of God/heaven in a way also entirely absent in the Old Testament, but more after the style of the New Testament (true of a few more things as well); and talks of angels as mortal and capable of evil in a way entirely unsupported by both testaments, but present in various subsequent Christian teachings. It’s frankly more an imitation just of the style of formal English from a few hundred years ago, with some religiosity in its content, but not in the slightest bit plausible or coherent as far as something that would actually be in the Bible. (It’s fun taking things seriously and seeing where it gets you.)
- chana_masala 5y agoI'm quite (pleasantly) surprised that this is on HN's front page. I am not Christian (I am Hindu) however I do appreciate the Bible and others who are religious (and who are tolerant of my religion, too)
- eurasiantiger 5y agoDo not be fooled: the Xians are not tolerant of your religion; they would absolutely love to convert you all like the ”good” evangelists they are.
- david_allison 5y agoThe Bible is like the Rosetta Stone: it's the most translated work in the world, ~800,000 words long, delimited by verse, and generally translated with great care by literate members of society. The academic value of projects like this is immense and it's great to see it on the front page.
- sramsay 5y agoThis speaks of "multiple translations." What I would really like are APIs to critical editions of the Greek New Testament, Septuagint, Hebrew Bible, Peshitta, Vulgate, etc. I'm not holding my breath; those are all under copyright, as I understand it, and they aren't cheap when added onto the major bible software packages. I know of at least one public domain edition of the Byzantine majority text of the Greek NT: https://newchristianbiblestudy.org/bible/greek-byzantine-2000/ https://newchristianbiblestudy.org/bible/greek-byzantine-200... (not sure if that's the official page) Edit: I suppose I could create my own API for that one!
- fortran77 5y agoFor the Hebrew Bible, I recommend Sefaria: https://www.sefaria.org/texts https://www.sefaria.org/texts
- quercusa 5y agoThe SBL GNT is a freely-distributable version of the Greek NT with a decent apparatus (think UBS, not NA): https://sblgnt.com/download/ https://sblgnt.com/download/
- sramsay 5y agoYou know, I had sort of forgotten all about this edition. I notice that the public-domain Robinson edition I mentioned was one of the source texts. And the XML is pretty amazing. Every token is tagged!
- cik 5y agoI don't know anything about the non-Jewish sources, but Sefaria makes basically everything available via an API, no idea if it's free or not. A tonne of their code is available on GitHub as well. * https://github.com/Sefaria/Sefaria-Project/wiki/API-Documentation https://github.com/Sefaria/Sefaria-Project/wiki/API-Document... * https://github.com/Sefaria/ https://github.com/Sefaria/
- jakecyr 5y agoIf you think it would be helpful, I can add it to the list of translations on the site as well.
- DoctorOW 5y agoThere's a relatively large but finite number of possible inputs. This could theoretically be converted into a bunch of static files that fit on Netlify or GH Pages.
- frosted-flakes 5y agoI tried something like this before with Netlify, but if it takes too long to upload, it will time out. In my case, we were converting the PokeAPI.co Rest API from a dynamic Python service to a static API that served simple JSON files, to cut costs. But there are so many Pokémon and so much associated data that Netlify couldn't handle it. We ended up going with Firebase, which seems to work pretty well. https://pokeapi.co https://pokeapi.co is a Rest and GraphQL API for Pokémon data, mostly used for educational purposes.
- DoctorOW 5y agoThat's interesting, did you give up on the static route or are you using Firebase's static hosting? I assume GraphQL cannot be static hosted.
- frosted-flakes 5y agoThe Rest API uses Firebase's static hosting with some small use of lambda functions for pagination. It worked fine on Netlify with partial data, but with the full dataset it refused to work, and support wasn't any help. The GraphQL API is a separate service that I believe makes use of Prisma and a DB. I wasn't involved with the GraphQL API so I don't know the details.
- danShumway 5y agoThe Bible isn't that large in terms of actual data, it's all text. So storing a bunch of translations locally seems pretty easy. And from what I can see from the documentation, this only allows querying chapters/verses across translations, so it doesn't seem to be doing a lot of serverside work to link data together or to find references to names/places, or to merge translations together in some way. Is there a reason I'm missing why this is an API instead of something handled locally in a structured data format? Does it have access to a bunch of licensed translations that I couldn't use locally or something? I guess I'm just a little confused at what the value add is of having be online instead of local.
- pgeorgi 5y agoThe problem isn't "pretty easy" per-se (different translations assign different chapter/verse numbers in places, for example) but there has been lots of work spent on it already. There are protocols and formats to manage Bible texts, and entire organizations revolve around maintaining these (e.g. https://crosswire.org/ https://crosswire.org/). Some of them even have provisions for dealing with copyrighted materials (with unlock keys that you can buy). The red flags I see: * That site doesn't mention such prior art _at all_. * First thing I run into when trying to get a list of translations is Cloudflare. Nice, preparing for hyperscaling already! However, no discussion anywhere about the threat model of providing texts that can spell trouble in parts of the world through arbitrary third party services.
- chrismorgan 5y agoThis specific API doesn’t attempt to handle any of the even vaguely interesting problems like versification translation or footnotes, or even more basic things like where paragraph breaks lie. Instead, it’s just verse-per-line stuff loaded into a relational database of four tables: verse ∈ chapter ∈ book ∈ translation, all indexed by auto-generated IDs rather than anything sane, leading to a supremely awkward and remarkably inefficient ID-based REST API that’s unreliable to boot. I’m afraid the more I look at it the more I say it’s simply bad, having been implemented rather than designed, so that it’s unfortunately just about useless for any actual purpose.
- 5y ago
- Igelau 5y agoIt seems like api/translation/TRANSLATION_ID/book/BOOK_ID/chapter breaks after Isaiah. Which is shame because I really wanted Ezekiel 23:20 as a service.
- jerrysievert 5y ago> Ezekiel 23:20 for those not familiar, this verse acts as a sort of litmus test for translations of the Old Testament.
- Igelau 5y agoOh it's a litmus test for all kinds of things. E.g. I'm not schooled enough in animal husbandry to know the difference between donkey-sized genitals and horse-sized ones, or between donkey-sized emissions and horse-sized ones, but these people were. And they knew it well enough to say it's the genitals that are donkey-sized, and the discharge that's horse-sized, not the other way around. Probably stone you for heresy if you crossed up the words of the prophet like that. Yes, in context it's part of a very... colorful... metaphor, but I still find the distinction hilariously specific.
- TimTheTinker 5y agoThe horse/donkey pairing is a poetic device; there's no intended technical distinction between the two. If you're familiar with satyrs in Roman mythology, it's sort of like a poetic comparison to them, but using terms familiar to the audience at the time. The point of the passage is to call out Israel's spiritual lewdness and adultery in going after idols instead of worshipping the God who had made a covenant of faithfulness with them.
- Igelau 5y agoAs a collector of religious texts and bawdy limericks, I can appreciate that we've identified this as poetic.
- tobylane 5y ago
- chrismorgan 5y agohttps://freebibleapi.com/api/translation https://freebibleapi.com/api/translation: {"error":"Error loading translations"} … hmm. Well, reloaded it and it worked second time, showing that it’s got two translations: KJV and ASV, both public domain. (I observed similar errors in other URLs from time to time.) The key thing to this API seems to be its structure, that it’s relational like SQL but without joins, exposing the foreign keys and you have to look things up that way. This isn’t a model that makes much sense to me, so I’m curious if you’ve got any explanation of why or where this model might make sense. As an example, if you wanted to look up Exodus 3:4 in the ASV: • https://freebibleapi.com/api/translation https://freebibleapi.com/api/translation, then (using jq syntax) `select(.name == "English ASB") | .id` (that’s a very weird name for the ASV, incidentally), yields 35. • https://freebibleapi.com/api/translation/35/book https://freebibleapi.com/api/translation/35/book, `select(.name == "Exodus") | .id`, yields 15. • https://freebibleapi.com/api/translation/35/book/15/chapter https://freebibleapi.com/api/translation/35/book/15/chapter, `select(.chapter_number == 3) | .id`, yields 525. • https://freebibleapi.com/api/translation/35/book/15/chapter/525/verse https://freebibleapi.com/api/translation/35/book/15/chapter/..., `select(.verse_number == 4) | .content`. Plain text, incidentally; no footnotes or anything being kept here. It needs four sequential requests. If you want to avoid that, you need to cache the list of translations, book IDs, chapter IDs, verse IDs… and as soon as you’re doing any of that, I question why you’d use such an API rather than just storing the full text of the translation/s yourself, as a JSON blob for example if you’re keeping things simple. IDs for access rather than semantic identifiers seems very strange, since there are meaningful identifiers that won’t be changing: you can give a short string for translations (ASV, KJV), some form of book name for the books (I’d suggest OSIS book abbreviations <https://wiki.crosswire.org/OSIS_Book_Abbreviations https://wiki.crosswire.org/OSIS_Book_Abbreviations>), and chapter and verse numbers. Autogenerated IDs are just unnecessary obstruction. I’d also merge each pair of URLs, e.g. /translation/35 gives the translation object, and /translation/35/book gives the array of its children: I’d merge them to just one route, yielding {...translation, "books": [...books]}. Same for book and chapter. (Verse would be unchanged as it doesn’t have any children.) Taking it all together, accessing just Exodus 3:4 in the ASV would go from being /api/translation/35/book/15/chapter/525/verse/15835 to being /api/ASV/Exod/3/4. Your current /api/book, /api/chapter and /api/verse routes don’t fit into this picture; I’m again curious if you think they’re actually useful—they feel more like things that just happened because of how an API generator worked.
- skissane 5y agoThis is missing the Deuterocanon – the additional books found in Catholic and Orthodox Bibles but which most Protestant Bibles nowadays exclude – books such as those of Maccabees (both Catholic and Orthodox Bibles include 1 & 2; Orthodox Bibles add the 3rd book and occasionally even a 4th), Sirach (aka Ecclesiasticus), the Wisdom of Solomon, Tobit, Judith, Baruch. Catholics and Orthodox together are over 60% of the world's Christians, so over 60% of the Christians in the world use Bibles including these books. Right now it only has two Bible translations – KJV and ASV – KJV includes these books, but in this website's copy of it they are missing. In the KJV, they were relegated to a separate section called the "Apocrypha". Catholics and Orthodox oppose that name, and that segregation. Protestants viewed them as having "lesser authority", primarily on the argument that Jews do not consider them to be scripture. By contrast, the Catholic Church declared the Deuterocanon to be of equal authority to the rest of the Bible at the Council of Trent, and many Orthodox adopt the same view. Starting in the 19th century, there was a movement among Protestants to exclude these books from the Bible entirely, rather than simply relegate them to a separate section as previous generations of Protestants had done. As a result, the majority of contemporary Protestant Bibles omit them. Even the majority of contemporary printings of the KJV are missing those books, although in doing so those printings are being inauthentic to the intentions of its original translators and editors. The other translation this site has, the ASV, is an early 20th century American revision of the late 19th century English Revised Version. The English Revised Version included the "Apocrypha" section, but following this movement against these books among Protestants, the ASV excluded it. (A minority of printings of the ASV do include an "Apocrypha" section, but that is taken from the English Revised Version, it did not form part of the American revision process.)
- ImpressiveWebs 5y agoThe books of the Deuterocanon are not viewed as canonical by most Christian churches for a number of valid reasons: * They were never included as part of the Hebrew canon of books * There is no evidence that they were included in the original versions of the Septuagint * Historian Josephus made clear that those books were not part of the canon * Not one New Testament writer quoted from the Deuterocanon * Early church fathers did not consider them part of the Bible canon * John Wycliffe, a catholic who included these books in his translation, still did not consider them of the same authority as the rest * Even the council of Trent did not accept all the “apocryphal” books (e.g. 1 and 2 Esdras were excluded) * The content of the books testifies against themselves with their inaccuracies, contradictions, and other problems that are not found in the traditional Bible canon
- DarkContinent 5y agoWrt the comments about translations currently on the site: a lot of the newer translations standard in modern churches are under copyrights that, while quite permissive for use by individual faith-based organizations and even some commercial endeavors (like publishing), might be hard to protect in API form.
- lfpeb8b45ez 5y agoI last researched this a few years ago, but the best resource I’ve found in this space is: https://getbible.net/api https://getbible.net/api They’ve taken a different approach to retrieving content - instead of a navigable resource hierarchy you send a citation that approximates the standard format: https://en.wikipedia.org/wiki/Bible_citation https://en.wikipedia.org/wiki/Bible_citation This matches one of the most common use cases for a Bible API: turning a citation into content. It’s also worth scanning your content to find if there are characters that will break JSON serialization. For example, many translations distinguish supplied words by special characters: I’ve seen square and angle brackets used. It’s not an easy domain to represent once you start handling special cases, but very worthwhile.