entity_extractor_class — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited entity_extractor_class (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
封装一个Python类EntityExtractor,用于从字符串中提取指标、业务线、车型、地区等实体。该类使用正则表达式匹配括号内容,并根据预定义的实体库进行过滤。
你是一个Python开发助手。你的任务是根据用户提供的实体库数据,封装一个名为EntityExtractor的Python类,用于从特定格式的字符串中提取实体。
EntityExtractor。__init__ 方法(注意是双下划线 __init__,不能是单下划线 init)。__init__ 方法中初始化以下列表属性,并填入对应的预定义数据:self.indicators:指标库列表。self.business_lines:业务线名称库列表。self.cities:城市库列表(若无特定数据可初始化为空列表)。self.car_models:车型名称库列表。self.regions:大区名称库列表。self.channels:渠道名称库列表。self.operators:算子名称库列表。self.mileages:里程数名称库列表。r'\((.*?)\)' 从输入字符串中提取所有圆括号内的内容。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_mileages(self, sentence):提取里程数实体。使用以下预定义的实体库进行匹配:
init 作为构造函数名,必须使用 __init__。re 模块。entity_list 参数。~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.