Skip to content

Commands

Zoltán Kovács edited this page Mar 8, 2026 · 19 revisions

Clipboards

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. Some commands can work only with one of the clipboards.

Passages

In all commands below 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

This list is ordered in logical order, not alphabetically.

addbooks

Syntax: addbooks

Load the books of LXX, SBLGNT and StatResGNT (if any of these are available) in a preindexed format. Most commands (see below) require that these books are already loaded in such a format. Therefore, most features in the bibref program cannot be used before using this command. The command line version offers the -a option to load the books on the startup.

This command does not require any parameters. Its only possible usage is: addbooks.

On the command line platforms, the addbooks command creates a database for the readline library to support autocompletion when typing. For example, it is enough to type St and press the TAB button to get the keyword StatResGNT. On certain command line platforms, pressing the TAB button twice results in showing all possible keywords for autocompletion.

textN

Syntax: textN text

Define a Greek text and put its Latin transcription in clipboard N. (N must be either 1 or 2.) Examples: text1 θεος, text2 Ιησου Χριστου.

latintextN

Syntax: latintextN text

Put the Latin transcription text in clipboard N. Examples: latintext1 ueos, latintext2 ihsoyxristoy. Note: Do not use any other character in the text than the letters a-z, that is, do not use any spaces, either.

findN

Syntax: findN Bible

Search for the text of clipboard N in the given Bible. Example: find1 LXX, find2 StatResGNT.

This command requires to have the books already loaded via the addbooks command first.

lengthN

Syntax: lengthN

Compute the length of the text in clipboard N.

This command does not require any parameters. Its only possible usage is either length1 or length2.

printN

Syntax: printN

Show the Greek text in clipboard N (without punctuation and spaces).

This command does not require any parameters. Its only possible usage is either print1 or print2.

lookup

Syntax: lookup Bible book verse

Search for the given verse in the given book in the given Bible. Here Bible can be any edition that is already installed as a module on the computer. In usual installations of bibref, the possible Bible editions are LXX, SBLGNT and StatResGNT. Advanced users may install additional modules via the SWORD library.

Depending on the Bible edition, sometimes there may be strange results if the verse is given incorrectly. For example, lookup KJV Matthew 28:21 and lookup KJV Mark 1:1 both give the text The beginning of the gospel of Jesus Christ, the Son of God;, however, this belongs clearly only to Mark 1:1. This issue is related to the SWORD library (and its modules), that is, we do not consider it as an error.

lookupN

Syntax: lookupN Bible book passage

Search for the given passage in the given book in the given Bible edition and put its Latin transcription in clipboard N. Example: lookup2 StatResGNT Mark 1:1. Here lookup2 StatResGNT Matthew 28:21 will give an error.

The lookupN command requires to have the books already loaded via the addbooks command first.

tokens

Syntax: tokens Bible book verse

Search for the given verse in the given book in the given Bible edition (similarly to the command lookup), but the output is shown in a tokenized form. Tokens are usually words or set of words. Currently, tokenization is done via Strong's numbers and read from the modules given in the SWORD library. Not all modules provide the Strong's numbers, for example, SBLGNT does not have this feature (but StatResGNT has).

Examples: tokens LXX Genesis 1:1 gives the list 1722 746 4160 3588 2316 3588 3772 2532 3588 1093, or tokens StatResGNT Matthew 1:1 gives the list 976 1078 2424 5547 5207 1138 5207 11 (this latter can be checked at the collation page of StatResGNT).

The tokens command requires to have the books already loaded via the addbooks command first.

search

Syntax: search Bible token1 token2 ... tokenN maxlength

Search for the given set of tokens on a maximal length of maxlength in the given Bible edition.

Using tokens may help checking the text from a different point of view. Example: search LXX 2744 1722 2962 6 returns 3 occurrences which means that the tokens 2744 (kauchaomai: to boast, to glory, to exult), 1722 (en: in, on, at, by, with, among) and 2962 (kurios: Lord, master, owner) can be found on 6-long tokenlist only three times: twice in Sirach 39:8 (in the tokenlist 846 846 3809 1319 846 2532 1722 3551 1242 2962 2744) and once in Jeremiah 9:22 (in the tokenlist 3592 3004 2962 3361 2744 3588 4680 1722 3588 4678 846 2532 3361 2744 3588 2478 1722 3588 2479 846 2532 3361 2744 3588 4145 1722 3588 4149 846). In Sirach 39:8 the first occurrence is from 2532 till 2744 and the second one begins with 1722 and ends with the token 134 which is the first token in Sirach 39:9 (both list consists of 6 tokens).

The search command requires to have the books already loaded via the addbooks command first.

raw

Syntax: raw Bible book start length

Show the raw Latin a-z transcription of a passage in the given book in the given Bible edition, beginning with the start position on length characters. Examples: raw LXX Genesis 1 10 gives the first 10 Greek letters of LXX, and raw LXX Genesis 150792 10 gives the last 10 Greek letters in the same book.

The raw command requires to have the books already loaded via the addbooks command first.

rawN

Syntax: rawN Bible book start length

Put a passage in the given book in the given Bible edition, beginning with the start position on length characters, in clipboard N. Example: raw1 LXX Genesis 1 10 puts the first 10 Greek letters of LXX in clipboard 1.

The rawN command requires to have the books already loaded via the addbooks command first.

minunique1

Syntax: minunique1 Bible

Search for minimal unique passages in clipboard 1 in the given Bible edition.

Assumed that clipboard 1 contains some text, possibly unique in the Bible edition. We are searching for all texts that are subtexts (with terminology of computer science: substrings) of it, but still unique. This may be mandatory when a text from the Old Testament is to be searched in the New Testament, but it is too long to be present as verbatim text.

Example: Assumed that clipboard 1 contains the first 10 Greek letters of LXX, enarxhepoi (εναρχηεποι with Greek letters). Now minunique1 LXX returns two substrings: xhepo and narxhep which are also unique. (If clipboard 1 does not contain a unique text from the given Bible edition, then no output will be given.)

The minunique1 command requires to have the books already loaded via the addbooks command first. This command cannot be used for clipboard 2.

extend

Syntax: extend Bible1 Bible2 book2 passage2

Extend the given passage in Bible2 according to the longest possible quotation from Bible1, based on the text of book2 in passage2. (In most cases LXX is used for Bible1 and SBLGNT for Bible2.)

This command is useful to extend a New Testament passage to the longest possible text that may be a verbatim quotation of an Old Testament passage. Examples: extend LXX StatResGNT Romans 3:12 and extend LXX StatResGNT Romans 3:13 (and other inputs) result in an extension of the New Testament passage into StatResGNT Romans 3:11+23 3:19-91, because a longer passage through these 9 verses are present letter by letter in LXX Psalms 13:2+71 13:4-100.

The extend command requires to have the books already loaded via the addbooks command first.

psalminfo

Syntax: psalminfo Bible number

Show the number of verses in Psalm number in the given Bible. Example: psalminfo LXX 13 returns 7. The purpose of this command is to allow handling Psalms like different books in bibref, because they are separated in the manuscripts (not like other books).

The psalminfo command requires to have the books already loaded via the addbooks command first.

getrefs

Syntax: getrefs Bible2 Bible1 book1 passage1

Search for references in Bible2 on the passage in Bible1 in book book1 in passage1. Usually SBLGNT or StatResGNT stands for Bible2 and LXX for Bible1. If book1 is Psalms, the passage can also be its number only.

Example: getrefs StatResGNT LXX Psalms 2 gives several results, the last matches are the longest, including Acts 4:25+58 4:26 (length 131), Hebrews 5:5+70 5:5 (length 32) and Hebrews 1:5+26 1:5-53 (length 32), and also Acts 13:33+88 13:33 (length 32). The latter three matches correspond to the same words of Psalm 2, and the former one is also a confirmable match. On the other hand, several other (shorter) occurrences are false positive and should be ignored by the user, but the computer cannot decide if they are relevant or not.

The getrefs command requires to have the books already loaded via the addbooks command first. The results may be displayed just after a while, depending on how long passage1 is. With more memory, it is possible to process several thousands of characters in one turn, but for very large inputs bibref may run out of memory and exit without informing the user. Therefore, it is suggested that just a couple of verses should be given as input unless you know what you are doing.

maxresults

Syntax: maxresults number

Set the maximal amount of results to be shown to number. To avoid getting an extremely high number of results on search-related commands, by default this is limited to 100 in the terminal based versions. Example usage: maxresults 5.

In the GUI versions, this setting cannot be changed, because the number of results is not limited at all.

compare12

Syntax: compare12

Compare the two clipboards with a 2-long substring-fingerprint (2-shingles) check, best match is reached at 1/(length1+length2). For more information, see Leskovec, Rajamaran, Ullman: Mining of massive datasets, Cambridge Univ. Press, 2014.

This command does not require any parameters. Its only possible usage is compare12. Example: We assume that clipboard 1 contains abc and clipboard2 contains abcd. Now compare12 returns 28.57% for the difference.

jaccard12

Syntax: 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. For more information, see Leskovec, Rajamaran, Ullman: Mining of massive datasets, Cambridge Univ. Press, 2014, p. 77, footnote 2. We redefine the union of bags, then, we compute the Jaccard distance.

This command does not require any parameters. Its only possible usage is jaccard12. Example: We assume that clipboard 1 contains abc and clipboard2 contains abcd. Now jaccard12 returns 33.33% for the difference.

The bibref program has a preference to use the Jaccard difference, mainly in the statement analysis (see below).

nearest12

Syntax: nearest12

Assume there is a longer passage stored in clipboard 1, maybe a verse or a couple of verses, from the Old Testament. We know that some words or a longer part of clipboard 1 is quoted in the New Testament. We know exactly the quotation so we store it in clipboard 2. Now, the question is: Can we find a subtext of clipboard 1 which is as close to clipboard 2 as possible?

The algorithm behind the command nearest12 finds a subtext of clipboard 1 which has a minimal Jaccard difference to clipboard 2.

This command does not require any parameters. Its only possible usage is nearest12. Example: We assume that clipboard 1 contains abcdefabcdefabcghi and clipboard2 contains cdebcdgh. Now nearest12 returns 0.428571 for the minimal Jaccard distance by finding the subtext cdefabcd.

colors

Syntax: colors switch

Show some outputs colored if switch is on. This command is supported only in the command line version. Usually, error messages are printed in red, Old Testament passages in yellow and New Testament passages in cyan, if the option is set to on. Examples: colors on or colors off.

In the GUI versions, outputs are always colored.

statement

Syntax: statement text

Analyze the given statement given in text.

Statements are complex constructions, usually consisting of several lines. They are written in a language called BRST, close to English, similar to the SQL programming language. They claim correspondence between Old Testament and New Testament passages with arguments that are based on verbatim matches or low Jaccard distances. The bibref program can parse such statements syntactically and semantically, and it gives an analysis of the result. Also, a correspondence diagram can be created and obtained in GraphViz format (which can be displayed or exported).

The statement command requires to have the books already loaded via the addbooks command first, otherwise the evidences cannot be checked. This command implicitly uses several other commands like lookupN, rawN and findN.

diagram

Syntax: diagram format

If the statement analysis is successful, turn the output of the statement command into format (info, graphviz, ps or svg). By default, the output format is info (in this case, no change is made in the output of the statement command).

By using this command, it is possible to export the statement diagram in the command line version in various formats. In the web based terminal version, the svg output is shown immediately as an SVG object in the terminal. In the TeXmacs plugin mode, the ps output is shown immediately as a PostScript figure in the bibref session.

This command is supported only in the command line version.

help

Syntax: help command

Show some hints on usage of command, or get general help if no parameter is given. If just the starting characters of the command are entered, then a short help for all those commands will be listed which start with the given characters. Examples: help b (it lists help for all commands since there is no command that starts with a b), help l (it lists help for the commands latintextN, lengthN, lookup and lookupN).

This command is supported only in the command line version.

quit

Syntax: quit

Exit the bibref program.

Clone this wiki locally