This commit is contained in:
lychang
2026-07-20 04:07:40 +08:00
parent 9093f08441
commit 00af6e8528
4 changed files with 354 additions and 5 deletions

View File

@@ -291,8 +291,11 @@ pub fn is_likely_person_name(name: &str) -> bool {
if name.is_empty() { return false; }
// 强制包含名单优先放行(已知模特名,跳过所有启发式检查)
// 同时支持通过更长匹配扩展 name(如 "杨晨晨" → "杨晨晨Yome")
let dict = tag_dict::get_tag_dict();
if dict.is_included_person(name) { return true; }
if dict.is_included_person(name) || dict.find_longest_included_match(name).is_some() {
return true;
}
// 字符数必须 >= 3(人名至少需要 2 个中文字或 3 个英文字母)
if name.chars().count() <= 2 { return false; }