跳到正文
FunCoding

citation_marker_remover

Star
541
分类
科研
最近提交
2026年12月1日

workspace/skills/citation_marker_remover/SKILL.md

在 GitHub 上查看

Citation Marker Remover 文献引用标记移除 Skill

功能概述

本skill用于移除科研文本中的引用标记,支持多种常见的引用格式。 适用于科研论文、学术文档的文本清洗,为后续NLP处理提供干净的文本。

输入文件格式

支持以下文件格式:

  • JSONL
  • JSON
  • CSV
  • TXT
  • Markdown

不支持的文件格式会直接报错拒绝,不会自动猜测格式;如需处理其他格式,请先转换为以上支持格式后再使用本skill。

触发条件

当用户请求以下任务时,应使用此skill:

  • 移除引用标记
  • 清理参考文献标注
  • 删除文献引用
  • 清洗学术文本

支持的引用格式

1. 数字型引用 (numeric)

  • [1], [2], [1,2,3]
  • [1-5], [1,3-5]
  • (1), (2,3)
  • 上标数字:¹, ², ³

2. 作者年份型引用 (author_year)

  • (Smith, 2020)
  • (Smith and Jones, 2020)
  • (Smith et al., 2020)
  • Smith (2020)
  • (Smith, 2020; Jones, 2021)

3. 上标型引用 (superscript)

  • ¹, ², ³, ⁴, ⁵
  • [1] 作为上标

4. 其他格式

  • {1}, <1>
  • [ref1], [cite1]

使用方法

基本用法 - 移除所有引用

python scripts/run_citation_marker_remover.py \
  --input paper.jsonl \
  --output cleaned.jsonl

只移除数字型引用

python scripts/run_citation_marker_remover.py \
  --input paper.jsonl \
  --output cleaned.jsonl \
  --citation_styles numeric

同时移除参考文献章节

python scripts/run_citation_marker_remover.py \
  --input paper.jsonl \
  --output cleaned.jsonl \
  --remove_reference_section true

移除多种格式

python scripts/run_citation_marker_remover.py \
  --input paper.jsonl \
  --output cleaned.jsonl \
  --citation_styles "numeric,author_year"

参数说明

参数必填说明
--input是输入文件路径
--output是输出文件路径
--citation_styles否引用格式:all/numeric/author_year/superscript,默认all
--remove_inline_refs否是否移除行内引用,默认true
--remove_reference_section否是否移除参考文献章节,默认false
--preserve_context否是否保留上下文,默认true
--text_field否文本字段名,默认text

输出示例

清理前后对比

原文: 研究表明[1],该方法具有较高的准确率[2,3]。Smith et al. (2020)也得出了类似结论。
清理后: 研究表明,该方法具有较高的准确率。也得出了类似结论。

原文: 根据文献(Johnson, 2019; Lee, 2020),这一现象普遍存在。
清理后: 根据文献,这一现象普遍存在。

原文: 实验结果¹²³表明该假设成立。
清理后: 实验结果表明该假设成立。

执行结果

[OK] Citation marker removal completed!
   Input file: paper.jsonl
   Citation styles: all
   Total samples: 1000
   Modified samples: 850 (85.0%)
   Citations removed: 5200
   Citation types:
     - Numeric [1]: 3500
     - Author-year (Smith, 2020): 1200
     - Superscript: 500
   Output file: cleaned.jsonl

注意事项

  1. 移除引用后会自动清理多余的空格和标点
  2. 作者年份型引用可能误匹配普通括号内容,建议先检查结果
  3. 参考文献章节识别基于关键词("参考文献"、"References"等)
  4. 上标数字可能与其他用途的上标混淆,请谨慎使用
  5. 建议在移除前备份原始文件

相似的 Skill

graphify

GRGraphify-Labs/graphify156k近 7 天新增 2,564 个 star

wiki-query

PApaperclipai/paperclip119k近 7 天新增 1,966 个 star

官方

clinical-case-report

NEnexu-io/open-design111k近 7 天新增 1,277 个 star

style-sampling

HEheygen-com/hyperframes94k近 7 天新增 4,558 个 star

academic-paper-review

BYbytedance/deer-flow86k近 7 天新增 276 个 star

systematic-literature-review

BYbytedance/deer-flow86k近 7 天新增 276 个 star