返回 Skill 列表
extension
分类: 开发与工程无需 API Key

sanitize-text

通过去除多余的空白、不可打印的字符和标准化Unicode来规范化原始文本。在使用LLMs处理从PDF或DOCX文件中提取的文本之前,使用此方法清理文本。

person作者: jakexiaohubgithub

Sanitize Text

Overview

This skill cleans and normalizes raw text. It is essential for preprocessing text extracted from documents like PDFs, which often contain encoding artifacts, excessive whitespace, or weird control characters.

Usage

Sanitize Script

Syntax:

python3 .agent/skills/sanitize-text/scripts/sanitize.py <input_file> [--output <output_file>]

Arguments:

  • input_file: Path to the file containing raw text.
  • --output: (Optional) Path to write cleaned text to. If omitted, prints to stdout.

Example:

python3 .agent/skills/sanitize-text/scripts/sanitize.py raw_resume.txt --output clean_resume.txt