{"id":51203767,"url":"https://github.com/crizin/bible-db","last_synced_at":"2026-06-28T02:06:32.672Z","repository":{"id":364595214,"uuid":"1268463782","full_name":"crizin/bible-db","owner":"crizin","description":"Multilingual Bible dataset (Korean/KJV/Hebrew/Greek) with Strong's numbers and semantic-domain tags on every original-language word","archived":false,"fork":false,"pushed_at":"2026-06-13T17:30:20.000Z","size":39170,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-13T18:16:12.361Z","etag":null,"topics":["bible","biblical-studies","dataset","greek","hebrew","korean-bible","nlp","public-domain","sqlite","strongs"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/crizin.png","metadata":{"files":{"readme":"README.ko.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE","maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-06-13T15:06:18.000Z","updated_at":"2026-06-13T17:30:23.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/crizin/bible-db","commit_stats":null,"previous_names":["crizin/bible-db"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/crizin/bible-db","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crizin%2Fbible-db","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crizin%2Fbible-db/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crizin%2Fbible-db/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crizin%2Fbible-db/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crizin","download_url":"https://codeload.github.com/crizin/bible-db/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crizin%2Fbible-db/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34874568,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-28T02:00:05.809Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bible","biblical-studies","dataset","greek","hebrew","korean-bible","nlp","public-domain","sqlite","strongs"],"created_at":"2026-06-28T02:06:27.653Z","updated_at":"2026-06-28T02:06:32.662Z","avatar_url":"https://github.com/crizin.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bible-db\n\n[![Build \u0026 Release](https://github.com/crizin/bible-db/actions/workflows/release.yml/badge.svg)](https://github.com/crizin/bible-db/actions/workflows/release.yml)\n[![Latest release](https://img.shields.io/github/v/release/crizin/bible-db?sort=semver\u0026color=blue)](https://github.com/crizin/bible-db/releases/latest)\n[![Downloads](https://img.shields.io/github/downloads/crizin/bible-db/total?color=brightgreen)](https://github.com/crizin/bible-db/releases)\n[![Code: MIT](https://img.shields.io/badge/code-MIT-blue.svg)](LICENSE)\n[![Data: PD · CC BY · CC BY-SA](https://img.shields.io/badge/data-PD%20%C2%B7%20CC%20BY%204.0%20%C2%B7%20CC%20BY--SA-green.svg)](NOTICE)\n\n*[English README](README.md)*\n\n**다국어 성경 데이터셋** — 4개 언어 병렬 + Strong 번호 + **원어 단어마다 의미 도메인 태그**. 전부 퍼블릭 도메인 / 오픈 라이선스 소스에서 수집했고, 깔끔한 JSONL과 단일 SQLite 파일로 제공한다.\n\n차별점: 히브리어·그리스어 단어마다 **의미 카테고리**(`animal\u003elivestock`, `plant\u003efruit`, `nature\u003emineral_gem` …)가 붙어 있어, 다른 성경 데이터셋엔 없는 질문에 바로 답한다.\n\n\u003e *\"성경에서 **과일**은 어떻게 언급되나? 어떤 **가축**이 등장하나? **보석**·**악기**·**친족** 용어는?\"*\n\n## 무엇이 들어있나\n\n| 데이터 | 규모 | 출처 / 라이선스 |\n|--------|------|------------------|\n| 개역한글 (1961) | 31,101절 | 대한성서공회 — **Public Domain** |\n| KJV (1769) | 31,102절 | scrollmapper (CrossWire/eBible) — **PD** |\n| 히브리어 (Westminster Leningrad Codex) | 23,213절 / 30.5만 단어 | openscriptures/morphhb — 본문 PD / 태깅 **CC BY 4.0** |\n| 그리스어 (Byzantine, Robinson-Pierpont 2018) | 7,953절 / 14만 단어 | byztxt — **PD** |\n| Strong's 히브리어·그리스어 사전 | 8,674 + 5,523 엔트리 | openscriptures/strongs — **CC BY-SA** |\n| **의미 카테고리** | 14,197 단어 → 18 도메인 / 20,450 태그 | 본 프로젝트 — **CC BY 4.0** |\n| **의미 벡터** | 62,203절 임베딩 (한국어 + 영어) | Gemini Embedding 2 · 768차원 int8 — **CC BY 4.0** |\n\n원어 단어마다 Strong 번호 + 형태소가 붙어 있다. 소스별 라이선스·출처 표기는 [`NOTICE`](NOTICE) 참조.\n\n## 데이터 맛보기\n\n핵심은 *병렬*이다. 모든 절이 언어 간 정렬되도록 키가 붙어 있고, 원어 단어마다 Strong 번호·형태소·의미 태그가 달려 있다.\n\n**한 절, 네 소스** — 창세기 1:1 (원본 좌표):\n\n| `source` | `text` |\n|----------|--------|\n| `krv` (한국어) | 태초에 하나님이 천지를 창조하시니라 |\n| `kjv` (영어) | In the beginning God created the heaven and the earth. |\n| `wlc` (히브리어) | בְּרֵאשִׁ֖ית בָּרָ֣א אֱלֹהִ֑ים אֵ֥ת הַשָּׁמַ֖יִם וְאֵ֥ת הָאָֽרֶץ ׃ |\n\n*(신약 절은 히브리어 대신 그리스어 `byz` 본문과 짝지어진다.)*\n\n**모든 단어에 태그** — 같은 절을 `words → word_strong → strongs → strong_category`로 분해:\n\n| `w` | `surface` (히브리어) | `strong` | `translit` | 의미 (`strongs_def` 발췌) | 주의미 `category` |\n|----:|---------------------|----------|------------|---------------------------|-------------------|\n| 1 | בְּרֵאשִׁ֖ית  | H7225 | rêʼshîyth | \"the first… (specifically, a firstfruit)\" | `time\u003eperiod` |\n| 2 | בָּרָ֣א     | H1254 | bârâʼ     | \"(absolutely) to create…\"                 | `action\u003emake_labor` |\n| 3 | אֱלֹהִ֑ים   | H430  | ʼĕlôhîym  | \"…specifically… the supreme God\"          | `deity_spirit\u003edivine_name` |\n| 4 | אֵ֥ת      | H853  | ʼêth      | \"…the object of a verb or preposition\"    | `function_word\u003eparticle_adverb` |\n| 5 | הַשָּׁמַ֖יִם   | H8064 | shâmayim  | \"the sky (as aloft…)\"                     | `nature\u003ecelestial` |\n| 6 | וְאֵ֥ת     | H853  | ʼêth      | \"…the object of a verb or preposition\"    | `function_word\u003eparticle_adverb` |\n| 7 | הָאָֽרֶץ    | H776  | ʼerets    | \"the earth (at large…)\"                   | `nature\u003eearth_stone` |\n\n이 `category` 컬럼이 다른 성경 데이터셋엔 없는 레이어다 — 문자열 매칭이 아니라 *의미*(과일·가축·보석·친족…)로 본문을 질의하게 해준다.\n\n## 빠른 시작\n\n[Releases](../../releases)에서 `bible.sqlite.gz`를 받아 압축 해제 후 질의:\n\n```sql\n-- \"성경에서 과일이 언급된 구절\"  (엄격 = 주의미만, 노이즈 적음)\nSELECT DISTINCT b.code, v.chapter, v.verse, v.text\nFROM strong_category sc\nJOIN word_strong ws ON ws.strong = sc.strong\nJOIN words w        ON w.id = ws.word_id\nJOIN verses v       ON v.book=w.book AND v.chapter=w.chapter AND v.verse=w.verse AND v.source='krv'\nJOIN books b        ON b.book = v.book\nWHERE sc.category = 'plant\u003efruit' AND sc.is_primary = 1;\n```\n\n또는 이 repo의 JSONL에서 직접 빌드:\n\n```bash\nuv run scripts/build_db.py     # data/*/*.jsonl  -\u003e  data/bible.sqlite\n```\n\n## 스키마\n\n```mermaid\nerDiagram\n    books           ||--o{ verses          : \"book\"\n    books           ||--o{ words           : \"book\"\n    words           ||--o{ word_strong     : \"id = word_id\"\n    strongs         ||--o{ word_strong     : \"strong\"\n    strongs         ||--o{ strong_category : \"strong\"\n    verses          ||--o| vec_verses      : \"id = verse_id\"\n\n    books {\n        int  book PK\n        text code\n        text name_kr\n        text testament\n    }\n    verses {\n        int  id PK\n        int  book FK\n        int  chapter\n        int  verse\n        int  canon_chapter\n        int  canon_verse\n        text source\n        text text\n    }\n    words {\n        int  id PK\n        int  book FK\n        int  chapter\n        int  verse\n        int  canon_chapter\n        int  canon_verse\n        int  w\n        text source\n        text surface\n        text morph\n    }\n    word_strong {\n        int  word_id FK\n        text strong FK\n    }\n    strongs {\n        text strong PK\n        text lang\n        text lemma\n        text translit\n        text pron\n        text derivation\n        text strongs_def\n        text kjv_def\n    }\n    strong_category {\n        text strong FK\n        text category\n        int  is_primary\n    }\n    vec_verses {\n        int  verse_id PK\n        blob embedding \"int8[768] sqlite-vec\"\n    }\n```\n\n| 테이블 | 행 수 | 컬럼 | 내용 |\n|--------|------:|------|------|\n| `books` | 66 | `book` PK · `code` · `name_kr` · `testament` | 66권 색인 (구약/신약) |\n| `verses` | 93,369 | `id` PK · `book` · `chapter` · `verse` · `canon_chapter` · `canon_verse` · `source` · `text` | **소스별** 절 1행 |\n| `words` | 445,656 | `id` PK · `book` · `chapter` · `verse` · `canon_*` · `w` · `source` · `surface` · `morph` | 원어 단어 1개 |\n| `word_strong` | 439,705 | `word_id` · `strong` | 단어 ↔ Strong (`wlc`→`H####`, `byz`→`G####`) |\n| `strongs` | 14,197 | `strong` PK · `lang` · `lemma` · `translit` · `pron` · `derivation` · `strongs_def` · `kjv_def` | Strong 사전 엔트리 |\n| `strong_category` | 20,450 | `strong` · `category` · `is_primary` | 의미 도메인 태그 (`major\u003eminor`) |\n| `vec_verses` | 62,203 | `verse_id` · `embedding int8[768]` | 절 임베딩 (한+영) |\n\n`vec_verses`는 [`sqlite-vec`](https://github.com/asg017/sqlite-vec) 가상 테이블 — 조회하려면\n확장을 로드해야 하고, 무시하면 나머지 DB는 그대로 동작한다.\n\n`source` 값: `krv`(개역한글) · `kjv` · `wlc`(히브리어) · `byz`(그리스어).\n\n`canon_chapter` / `canon_verse`는 모든 절에 **canonical(KJV) 좌표**를 부여해 4개 소스가 한 키로 정렬되게 한다 — 히브리어 시편 표제, 장 분할, 절 경계 이동이 정규화되고 원본 `chapter` / `verse`는 그대로 보존된다. 시편 표제는 `canon_verse = 0`.\n\n## 의미 카테고리 — 차별 레이어\n\n모든 Strong 엔트리를 18개 도메인 체계(`animal`, `plant`, `human_body`, `nature`, `artifact`, `ritual`, `abstract_quality` …)로 분류했다. `major\u003eminor` 키, multi-label, 그리고 `is_primary` 주의미 1개. 전체 목록은 [`data/categories/taxonomy.md`](data/categories/taxonomy.md).\n\n**다의어는 `is_primary`로 처리한다.** 예: G1081 *γέννημα* = \"자손 / 산물\"은 `person_role\u003ekinship`(primary)과 `plant\u003efruit` 둘 다 태깅. 엄격 검색(`is_primary=1`)은 \"독사의 자식\"을 제외하고, 넓은 검색은 포함한다. 질의마다 정밀도 vs 재현율을 조절할 수 있다.\n\n```sql\n-- 성경에 등장하는 가축 종류\nSELECT DISTINCT s.strong, s.lemma, s.translit, s.strongs_def\nFROM strong_category sc JOIN strongs s ON sc.strong = s.strong\nWHERE sc.category = 'animal\u003elivestock';\n```\n\n## 의미 검색 — 자연어 벡터 색인\n\n한국어(`krv`)·영어(`kjv`) 모든 절을 **Gemini Embedding 2**(768차원, int8 양자화)로\n임베딩해 [`sqlite-vec`](https://github.com/asg017/sqlite-vec) `vec0` 테이블에 넣었다. 그래서\n*의미*로 검색할 수 있고, 모델이 cross-lingual이라 **한국어 쿼리로 영어 구절**도, 그 반대도 찾는다.\n\n```bash\n# GEMINI_API_KEY 필요(쿼리를 런타임에 임베딩) — pip install sqlite-vec\nuv run scripts/search.py \"불안할 때 위로가 되는 말씀\" --lang ko --k 10\nuv run scripts/search.py \"the good shepherd\"\n```\n\n내부는 평범한 sqlite-vec KNN을 `verses`에 다시 조인하는 것:\n\n```sql\n-- 먼저 확장 로드: Python은 sqlite_vec.load(conn), CLI는 .load vec0\nSELECT v.source, b.code, v.chapter, v.verse, v.text, k.distance\nFROM (SELECT verse_id, distance FROM vec_verses\n      WHERE embedding MATCH vec_int8(:qvec) AND k = 10 ORDER BY distance) k\nJOIN verses v ON v.id = k.verse_id\nJOIN books  b ON b.book = v.book;\n```\n\n벡터는 **derived 레이어**다. Gemini는 API 기반·비결정적이라, int8 벡터를 `data/embeddings/`에\n글자 그대로 커밋해두고 `build_db.py`가 통합한다 — **DB 재빌드에 API 키가 필요 없다**. 모델/차원을\n바꿀 때만 재생성: `GEMINI_API_KEY=… uv run scripts/embed_verses.py`.\n\n## 병렬 절 \u0026 단어 조회\n\n```sql\n-- 한 절을 여러 번역 + 원어로 (원본 좌표)\nSELECT source, text FROM verses WHERE book=1 AND chapter=1 AND verse=1;\n\n-- canonical(KJV) 좌표로 전 언어 정렬 — 히브리어 표제/분할 offset 처리.\n-- 시 3:1: kjv/krv는 3:1, 히브리는 자기 3:2에 정렬 (히브리 3:1은 표제 -\u003e canon_verse 0).\nSELECT source, chapter, verse, text FROM verses WHERE book=19 AND canon_chapter=3 AND canon_verse=1;\n\n-- 단어 -\u003e Strong -\u003e 정의: words -\u003e word_strong -\u003e strongs 조인\n```\n\n## 소스에서 빌드\n\n```\nscripts/\n  books.py            66권 매핑 + OSIS/USFM 유틸\n  crawl_holybible.py  개역한글 (holybible.or.kr)\n  crawl_bskorea.py    개역한글 (bible.bskorea.or.kr)\n  crosscheck.py       두 개역한글 소스 diff\n  parse_kjv.py        scrollmapper KJV -\u003e JSONL\n  parse_wlc.py        morphhb OSIS XML -\u003e 절 + 단어별 Strong/형태소\n  parse_byz.py        byztxt CSV -\u003e JSONL\n  parse_tagnt.py      STEPBible TAGNT -\u003e 단어별 판본비교 (데이터 미포함)\n  parse_strongs.py    Strong's JS 사전 -\u003e JSON\n  split_strongs.py    Strong 엔트리 -\u003e 분류 배치\n  merge_categories.py 분류 배치 머지 + taxonomy 키 검증\n  embed_verses.py     한+영 절 -\u003e Gemini Embedding 2 -\u003e int8 벡터 (data/embeddings/)\n  search.py           자연어 의미 검색 데모 (sqlite-vec KNN)\n  build_db.py         전부 SQLite로 통합 (+ 벡터 있으면 함께 통합)\n```\n\n원본 소스 clone(`data/sources/`)은 **재배포하지 않는다** — parse 스크립트가 받아온다. STEPBible TAGNT 데이터는 재배포 권고에 따라 미포함(`parse_tagnt.py`로 직접 생성, `NOTICE` 참조).\n\n## 참고\n\n- **한국어 본문**(`krv`)은 holybible.or.kr에서 크롤한 개역한글(완전). 절 번호는 KJV를 따르되 4곳에서 절 경계가 달라 canonical 좌표로 보정한다(아래 참조). 빌드 시 2차 크롤(bible.bskorea.or.kr)과 diff해 크로스체크하지만(`crosscheck.py`) **DB엔 포함하지 않는다** — 그 크롤은 일부 절 번호 밀림 + 시편 92편 누락(사이트측 렌더 누락)이 있다.\n- versification: 원어(`wlc`) 좌표는 `chapter` / `verse`에 보존하고, canonical KJV 좌표를 `canon_chapter` / `canon_verse`에 추가해 모든 소스가 한 키로 정렬되게 했다. 매핑은 [Copenhagen Alliance versification spec](https://github.com/Copenhagen-Alliance/versification-specification)(`eng.json`)에서 가져왔고, 히브리어 시편 표제·요엘/말라기 장 분할·절 경계 이동을 정규화한다. 개역한글(`krv`)도 대체로 KJV를 따르지만 4곳에서 절 경계가 달라(예: 고후 13, 아 6:13) 같은 좌표로 보정한다. 언어 간 조인은 원본 절 키가 아니라 **canonical 좌표로** 한다.\n- **본문은 AI가 생성·교정하지 않는다** — 검증된 소스에서 글자 그대로 수집. 의미 카테고리만 기계 생성(Strong 사전에 그라운딩).\n\n## 라이선스\n\n코드(`scripts/`): **MIT**. 데이터: 소스별(Public Domain / CC BY 4.0 / CC BY-SA) — [`LICENSE`](LICENSE), [`NOTICE`](NOTICE) 참조.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrizin%2Fbible-db","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrizin%2Fbible-db","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrizin%2Fbible-db/lists"}