修复YAML误杀+核心词优化
1. YAML过滤器放宽:允许gitcode:等域名格式的消息 - 添加正则排除gitcode:ypshidifu等已知域名 - 修复公告查询被误杀问题 2. 核心词提取优化: - 将'相关联','相关','有关'加入non_core_kw - 添加'那么'到_STOPWORDS - 正确识别查询['公告', '消息']为核心词 3. 保持重复回复检测逻辑不变
This commit is contained in:
@@ -97,6 +97,8 @@ class AutoReply:
|
||||
"哪个", "那个", "这个", "哪些", "什么", "哪里",
|
||||
# 语气助词
|
||||
"啊", "呀", "么", "嘛", "呢",
|
||||
# 通用连词/代词(避免污染核心词)
|
||||
"那么", "那个", "这些", "那些", "这个", "那些",
|
||||
# 通用名词,出现在太多文档中导致误匹配
|
||||
"服务器","玩家","游戏","世界","地图","技能","装备","物品","命令","指令",
|
||||
}
|
||||
@@ -255,6 +257,8 @@ class AutoReply:
|
||||
'第一', '最新', '全部', '所有', '一起', '各种', '各种各样',
|
||||
# 疑问代词变体
|
||||
'哪些', '哪个', '什么', '怎么', '如何', '多少',
|
||||
# 连接/修饰词:不应参与核心词匹配
|
||||
'相关联', '相关', '有关', '以及', '以及',
|
||||
}
|
||||
core_kw = q_mean - non_core_kw
|
||||
doc_text = heading_clean + " " + title.lower() + " " + body_clean[:800]
|
||||
|
||||
+2
-1
@@ -7390,7 +7390,8 @@ class MessageMonitor:
|
||||
continue
|
||||
if re.match(r'^[a-zA-Z_][\w]*\s*:\s*["\w\d]', ts) and \
|
||||
not re.match(r'^(https?|ftp)://', ts) and \
|
||||
not re.match(r'^[a-zA-Z_][\w]*\s*:\s*/', ts):
|
||||
not re.match(r'^[a-zA-Z_][\w]*\s*:\s*/', ts) and \
|
||||
not re.match(r'^(github|gitee|gitcode|git)\.ypshidifu|git\.', ts, re.IGNORECASE):
|
||||
logger.debug(f"[{platform}] Poll过滤: YAML行 ts={ts!r}")
|
||||
continue
|
||||
# === 纯问句碎片(如"怎么办?" "好不好?")无实质内容 ===
|
||||
|
||||
Reference in New Issue
Block a user