Skip to content

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

chem_summarizer

从 ChemDraw 文件及 Office 文档中的 ChemDraw 嵌入对象提取化学结构、反应和文本,生成 Markdown 摘要。

支持 .cdx、.cdxml、.pptx、.docx 和 .ppt,输出包括 SMILES、InChI、反应表及文献线索。当前版本为 0.1.0(Alpha)。

安装

需要 Python ≥ 3.9,安装时会自动安装 RDKit 和 olefile。

python -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install -e .

Linux/macOS 使用 source .venv/bin/activate 激活环境。

使用

chem-summarizer "report.pptx" "structures.cdx"
chem-summarizer --version

摘要默认保存到输入文件旁的 <文件名>_summary.md。

也可以通过 Python 调用:

from chem_summarizer import process_file

process_file("report.pptx")

一般解析不需要安装 ChemDraw。旧版 .ppt 需要 Windows PowerPoint 转换;如果转换失败,可先另存为 .pptx。

注意事项

  • 读取嵌入结构数据,不识别截图或普通图片中的化学式。
  • 反应提取依赖文件中保存的反应关系,仅有视觉箭头可能无法提取。
  • 支持常用缩写展开和立体化学校验,但部分复杂缩写、泛基团、配位结构和立体信息仍可能无法解析。
  • 输出需要结合原图核对,提取数量不等于准确率或召回率。

配置和解析细节见 开发文档。

许可证

MIT

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages