Skip to main content

面向古籍、古诗文和课堂文本分析的中文词频统计 MCP Server

Project description

dhcckb-guji-wordfreq-mcp-20260618b

面向古籍、古诗文和课堂文本分析的中文词频统计 MCP Server。

底层使用 Python 生态的 jieba 做中文分词与词频统计,支持单段或多段文本输入,返回总字数、分词数、词频 Top-K、停用词过滤和最小词长过滤,所有输出为可复现的标准 JSON 格式。适用于数字人文学者、古文研究者及课堂教学场景的量化文本分析。

安装与启动

uvx dhcckb-guji-wordfreq-mcp-20260618b

MCP 客户端配置

在 MCP 客户端(如 Claude Desktop)的配置文件中添加:

{
  "mcpServers": {
    "dhcckb-guji-wordfreq-mcp-20260618b": {
      "type": "stdio",
      "command": "uvx",
      "args": ["dhcckb-guji-wordfreq-mcp-20260618b"]
    }
  }
}

工具

word_frequency

对输入的中文文本执行分词与词频统计。支持单段或多段文本同时分析,返回总字数、分词总数、词频 Top-K 排名、停用词过滤后的有效词数,以及最小词长过滤后的结果。所有输出为可复现的 JSON 结构,确保同一输入多次调用得到一致结果。

参数:

  • texts (array, required): 待分析的中文文本列表
  • topK (integer, default: 20): 返回词频最高的前 K 个词
  • stopWords (array, default: []): 自定义停用词列表
  • minWordLength (integer, default: 1): 最小词长过滤
  • useBuiltinStopWords (boolean, default: true): 是否启用内置停用词

health_check

返回当前 MCP Server 的健康状态、版本信息和底层依赖版本。

版本

0.1.1

许可

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dhcckb_guji_wordfreq_mcp_20260618b-0.1.1.tar.gz (19.2 kB view details)

Uploaded Source

File details

Details for the file dhcckb_guji_wordfreq_mcp_20260618b-0.1.1.tar.gz.

File metadata

File hashes

Hashes for dhcckb_guji_wordfreq_mcp_20260618b-0.1.1.tar.gz
Algorithm Hash digest
SHA256 02863777842c953594a6af943ed9fcd73e744fe0cee9fe47fa2a6b25af687391
MD5 e96d29559c9b3242f4430c6277125c2f
BLAKE2b-256 e4c92113095ea35a6f03b45baed5e4c55ea32784da16d80ac26b913130fee833

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page