zcbot/skills/literature/references/source-paper-server.md

31 lines
1.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# paper_server 来源
`paper_server` 以 OpenAlex 元数据为基础并按记录实际可用性提供摘要、PDF 或 XML。当前语料以英文为主也包含中文记录。
## 调用
通过 `run_python` 使用 helper
```python
from skills.literature.paper import search, get_paper, fetch_pdf, fetch_xml
```
- `search(keyword="", year=None, year_gte=None, year_lte=None, doi="", first_author="", publication_name="", has_pdf=None, is_oa=None, limit=10)`:搜索题录并返回摘要和全文可用状态。
- `get_paper(id_or_doi)`:按内部 ID 或 DOI 获取完整记录。
- `fetch_xml(id_or_doi, working_dir)` / `fetch_pdf(id_or_doi, working_dir)`:把可用全文保存到任务的 `papers/` 目录。
helper 自动使用 `PAPER_SERVER_API_KEY` 和可选的 `PAPER_SERVER_URL`。只通过 helper 访问由它处理认证、URL 和下载路径。
## 查询与全文
- 将中文概念转换为常用专业英文术语,并按需补中文、缩写、全称或同义词。
- 用 DOI、题名、作者、出版物、年份和来源返回的 `type` 筛选候选。
- 相关性初筛使用题名和摘要;精确数据、章节、图表或页码必须读取正文。
- 结构化段落和参考文献优先 XML版式、页码、公式和图表优先 PDF。只获取记录实际提供的格式。
## 失败
- 认证失败需要管理员检查 `PAPER_SERVER_API_KEY`
- DOI 未命中、格式缺失或服务器文件不存在时,改查其他候选或使用现有摘要,并降低证据等级。
- 只引用返回记录中的真实字段,不补写缺失的 ISBN、出版社、版本或页码。