CoolFace
Apppublic

TorahNLP/rambam-concordance

sourceHugging Faceupdated 3mo agoView on Hugging Face
0likes
App README

Rambam Concordance — מפתח למשנה תורה

A full-text concordance of the Mishneh Torah (Maimonides), with manuscript version comparison and printable traditional concordance export.

Features

  • —Word & phrase search across all ~14,000 halachot
  • —Root/headword grouping — inflected forms clustered under their dictionary entry, using a rule-based prefix/suffix stripper and a curated Rambam-vocabulary lexicon
  • —Girsaot comparison — side-by-side view of alternate manuscript versions
  • —Browse by Book → Hilchet → Chapter → Halacha
  • —Print concordance — traditional format (headword → indented references with surrounding context), exported as PDF for physical printing

Setup

1. Fetch the corpus from Sefaria

bash
python fetch_corpus.py                # primary Hebrew version (~5 min)
python fetch_corpus.py --all-versions # also fetch alternate girsaot (~20 min)

2. Build the concordance database

bash
python build_concordance.py

3. Run the app

bash
streamlit run app.py

Docker / Hugging Face Spaces

The Dockerfile installs Noto Hebrew fonts for PDF generation. The pre-built data/concordance.db should be committed to the repo before pushing to HF Spaces (or use Git LFS for large files).

Data source

Hebrew text from Sefaria. Licensed CC BY-NC 4.0.

Architecture

fetch_corpus.py       — Sefaria API → data/mishna_torah_*.jsonl
hebrew_morph.py       — Hebrew tokenisation, prefix/suffix stripping, root lexicon
build_concordance.py  — JSONL → data/concordance.db (SQLite + FTS5)
app.py                — Streamlit UI (Search / Browse / Girsaot / Print)
print_export.py       — ReportLab PDF concordance generator