corpus-building
安装方式
先用 Prompt 核对来源与依赖。也可下载安装包。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "corpus-building":https://skillpi.com/zh/skills/deepskill-020d9da25c6e1f3d8dcbfb1300bd7cbad131f30bf9c4f201e8ad9a7a7306fe9a。安装前核对上游来源和版本:https://github.com/scholay/skills。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
来源与配置
github.com
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
从已注册源对象中提取、结构化并检查证据质量:将处理后的文档转换为可搜索的证据卡片,管理 OCR 与翻译层,运行质量评分,处理噪声与恢复,并维护语料库索引。适用于需要将来源文档整理为可用语料或证据集的场景。
介绍来源: third_party · scholay · 0.0.1 参考来源
SkillPi 解读
- 能完成的任务
- 翻译待完成,请参阅来源文档。
- 实测状态
- 未测试
文件浏览
Frontmatter
name: corpus-building
description: Extract, structure, and quality-check evidence from registered source objects. Use when converting processed documents into searchable evidence cards, managing OCR and translation layers, running quality scoring, handling noise and recovery, or maintaining a corpus index.Corpus Building
The core problem
A folder of PDFs is not a corpus. A corpus is a collection of addressable evidence units — each one traceable to a specific page of a specific source, with enough context to be used in writing without reopening the original document.
This skill covers the full path from source object to evidence card, including OCR, translation, quality scoring, and the noise problems that appear at scale.
Key concepts
Source card — one record per registered source. Holds metadata, processing status, and links to all derived evidence.
Text slice — one evidence unit extracted from a specific page range of a source. Stores the original text, cleaned OCR text, and working translation as separate layers. Never collapses them.
Image slice — one image evidence unit (a page scan, figure, plan, photograph, table, or diagram). Stores file path, description, and status.
The separation rule: a slice stores what the source says. AI annotations store what AI thinks about the slice. Do not mix them.
Workflow
1. Create the source card first
Before creating any slices, create a source card for the registered source object. Minimum fields: source ID, title, language, file path, topics, status fields for OCR and translation.
2. Run OCR
For each source, generate per-page text output.
Default path: use a local OCR engine (Tesseract or equivalent). For multilingual documents, set the language pack explicitly — running an incorrect language pack produces script-mismatch noise, not just bad quality.
Cloud OCR path (optional): use a cloud OCR API for higher fidelity on difficult scans. Reserve this for pages that local OCR consistently fails on, not as a default for all sources.
Output per page: raw OCR text file. Keep raw output separate from any cleaned version.
3. Slice into evidence cards
For each page (or logical text unit), create a text slice card with:
- Slice ID (
SLC-####-T###) - Source ID and page reference
- Original text (from source)
- OCR-cleaned text (if different)
- Working translation (in your project's working language)
- Status fields: OCR status, translation status, verification status
For each page image, create a baseline image slice card with:
- Slice ID (
SLC-####-I###) - Source ID and page number
- Image file path
- Image type (page scan, figure, plan, photo, table, diagram)
- Description status
On image descriptions: use a multimodal model to inspect the actual image pixels. Do not use OCR output as a substitute for visual inspection. Label OCR-derived descriptions as ocr_assisted_draft — they are lower trust than a genuine visual description.
4. Run quality scoring
After slicing, score each page on:
- OCR quality: are there repeated characters, symbol noise, script artifacts?
- Translation quality: is the working language layer present and readable?
Assign a triage priority:
P1— likely broken; inspect immediately before usingP2— needs review; often image-heavy or missing translationP3— usable but worth spot-checkingOK— acceptable for browsing
Calibrate before scaling: after your first new source type, inspect all P1 pages plus a sample of P2 and OK. If the scoring looks wrong, fix the scorer before running 50 more sources.
5. Handle noise and blocked pages
At scale, some pages will have OCR artifacts severe enough to quarantine:
- Repeated-character runs
- Script mismatch (wrong language pack)
- Symbol floods
Before bulk quarantine, sample the flagged pages visually. Common false positives:
- Table-of-contents pages with dotted leaders (
…………) — readable, just unusual - Pages in a different script than you expected — fix the language setting, not the page
For genuinely noisy pages, mark them excluded and log them in a blocked pages list with a reason code. Revisit after fixing the underlying cause (wrong language pack, poor scan quality, etc.) rather than leaving them permanently blocked.
6. Validate and rebuild
After every batch, validate that:
- Every slice card in your folder has a row in your index
- No duplicate slice IDs exist
- No index rows reference missing files
Rebuild any downstream views (app data, search indexes) from the validated corpus, not from cached state.
Rules
- Markdown/text cards are the source of truth. CSV/database indexes are rebuildable projections.
- Never let a translation overwrite the original text or the OCR-cleaned text. Keep all three layers.
- Never use OCR output as a substitute for visual inspection of images.
- Do not create slices from unregistered source objects.
- Do not run quality scoring and then ignore the results — calibrate the scorer and act on P1 pages.
- Over-quarantine is as harmful as under-quarantine. Sample before bulk-blocking.
- Auto-generated page slices are browsing inventory, not citation-ready evidence. Mark them accordingly.
- Validate after every batch. Do not continue slicing when validation fails.
Status vocabulary
OCR status: not_started / in_progress / raw_ocr / cleaned / verified / blocked / not_needed
Translation status: not_started / machine_draft / agent_draft / pending_translation / reviewed / quote_ready / blocked / not_needed
Verification status: draft / checked / reviewed
Image description status: not_started / ocr_assisted_draft / visual_draft / reviewed / caption_ready
References
- Read
references/slice-schema.mdfor required fields, status vocabulary, and granularity rules. - Read
references/quality-scoring.mdfor triage priority semantics, risk tags, and calibration guidance. - Read
references/ocr-noise.mdfor common noise patterns, false-positive quarantine risks, and recovery steps.
当前收录版本
0.0.1
安全与评测信息
质量评测
满分100 · 来自 SkillPi LAB 实验室的评测报告。
亮点
- 提供完整的语料库构建端到端流程,涵盖OCR、翻译、质量评分和噪声处理
- 适用于文档处理、证据卡片生成等明确场景,具有广泛实用价值
亮点
- 触发描述精准完整,覆盖多种使用场景变体
- 边界清晰,不易与其他Skill混淆
待提升项
-
缺少 When to Use/示例章节 原报告严重程度:轻微
文档结构完整但缺少显式的使用场景说明章节和端到端示例
改进建议:建议补充 When to Use 章节和具体使用示例以增强可读性
-
文档过长 原报告严重程度:轻微
主文档内容约1200行,超出建议的500行限制
改进建议:考虑将部分详细说明移至参考文档或进行内容精简
亮点
- Phase/步骤清晰,有明确的出口条件和验证机制
- frontmatter完整,状态词汇表规范
亮点
- 工具来源明确(Tesseract等),参数建议合理
- 覆盖主要异常情况并有采样验证机制
- 强调校准和批量处理前的验证,可靠性高
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
正文静态检测
100 / 100 · skillpi-20261123-no-r3-v1
正文未命中当前规则。
分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。
安全评级与访问范围
safe · 静态证据核验,不代表运行安全保证。
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。