News for hackers. Stuff that matters.
Re:Bible Semantic Search by lalaland1125 on Monday June 13, 2022 @11:27PM (#31734424)
SBERT isn't trained on this type of archaic English and you can see it failing. It needs to be fine tuned or you should use a modern Bible translation.

A clear example is the query: "homosexuality"

This returns:

> James 2:3 - And ye have respect to him that weareth the gay clothing, and say unto him, Sit thou here in a good place; and say to the poor, Stand thou there, or sit here under my footstool

It's clearly seeing "gay" but is unaware that the meaning has changed.

A classic issue when applying a ML model out of domain.

Re:Bible Semantic Search by chrislee973 on Tuesday June 14, 2022 @12:48AM (#31734841)
Hey, creator of the Bible Semantic Search app here. I 100% agree with you. I hacked together this prototype for the purposes of learning the Pinecone API rather than fine-tuning a language model, but I'm still pleasantly surprised by the quality of the search results despite all the shortcomings you mentioned. The results aren't great, but they're decent. I'm surprised how well SBERT works out of the box considering I haven't done any fine-tuning whatsoever, and like you said, it doesn't fully understand the KJV's archaic writing style. Switching to a version that uses more modern English like the NIV is trivial so maybe I'll do that.
Re:Bible Semantic Search by chrismorgan on Tuesday June 14, 2022 @01:57AM (#31735208)
I recommend the WEB as a public domain translation. The likes of the NIV and ESV will be troublesome for licensing reasons. The WEB isn’t my favourite translation (I grew up with the RSV and prefer the RSV or ESV), a bit clumsier than the ASV from which it is mostly springs (with changes both missing and extraneous), but it’s public domain.
Re:Bible Semantic Search by mikeytown2 on Tuesday June 14, 2022 @01:08AM (#31734956)
Go with the ESV or NASB as these are word for word translations similar to the KJV. There's also the NKJV that uses modern english. Can use modern translations on the backend and still display the KJV verse.
Re:Bible Semantic Search by jordanmoconnor on Tuesday June 14, 2022 @05:53AM (#31736692)
Most of these newer translations have licensing restrictions that prevent you from simply using them.
Re:Bible Semantic Search by dotancohen on Tuesday June 14, 2022 @06:34AM (#31736971)
Do those licenses apply to using them on the backend, though? Assuming that the site displays the classic verse, and not the copyrighted verse, as GP prescribes.
Re:Bible Semantic Search by anjbe on Tuesday June 14, 2022 @06:39AM (#31736998)
I suppose that would be the same question as whether GitHub Copilot violates copyright in its code suggestions.
Re:Bible Semantic Search by hushpuppy on Tuesday June 14, 2022 @09:45AM (#31739404)
What makes the Bible unique in this context is that there are huge amount of resources that all reference the same basic structure.

One of the things that makes KJV version useful for scholars is that since it's been the "standard" for hundreds of years a great deal of other work references its structure. People use it because of this. It's less to do with it being a fabulously accurate translation or whatever. It's just newer bibles don't have this wealth of history and documentation that references it and much of them are pretty expensive to license, while KJV is public domain.

For example "Strong's Exhaustive Concordance". If you get a version of KJV with "Strong's Numbers" you can cross reference words and phrases in their original languages (greek/hewbrew/etc). This way students can understand some of the original meanings that go into difficult or disputed passages.

Also there is a large number of commentaries of all sorts of different types that reference specific passages.

Besides that KJV is just mostly valued in Protestant Christian dialects of Christianity. Other Christian religions such as various versions of Eastern Orthodox have different numbers of books or will arrange things in different orders. There have been different attempts to past scholars to arrange things in more chronological order, too.

This makes the Bible fairly unique when it comes to literature. Each verse of text can have dozens of different "back links" and "references".

so if somebody searches for the subject "Homosexuality" it will get hits in various commentaries. Those commentaries all directly reference verses in the Bible.

So you could show the version found and why it was selected. That way a reader would be shown "These authors think this verse is has to do with homosexuality" and they could click through and find out the justification for this, different translations, what those translations are likely based on, what other Christian sects feel this verse means, and so on and so forth.

I don't know if it would be useful for you, but there is a "Sword Project" that collects and cross references different Bibles and bible resources as well as tools.

https://www.crosswire.org/sword/index.jsp

Re:Bible Semantic Search by Syonyk on Tuesday June 14, 2022 @01:11AM (#31734972)
> Switching to a version that uses more modern English like the NIV is trivial so maybe I'll do that.

ESV or CSB, please...

How hard would it be to train it on the range of common modern translations? It would be an interesting stress test of the models to see how close searches in different translations are - they're theoretically all communicating the same thing, with different styles and emphasis, but I'd expect a lot of that to fall out in the semantic search (at least, if it were working properly).

You could grab a range of English translations ranging from "very literal" to "thought for thought" (The Message applies here, and I'm not even sure it's thought for thought), do various searches, and see what the overlap in results is.

In any case, very neat project... concept. :/ It appears to have fallen over, all I get is "Please wait..." when I try to access it. Even without my usual web filters interfering. I think.

Re:Bible Semantic Search by xhrpost on Tuesday June 14, 2022 @06:39AM (#31737000)
The range[1] you speak of could definitely be interesting to add. There can already be quite a difference between translations on this spectrum which could help this tool pick up even more possibilities for particular meanings (particularly on the extreme end of functional/paraphrasing like The Message you mentioned or The Passion Translation). It's quite fascinating looking at a verse across this spectrum and seeing what the different translators chose to focus on or "pull out" of the underlying Greek/Hebrew.

I haven't personally read much of ESV or CSB, just curious, why the preference for those?

[1]: https://en.wikipedia.org/wiki/Dynamic_and_formal_equivalence

Re:Bible Semantic Search by eckza on Tuesday June 14, 2022 @06:47AM (#31737049)
Semantic search on several versions and show results for chapter and verse in my preferred version = best of both worlds.

This is awesome. Thank you for building it.

Re:Bible Semantic Search by xhrpost on Tuesday June 14, 2022 @06:31AM (#31736936)
Some modern translations might have copyright rules preventing this without express permission (which may or may not be difficult to acquire, obviously other sites/apps have done it). They all have different rules and limitations but I remember reading that the NET Bible was specifically built for more permissive copyright requirements in the Internet age.
Re:Bible Semantic Search by yjftsjthsd-h on Tuesday June 14, 2022 @06:47AM (#31737045)
https://ebible.org/t4t/ might work? It's available in ex. https://andbible.github.io/ which bodes well for its licensing. It's also in conventional English (minimal jargon), which is probably a positive.

Edit: Actually, better yet: https://crosswire.org/sword/modules/ModDisp.jsp?modType=Bibl... has licensing info for each listed item

Re:Bible Semantic Search by gibspaulding on Tuesday June 14, 2022 @10:12AM (#31739790)
I just looked up NET because I was thinking the same thing, but it seems their free license is strictly for print versions and <1000 copies. Also if OP cares, its noncommercial. Their site has an email address posted for licensing inquiries though so you could ask!

As someone else pointed out, the WEB translation is public domain so it might be a better option.

Re:Bible Semantic Search by swasheck on Tuesday June 14, 2022 @08:56AM (#31738674)
sblgnt is a decent basis for literary analysis but it’s NT only. the non-trivial part of your work is to navigate the oddly byzantine bible licensing considerations
Re:Bible Semantic Search by kadoban on Monday June 13, 2022 @11:57PM (#31734575)
Couldn't they search in a modern translation and just refer back to the ancient one? Seems like the way bible verses are split up should remove the ability of translation to move anything around much.
Re:Bible Semantic Search by chrislee973 on Tuesday June 14, 2022 @12:52AM (#31734868)
Ah, that's a good idea. I was considering just fully replacing the KJV with the NIV, but for people who want the KJV, having a mapping between the two versions would work. Do the verses between the two versions map each other exactly? Like they cover the same exact thing, just written in a different style?
Re:Bible Semantic Search by chrismorgan on Tuesday June 14, 2022 @01:47AM (#31735170)
To do this properly, you have to map versifications, because some systems use different conventions. As the most significant and pervasive example, some systems treat the title of psalms as verse one (French generally does this), while others treat it as separate (verse zero, effectively; English generally does this), so if you just reuse numbers across such transitions you’ll get consistent off-by-one errors. There are quite a few other similar off-by-one errors, and occasionally more, throughout.

https://wiki.crosswire.org/Alternate_Versification is a decent starting point for looking into the topic, with SWORD’s canon_.h files fairly tolerable for showing the number of verses in each chapter. Unfortunately, SWORD has never gone as far as doing proper mapping* between versifications for some reason—they have some basic mapping somewhere or other, but I can’t remember offhand where or what it is, as I only briefly looked into it five years or so ago.

The most significant differences occur when you switch languages (there are quite a few differences if you switch from English to French or to many Indic languages), but there may be some differences between translations within a language too, e.g. SWORD’s NRSV versification has an extra verse in 3 John and Revelation 12 compared to its KJV versification.

Re:Bible Semantic Search by lrvick on Tuesday June 14, 2022 @02:13AM (#31735315)
Just remember the NIV translation of The Bible is property of Harper Collins, who is also amusingly the publisher of many tabloids and The Satanic Bible.

I used to distribute a BibleGateway-ripped copy of NIV as a plugin for the open source GnomeSword project and managed to upset both Harper Collins and the open source scholar community. It was absurd and I refused to stop. I dared them to sue me for sharing the Bible as open source... the headlines would write themselves.

FWIIW they never took the bait, but expect empty threat Cease and Desist letters from the Harper Collins legal team.

Re:Bible Semantic Search by pbhjpbhj on Tuesday June 14, 2022 @06:05AM (#31736771)
I thought NIV was Zondervan, bought (as you intimate) by News International (Rupert Murdoch). What I hadn't realised is Harper Collins owns Zondervan and Murdoch controls that.
Re:Bible Semantic Search by JasonFruit on Tuesday June 14, 2022 @07:34AM (#31737571)
Since a few verses are in the KJV but not the NIV, some would never appear in searches.
Re:Bible Semantic Search by Yeroc on Tuesday June 14, 2022 @01:06AM (#31734943)
Yes, for the majority of the English translations verses map to each other exactly with a few minor exceptions. NIV would map virtually exactly.