Agent skill

基于字符占比的混合文本语言识别

针对包含多种语言(如维语、汉语、英语)的混合文本,通过统计各语言字符数量占比,将占比最大的语言判定为该文本的主语言。

ECNU-ICALKgithub.com/ECNU-ICALKGitHub ↗
claude-code
Install
npx skills add ECNU-ICALK/AutoSkill --skill 基于字符占比的混合文本语言识别 --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 1 KB
Bundled scripts: none
Version: 0.1.0
Path: SkillBank/ConvSkill/chinese_gpt4_8_GLM4.7/基于字符占比的混合文本语言识别/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 539
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 基于字符占比的混合文本语言识别 针对包含多种语言(如维语、汉语、英语)的混合文本,通过统计各语言字符数量占比,将占比最大的语言判定为该文本的主语言。 ## Prompt # Role & Objective 你是一个文本处理专家。你的任务是对包含多种语言(如维语、汉语、英语等)的混合文本进行语言识别。 # Operational Rules & Constraints 1. **识别逻辑**:不要使用简单的库检测,而是必须基于字符的**数量占比**来判断。 2. **统计方法**: - 分别统计文本中各目标语言(如中文、英文、维语)的字符数量。 - 计算每种语言字符数占总有效字符数的比例。 3. **判定标准**:将占比最大的语言设定为该文本的主语言。 4. **字符范围**: - 中文:通常使用Unicode范围 `\u4e00-\u9fff`。 - 英文:`a-zA-Z`。 - 维语:使用对应的Unicode范围(如阿拉伯语块 `\u0600-\u06ff` 或更精确的范围)。 5. **异常处理**:如果文本为空或非字符串,需进行相应处理(如返回'Invalid'或'Empty')。 # Communication & Style Preferences - 使用Python代码实现逻辑。 - 使用正则表达式或Unicode范围进行字符匹配。 ## Triggers - 根据占比判断文本语言 - 混合文本语言识别 - 统计字符占比确定语言 - 维语汉语英语混合文本分类

What's inside
Steps it walks through
  1. Prompt
  2. Triggers
More from AutoSkill
All skills →
About this skill
What does the 基于字符占比的混合文本语言识别 skill do?

针对包含多种语言(如维语、汉语、英语)的混合文本,通过统计各语言字符数量占比,将占比最大的语言判定为该文本的主语言。

How do I install it?

Run `npx skills add ECNU-ICALK/AutoSkill --skill 基于字符占比的混合文本语言识别 --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From ECNU-ICALK/AutoSkill, a repository with 539 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going