Chinese NLP Toolkit

Specialized natural language processing for Chinese text. Covers segmentation (jiaba), sentiment analysis, keyword extraction, text summarization, tone detection, readability scoring, and format conversion (simplified/traditional, pinyin annotation). Use when processing, analyzing, or transforming Chinese text content.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "Chinese NLP Toolkit" with this command: npx skills add 371166758-qq/chinese-nlp-toolkit

Chinese NLP Toolkit

Process and analyze Chinese text with specialized NLP capabilities.

Core Capabilities

1. Text Segmentation (分词)

Chinese has no word boundaries. Segmentation is the foundation of all Chinese NLP.

Approach: Use rule-based heuristics when no library is available:

  • Dictionary matching (maximum forward/backward matching)
  • Context-aware: "南京市长江大桥" → ["南京市", "长江大桥"] not ["南京", "市长", "江大桥"]
  • Domain-specific terms should be added as custom dictionary entries

Common Ambiguities:

TextWrong SplitCorrect Split
雨伞雨/伞雨伞 (compound)
结婚的和尚未结婚的结婚/的/和尚/未/结婚/的结婚/的/和/尚未/结婚/的
项目部项目/部项目部 (compound)

2. Sentiment Analysis (情感分析)

Beyond positive/negative — Chinese sentiment is nuanced:

Intensity levels: 强烈负面 < 偏负面 < 中性 < 偏正面 < 强烈正面

Chinese-specific signals:

  • Rhetorical questions often indicate negative sentiment: "这也算好?"
  • Sarcasm markers: "呵呵", "厉害了", "也是醉了", "你开心就好"
  • Intensifiers: "非常", "特别", "简直了", "超级"
  • Diminishers: "还行吧", "马马虎虎", "凑合"

Emoji contribution (critical for social media):

  • 😊👍❤️ = positive amplification
  • 😤👎💔 = negative amplification
  • 🙄🙄🙄 = sarcasm/disdain (intensity scales with repetition)

3. Keyword Extraction (关键词提取)

For Chinese text, prioritize:

  • Noun phrases (名词短语)
  • Domain-specific terminology
  • Named entities (人名、地名、机构名)

Method: TF-IDF adapted for Chinese + positional weighting (first/last sentences carry more weight in Chinese writing).

4. Text Summarization (文本摘要)

Chinese-specific rules:

  • Summarize to 20-30% of original length
  • Preserve key numbers, names, and claims
  • Chinese articles often "bury the lead" — the conclusion may be more important than the introduction
  • Extract key sentences using positional + keyword scoring

5. Readability Scoring (可读性评分)

Rate Chinese text on a 1-10 scale considering:

  • Average sentence length (characters per sentence)
  • Vocabulary difficulty (HSK level estimate)
  • Clause density ( commas per sentence)
  • Use of classical Chinese elements
  • Technical jargon density
ScoreLevelTarget Audience
1-3EasyGeneral public
4-6ModerateEducated readers
7-8HardDomain experts
9-10Very HardAcademic specialists

6. Format Conversion

ConversionExample
Simplified → Traditional体验 → 體驗
Traditional → Simplified體驗 → 体验
Chinese → Pinyin你好 → nǐ hǎo
Chinese → Zhuyin你好 → ㄋㄧˇ ㄏㄠˇ

Workflow

When Processing Chinese Text:

  1. Detect variant: Simplified (简体) or Traditional (繁体)?
  2. Segment: Break into meaningful units
  3. Analyze: Apply the requested analysis type(s)
  4. Report: Present results with Chinese annotations

Output Format

原文:[original text]
分词:[segmented text with / separators]
关键词:[top 5-10 keywords with relevance scores]
情感:[sentiment label + confidence + key signals]
摘要:[summarized text]
可读性:[score/10 + brief explanation]

Edge Cases

  • Mixed-language text: Handle code-switching naturally ("这个bug太坑了") — don't force Chinese segmentation on English words
  • Internet slang: Recognize common abbreviations (yyds, xswl, nbcs, awsl) and expand for formal analysis
  • Poetry/classical Chinese: Flag as special case — modern NLP rules don't apply; use classical grammar patterns
  • Dialectal text: Flag non-Mandarin text (Cantonese, Shanghainese written forms) — analysis may be unreliable
  • Zero-width characters: Chinese text sometimes contains invisible characters (U+200B, U+FEFF) that affect processing

Common Tasks & Prompts

  • "Analyze the sentiment of this Chinese review"
  • "Extract keywords from this article"
  • "Summarize this Chinese news article in 100 characters"
  • "Rate the readability of this document"
  • "Convert this to Traditional Chinese with pinyin annotation"
  • "Segment this Chinese text and identify named entities"

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Research

PoliBERT Sentiment Analysis

Political sentiment analysis using PoliBERTweet - a RoBERTa model pre-trained on 83M political tweets. Analyzes support, opposition, and stance toward politi...

Registry SourceRecently Updated
600Profile unavailable
Research

中文AI知识管理

中文 AI 增强知识管理。PREFIX 确定性分类 + hash/语义去重 + jieba 自动标签 + LLM 对话知识提取。

Registry Source
4770Profile unavailable
General

中文工具包

为OpenClaw提供中文文本处理、翻译、OCR、语音识别等功能的综合工具包。支持中文分词、拼音转换、中英文翻译、关键词提取、文本分析等功能。

Registry SourceRecently Updated
1.1K1Profile unavailable
General

Emotion State

NL emotion tracking + prompt injection via OpenClaw hook

Registry SourceRecently Updated
2.7K6Profile unavailable