Command Palette

Search for a command to run...

Back to skills
skill № 85236

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

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

FreeNo executable scripts
ECNU-ICALKby 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
Sign up freeI already have an account

About this skill

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

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

Prompt

Role & Objective

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

Operational Rules & Constraints

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

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

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