Skip to main content

duan-blocks

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

# 命令行
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。

Download files

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

Source Distribution

duan_blocks-1.0.0.tar.gz (237.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

duan_blocks-1.0.0-py3-none-any.whl (338.2 kB view details)

Uploaded Python 3

File details

Details for the file duan_blocks-1.0.0.tar.gz.

File metadata

  • Download URL: duan_blocks-1.0.0.tar.gz
  • Upload date:
  • Size: 237.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for duan_blocks-1.0.0.tar.gz
Algorithm Hash digest
SHA256 96917febf29e2e15188cc0610eeba1fc1b7697dc8e11b87934b24797e307363b
MD5 ba0cf90b1e82c7747bfb83a0f70cb830
BLAKE2b-256 3108109e219896180e53e2d57f16cd9e1da156d5de56802edcef420a10319188

See more details on using hashes here.

File details

Details for the file duan_blocks-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: duan_blocks-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 338.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for duan_blocks-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0692d3ed2fd8c8cfc8e589da841b73b4b948c6497833273caa0ad8d9f2ee72cf
MD5 85993a35d0893442880d95211d1dacf3
BLAKE2b-256 ea9749ac35d16f23b4814caf34963f89750331f984740d69952ebf86c0eb793e

See more details on using hashes here.

Release history Release notifications | RSS feed

1.0.1

2 files

This release

1.0.0 This release

2 files

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