基于LLM的WOS学术文献智能筛选工具
Project description
ABSeeker
基于LLM的WOS学术文献智能筛选工具
简介
ABSeeker 是一个利用大语言模型(LLM)智能筛选 Web of Science (WOS) 学术文献的 Python 工具。它能够:
- 解析 WOS 导出的纯文本文献记录
- 使用 LLM 智能判断文献是否符合检索意图
- 提供置信度评分和判断理由
- 支持批量处理和断点续传
- 实时显示处理进度和统计信息
安装
从源码安装
git clone https://github.com/BHM-Bob/abseeker.git
cd abseeker
pip install -e .
依赖
- Python >= 3.9
- pydantic >= 2.0.0
- httpx >= 0.25.0
- click >= 8.0.0
- rich >= 13.0.0
- pandas >= 2.0.0
快速开始
1. 配置 LLM 后端
# 配置 OpenAI 兼容的 API
abseeker config set-llm --provider openai
# 或配置 DeepSeek
abseeker config set-llm --provider deepseek
2. 测试连接
abseeker config test
3. 分析文献
abseeker analyze savedrecs.txt --intent "研究肽类药物递送" -o results.csv
使用指南
配置管理
# 查看当前配置
abseeker config show
# 设置 LLM 后端
abseeker config set-llm --provider openai --base-url https://api.example.com/v1
# 查看可用模型
abseeker config list-models
# 设置具体模型
abseeker config set-model gpt-4
# 设置请求速率限制
abseeker config set-rate-limit --interval 1.0 --rpm 60
# 重置配置
abseeker config reset
文献分析
基本用法
abseeker analyze savedrecs.txt --intent "研究深度学习在医疗领域的应用"
范围过滤
# 按索引范围
abseeker analyze savedrecs.txt -i "纳米技术" --start-index 0 --end-index 99
# 按年份范围
abseeker analyze savedrecs.txt -i "AI医疗" --start-year 2020 --end-year 2023
输出格式
# CSV 格式(默认)
abseeker analyze savedrecs.txt -i "研究意图" -o results.csv
# JSON 格式
abseeker analyze savedrecs.txt -i "研究意图" -o results.json --format json
速率限制
# 设置请求间隔(秒)
abseeker analyze savedrecs.txt -i "研究意图" --interval 2.0
断点续传
# 每隔 10 篇文献自动保存
abseeker analyze savedrecs.txt -i "研究意图" --save-interval 10
# 从保存文件恢复(中断后)
abseeker analyze savedrecs.txt -i "研究意图" --from-saved results.autosave.json
工作原理
- 解析: 读取 WOS 导出的纯文本文件,提取文献元数据(标题、作者、摘要、关键词等)
- 过滤: 根据用户指定的索引或年份范围筛选文献
- 分析: 将每篇文献的摘要和元数据发送给 LLM,判断是否符合检索意图
- 输出: 生成包含相关性判断、置信度、理由和分类的结果文件
输出格式
CSV 输出
| 字段 | 说明 |
|---|---|
| title | 文献标题 |
| authors | 作者列表 |
| journal | 期刊名称 |
| year | 发表年份 |
| doi | DOI |
| relevant | 是否相关 (True/False) |
| confidence | 置信度 (0.0-1.0) |
| reason | 判断理由 |
| categories | 分类标签 |
JSON 输出
{
"results": [
{
"record": {
"title": "文献标题",
"authors": ["作者1", "作者2"],
"journal": "期刊名",
"year": 2023,
"doi": "10.xxxx/xxxxx"
},
"relevant": true,
"confidence": 0.95,
"reason": "该文献研究了...",
"categories": ["深度学习", "医疗AI"]
}
],
"stats": {
"total": 100,
"relevant": 25,
"avg_confidence": 0.85
}
}
配置存储
配置文件存储在用户家目录的 .abseeker/ 文件夹中:
- Linux/macOS:
~/.abseeker/config.json - Windows:
%USERPROFILE%\.abseeker\config.json
开发
项目结构
abseeker/
├── abseeker/ # 主代码
│ ├── cli/ # 命令行接口
│ ├── llm/ # LLM 客户端
│ ├── parser/ # WOS 文件解析
│ ├── processor/ # 批量处理器
│ └── prompt/ # 提示词模板
├── tests/ # 测试代码
├── dev/ # 开发数据和文档
└── docs/ # 文档
运行测试
pytest
代码格式化
black abseeker/
ruff check abseeker/
许可证
MIT License - 详见 LICENSE 文件
贡献
欢迎提交 Issue 和 Pull Request!
致谢
- 感谢 OpenAI/DeepSeek 等 LLM 提供商的 API
- 感谢 Web of Science 提供的学术文献数据
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
abseeker-0.1.0.tar.gz
(43.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
abseeker-0.1.0-py3-none-any.whl
(45.4 kB
view details)
File details
Details for the file abseeker-0.1.0.tar.gz.
File metadata
- Download URL: abseeker-0.1.0.tar.gz
- Upload date:
- Size: 43.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c89f1d3507b58a0d37fa215225229c5fefa646b080631ae21df58c7f8cf03df
|
|
| MD5 |
5677087cdc6e7514d51fdd7e972d0305
|
|
| BLAKE2b-256 |
12ab284e6c5588be139394d035e465c7f5d4acec2c76918a3bfcefc4470d4e9c
|
File details
Details for the file abseeker-0.1.0-py3-none-any.whl.
File metadata
- Download URL: abseeker-0.1.0-py3-none-any.whl
- Upload date:
- Size: 45.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a5cda71abd4bc14c19231b9abacf13296be530c5324272c0af910260c91e5cc8
|
|
| MD5 |
793d09175e4795e5aa4f23724ccab44d
|
|
| BLAKE2b-256 |
1a2f69bb1ab42baf26e850f5a630c7be803dcbd6795ce592505f237f239580bd
|