放宽病句过滤器长度阈值:从>8改为>6
- 修复'问插件怎么用'等短查询被误杀 - 保持对其他缺主语碎片的严格过滤
This commit is contained in:
+2
-2
@@ -4042,8 +4042,8 @@ class MessageMonitor:
|
||||
continue
|
||||
# "问"开头的消息单独处理:排除"问一嘴"、"问一下"等正常查询
|
||||
if re.match(r'^问', line) and not re.search(r'[。!?,,;;::?]$', line):
|
||||
# 如果包含疑问词或核心动作词且长度>8,视为正常查询放行
|
||||
if len(line) > 8 and (re.search(r'[在何哪什怎么多少]', line) or re.search(r'(下载|地址|查询|查看|了解|咨询|知道|怎么|如何)', line)):
|
||||
# 如果长度>6且包含疑问词或核心动作词,视为正常查询放行
|
||||
if len(line) > 6 and (re.search(r'[在何哪什怎么多少]', line) or re.search(r'(下载|地址|查询|查看|了解|咨询|知道|怎么|如何)', line)):
|
||||
pass # 放行
|
||||
else:
|
||||
logger.debug(f"[{platform}] OCR 过滤: 病句(缺主语) line={line!r}")
|
||||
|
||||
Reference in New Issue
Block a user