Skip to content

fix: support CJK title and author identity matching - #16

Closed
xzjncu wants to merge 1 commit into
917Dhj:mainfrom
xzjncu:fix/cjk-identity-matching
Closed

fix: support CJK title and author identity matching#16
xzjncu wants to merge 1 commit into
917Dhj:mainfrom
xzjncu:fix/cjk-identity-matching

Conversation

@xzjncu

@xzjncu xzjncu commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Fix Unicode/CJK title normalization: normalize_title() retains alphanumeric characters from all scripts (not just ASCII a-z0-9) via unicodedata.normalize("NFKC") + character.isalnum(), so Chinese/Japanese/Korean titles no longer collapse to empty strings
  • Add NFKC+casefold full-name equality pre-check in _full_leading_author_matches() before the per-part fallback, and a normalized full-name equality condition in _leading_author_status() — so identical CJK names like "朱云鹃" match correctly instead of degrading to conflict
  • Keep fail-closed behavior for genuinely mismatched titles/authors — only fix the false-negative path where equivalent Unicode strings were treated as different

Test plan

  • python3 -m py_compile scripts/common.py
  • In-memory identity regression: same Chinese title ("双元联盟网络如何影响突破式创新——技术能力与网络惯例的调节作用") / same author ("朱云鹃") → title_similarity=1.0, leading_author=match (was 0.0 / conflict)
  • Different Chinese titles/authors → still ambiguous/conflict (no false-positive regression)
  • Real Chinese paper UXETRB6P re-verified: identity accepted (title, author, abstract all matched; no PDF download or network metadata backfill triggered)

…fold; add full CJK name equality check for leading author matching

- normalize_title(): replace ASCII-only a-z0-9 filter with unicodedata.normalize("NFKC") + character.isalnum() to retain CJK/Unicode characters
- _full_leading_author_matches(): add NFKC+casefold full-name equality check before falling back to per-part comparison
- _leading_author_status(): add normalized full-name equality as a match condition alongside family-name key comparison

Fixes source_pdf_mismatch false negatives for Chinese-titled papers (e.g. same title/author previously scored title_similarity=0.0, leading_author=conflict).

917Dhj commented Jul 28, 2026

Copy link
Copy Markdown
Owner

Thank you, @xzjncu, for identifying and fixing the CJK title/author false-negative path.

We have incorporated your original authored commit (4bbb16f) into the maintainer integration branch without squashing or rewriting it. The maintainer follow-up narrows the Unicode normalization boundary, preserves existing English behavior, and adds fail-closed regression coverage.

The integration is now continued in #20. Your commit and authorship remain part of that PR's history. We are closing this PR to avoid duplicate integration; #20 has not been merged into main yet.

Thanks again for the contribution!

@917Dhj 917Dhj closed this Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants