Skip to content

BHM-Bob/abseeker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ABSeeker

基于LLM的WOS学术文献智能筛选工具

Python 3.9+ License: MIT

简介

ABSeeker 是一个利用大语言模型(LLM)智能筛选 Web of Science (WOS) 学术文献的 Python 工具。它能够:

  • 解析 WOS 导出的纯文本文献记录
  • 使用 LLM 智能判断文献是否符合检索意图
  • 提供置信度评分和判断理由
  • 支持批量处理和断点续传
  • 实时显示处理进度和统计信息

安装

PyPI 安装

pip install abseeker

从源码安装

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

工作原理

  1. 解析: 读取 WOS 导出的纯文本文件,提取文献元数据(标题、作者、摘要、关键词等)
  2. 过滤: 根据用户指定的索引或年份范围筛选文献
  3. 分析: 将每篇文献的摘要和元数据发送给 LLM,判断是否符合检索意图
  4. 输出: 生成包含相关性判断、置信度、理由和分类的结果文件

输出格式

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 文件

About

No description, website, or topics provided.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages