Semantic Search Engine for Chinese Bible
Project description
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.
搜尋「喜樂 事奉」的結果:
安裝
- 系統需求: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 介面:
安裝後可以 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ezra-search-0.9.0.tar.gz.
File metadata
- Download URL: ezra-search-0.9.0.tar.gz
- Upload date:
- Size: 52.9 MB
- Tags: Source
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2be5f305ecbcbd90474c82d01f3de39324dab4fb836a9da47f7526ef64ce762b
|
|
| MD5 |
960b3be0a932d827f109dc560f024bed
|
|
| BLAKE2b-256 |
f18094703fffc43a75b1381ffe290d372b9a81f34740d4fe8c07a3918de16344
|
File details
Details for the file ezra_search-0.9.0-py3-none-any.whl.
File metadata
- Download URL: ezra_search-0.9.0-py3-none-any.whl
- Upload date:
- Size: 53.1 MB
- Tags: Python 3
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cdbf79d46e6b8ea5a5aa3a1d72864c39d08f483e74349d19dde290a7cd8caa69
|
|
| MD5 |
4fe14fc907325a926ac774d15d001531
|
|
| BLAKE2b-256 |
60a5348f192f887d3bf87bbc2f7eb83f71aa7f903cfeada3cd64e2c146722d73
|