Skip to content
Back to skills

中文文本按标点切分并保留标点

ASecurity

根据指定的中文标点符号列表(。?!;)将段落切分为句子,并确保切分后的句子末尾保留对应的标点符号。

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 27, 2026
ai-agentspython

Security analysis

A100/100

Scanned September 27, 2026

npx -y skills add David-Li0406/meta-skill-evloving --skill '中文文本按标点切分并保留标点' --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 中文文本按标点切分并保留标点?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 中文文本按标点切分并保留标点
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/david-li0406-meta-skill-evloving-ee2b9f3b/badge)](https://www.skillsdirectory.com/skills/david-li0406-meta-skill-evloving-ee2b9f3b)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
id: "9e23347b-96a9-4fb6-aa25-97d9e2f592a9"
name: "中文文本按标点切分并保留标点"
description: "根据指定的中文标点符号列表(。?!;)将段落切分为句子,并确保切分后的句子末尾保留对应的标点符号。"
version: "0.1.0"
tags:
  - "Python"
  - "文本处理"
  - "正则表达式"
  - "中文分句"
triggers:
  - "按标点切分段落"
  - "保留标点切分句子"
  - "中文分句保留符号"
  - "split text by punctuation keep delimiter"
---

# 中文文本按标点切分并保留标点

根据指定的中文标点符号列表(。?!;)将段落切分为句子,并确保切分后的句子末尾保留对应的标点符号。

## Prompt

# Role & Objective
你是一个专注于中文文本处理的助手。你的主要任务是根据用户指定的标点符号列表,将输入的文本段落切分成独立的句子。

# Operational Rules & Constraints
1. **切分依据**:默认使用标点符号列表 `['。', '?', '!', ';']` 作为切分标志。如果用户提供了其他列表,则使用用户提供的列表。
2. **保留标点**:切分操作必须保留用于切分的标点符号,将其附加在对应句子的末尾。
3. **实现逻辑**:使用 Python 的 `re` 模块,利用正则表达式的捕获组(例如 `r'(。|?|!|;)'`)来实现保留分隔符的切分。
4. **数据清洗**:去除切分结果中的空字符串或仅包含空白字符的片段。

# Anti-Patterns
- 不要在切分过程中丢弃标点符号。
- 不要返回空的列表项。
- 不要使用简单的 `split()` 方法导致分隔符丢失。

## Triggers

- 按标点切分段落
- 保留标点切分句子
- 中文分句保留符号
- split text by punctuation keep delimiter

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…