bhs3 / README.md
balassit's picture
Clean dataset documentation; retain source attribution, license and access settings
3a57089 verified
|
Raw History Blame Contribute Delete
6.75 kB
metadata
license: cc0-1.0
language:
  - he
  - arc
task_categories:
  - token-classification
tags:
  - etcbc
  - bhs3
  - emdros
  - biblical-hebrew
size_categories:
  - 100K<n<1M
configs:
  - config_name: words
    default: true
    data_files:
      - split: train
        path: data/words.parquet
  - config_name: book
    data_files:
      - split: train
        path: data/book.parquet
  - config_name: chapter
    data_files:
      - split: train
        path: data/chapter.parquet
  - config_name: verse
    data_files:
      - split: train
        path: data/verse.parquet
  - config_name: half_verse
    data_files:
      - split: train
        path: data/half_verse.parquet
  - config_name: sentence
    data_files:
      - split: train
        path: data/sentence.parquet
  - config_name: sentence_atom
    data_files:
      - split: train
        path: data/sentence_atom.parquet
  - config_name: clause
    data_files:
      - split: train
        path: data/clause.parquet
  - config_name: clause_atom
    data_files:
      - split: train
        path: data/clause_atom.parquet
  - config_name: phrase
    data_files:
      - split: train
        path: data/phrase.parquet
  - config_name: phrase_atom
    data_files:
      - split: train
        path: data/phrase_atom.parquet
  - config_name: subphrase
    data_files:
      - split: train
        path: data/subphrase.parquet

Text Database of the Hebrew Bible ETCBC3

The ETCBC3 database contains the Hebrew Bible in Hebrew and Aramaic with morphological, syntactic and discourse annotations. This dataset provides SQLite and Parquet representations of the bhs3.mql.bz Emdros export published by DANS on December 31, 2011.

The corpus contains 426,499 words, 23,213 verses, 39 books, and 1,453,175 objects across 12 native object types. It defines 39 enums and 52 word features. Word monads extend through 430,156 with 3,657 unused positions. Checksums and per-type counts are in SOURCE.json.

Build

Python 3.10 or newer:

python3 create_dataset.py --source /path/to/bhs3.mql.bz
python3 -m unittest test_create_dataset
python3 export_parquet.py
python3 upload_to_hf.py --repo-id NuBerea/bhs3

The default output is baseline/. Use --output /another/path to create a separate baseline. Existing output is never overwritten. A failed build does not publish a partial dataset.

The SQLite importer uses only the standard library. Parquet export, tests and upload use the parent repository's pyarrow, datasets and huggingface_hub requirements.

The uploader creates a new private HF repository, accepts only the checksum-matched DANS archive and verifies the published files. It requires an authenticated account with repository creation permissions and refuses existing repositories.

Output

  • baseline/source/bhs3.mql.bz: byte-for-byte source archive.
  • baseline/SOURCE.json: compressed source, decompressed MQL, database and builder SHA-256 hashes, counts and validation results.
  • baseline/bhs3.sqlite: all native objects and annotations, not just words.
  • data/*.parquet: a default word table and separate configurations for every other native object type, with typed ID lists and monad ranges.
  • SOURCE.json: baseline provenance plus Parquet hashes and row counts.

Each native object type has a table retaining its original feature names. __id_d is the original Emdros ID, not a Text-Fabric node number. __monads is a JSON list of exact inclusive [first, last] ranges; first/last bounds alone are not proof of membership for discontinuous objects. Integer features remain integers, enum features retain their original labels, ID lists such as parents are JSON arrays, and byte-escaped text is decoded as UTF-8. Native id_d value nil is null, distinct from numeric 0. feature_schema preserves declarations and defaults; enumerations preserves numeric enum codes and default labels. Unassigned features receive their declared defaults. Unknown syntax, features, enum labels, escapes, duplicate IDs, truncated records and malformed ranges fail the build.

objects indexes all native IDs and types. monad_ranges retains exact membership. The words view adds book/chapter/verse, native verse ID, ref, and a 1-based word_in_verse derived from ordered word monads. It requires every word to belong to exactly one verse and every verse to contain words. Gaps in legacy monad numbering are retained, not renumbered.

Example (from this directory):

sqlite3 -readonly baseline/bhs3.sqlite \
  "SELECT __id_d, __first_monad, ref, word_in_verse, text, lexeme, part_of_speech
   FROM words WHERE book='Genesis' AND chapter=1 AND verse=1
   ORDER BY word_in_verse;"

Hierarchy features, including parents and mother, retain their native values. The HF dataset includes the SQLite database, original archive and browseable tables:

from datasets import load_dataset

words = load_dataset("NuBerea/bhs3", "words", split="train", token=True)
clauses = load_dataset("NuBerea/bhs3", "clause", split="train", token=True)

Source and rights

Source detail Verified value
Original title Text Database of the Hebrew Bible ETCBC3
Original author E. Talstra, ETCBC, VU Amsterdam
Original publisher DANS Data Station Social Sciences and Humanities
Original publication date 2011-12-31
Persistent source 10.17026/DANS-X8H-Y2BV
DANS metadata version 2.1
Source file bhs3.mql.bz, file 151015
File size 25,149,657 bytes
DANS SHA-1, matched locally c0a780b1de380978c557a6ad00fd24845b45f233
Local SHA-256 5fdc0a1506a7706d31dca356218d8671b5ef08832067cd28aa07779df798b877
Source license CC0-1.0
Recorded rights holder Vrije Universiteit Amsterdam

The DANS dataset API records the CC0-1.0 license and the matching source file checksum. DANS community norms request citation of the original author and source. The publication date is 2011-12-31; DANS metadata version 2.1 identifies the repository record. The license applies to the ETCBC3 release identified above.

Citation

Cite the NuBerea publication below; original source attribution is recorded separately above.

@misc{nuberea_bhs3,
  title={Text Database of the Hebrew Bible ETCBC3},
  author={{NuBerea}},
  publisher={NuBerea},
  license={CC0-1.0},
  url={https://huggingface.co/datasets/NuBerea/bhs3}
}