AbdouMagico/cross-scriptural-verse-matcher
0
Cross-Scriptural Verse Matcher
A unified framework for finding theologically relevant verses across the Old Testament (OT), New Testament (NT), and the Quran based on semantic meaning and latent thematic guidance.
Architecture
- Base Encoder:
intfloat/multilingual-e5-base— multilingual sentence embeddings, strong zero-shot retrieval - Latent Guidance Head: Multi-label thematic classifier (45 theological themes) on top of embeddings
- Scripture-Type Embedding: Learned embedding for OT/NT/Quran to condition the shared space
- Loss: Combined contrastive (InfoNCE with hard negatives) + thematic BCE classification
Training Recipe
Dataset
Cross-scriptural verse pairs generated via LLM annotation with:
- Similarity scores (0.0–1.0)
- Relationship types: thematic, narrative, prophetic, lexical, ethical, cosmological
- Hard negatives: same-theme verses with different meaning
- 45 theological themes for latent guidance
Source datasets:
- Quran:
freococo/quran_multilingual_parallel(English) - Bible:
davidguzmanr/open-bible-resources(English Standard, verse-level)
Usage
Training
python train.pyInference
python inference.py --query "For God so loved the world" --top_k 5Repositories
- Model: https://huggingface.co/AbdouMagico/cross-scriptural-verse-matcher
- Dataset: https://huggingface.co/datasets/AbdouMagico/cross-scriptural-pairs
Citation
Built on:
- SimCSE (Gao et al., 2021) — contrastive sentence embeddings
- E5 (Wang et al., 2022) — weakly-supervised text embedding
- multilingual-e5 (XLM-R backbone) — cross-lingual alignment
