Agent skill

entity_extractor_class

封装一个Python类EntityExtractor,用于从字符串中提取指标、业务线、车型、地区等实体。该类使用正则表达式匹配括号内容,并根据预定义的实体库进行过滤。

ECNU-ICALKgithub.com/ECNU-ICALKGitHub ↗
claude-code
Install
npx skills add ECNU-ICALK/AutoSkill --skill entity_extractor_class --agent claude-code

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

Facts
Files in the skill folder: 1
SKILL.md size: 3 KB
Bundled scripts: none
Version: 0.1.1
Path: SkillBank/ConvSkill/chinese_gpt4_8/entity_extractor_class/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

# entity_extractor_class 封装一个Python类EntityExtractor,用于从字符串中提取指标、业务线、车型、地区等实体。该类使用正则表达式匹配括号内容,并根据预定义的实体库进行过滤。 ## Prompt # Role & Objective 你是一个Python开发助手。你的任务是根据用户提供的实体库数据,封装一个名为`EntityExtractor`的Python类,用于从特定格式的字符串中提取实体。 # Operational Rules & Constraints 1. **类结构定义**: - 类名必须为 `EntityExtractor`。 - 必须包含 `__init__` 方法(注意是双下划线 `__init__`,不能是单下划线 `init`)。 2. **数据初始化**: - 在 `__init__` 方法中初始化以下列表属性,并填入对应的预定义数据: - `self.indicators`:指标库列表。 - `self.business_lines`:业务线名称库列表。 - `self.cities`:城市库列表(若无特定数据可初始化为空列表)。 - `self.car_models`:车型名称库列表。 - `self.regions`:大区名称库列表。 - `self.channels`:渠道名称库列表。 - `self.operators`:算子名称库列表。 - `self.mileages`:里程数名称库列表。 3. **提取逻辑**: - 使用正则表达式 `r'\((.*?)\)'` 从输入字符串中提取所有圆括号内的内容。 - 将提取出的候选词与预定义的实体库列表进行比对,筛选出存在于库中的实体。 4. **方法实现**: - 实现一个通用的辅助方法 `extract(self, sentence, entity_list)`,接收句子和实体库列表,返回匹配的实体列表。 - 实现以下公开方法,分别调用通用方法并传入对应的实体库: - `extract_indicators(self, sentence)`:提取指标实体。 - `extract_business_lines(self, sentence)`:提取业务线实体。 - `extract_cities(self, sentence)`:提取城市实体。 - `extract_car_models(self, sentence)`:提取车型实体。 - `extract_regions(self, sentence)`:提取大区实体。 - `extract_channels(self, sentence)`:提取渠道实体。 - `extract_operators(self, sentence)`:提取算子实体。 - `extract_milea

What's inside
Steps it walks through
  1. Prompt
  2. Triggers
More from AutoSkill
All skills →
About this skill
What does the entity_extractor_class skill do?

封装一个Python类EntityExtractor,用于从字符串中提取指标、业务线、车型、地区等实体。该类使用正则表达式匹配括号内容,并根据预定义的实体库进行过滤。

How do I install it?

Run `npx skills add ECNU-ICALK/AutoSkill --skill entity_extractor_class --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