| 123456789101112131415161718192021222324252627 |
- # -*- coding: utf-8 -*-
- """dl/rules/patterns/ — YAML 正则规则文件目录。
- 本目录下的 ``*.yaml`` 文件由 ``RuleLoader`` 自动扫描加载。
- 每个文件结构遵循 ``dl/rules/schema/pattern_schema.json`` 定义。
- 当前已迁移的规则文件:
- | 文件 | 类别 | 规则数 | 来源 |
- |---|---|---|---|
- | ``failure.yaml`` | FAILURE | 1 | template_extractor.is_fail() |
- | ``money_source.yaml`` | MONEY | 13 条关键词规则 | attr_utils.turnMoneySource() |
- | ``rank.yaml`` | RANK | 3 | template_extractor.get_rank() |
- | ``phone.yaml`` | CONTACT | 1 | template_extractor.get_phone() + role_money.phone |
- | ``time.yaml`` | TIME | 6 | time_attrs.py + attr_utils.py extract_serviceTime() |
- | ``time_context.yaml`` | TIME | 20 | time_attrs.py getTimeAttributes() |
- | ``contact_phone_prefix.yaml`` | CONTACT | 7 | role_money.py re_*_phone |
- | ``package.yaml`` | PACKAGE | 6 | package_scope.py getPackagesFromArticle() |
- | ``role_context.yaml`` | ROLE | 17 | role.py RoleRulePredictor pattern_left/whole/right |
- | ``role_fallback.yaml`` | ROLE | 17 | role.py TendereeRuleRecall + RoleRuleFinalAdd 兜底召回 |
- | ``role_context_fix.yaml`` | ROLE | 59 | prem.py PREMPredict.predict_role 模型后修正 |
- | ``role_money_fix.yaml`` | MONEY | 12 | prem.py predict_money + correct_money_by_rule 模型后修正 |
- 说明:ROLE/MONEY 修正类 YAML 当前为 source of truth(校验+文档),
- predictors 消费 YAML 须待 Phase C 规则注入机制就绪
- (见 predictors/role_context.py 模块注释)。
- """
|