圣经文本分析工具

一个支持文本批评的圣经文本分析工具,提供形态分析、手稿变体和希伯来语及希腊语圣经文本的词汇搜索功能。

  • by NoveltyDreams
  • Python
  • 本地部署
  • 更新于
在 GitHub 查看 NoveltyDreams/textual-criticism-mcp

使用说明

考据学

在考据学支持下的圣经文本分析。MCP服务器,用于希伯来语和希腊语圣经文本的形态分析、手稿变体和索引搜索。

特性

  • 文本结构集成:希伯来语(BHSA)和希腊语(N1904)文本的完整形态和句法分析
  • 经文鉴别学:变量读数、手稿数据、仪器分析
  • 一致:按引理、词法或语法模式搜索
  • 词典:BDB(希伯来语)、塞耶数(希腊语)、斯特朗数
  • 多个翻译:公共领域文本(KJV、WEB、ASV、YLT、Darby、BBE)

安装

# Basic installation
pip install textual-criticism-mcp

# With MCP server support
pip install textual-criticism-mcp[mcp]

# With CLI
pip install textual-criticism-mcp[cli]

# Everything
pip install textual-criticism-mcp[all]

快速开始

Python库

from textual_criticism_mcp.lib import parse_verse, search

# Parse a verse with full morphology
verse = parse_verse("John 3:16")
for word in verse.words:
    print(f"{word.text} ({word.lemma}) - {word.pos}")

# Search for a lemma
results = search("word lex=ἀγάπη", corpus="greek")

MCP 服务器

添加到您的Claude桌面配置(~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "textual-criticism": {
      "command": "python",
      "args": ["-m", "textual_criticism_mcp.mcp.server"]
    }
  }
}

或者使用uvx:

{
  "mcpServers": {
    "textual-criticism": {
      "command": "uvx",
      "args": ["textual-criticism-mcp"]
    }
  }
}

MCP工具

parse_verse

用完整的形态分析来解析一首诗。

parse_verse("Gen 1:1", detail_level="syntax")

返回逐字分解,如下所示:

  • 原文+音译
  • 引理和斯特朗数
  • 全形态解析(词性、人称、性别、数字、时态、语态、语气、格、状态、词干)
  • 句法信息(短语函数、子句类型)

search_lemma

查找一个单词的所有出现。

search_lemma("ἀγάπη", corpus="nt", limit=100)

search_morphology

按语法标准搜索。

search_morphology(language="hebrew", pos="verb", stem="qal", mood="imperative")

get_variants

获取文章的文本变体。

get_variants("Mark 16:9-20", include_manuscripts=True)

退货:

  • 所有变量读数
  • 手稿支持(P46、B等)
  • 版本支持(NA28、SBLGNT、TR)
  • 变异分类和转录分析

get_passage

检索多个翻译中的文章文本。

get_passage("Rom 8:1-4", translations=["KJV", "WEB", "ASV"], include_original=True)

数据源

  • 希伯来圣经:BHSA(Biblia Hebraica Stuttgartensia Amstelodamensis)通过文本结构
  • 希腊语NT:雀巢1904通过文本织物
  • 装置:不稳定的标签/标签(CC BY 4.0)
  • 词典:开放脚本BDB、斯特朗、塞耶
  • 翻译: wldeh/圣经api (公共领域文本)

首次运行

文本结构语料库在首次使用时会自动下载(总计约300MB)。

from textual_criticism_mcp.lib.corpus import get_corpus_manager

# This will download BHSA and N1904 on first run
cm = get_corpus_manager()
cm.hebrew  # Downloads Hebrew corpus
cm.greek   # Downloads Greek corpus

发展

# Clone and install in dev mode
git clone https://github.com/yourusername/textual-criticism-mcp
cd textual-criticism-mcp
pip install -e ".[all]"

# Run tests
pytest

# Type check
mypy src/textual_criticism_mcp

# Lint
ruff check src/textual_criticism_mcp

许可证

麻省理工学院

致谢