Skip to content

Preserve Vietnamese Unicode in relevance and anchor matching - #11

Open
bongsunflower01-boop wants to merge 6 commits into
alok-vibe-code:mainfrom
bongsunflower01-boop:codex/vietnamese-unicode
Open

bongsunflower01-boop wants to merge 6 commits into
alok-vibe-code:mainfrom
bongsunflower01-boop:codex/vietnamese-unicode

Conversation

@bongsunflower01-boop

Copy link
Copy Markdown

Summary

ASCII-only term extraction splits Vietnamese words at accented letters and treats canonically equivalent Unicode differently. Preserve Unicode terms and NFC/NFD equivalence in relevance and anchor matching while retaining source text and technical identifiers.

Evidence / behavior

  • Normalize comparison text with NFC and casefold; keep Vietnamese tone distinctions, attached combining marks and meaningful non-ASCII single-character syllables.
  • Add a conservative Vietnamese stopword list while preserving negation and the existing English/technical-token behavior.
  • Match equivalent NFC/NFD anchors at the original source offsets without applying English plural/stemming rules to accented words or product identifiers.
  • Document remaining lexical-analysis and shared-stopword limitations. Fallback placement copy remains unchanged.

Testing

  • Add 15 deterministic Unicode regression tests, including Vietnamese tones, NFC/NFD, combining marks, English compatibility, negation and technical IDs.
  • python -m unittest discover -s tests -v passes: 81/81 tests on Windows / Python 3.12.14.
  • Package compile, CLI version/status smoke checks and an offline Unicode reproducer pass on the same checkout.
  • Python 3.11/3.13 were not run locally; the existing upstream CI matrix remains responsible for those environments.
  • No live-site dependency was added to deterministic tests.

Safety and methodology

  • No URL fetching or network behavior changed.
  • Evidence fields and confidence workflow remain intact.
  • Documentation explains behavioral changes and remaining limits without making search-ranking claims.
  • No secrets or confidential datasets are included.

This branch has not been deployed

No deployments
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.

1 participant