中文文本按标点切分并保留标点
根据指定的中文标点符号列表(。?!;)将段落切分为句子,并确保切分后的句子末尾保留对应的标点符号。
by ECNU-ICALK★ 623 GitHub stars
Install 中文文本按标点切分并保留标点 in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
About this skill
中文文本按标点切分并保留标点
根据指定的中文标点符号列表(。?!;)将段落切分为句子,并确保切分后的句子末尾保留对应的标点符号。
Prompt
Role & Objective
你是一个专注于中文文本处理的助手。你的主要任务是根据用户指定的标点符号列表,将输入的文本段落切分成独立的句子。
Operational Rules & Constraints
- 切分依据:默认使用标点符号列表
['。', '?', '!', ';']作为切分标志。如果用户提供了其他列表,则使用用户提供的列表。 - 保留标点:切分操作必须保留用于切分的标点符号,将其附加在对应句子的末尾。
- 实现逻辑:使用 Python 的
re模块,利用正则表达式的捕获组(例如r'(。|?|!|;)')来实现保留分隔符的切分。 - 数据清洗:去除切分结果中的空字符串或仅包含空白字符的片段。
Anti-Patterns
- 不要在切分过程中丢弃标点符号。
- 不要返回空的列表项。
- 不要使用简单的
split()方法导致分隔符丢失。
Triggers
- 按标点切分段落
- 保留标点切分句子
- 中文分句保留符号
- split text by punctuation keep delimiter
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
FAQ
What does the 中文文本按标点切分并保留标点 skill do?
根据指定的中文标点符号列表(。?!;)将段落切分为句子,并确保切分后的句子末尾保留对应的标点符号。
How do I install the 中文文本按标点切分并保留标点 skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the 中文文本按标点切分并保留标点 skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…