Dataset Viewer
Auto-converted to Parquet Duplicate
text
stringlengths
0
145
0:19 1:12 2:10-12 3:7-8 4:9 5:4-5 6:0-3 7:23-24 8:22
0:15-17 1:11-14 2:46 3:5-8 4:43 5:32-33 6:31 8:19 9:40 10:35 11:34 12:28-29 13:24-25 14:23-24 15:26-27 16:27
0:13-14 1:15-17 2:2-4 3:0-1 4:8-9 5:10 6:11-12
0:22-23 1:17-19 2:8-10 3:3-6 5:0-1 6:1-2
1:7 3:8 5:14-16
0:6 1:3-4 2:15
0:24 2:25-26 3:15-16 4:10 5:4-6 6:7 7:8-9
0:9 1:1-2 3:22-24 4:13-15 5:16 6:17-18
0:3-5 1:0-2 2:26 3:21-23 4:11-13 5:14 6:15-16 7:17-19
0:26 1:0-3 2:24-25 3:18-20 4:21 5:22-23 9:7 11:31 12:28 13:42
1:0-3 2:16 3:7-8
0:2 2:42 4:16 5:22-23 6:28 7:36-37
0:3 1:1-2 2:6 3:8-13 4:21-22 5:20 6:23-25
0:24-26 1:12-14 2:16-18 3:2,3,5,6 4:5
0:16 2:8-9 3:10-12
0:7-11 1:4 2:5-6 3:16 4:24
0:11-12 1:3-4 2:7-10 3:17-19 4:29,30,31,32,35 5:33-34 6:40 7:43-47 8:41-42
0:6 1:0-3 2:9-10 3:14-15 4:8 5:20-22 6:30-31 7:26-29
0:5-10 1:22 2:18-21 3:15 4:32-34 5:27 6:30
0:0-2 1:3-7 2:10-13 3:20 4:29-30 5:16 6:26-28 7:20-24
0:0-4 2:11,13 3:7 4:19-23 5:15-18 6:19 8:30-32 9:29 10:38-39 11:35-36
0:0 1:1-5 2:8 3:12 4:14-18 5:18-19
0:12-14 1:1,8,9,10 2:2-7 3:17 4:19-20 5:22-26 6:27-29
0:5 1:8 2:10,11,13 3:14-15 4:2 5:21-22 6:26 7:24-26
0:7 1:17 2:15,16,18 3:11-14 4:10 5:32-34 6:36 7:7 8:39
1:9 2:0-3 3:12 4:33-34 5:22-25 6:30 7:43 8:40 9:52
0:20 1:5-9 2:5 3:1-3 4:16-18 5:10-12 6:46 7:26-30 8:28 9:43 10:42 11:37
0:11 1:4-8 2:18 3:30 4:0-3 5:12 7:15
0:11-13 1:9 2:9 3:4-6
1:7-8 2:8-9 3:22-23 4:14,18,19,20,21,24 5:27-28 6:30-34 7:36-38 8:43-44
0:6-11 1:27 2:20-22 3:17
1:0-3 2:18-19 3:23 4:23,25 5:29-33 6:38 7:41 8:9
0:2 2:9 3:10-11 4:13-17
0:1 1:9 2:8 4:15
0:0 1:5 2:6 3:11-15 4:20 5:18 6:25-27 7:28-29
0:5 1:7 2:6,13,14,15,16 3:7-11 4:27-28 5:23-25
0:10-14 1:17 2:7 3:33 4:20-21 5:28-30 6:22 7:37
0:2 1:3-4 2:11-13 3:9 4:6-7 6:26 7:19-22 8:31-32
0:9-10 1:6-8 2:1-4 3:13,14,20 5:26-27 6:24-25 7:28-32
0:3-8 1:17 2:12 4:14-15 5:19-20 7:22 8:34-35 9:25-28 10:30-32
0:13-14 1:1-4 2:5-6 3:21-23 4:24-26 5:34 6:32 7:28-31
0:36 2:1 3:14 5:22-24 6:18 7:17-18 8:33
0:7-8 1:2-5 2:27 3:31-33 4:16 5:22-23 6:14 7:15
0:6 1:7 2:8-9 3:11-15 5:32 6:22 7:28-30 8:36
1:2 2:15-16 3:10 4:5-9 5:21-23 6:19 7:28-30 8:26-27 9:40
0:3-4 1:13 2:7-9 3:17-20 4:16
1:11-12 2:8-9 3:2 4:30-31 5:28-29 6:23-26
0:0-3 2:18 3:10-12 4:36 5:35,37,38
0:2 1:26 2:27 3:29 4:39
0:30 1:4 2:18 3:19,20,22 4:13 6:38 7:36
2:11 3:14-15 4:20-23 5:30
1:0-1 3:3 4:12 5:23-24 6:10 7:8-9
0:2 1:3-5 2:6-8 3:10-14
0:4 1:6 2:8,9,10,16 3:16 4:17-19
0:2-3 1:5-7 2:10 3:9 5:19 6:22-24 7:22 9:14-15
2:3-5 3:6-8 4:13 5:15-17 6:19
0:6-8 1:0-3 3:12 4:18 5:18-20 6:22-23 7:27 8:43 9:25 10:53 11:47
0:30 1:23,26 2:24-25 3:31-34 4:4 5:7 6:10-11 7:12 8:13-14
0:4 1:2 2:9-11 3:12-13 4:17 5:14-17 6:18-19 7:20-21 8:22
1:2-3 2:1 4:11-12 5:10 6:9 7:13-14 8:20 9:23-25 12:33 13:29-32
0:3-6 2:7 3:7 4:12
0:4-7 1:26 2:19 3:21-22 4:24
0:8,10 1:2-4 2:1,5 4:20-21 5:16-17 6:14
0:3-6 1:10-11 2:7-9 3:20 4:21-23 6:26 7:24-25 8:36
0:4-5 1:1-3 2:25 3:14-16 4:21 5:9-12 6:31-32 9:40
0:9-12 1:4-8 2:18-20 3:15-16 4:23 5:24-30 7:32-34 8:37-38
0:16-18 1:11 2:10 3:5-7 4:15 5:13
0:8-9 1:6,7,10,11 2:12 3:18-19 4:20
0:0 1:1-3 2:4 3:9-13 4:14-16 5:17 6:20 8:8
0:12-13 1:15-17
0:24 1:3-6 2:10 3:7 4:11 5:16-17 6:12-15
0:1 1:5 2:6-7 3:8-9
0:13 2:2-5 5:23
0:2 1:22 2:18 3:16,17,30 4:25-27 5:20
0:9-10 1:15-18 3:5 4:30 5:26 6:23 7:43-44 8:40 10:55-58 12:49 13:50-52
0:2-5 1:17 2:27-28 4:14-16 7:40-41
0:16 1:21 2:30 4:35-37
0:34 1:2 2:15-16 3:24 4:17 5:31 6:38
1:21-23 2:26-28 3:32 4:3 5:33-35 6:39 7:68 8:51-55 9:56-58 10:60-62
0:3-5 1:1-2 2:11-13 3:8-9 4:22 5:14 6:24 7:35
0:1 1:4-5 3:14-15 4:25 5:27
0:5-8 1:9-11 2:1 3:2-3 4:13,14,19 5:16-18 6:20-21 7:22,24,25,26
0:3-4 1:9 2:31-32 3:28-30 4:33-35 6:22
0:1,2,5 1:9-10 2:15-18 4:20-23
0:13 1:14 2:9 3:0-1 4:5 5:30-31 6:27-28 7:28-29 8:19-20 9:32
0:12-14 1:6-7 2:9-10
0:21-22 1:19 3:16-18 4:7-9 5:14-15 6:12-13 7:46 9:36-37 10:38 11:25 12:26-28 13:29
1:13-14
1:1-2 2:4-5 3:40 5:20,25 6:35-36
0:9 1:4-6 3:13-14
0:2 1:8 3:14-15 5:17-22
1:3-4 2:29-30 3:40 4:20 5:15-16 6:17
0:2-3 2:7-8 4:21 6:26
0:14-15 1:13 2:4 3:5 4:25-26 5:16 6:21
0:4-5 1:0-2 2:3 3:10 4:14-16 6:21-23 7:18-19 8:20
0:12-13 1:9-11 2:22 3:18-21 4:27-29 5:36-37 6:32-35 7:30-31
0:5 1:1-3 2:8 3:12-13 4:14 5:30 7:17
0:5 1:10 2:7 3:16 4:20 5:20-21 6:28 7:42 8:39-43 9:31-32 10:26-27
1:9 2:1 3:3 4:13 5:21 6:32-33 7:36 8:23-24
0:1 1:22-24 2:28 3:8
End of preview. Expand in Data Studio

compact-alignments — per-verse, per-book, content-addressed

The token-position companion to lexeme-alignments (which is aggregated/type-level and can't tell you what happened in any one verse). This dataset restores position: for a given edition's Bible book, which Hebrew/Greek content word aligned to which target-text token, verse by verse.

The authoritative list of what's published is always manifest.json, not this file.

Original-language source editions (needed to resolve srcOrd)

srcOrd (in the compact string, below) is an ordinal among a verse's Hebrew/Greek content lexemes (the same MACULA lexeme anchor lexeme-alignments uses — see below) — to turn it back into an actual source word, a client needs the SAME fixed original-language edition this project aligns against, for both testaments:

testament edition source
Hebrew (OT) WLC (Westminster Leningrad Codex) Clear-Bible macula-hebrew@main
Greek (NT) Nestle1904 Clear-Bible macula-greek@main

Same editions lexeme-alignments anchors against — see that dataset's README for detail.

What this is not

It does not contain any Bible text. Every entry is a pair of integers (an ordinal and a target token position) — no words, no verse text, nothing copyrightable. To turn a compact string back into words you need the edition's own text (tokenized the same way alignment tokenized it), obtained separately from that edition's own source. This is deliberate: it's what keeps the dataset unambiguously CC0 and small.

Two kinds of file

1. Shared content-lexeme sequence — _index/<BOOK>_lexemes.json, published ONCE per book

{"RUT 1:1": ["1961", "3117", "8199", "8199", "1961", "7458", "0776", ...], ...}

The only shared index — this dataset does NOT also publish a separate flat ["BOOK C:V", ...] ref list. That would be pure redundancy: this object's own (ordered) keys already are that list, so a client derives it in one line rather than downloading a second, duplicate file (see below).

srcOrd[i] in a compact string (file kind #2) is the lexeme at position i in the value here — resolved for you, no morphology knowledge required. Lexemes are published without the hbo:/grc: language prefix that lexeme-alignments uses (hbo:0430 → plain 0430) — redundant here specifically, because a BOOK is always entirely one testament (Hebrew OT or Greek NT, never mixed), so the book code itself already tells you which language every entry in the file is. (Don't drop the prefix anywhere it might mix testaments, e.g. lexeme-alignments — one partition there spans a whole language, both OT and NT.)

srcOrd cannot be resolved from file kind #2 alone — you always need this file too. It exists specifically so a client never has to reconstruct is_content themselves. Live case that motivated it: Hebrew's direct-object marker (Strong's H0853) shares its bare lexeme id with a much rarer noun homonym — nothing in the lexeme or Strong's code alone distinguishes them, in EITHER our spine or a typical external lexicon. is_content in our own pipeline isn't derived from lexeme/Strong's either — it comes from a per-occurrence morphological class tag (MACULA class: noun/verb/adjective vs particle/etc.) — so we resolve it once, here, and publish the answer rather than asking every client to independently re-derive it from their own morphology data and hope it agrees with ours. Concrete check, GEN 1:1 ("In the beginning God created the heavens and the earth"): the verse has 7 Hebrew tokens including two occurrences of H0853 (the object marker, before "heavens" and before "earth") — _index/GEN_lexemes.json["GEN 1:1"] lists exactly 5 lexemes (7225 beginning, 1254 create, 0430 God, 8064 heavens, 0776 earth) — both 0853 occurrences correctly excluded, with nothing beyond an array lookup required to know that.

Edition-independent — written once, the first time any edition publishes that book, every subsequent edition just reuses it. See the pooled-range caveat in compact_align.py's build_source_lexemes docstring if you're decoding a PKF-style pooled target-verse range (rare).

2. Per-edition, per-book compact array — <iso[0]>/<iso>/<edition>/<BOOK>_<hash>.json

["0:1 1:2 2:5 3:5-6 4:12 5:10 6:13 7:16 8:17 9:19 10:21 11:30 12:33 13:35 14:24 15:27",
 "0:3 1:1 2:5 3:9 4:7 5:11 6:14 7:18 8:20 9:22 10:24-25 11:27 12:29 13:32 14:34 15:36 16:38",
 "0:5 1:4 2:3 3:1 4:9 5:13",
 ...]

Same length as that book's _lexemes.json, position-parallel to its keys — array element i is the compact string for the i-th verse ref (in _lexemes.json's own key order). No verse-ref keys stored per edition.

Deriving the ref list — one line, either language

Since the ref list is just _index/<BOOK>_lexemes.json's own ordered keys, don't fetch/store it separately — derive it from the same file you already need for lexemes:

Python:

import json
lexemes = json.loads(open("_index/RUT_lexemes.json").read())
refs = list(lexemes.keys())                          # ["RUT 1:1", "RUT 1:2", "RUT 1:3", ...]
array = json.loads(open("e/eng/eng_BSB/RUT_101a1.json").read())
by_ref = dict(zip(refs, array))

by_ref["RUT 1:1"]        # -> "0:1 1:2 2:5 3:5-6 4:12 5:10 6:13 7:16 8:17 9:19 10:21 11:30 12:33 13:35 14:24 15:27"
lexemes["RUT 1:1"][0]    # -> "1961"  (the lexeme srcOrd 0 refers to)

JavaScript:

const lexemes = JSON.parse(await fetch("_index/RUT_lexemes.json").then(r => r.text()));
const refs = Object.keys(lexemes);                    // ["RUT 1:1", "RUT 1:2", "RUT 1:3", ...]
const array = JSON.parse(await fetch("e/eng/eng_BSB/RUT_101a1.json").then(r => r.text()));
const byRef = Object.fromEntries(refs.map((ref, i) => [ref, array[i]]));

byRef["RUT 1:1"];         // -> "0:1 1:2 2:5 3:5-6 4:12 5:10 6:13 7:16 8:17 9:19 10:21 11:30 12:33 13:35 14:24 15:27"
lexemes["RUT 1:1"][0];    // -> "1961"  (the lexeme srcOrd 0 refers to)

(Object.keys()/for...in iterate string keys in insertion order per the ECMAScript spec since ES2015 — this is guaranteed, not just conventional, in modern JS. Same guarantee in Python 3.7+ dicts.)

Path components

<iso[0]>/<iso>/<edition>/<BOOK>_<hash>.json
segment meaning example
<iso[0]> first character of the ISO 639-3 code — a sharding bucket, nothing more e (for eng)
<iso> the TRUE published language code eng
<edition> which edition/translation of that language, iso-prefixed unless it already carries one eng_BSB, arb_vdv
<BOOK> 3-letter USFM book code RUT
<hash> last 5 hex chars of that book's content hash (below) 101a1

<edition> comes from the same identifier already published as base_text in lexeme-alignments — so a consumer of both datasets can join on it directly.

The compact string format

"0:1 1:2 2:5 3:5-6 4:12 5:10 6:13 7:16 8:17 9:19 10:21 11:30 12:33 13:35 14:24 15:27"

srcOrd counts lexemes, not raw source tokens — the SAME MACULA lexeme anchor (lang:augmented-strong, e.g. hbo:0430) lexeme-alignments uses, not a bare Strong's number or a raw word count. See lexeme-alignments' "The anchor: lexeme, not Strong's" section for what that means and why (homonym/sense-split handling, the Strong's rollup, etc.) — this dataset assumes that anchor as given rather than re-explaining it. (On GitHub, the same section lives at lexeme-alignments/README.md.)

token meaning
space separates entries — one per aligned content lexeme (the lexeme anchor above)
srcOrd:targetSpan srcOrd = 0-based ordinal among that verse's content lexemes ONLY, in source order (function words never get an ordinal)
- inside a span a contiguous range of target-token positions, inclusive (3-4 = tokens 3 and 4)
, inside a span a scattered, non-contiguous list of target-token positions — see the worked example below
bare integer one single target token
(ordinal absent) that content lexeme is unaligned in this edition — no null placeholder
"" (empty string) the verse has no aligned content lexeme, or the edition has no text there (e.g. a non-anchor verse of a pooled translation range)

Target token positions are addressed by position in that verse's own tokenized text — a consumer tokenizes the edition's text the SAME way alignment did to resolve a position back to a word, or target positions silently point at the wrong words. This is NOT plain whitespace/punctuation splitting — the exact rule (usj_source.tokenize()) is: a token is a maximal run of Unicode letters + combining marks (categories L/M). Everything else — punctuation, whitespace, AND digits (Nd, e.g. 40, 3) — is a separator, producing NO token at all, not even a placeholder. Numerals in the source text are the sharpest gotcha: a naive re-tokenizer that treats "Selama 40 hari" as 3 tokens (Selama, 40, hari) will be off-by-one from every position onward, compounding for every subsequent number in the verse — this alone can look exactly like a systematic alignment bug when it's actually a tokenization mismatch (verified against real client feedback on ACT 1:3/ind_ags: 8 apparent "off-by-one" mismatches collapsed to 2 genuine ones once decoded with the correct tokenizer rule).

Reference implementation, both languages (verified byte-for-byte identical to usj_source.tokenize() on the real ind_ags ACT 1:3 text above):

Python:

import unicodedata

def tokenize(text: str) -> list[str]:
    toks, cur = [], []
    for ch in unicodedata.normalize("NFC", text):
        if unicodedata.combining(ch):          # drop non-spacing combining marks (Hebrew niqqud,
            continue                           # Arabic harakat, ...) before the letter/mark test below
        if unicodedata.category(ch)[0] in ("L", "M"):
            cur.append(ch)
        elif cur:
            toks.append("".join(cur))
            cur = []
    if cur:
        toks.append("".join(cur))
    return toks

JavaScript (covers Latin/Cyrillic/Greek-script targets, which is the large majority — see the caveat below for diacritic-heavy scripts):

function tokenize(text) {
    const normalized = text.normalize("NFC");
    return normalized.match(/[\p{L}\p{M}]+/gu) || [];   // \p{L}=letter, \p{M}=mark (Unicode property escapes)
}

Honest caveat on the JS version: JavaScript has no built-in equivalent to Python's unicodedata.combining() (canonical combining class), so the snippet above doesn't strip non-spacing marks (Mn) the way the Python one does — it's exactly right for scripts without those (Latin, Cyrillic, Greek — covers most target languages, including the ind_ags case here), but for a diacritic-heavy script (Hebrew niqqud, Arabic harakat, Devanagari) it may tokenize slightly differently than usj_source.tokenize(). Rather than ship a JS mark-stripping table that could itself be subtly wrong, if you're decoding one of those scripts, treat usj_source.py's Python implementation as the authoritative reference.

Worked example — the scattered (comma) case

Real output, RUT 1:11, English (BSB):

"0:2 1:1 2:3 3:4,6 4:10 5:16 6:19 8:23"

Verse text: "But Naomi replied, "Return home, my daughters. Why would you go with me?..."

ordinal Hebrew Strong's span decoded
0 תֹּ֤אמֶר H0559 2 replied
1 נָעֳמִי֙ H5281 1 Naomi
2 שֹׁ֣בְנָה H7725 3 Return
3 בְנֹתַ֔ H1323 4,6 home, daughters (scattered — token 5, "my", is skipped in between)
4 תֵלַ֖כְנָה H1980 10 go

This is genuine eflomal output, not a contrived case: the aligner linked "daughters" to two non-adjacent English words. The comma form exists precisely to represent real cases like this — a contiguous "a-b" range would be wrong here (it would also claim token 5, "my", which this Hebrew word did not align to).

The content hash — reproducible by ANY client, in any text format

Alignment is extremely sensitive to any wording difference in a revised Bible book. If a publisher fixes a typo or re-versifies a chapter, an alignment computed against the OLD text is silently wrong against the new one. The hash in the filename turns that into a fail-closed lookup: a client hashes its OWN copy of the edition's book text and looks for a matching filename — no match means no stale alignment can be served by accident.

Algorithm (book_content_hash in compact_align.py — reimplementable in any language):

  1. Extract every verse's translatable text only (no footnotes, headings, or titles — the same rule alignment itself follows).
  2. For each (chapter, verse) pair, ascending, form the string "{chapter}:{verse}:{text}".
  3. Join all of a book's verse-strings with "\n".
  4. UTF-8 encode.
  5. SHA-256, hex digest.
  6. The filename uses the last 5 hex characters (a client wanting stronger collision resistance can still recompute and compare the full 64-char digest — only the filename is truncated).

Including chapter:verse in the hashed string (not just the bare words) means a re-versification (a verse split, merge, or renumbering) changes the hash too, even when every word stayed the same — a re-versified book needs a fresh alignment exactly as much as a reworded one does.

This is deliberately based on the extracted words, never the container format (USJ/USFM/plain-text JSON bytes) — verified: re-serializing identical content with different JSON formatting keeps the hash unchanged; changing a single word anywhere in the book changes it.

Layout — why the bulk data isn't in git

compact-alignments/
  README.md              # committed — this file
  manifest.json           # committed — per-language/edition metadata (the durable record)
  _index/                 # committed — small (~tens of KB total), generated once, never edition-specific
    RUT_lexemes.json
    GEN_lexemes.json
    ...
  e/eng/eng_BSB/          # GIT-IGNORED — bulk data, published out-of-band (HF / object storage)
    RUT_101a1.json
    ...
  a/arb/arb_vdv/
    ...

Provenance

manifest.json lists every published (iso, edition) with its tag (the internal alignment id), books (which ones are published), and a source pointer (provider/edition/license_url) — same convention as lexeme-alignments. Alignment source is the additive union of eflomal + gloss + gapfill per-verse output (align_files.tag_files, exact-tag matched).

Reproducibility

Same content-addressed model as lexeme-alignments: eflomal is non-deterministic (seeds from /dev/urandom), so a regenerated edition's spans can drift ~1% run-to-run. There's no single dataset-wide hash to pin against here — the book-content hash in each filename pins the source text, not the alignment output; two regenerations of the same edition can legitimately publish under the same filename with slightly different span content.

Publishing (one-time per edition)

python3 -c "from huggingface_hub import login; login()"
python3 -m lexeme_aligner.compact_align --iso bsb --publish-iso eng --usj-dir data/usj-eng \
    --publish compact-alignments

License

CC0-1.0. As noted above, no Bible text is stored anywhere in this dataset — only integer token positions and spine verse references. There is nothing here that reproduces a source translation's copyrightable expression. The edition's own text (needed to decode a compact string into words) keeps its own license — see lexeme-alignments/manifest.json's sources pointers, or this dataset's own manifest.json, for the authoritative terms per edition.

Downloads last month
70