figures-of-speech
Dataset describing biblical figures of speech and listing instances.
The original figures of speech data comes from unfoldingWord's translationCore® — unfoldingWord suite, and is provided under a CC BY-SA 4.0 License.
The data was reorganized and extended by Sean Boisen (Gloo, LLC), and is provided under a CC BY-SA 4.0 License.
The code for accessing the data is by Drew Bronson (Gloo) and is provided under an MIT license.
Note there is no data for these books:
- NUM
- 1CH
- 2CH
- ECC
- ISA
- JER
- EZK
- DAN
- AMO
- ZEC
Install
The Python package is bible-figures-of-speech. The data (19 figure types and
about 27,000 verse-indexed instances) ships inside it, so no separate download
or checkout is needed.
pip install bible-figures-of-speech
Or, before a PyPI release, straight from GitHub:
pip install git+https://github.com/TangoGroup/figures-of-speech
Requires Python 3.12 or 3.13 (the upper bound comes from biblelib, used for verse references).
Usage
from bible_figures_of_speech import FiguresOfSpeech
fos = FiguresOfSpeech() # loads the bundled data
# The type catalog, keyed by translationAcademy slug
metaphor = fos.types["figs-metaphor"]
print(metaphor.label, "-", metaphor.summary)
# Instances overlapping a passage
for note in fos.notes_for("JUD 1:2-4"):
print(note.ref, note.title, note.translation)
print(note.alternate_translations)
# Everything for one book, or the whole dataset
mark = fos.instances("MRK")
total = sum(1 for _ in fos.iter_instances())
notes_for() accepts a USFM reference string ("MRK 1:2", "MRK 1:4-8",
"MRK 1:40-2:3", "ROM 3:1-ROM 3:9"), a biblelib BCVID or BCVIDRange, or
any object with .start and .end verses that have .book, .chapter and
.verse (the PassageLike protocol). Each instance's passage is a biblelib
BCVIDRange.
Each FigureInstance keeps all of the source fields (id, ref,
source_text, translation, original_comment, and comments as a tuple of
Comment(comment, alternate_translations)), joined to its FigureType as
figure. For convenience, it also offers title, comment and
alternate_translations (from the first interpretation), plus body, a
display-ready summary.
To load a different copy of the data (for example, a newer snapshot), pass its
directory: FiguresOfSpeech(Path("path/to/figures_of_speech")).
Data
See src/bible_figures_of_speech/data/README.md
for the full field-by-field description, scope and known limitations, and
src/bible_figures_of_speech/data/LICENSE
for the data license and attribution. The data is a snapshot generated
2026-09-16. Attribution constants are available as
bible_figures_of_speech.PUBLISHER, DATA_LICENSE and DATA_LICENSE_URL.
Development
uv sync
uv run pytest
uv run ruff check . && uv run ruff format --check .
uv run mypy
uv build
Metadata
Release files for bible-figures-of-speech 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| bible_figures_of_speech-0.1.0.tar.gz | 3.3 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bible_figures_of_speech-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.7 MB
Release files / bible_figures_of_speech-0.1.0.tar.gz
| Download URL | bible_figures_of_speech-0.1.0.tar.gz |
|---|---|
| Size | 3.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8beea53115b8d709dda1fadd7535cbc92b6cfee30564725eada2a64d99345a2c
|
|
BLAKE2b-256 checksum How to use checksums |
874a034498200bb2df65611242055b9633db8e83645e31041e30b4dced4b6097
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / bible_figures_of_speech-0.1.0-py3-none-any.whl
| Download URL | bible_figures_of_speech-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.4 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5e0239a24590769a736b2b83bdb421c907d0722e33db43cf39316854776d365a
|
|
BLAKE2b-256 checksum How to use checksums |
e5008026ede498a207c8e62aaad683a5d96b3aa4cc9b487b3a6848f95444d774
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|