| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256 |
- # 招标人兜底召回规则(角色分类流程优化 Phase B)。
- #
- # 来源(触发条件均为 tenderee_notfound,即全文无 label=0 且 prob>0.55 的实体):
- # 1. dl/predictors/role.py TendereeRuleRecall(约 699-921 行):
- # - entity_context_rule:7 级优先级链(left_1..left_5 → right → right2 → right3),
- # 命中后 label=0,prob=0.5+values[0]/10(略高于 0.5 基线)
- # - subject_rule:公告主语 [我本][院校局]
- # 2. dl/predictors/role.py RoleRuleFinalAdd(约 598-695 行):
- # 文末格式(公司名+日期)、招标联系人、户名、买家信息、发布单位、站源格式,
- # 命中后 label=0/1,prob=0.51(比标题概率略高)
- #
- # 优先级(priority 越大越先执行,与代码中的串行顺序一致):
- # final_*(RoleRuleFinalAdd,extract.py 中先执行)→
- # left_1 > left_2 > left_3 > left_4 > left_5 > right > right2 > right3 → subject
- version: 1
- category: ROLE
- description: >-
- 招标人兜底召回规则:模型与上下文规则均未召回招标人时,
- 按 7 级上下文 → 文末格式 → 主语的优先级链补充召回。
- probability_ladder:
- p_model_threshold: 0.5
- p_rule_override: 0.501
- p_fallback: 0.51
- p_title: 0.55
- patterns:
- # ---- RoleRuleFinalAdd:文末/全文格式召回(先执行)----
- - id: final_publisher
- description: '全文前 5000 字:发布人/单位/机构/企业、项目业主、所属公司、寻源单位、主办单位、卖家:实体名。doc DX020065-3 卖家:成都积微物联电子商务有限公司'
- role: tenderee
- prob: 0.51
- priority: 90
- pattern: '(发布(?:人|单位|机构|企业)|项目业主|所属公司|寻源单位|主办单位|卖家)[,::][A-Za-z0-9_]*(?P<entity>[\u4e00-\u9fa5()()]{4,20})[,。]'
- golden_examples:
- - input: '发布单位:济南城市建设有限公司,'
- should_match: true
- - input: '卖家:成都积微物联电子商务有限公司。'
- should_match: true
- - input: '中标单位:青岛市政工程集团有限公司,'
- should_match: false
- - id: final_buyer_info
- description: '全文前 5000 字:买家信息/所有权人/土地权属单位/报名咨询/收送货地点:实体名'
- role: tenderee
- prob: 0.51
- priority: 89
- pattern: '(买家信息|所有权人|土地权属单位|报名咨询|[收送交]货地点)[,:](?P<entity>[\u4e00-\u9fa5()()]{5,20})[0-9\-]*[,。]'
- golden_examples:
- - input: '买家信息:广州市水务局,'
- should_match: true
- - input: '收货地点:济南市历城区仓库。'
- should_match: true
- - input: '发布单位:某公司,'
- should_match: false
- - id: final_account_name
- description: '全文前 5000 字:户名/开户名称/发票抬头:实体名'
- role: tenderee
- prob: 0.51
- priority: 88
- pattern: '[,:](户名|开户名称|发票抬头)[::](?P<entity>[\u4e00-\u9fa5()()]{5,20})[,。]'
- golden_examples:
- - input: ',户名:苏州市广播电视总台,'
- should_match: true
- - input: '户名:某某公司'
- should_match: false
- - id: final_contact_unit
- description: '全文前 5000 字:招标/采购联系人:姓名+实体名'
- role: tenderee
- prob: 0.51
- priority: 87
- pattern: '((招标|采购)联系人)[,::][A-Za-z0-9_]*(?P<entity>[\u4e00-\u9fa5()()]{4,20})'
- golden_examples:
- - input: '采购联系人:张先生济南城建集团'
- should_match: true
- - input: '联系人:李先生'
- should_match: false
- - id: final_end_date
- description: >-
- 文末(最后 5 句由后往前,去网址/招标办/附件名后 200 字):
- 实体名 + 日期格式(公告日期/电子签章/年月日)。doc 402073799 285264698。
- guard_not: 实体名前后出现 报价记录|竞价成交 则不召回。
- role: tenderee
- prob: 0.51
- priority: 86
- pattern: '([,。;:]|^)(?P<entity>[\u4e00-\u9fa5()()]{5,20}(,?[\u4e00-\u9fa5]{,8})?),?\s*((公告|发布)(日期|时间):|(电子签章),)?[0-9零一二三四五六七八九十〇○]{2,4}[年\-/][0-9零一二三四五六七八九十]{1,2}[月\-/]([0-9零一二三四五六七八九十]{1,2}日?)?'
- guard_not: '报价记录|竞价成交'
- golden_examples:
- - input: '。苏州卫生职业技术学院,2022年11月24日'
- should_match: true
- - input: '传真:0512-62690315,2022年11月24日'
- should_match: false
- - id: final_end_date_fallback
- description: >-
- final_end_date 主模式未命中时,取正文末尾 100 字重试:与主模式的差异为
- 引导符不含 :、(公告|发布) 可选、日期"日"可缺省。
- 注:原 role.py L632 此模式括号不平衡(缺 ")")导致该分支一旦执行必抛
- re.error,属隐性 bug;迁移时已修复(补齐 ")?"),badcase 回归集未覆盖
- 该路径,行为差异仅为"原来必崩 → 现在正常匹配"。
- role: tenderee
- prob: 0.51
- priority: 85
- pattern: '([,。;]|^)(?P<entity>[\u4e00-\u9fa5()()]{5,20}(,?[\u4e00-\u9fa5]{,8})?),?\s*((公告|发布)?(日期|时间):|(电子签章),)?[0-9零一二三四五六七八九十〇○]{2,4}[年\-/][0-9零一二三四五六七八九十]{1,2}[月\-/]([0-9零一二三四五六七八九十]{1,2}日?)?'
- guard_not: '报价记录|竞价成交'
- golden_examples:
- - input: '。某某某某单位2022年11月'
- should_match: true
- - input: '传真:0512-62690315'
- should_match: false
- - id: final_station_format
- description: '站源格式:,单位名称:实体名,联系人及联系电话:。doc 665632891'
- role: tenderee
- prob: 0.51
- priority: 85
- pattern: ',单位名称:(?P<entity>[\u4e00-\u9fa5()()]{4,20}),联系人及联系电话:'
- golden_examples:
- - input: ',单位名称:驻马店市公共资源交易中心,联系人及联系电话:'
- should_match: true
- - input: ',单位名称:某公司'
- should_match: false
- # ---- TendereeRuleRecall:7 级上下文链(front=前 40 词,behind=后 40 词)----
- - id: recall_left_1
- description: '前文(40 词):采购商/项目法人/询价单位/预算单位/买方单位/购买主体 等+冒号结尾'
- role: tenderee
- prob: 0.55
- applies_to: front
- priority: 70
- pattern: '((?:采购商|项目法人|项目业主)(名称)?|(?:采购商|询价|项目法人|项目业主|申购|预算|买方|需求|寻源|需用|征集)(单位|公司)((?:单位|公司)?名称)?|询价企业|业主单位咨询电话|购买主体|采购工厂|需求方(信息[,:])?(单位|公司)?名称|采购单位[\((].{1,6}[\))])[::是为][^。;,]{,2}$'
- golden_examples:
- - input: '项目业主:'
- should_match: true
- - input: '预算单位名称:'
- should_match: true
- - input: '供应商名称:'
- should_match: false
- - id: recall_left_2
- description: '前文(40 词):招标承办单位/交易人/招标人代表/交易单位/发起单位/收货单位/使用方/买家信息 等+冒号结尾'
- role: tenderee
- prob: 0.55
- applies_to: front
- priority: 69
- pattern: '(招标承办单位|交易人(?:名称)?|招标人代表|(采购|招标)联系人|交易单位|发起(单位|组织)|收货单位|使用方|买家信息)[::是为][^。;,]{,2}$'
- golden_examples:
- - input: '招标承办单位:'
- should_match: true
- - input: '收货单位:'
- should_match: true
- - input: '代理机构:'
- should_match: false
- - id: recall_left_3
- description: '前文(40 词):本公司/本单位(我/本引导)结尾'
- role: tenderee
- prob: 0.55
- applies_to: front
- priority: 68
- pattern: '[本我](?:公司|单位)[\(\[(【]?$'
- golden_examples:
- - input: '本公司'
- should_match: true
- - input: '本单位('
- should_match: true
- - input: '贵公司'
- should_match: false
- - id: recall_left_4
- description: '前文(40 词):采购机构/组织单位/执行单位/联系单位 等+冒号结尾(需实体名非代理类或机构类后缀)'
- role: tenderee
- prob: 0.55
- applies_to: front
- priority: 67
- pattern: '(采购机构|(?:采购|招标|询价)?(组织|执行)(机构|方|单位|部门|组织)|联系(单位|部门)|联系(人|方式),?(单位|公司)(名称)?|联系(人|方式),名称)[::是为][^。;,]{,2}$'
- golden_examples:
- - input: '采购机构:'
- should_match: true
- - input: '组织单位:'
- should_match: true
- - input: '招标人:'
- should_match: false
- - id: recall_left_5
- description: '前文(40 词):撰写单位/发布人/发布单位/发布机构/发布公司/发布部门/发布企业 结尾'
- role: tenderee
- prob: 0.55
- applies_to: front
- priority: 66
- pattern: '(撰写单位|发布(?:人|单位|机构|公司|部门|企业))[^。;,]{,2}$'
- golden_examples:
- - input: '发布单位:'
- should_match: true
- - input: '撰写单位:'
- should_match: true
- - input: '中标单位:'
- should_match: false
- - id: recall_behind
- description: '后文(40 词):(以下简称"我X")/(称招标人)/对…进行采购/关于…的公告/的…正在…进行/已批准/选定供应商 等'
- role: tenderee
- prob: 0.55
- applies_to: behind
- priority: 60
- pattern: '^[^。;::]{,5}[((](以?下简?称)?,?[,"“]*[我本][一-龥]{1,2}[,"”]*[))]|^[\((][^。;::\))]{,5}称(?:招标|采购)(?:人|单位)|^[^。;::]{,10}[对就][^。;,]+,?[^。;,]{,20}进行[^。;,]*(采购|询比?价|遴选|招投?标|征集)|^[^。;::]{,10}关于[^。;,]+,?[^。;,]{,20}的[^。;,]{,20}公告|^[^。;,::]{,10}的[^。;,]+,?[^。;]{,20}正在[^。;,]{,5}进行|^[^。;,::]{,10}的[^。;,]+,?[^。;]{,20}已?[^。;,]{,20}批准|^[^。;,::]{,15}(选定|选取|征集|遴选)[^。;,]{,20}(供应商|(代理|咨询|设计)[^。;,]{,5}机构|代理人)'
- golden_examples:
- - input: '(以下简称“我院”)'
- should_match: true
- - input: '关于2025年度物业服务项目的公告'
- should_match: true
- - input: ',中标人,'
- should_match: false
- - id: recall_behind_2
- description: '后文(40 词):前 10 字内出现 招标办/采购部/办事处/采购小组'
- role: tenderee
- prob: 0.55
- applies_to: behind
- priority: 59
- pattern: '^[^。;,::]{,10}(招标办|采购部|办事处|采购小?组)'
- golden_examples:
- - input: '招标办'
- should_match: true
- - input: '采购小组'
- should_match: true
- - input: '中标办'
- should_match: false
- - id: recall_behind_3
- description: '后文(40 词):对/就/关于/的 + 项目名(4-40 字),项目名命中 name 实体时召回'
- role: tenderee
- prob: 0.5
- applies_to: behind
- priority: 58
- pattern: '^[^。;,::]{,10}(对|就|关于|的)(?P<project>[^。;,?!::]{4,40})'
- golden_examples:
- - input: '关于某某市人民医院物业服务项目'
- should_match: true
- - input: ',中'
- should_match: false
- - id: recall_subject
- description: '公告主语:全文出现 我院/本校/我局(实体名含院/校/局 时召回,prob=0.5+values/10)'
- role: tenderee
- prob: 0.55
- priority: 50
- pattern: '[我本][院校局]'
- golden_examples:
- - input: '我院'
- should_match: true
- - input: '本校'
- should_match: true
- - input: '贵校'
- should_match: false
|