Skip to main content

duan-blocks

段言积木组合平台——把「用户自然语言需求」映射为「预置积木的组合装配」,零 token、全离线。

✅ 已发布到 PyPI:pip install duan-blocks — https://pypi.org/project/duan-blocks/

演示

duan-blocks 概念海报

# 命令行
duan-combo "对一批数字求和再算平均" --输入 "[1,2,3,4,5]"
duan-combo "把这段中文转成拼音" --输入 '"你好"' --json   # 结构化诊断

# Web/API(需 fastapi uvicorn)
uvicorn duan_blocks.api:app --port 8123
#   GET /        演示页(输入需求实时看组合)
#   POST /combo  {"requirement":"半径5的圆有多大","input":"5"}
  • 零 token 常态:选块/校验/接线/粘合全本地(概念图 + TF-IDF 混合选块,不调 LLM)。
  • 兜底沉淀:仅能力缺失时经 LLM(或本地规则)生成新积木并永久入库存,下次零 token 复用。
  • 运行依赖:段言运行时(pip install duan);拼音/繁简/历法等可选 pip install duan-blocks[zh](pypinyin / opencc / lunardate)。
  • 定位:DUAN_BLOCKS_LIB 环境变量 → 包内数据(wheel 自带 _data/积木库)→ 仓库内。
  • 构建发布:先 python blocks_pkg/打包数据.py 复制积木库数据,再 python -m build blocks_pkg 产出 sdist+wheel。

Metadata

Release files for duan-blocks 1.0.1

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

Source distribution (sdist)

Source distribution for duan-blocks 1.0.1
File Size Uploaded Provenance Actions
duan_blocks-1.0.1.tar.gz 238.2 kB Without provenance Details for duan_blocks-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for duan-blocks 1.0.1
File Interpreter ABI Platform Actions
duan_blocks-1.0.1-py3-none-any.whl Python 3 none any Details for duan_blocks-1.0.1-py3-none-any.whl

Total release size: 577.0 kB

Release files / duan_blocks-1.0.1.tar.gz

Download URL duan_blocks-1.0.1.tar.gz
Size 238.2 kB
Tags Source
SHA-256 checksum
How to use checksums
7ed1dadc78054150f9a0eb64d9538f525bc733179b3b457bb01dd2cb7a5e463b
BLAKE2b-256 checksum
How to use checksums
abe1bee24919f921da0b79d31866173ea9998b68075c8d9101cf2bc2607becde
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / duan_blocks-1.0.1-py3-none-any.whl

Download URL duan_blocks-1.0.1-py3-none-any.whl
Size 338.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8a1b8967b526c7d71e55ad02e37f571b61a80c75453ed417b1b6c54807f62acf
BLAKE2b-256 checksum
How to use checksums
a84afd54a3b891fe5d962f142d639ce27a5a82e2464626bd2b5210a73dace33d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Security for duan-blocks 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files No provenance

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