hmcgovern's picture
Update README.md
249ac40 verified
metadata
license: cc-by-4.0
dataset_info:
  features:
    - name: english_reference
      dtype: string
    - name: hebrew_reference
      dtype: string
    - name: text
      dtype: string
    - name: transliteration
      dtype: string
    - name: translation
      dtype: string
    - name: dStrongs
      dtype: string
    - name: manuscript_source
      dtype: string
  splits:
    - name: train
      num_bytes: 30435977
      num_examples: 305638
  download_size: 13210659
  dataset_size: 30435977
configs:
  - config_name: default
    data_files:
      - split: train
        path: data/train-*
language:
  - he
  - en
tags:
  - Bible
pretty_name: Original Language Bible Corpus -- Ancient Hebrew

Citation Information

If you use this data, please cite:

BibTeX:

@dataset{original_language_bibles,
  author       = {Hope McGovern},
  title        = {Original Language Bible Corpus: Ancient Hebrew Bible and Ancient Greek New Testament with Word-Level Translations},
  year         = {2024},
  publisher    = {Hugging Face Hub},
  url          = {https://huggingface.co/hmcgovern/original-language-bibles-greek},
  note         = {Includes word-level annotations and English translations for the Ancient Hebrew Bible (Old Testament) and Ancient Greek New Testament based on earliest manuscript evidence, compiled from STEP Bible (https://www.stepbible.org/).}
}

Aggregate to Line-Level

To aggregate this dataset to the line (verse) level, you can use a .map() function like this:

def aggregate_to_line(examples, priority='english'):
    aggregated = {}
    for ref, word, gloss in zip(examples[f"{priority}_reference"], examples["text"], examples["translation"]):
        verse_key = ".".join(ref.split(".")[:-1])  # Extract the verse key (e.g., Gen.1.1)
        if verse_key not in aggregated:
            aggregated[verse_key] = {"texts": [], "translations": []}
        aggregated[verse_key]["texts"].append(word)
        aggregated[verse_key]["translations"].append(gloss)

    # Convert the aggregated results into line-level entries
    return {
        "verse": list(aggregated.keys()),
        "text": [" | ".join(aggregated[verse]["texts"]) for verse in aggregated],
        "translation": [" | ".join(aggregated[verse]["translations"]) for verse in aggregated],
    }
ds = ds.map(aggregate_to_line, batched=True, remove_columns=ds['train'].column_names, fn_kwargs={"priority": "hebrew"})

Where priority denotes whether to use English or Hebrew verse delineations. english priority -> 23_547 verses, hebrew priority -> 23_499 verses