This commit is contained in:
lychang
2026-07-20 01:49:49 +08:00
parent 97c2c208ba
commit 1700585a36
2 changed files with 23 additions and 1 deletions

View File

@@ -340,7 +340,8 @@ pub fn is_excluded_name(name: &str) -> bool {
pub fn is_likely_person_name(name: &str) -> bool {
let name = name.trim();
if name.is_empty() { return false; }
if name.len() < 2 { return false; }
// 字符数必须 >= 3(人名至少需要 2 个中文字或 3 个英文字母)
if name.chars().count() <= 2 { return false; }
// 先排除已知的非人名
if is_excluded_name(name) { return false; }