Git Product home page Git Product logo

bibref's Introduction

A bibref version based on the Qt graphical framework

bibref

bibref is a tool that helps discovering internal references in the Bible. It aims at finding citations of the Septuagint in the Greek New Testament in a mechanical way.

Background

The Bible, a book that has been translated into many languages, is maybe the most important book has ever existed. Believers have evidence that it is God's word, written by various people being inspired by God himself.

The Bible has many internal references. Many of them connect the two parts of the Bible: the Old Testament and the New Testament. The books of the Old Testament are usually written in Hebrew, while the books of the New Testament are Greek. A natural question can arise: How can Hebrew texts be cited in the Greek text?

There are several research projects on this, and today it seems to be clear that many authors of the New Testament cited a Greek translation of the Hebrew text, namely the Septuagint, that was widely popular in the first centuries, and still popular in some Christian churches. Many Bible translations, however, mostly use only the Hebrew text as a basis of the Old Testament, because the importance of the Septuagint is not yet widely identified.

This project

This software project attempts to support finding citations of the Septuagint in the New Testament automatically. The work is based on The SWORD Project.

The bibref package offers several tools that help in comparing the verses of the Septuagint with the verses of the Greek New Testament. The tools consider the texts of full books of the Bible as one unit instead of considering just separated verses. The texts are provided by the SWORD project from the modules LXX and SBLGNT. In the newest versions the module StatResGNT is also supported.

This project is a work in progress.

Using the software tool

Qt version

Since March 2024 bibref comes with a graphical user interface that is based on Qt. You can find information on how to install the program on your machine on the Releases page.

Terminal based versions

A bibref version based on jquery.terminal

You need a Linux system (preferred) or a web browser (fallback) to use the terminal based interface.

At the moment this interface was tested on Ubuntu Linux 18.04, 19.10, 20.04 and 22.04 but it should work on many other systems.

Snap store installation (preferred)

Get it from the Snap Store

After installation you need to use the command bibref via command line. In the snap version only the LXX, SBLGNT, StatResGNT and KJV modules are present. If you want to use additional modules, please try installing the tool from source code (see below).

Web version (fallback)

Currently there is an online web version of bibref available: a simple version that is based on jquery.terminal. It is somewhat slower than the installable version, but works immediately in a web browser (you may need to wait a couple of seconds before the start). In the web versions the modules LXX, SBLGNT, StatResGNT and KJV are available.

Installation from source code (for developers)

build

Qt version

We provide some hints to help you build the graphical user interface.

Terminal based versions

The following commands should be entered on command line:

sudo apt install libsword-common libsword-dev libreadline-dev libboost-dev libboost-filesystem-dev git cmake build-essential pkg-config
git clone https://github.com/kovzol/bibref.git
cd bibref
mkdir build
cd build
cmake ..
make
make install || true

Finally enter the command

build/bibref -c

to start the program with a user friendly command line interface (with colors).

(If you want to compile the web version, please have a look on the corresponding GitHub action.)

Example use case

We follow the syntax of the terminal based version, but the similar steps can be used on the graphical interface as well. The following session finds the corresponding citation of the LXX text of Psalm 2:1 in the SBLGNT:

This is bibref 2022Feb24, nice to meet you.
>> addbooks
Loading LXX...
Genesis contains 150801 characters,
...
and Malachi contains 7250 characters.
Done loading books of LXX.
Loading SBLGNT...
Matthew contains 89148 characters,
...
Jude contains 2550 characters,
and Revelation of John contains 45581 characters.
Done loading books of SBLGNT.
>> getrefs SBLGNT LXX Psalms 2:1
LXX Psalms 2:1 2:2-8 = SBLGNT Acts 4:25+58 4:26 (length=131, pos1=502, pos2=11601)
>> quit
Goodbye.

Available commands

For most commands two clipboards can be used. They are numbered with 1 and 2. These clipboards store the Latin transcription of the Greek texts to work with. Typically clipboard 1 is used to store a passage from the LXX and clipboard 2 for the SBLGNT. Therefore some commands can work only with one of the clipboards.

In all commands where passage is given as a parameter, it can be either one verse with the classic notation (e.g. 1:2), or it can be fine tuned by entering two positions: a verseStart and a verseEnd. These can be also given with the classic notation or a modifier can be appended:

  • If verseStart is appended by a +M modifier (where M is a non-negative integer) then the first M characters will be removed from the passage.
  • If verseEnd is appended by a -M modifier (where M is a non-negative integer) then the last M characters will be removed from the passage.

For example, Genesis 1:1, Genesis 1:1+0 1:1-0, Genesis 1:1+0 1:1, Genesis 1:1 1:1-0 define the same first verse of Genesis. On the other hand, Genesis 1:1+2 1:1-3 defines the first verse of Genesis without the first two and the last three letters.

In all commands the Bible parameter can be either LXX, SBLGNT, StatResGNT, except for the command lookup.

The available commands are:

  • addbooks: Load the books of LXX, SBLGNT and StatResGNT (if any of these are available). Most commands require that these books are already loaded. After using this command for the first time (it takes a couple of seconds), a folder named bibref-addbooks-cache will be created in the current working directory to speed up the next startup of this command.
  • textN text: Define a Greek text and put its Latin transcription in clipboard N.
  • latintextN text: Put the Latin transcription text in clipboard N.
  • findN Bible: Search for the text of clipboard N in the given Bible.
  • lengthN: Compute the length of the text in clipboard N.
  • printN: Show the Greek text in clipboard N (without punctuation and spaces).
  • lookup Bible book verse: Search for the given verse in the given book in the given Bible. Here Bible can be any translation that is already installed as a module on the computer.
  • lookupN Bible book passage: Search for the given passage in the given book in the given Bible and put its Latin transcription in clipboard N.
  • search Bible token1 token2 ... tokenN maxlength: Search for the given set of tokens on a maximal length of maxlength in the given Bible.
  • raw Bible book start length: Show the raw Latin transcription of a passage in the given book in the given Bible, beginning with the start position on length characters.
  • rawN Bible book start length: Put a passage in the given book in the given Bible, beginning with the start position on length characters, in clipboard N.
  • minunique1 Bible: Search for minimal unique passages in clipboard 1 in the given Bible.
  • extend Bible1 Bible2 book2 passage2: Extend the given passage in Bible2 according to the longest possible citation from Bible1, based on the text of book2 in passage2. In most cases LXX is used for Bible1 and SBLGNT for Bible2.
  • psalminfo Bible number: Show the number of verses in Psalm number in the given Bible.
  • getrefs Bible2 Bible1 book1 passage1: Search for references in Bible2 on the passage in Bible1 in book book1 in passage1. Usually SBLGNT stands for Bible2 and LXX for Bible1. If book1 is Psalms, the passage can also be its number only.
  • maxresults number: Set the maximal amount of results to be shown to number.
  • compare12: Compare the two clipboards with a 2-long substring-fingerprint (2-shingles) check, best match is reached at 1/(length1+length2).
  • jaccard12: Compare the two clipboards the same way how compare12 does but use the "Jaccard similarity for bags" algorithm, best match is reached at 0.
  • sql switch: Set some outputs to be shown also as an SQL query if switch is on.
  • colors switch: Show some outputs colored if switch is on.
  • tokens Bible book verse: Search for the given verse in the given book in the given Bible (see command lookup), but the output is shown in a tokenized form. Tokenization is done via Strong's numbers.
  • help command: Show some hints on usage of command, or get general help if no parameter is given.
  • quit: Exit program.

There may be other commands available that are not documented yet.

Some examples are also available. See also an incomplete draft (in Hungarian) on the purpose of the commands. Also, a work-in-progress database can be found in docs/common which aims at collecting all quotations.

You may be interested in some blog entries that extensively use the web version of bibref.

Command line options in the terminal based version on Linux

Issue bibref -h to learn about the available command line options.

bibref's People

Contributors

kovben2004 avatar kovzol avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

seanpm2001

bibref's Issues

Consider introducing clasps

A clasp is a literal (or an almost literal) quotation that connects an OT text with an NT text. Given a quotation in the NT text, it refers to a longer OT text, but there are some clasps that literally prove that there is a connection. However, other parts of the NT text can be commentary. Example: Isaiah 53:5-9 and I_Peter 2:22-25, and the clasps are (almost fully) the verse 22 and the end of verse 24.

Position outputs are inconsistent

>> getrefs SBLGNT LXX Psalms 2:9
LXX Psalms 2:9+20 2:9-35 = SBLGNT Luke 22:48+54 22:49-58 (length=5, pos1=1051)
LXX Psalms 2:9+43 2:9-7 = SBLGNT Romans 16:20+16 16:20-71 (length=10, pos1=1074)
LXX Psalms 2:9+5 2:9-43 = SBLGNT II_Corinthians 8:24+50 8:24-34 (length=12, pos1=1036)
LXX Psalms 2:9+15 2:9-32 = SBLGNT Revelation_of_John 12:5+47 12:5-55 (length=13, pos1=1046)
LXX Psalms 2:9+9 2:9-32 = SBLGNT Revelation_of_John 19:15+81 19:15-68 (length=19, pos1=1040)
LXX Psalms 2:9+9 2:9-30 = SBLGNT Revelation_of_John 2:27+11 2:27-28 (length=21, pos1=1040)
>> lookup1 LXX Psalms 2:9+9 2:9-32
Stored internally as aytoysenrabdvsidhra.
>> find1 LXX
Found in Psalms 2:9+9 2:9-32 (book position 1041-1059)
1 occurrences.

Here pos1=1040 but book position starts with 1041.

Create SQL views to simplify queries

It is very difficult to understand the queries in the Python script visualize.py. Create some views to ease updating old ones and writing new ones.

Enumerate NT parts of quotations

Some NT texts are combinations of OT quotations. E.g. Galatians 3:8 seems to be a combination of Genesis 12:3 and Genesis 18:18. However, there is only one mentioning that here is some quotation (θεος προευηγγελισατο = God foretold the Gospel). This introduction of the set of quotations should be enumerated with a unique ID in the database. Also the starting position and length of the introductory words should be stored in the database (eventually as a list if there are more shorter passages). In the current SQL files (quotations.sql) the introductory words are already stored as text, but a more precise list could be useful to analyze the position of the introductory text whether it is before, after or in the middle of the NT quotation.

Remove some characters in lookup's output

· and ⸀ are unnecessary, e.g. here:

lookup SBLGNT Matthew 19:5
# και ειπεν· ⸀Ενεκα τουτου καταλειψει ανθρωπος τον πατερα και την μητερα και ⸀κολληθησεται τη γυναικι αυτου, και εσονται οι δυο εις σαρκα μιαν;

Removal of other characters like , and ; should also be considered.

Match LXX Psalms 90:14+63 90:14 = SBLGNT Luke 1:75+35 1:75 is not further extended

Maybe the character ⸂ is handled in an incorrect way:

>> lookup1 LXX Psalms 90:14+63 90:14
Stored internally as asaistaishmeraishmvn.
>> lookup LXX Psalms 90:14
ενεπλησθημεν το πρωι του ελεους σου και ηγαλλιασαμεθα και ευφρανθημεν εν πασαις ταις ημεραις ημων
>> lookup SBLGNT Luke 1:75
ἐν ὁσιότητι καὶ δικαιοσύνῃ ἐνώπιον αὐτοῦ ⸂πάσαις ταῖς ἡμέραις⸃ ἡμῶν.
>> lookup2 SBLGNT Luke 1:75+35 1:75
Stored internally as asaistaishmeraishmvn.
>> lookup2 SBLGNT Luke 1:75+34 1:75
Stored internally as yasaistaishmeraishmvn.
>> lookup SBLGNT Luke 1:75
ἐν ὁσιότητι καὶ δικαιοσύνῃ ἐνώπιον αὐτοῦ ⸂πάσαις ταῖς ἡμέραις⸃ ἡμῶν.
>> lookup1 LXX Psalms 90:14+62 90:14
Stored internally as pasaistaishmeraishmvn.

That is, letter π in the word πάσαις in Luke is ignored.

Fix pos1 data

In the output of getrefs in the file examples/find-citation-of-Psalms.txt the pos1 data are incorrect before Psalm 40. The outputs should be regenerated.

Crash on wrong parametrization of getrefs

The following gives a segfault:

getrefs Deuteronomy 29:3
terminate called after throwing an instance of 'std::logic_error'
  what():  basic_string::_M_construct null not valid
Aborted (core dumped)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.