Skip to content

fix: safely support CJK title and author identity matching - #20

Merged
917Dhj merged 3 commits into
mainfrom
integrate/pr-16-cjk-identity
Jul 28, 2026
Merged

fix: safely support CJK title and author identity matching#20
917Dhj merged 3 commits into
mainfrom
integrate/pr-16-cjk-identity

Conversation

@917Dhj

@917Dhj 917Dhj commented Jul 28, 2026

Copy link
Copy Markdown
Owner

Summary

  • preserve the original PR fix: support CJK title and author identity matching #16 contribution and commit (4bbb16f) from @xzjncu
  • recognize exact NFKC + casefold title and leading-author matches for CJK papers
  • keep the existing ASCII/English title normalization path unchanged
  • retain fail-closed behavior for genuinely different CJK names and for Unicode combining-mark differences
  • add end-to-end identity equivalence and provider-adjudication regression coverage

Root cause

The original ASCII-only title normalizer drops CJK characters, so identical Chinese titles score 0.0 and single-token CJK author names can be reported as conflicts. PR #16 correctly identified that false-negative path.

Applying isalnum() globally, however, changes every caller of the shared title normalizer and can remove meaningful Unicode combining marks. It also exposes CJK names to the existing Western last-token author fallback, creating false-positive identity matches.

This integration keeps the established normalizer intact and adds exact Unicode equality only at the identity comparison boundaries.

Contributor credit

This PR supersedes #16 while retaining @xzjncu's original authored commit in the merge history. The maintainer follow-up narrows the implementation and adds regression tests; it does not squash or rewrite the contributor commit.

Validation

  • focused identity regressions: 5 passed
  • tests/test_common.py: 87 passed
  • full suite: 825 passed, 1 skipped
  • python -m compileall: passed
  • git diff --check: passed
  • post-fix Standards and Spec reviews: no remaining findings

xzjncu and others added 3 commits July 27, 2026 09:23
…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
917Dhj marked this pull request as ready for review July 28, 2026 07:53
@917Dhj
917Dhj merged commit 810e339 into main Jul 28, 2026
2 checks passed
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