Skip to main content

Ezra 聖經語意搜尋 - Semantic Search Engine for Chinese Bible

應用語意搜尋技術的聖經經文搜尋器,通過新型的自然語言處理技術,了解字詞的意思來進行搜尋。即使經文內詞彙的字眼不一樣,只要意思相近,也有機會被搜尋出來。

Semantic search engine for Chinese Bible, applying state-of-the-art natural language processing techniques, which is able to search for relevant biblical text by the meaning of search keywords.

搜尋「喜樂 事奉」的結果: Search example

安裝

  • 系統需求:Python 3.8 或以上(較低版本或許也可以,但沒有詳細測試)
  • 使用 pip 安裝:
pip install ezra-search

用法

Python module

>>> import ezra
>>> results = ezra.search("喜樂 事奉", top_k=3)
....
>>> for r in results:
...     print(r.to_dict())
... 
{'text': '所以,弟兄們,我以神的慈悲勸你們,將身體獻上,當作活祭,是聖潔的,是神所喜悅的;你們如此事奉乃是理所當然的。', 'ref': {'book': 'rom', 'chap': 12, 'vers': 1}, 'score': 1.7845185866114202, 'kw_scores': {'喜悅': 0.78451858661142, '事奉': 1.0}}
{'text': '「因為你富有的時候,不歡心樂意地事奉耶和華─你的神,', 'ref': {'book': 'deut', 'chap': 28, 'vers': 47}, 'score': 1.609989717447291, 'kw_scores': {'歡心': 0.609989717447291, '事奉': 1.0}}
{'text': '希該喜悅以斯帖,就恩待她,急忙給她需用的香品和她所當得的分,又派所當得的七個宮女服事她,使她和她的宮女搬入女院上好的房屋。', 'ref': {'book': 'esth', 'chap': 2, 'vers': 9}, 'score': 1.580993769747976, 'kw_scores': {'喜悅': 0.78451858661142, '服事': 0.7964751831365557}}

Web App

自帶簡單的 Web 介面: UI

安裝後可以 flask 或 gunicorn 直接起動,但目前不支援 multiprocessing/multithreading

  • flask
FLASK_APP=ezra flask run --without-threads
  • gunicorn(需另行安裝)
gunicorn --workers=1 --threads=1 'ezra:create_app()'

數據來源

和合本經文、人名和地名資料來自「信望愛信仰與聖經資源中心」:https://bible.fhl.net/public 。

語意模型採用了 ConceptNet Numberbatch 的中文詞彙部分,由 Luminoso Technologies, Inc. 以 CC-By-SA 4.0 條款授權。

版權相關

項目以 GNU AGPLv3 條款授權, 基本上是自由使用、分發和修改,但修改後發佈的話煩請列明改動。


Ezra 聖經語意搜尋,應用語意模型的聖經經文搜尋器。
Copyright (C) 2021 Ken Hung

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see https://www.gnu.org/licenses/.


This work includes data from ConceptNet 5, which was compiled by the Commonsense Computing Initiative. ConceptNet 5 is freely available under the Creative Commons Attribution-ShareAlike license (CC-By-SA 4.0) from http://conceptnet.io.

The included data was created by contributors to Commonsense Computing projects, contributors to Wikimedia projects, Games with a Purpose, Princeton University's WordNet, DBPedia, Unicode, Jim Breen, MDBG, and Cycorp's OpenCyc.

Metadata

Release files for ezra-search 0.9.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ezra-search 0.9.0
File Size Uploaded
ezra-search-0.9.0.tar.gz 52.9 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for ezra-search 0.9.0
File Interpreter ABI Platform
ezra_search-0.9.0-py3-none-any.whl Python 3 none any Details

Total release size: 106.1 MB

Release files / ezra-search-0.9.0.tar.gz

Download URL ezra-search-0.9.0.tar.gz
Size 52.9 MB
Tags Source
SHA-256 checksum
How to use checksums
2be5f305ecbcbd90474c82d01f3de39324dab4fb836a9da47f7526ef64ce762b
BLAKE2b-256 checksum
How to use checksums
f18094703fffc43a75b1381ffe290d372b9a81f34740d4fe8c07a3918de16344
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.4 tqdm/4.59.0 importlib-metadata/3.10.0 keyring/22.3.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.4

Release files / ezra_search-0.9.0-py3-none-any.whl

Download URL ezra_search-0.9.0-py3-none-any.whl
Size 53.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
cdbf79d46e6b8ea5a5aa3a1d72864c39d08f483e74349d19dde290a7cd8caa69
BLAKE2b-256 checksum
How to use checksums
60a5348f192f887d3bf87bbc2f7eb83f71aa7f903cfeada3cd64e2c146722d73
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.4 tqdm/4.59.0 importlib-metadata/3.10.0 keyring/22.3.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.4

Release history Release notifications | RSS feed

This release

0.9.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page