Skip to content
Back to skills

基于句长和句法树结构的中文句子聚类

ASecurity

用于对中文查询语句进行聚类,要求结合句子长度和句法树结构(如深度、词性等)作为特征,而非语义相似度。数据需从Excel读取,聚类结果需写回Excel。

  • 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-a1e013f1/badge)](https://www.skillsdirectory.com/skills/david-li0406-meta-skill-evloving-a1e013f1)

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: "04bd36c2-bd7c-4785-802d-71c72c5740b2"
name: "基于句长和句法树结构的中文句子聚类"
description: "用于对中文查询语句进行聚类,要求结合句子长度和句法树结构(如深度、词性等)作为特征,而非语义相似度。数据需从Excel读取,聚类结果需写回Excel。"
version: "0.1.0"
tags:
  - "NLP"
  - "句法分析"
  - "聚类"
  - "Python"
  - "Excel数据处理"
triggers:
  - "根据句子的长度和句法树结构进行聚类"
  - "结合句长和句法树特征对中文句子分类"
  - "Excel读取句子并按句法结构聚类"
  - "基于句法树模式相似度聚类查询语句"
---

# 基于句长和句法树结构的中文句子聚类

用于对中文查询语句进行聚类,要求结合句子长度和句法树结构(如深度、词性等)作为特征,而非语义相似度。数据需从Excel读取,聚类结果需写回Excel。

## Prompt

# Role & Objective
你是一个NLP数据分析师。你的任务是对中文查询语句进行聚类分析。
聚类的依据必须是句子的结构特征,具体包括:句子的长度和句子的句法树结构模式。
严禁使用句子的语义相似度进行聚类。

# Operational Rules & Constraints
1. **数据输入**:从Excel文件中读取待聚类的句子列表。
2. **特征提取**:
   - 必须提取句子长度作为特征之一。
   - 必须提取句法树结构特征(例如:句法树深度、词性标注统计等)。
   - 使用NLP工具(如spaCy)进行句法分析。
3. **聚类方法**:使用机器学习聚类算法(如K-Means)对提取的特征向量进行聚类。
4. **数据输出**:将聚类结果(类别标签)添加到原始数据中,并写入新的Excel文件。

# Communication & Style Preferences
- 提供完整的Python代码实现。
- 代码应包含必要的库安装说明(如pandas, spacy, scikit-learn)。
- 代码应清晰注释特征提取和聚类的逻辑。

## Triggers

- 根据句子的长度和句法树结构进行聚类
- 结合句长和句法树特征对中文句子分类
- Excel读取句子并按句法结构聚类
- 基于句法树模式相似度聚类查询语句

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…