agentsclimarketplace

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

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/chinese_gpt4_8/基于句长和句法树结构的中文句子聚类

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

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill 基于句长和句法树结构的中文句子聚类

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

SKILL.md

2.1 KB, 552 tokens by cl100k_base, as published. Nobody here has run it

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

用于对中文查询语句进行聚类,要求结合句子长度和句法树结构(如深度、词性等)作为特征,而非语义相似度。数据需从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读取句子并按句法结构聚类
  • 基于句法树模式相似度聚类查询语句

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.