一个免费的python圣经数据处理工具包

freebible的Python项目详细描述


免费圣经库

为python开发人员提供免费圣经数据和工具包

项目主页

https://github.com/neocl/freebible

安装

pypi上提供了freebool包,因此可以通过pip使用

pip install freebible
# or even better
python3 -m pip install freebible

请注意,freebool需要python 3。它不再在python 2上工作。

示例代码

轻松访问

>>>fromfreebibleimportbibles# Quote everything>>>bibles.print("Gen")[1]創世記[1]Genesis>>>bibles.print("Gen",1,1)[Ge1:1]元始に神天地を創造たまへり[Gen1:1]InthebeginningGodcreatedtheheavensandtheearth.# Quote from a specific bible>>>bibles.kougo.quote("John")# this returns a book objectBook(ID='104',title='ヨハネ傳福音書',filename='John',title_eng='John',short_name='John')>>>bibles.kougo.quote("John",1)# this returns a chapter objectChapter(ID='1')>>>bibles.kougo.quote("John",1,1)# this returns a verse objectJohn1:1太初に言あり言は神と偕にあり言は神なりき>>>bibles.web.quote("John")Book(ID='43',title='John',filename='',title_eng='John',short_name='John')>>>bibles.web.quote("John",1)Chapter(ID='1')>>>bibles.web.quote("John",1,1)John1:1InthebeginningwastheWord,andtheWordwaswithGod,andtheWordwasGod.

访问kougo

>>>fromfreebibleimportread_kougo>>>kougo=read_kougo()>>>print(len(kougo))66>>>print(kougo['John'])[104]ヨハネ傳福音書>>>print(len(kougo['John']))21>>>print(kougo['John'][1])Chapter(ID='1')>>>print(kougo['John'][1][1])[John1:1]太初に言あり言は神と偕にあり言は神なりき

访问世界英语圣经(网络)

>>>fromfreebibleimportread_web>>>web=read_web()>>>print(len(web))66>>>print(web['John'])[43]John>>>print(len(web['John']))21>>>print(web['John'][1])Chapter(ID='1')>>>print(len(web['John'][1]))51>>>print(web['John'][1][1])[John1:1]InthebeginningwastheWord,andtheWordwaswithGod,andtheWordwasGod.

开发人员设置

如果您想贡献源代码,可以设置这样的开发环境

# Create a virtual environment to install packages
python3 -venv ~/.envfreebible
# Activate the virtual environment
. ~/.envfreebible/bin/activate

# Check out the source code to your machine
git clone https://github.com/freebible freebible-project
cd freebible-project
# Install required packages
python3 -m pip install -r requirements.txt

# Run the demo to make sure that this source code work
python3 demo.py

圣经来源:

日语口语

世界英语圣经:https://github.com/scrollmapper/bible_databases

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
从Android的Chrome Java网站下载文件   java如何使用正确的语法在Oracle数据库中插入值   启动时java eclipse端口占用错误   java判断两个字符串是否“足够相似”的好指标是什么   ANT中选项无法识别的java问题   Java RMI导致“NoSuchObjectException”   java如何用txt文件中的某些单词填充JList   字符串引用另一个字符串的部分?JAVA   java识别Spring MVC DTO   java JMH注释处理器NullPointerException   java Big decimal setScale有时给出不同的值   带有JWT的java Web和Http安全配置(忽略登录路径问题)   java添加JPA非主键引用了多个实体   java树算法中两个节点之间的距离问题   java延迟与解耦体系结构建议   SWI Prolog Java jpl。PrologException查询不工作   java用不同的构造函数实例化一个类   java如何使用JDO从数据库中获取特定数量的行?