Repository navigation
fix(hotwords): prevent missing Latin prefixes in mixed-script correction - #3798
Merged
Merged
Conversation
Avoid adding a missing Latin prefix to Chinese-only text. Preserve complete homophones and same-script fuzzy matching. Add regression coverage for #3796. Tested: 22 targeted and adjacent pure-text CPU tests, compile and diff checks. Signed-off-by: LauraGPT <zhifu.gzf@alibaba-inc.com>
Exercise text-only regressions on Python 3.10 and 3.12 with real optional dependencies. Signed-off-by: LauraGPT <zhifu.gzf@alibaba-inc.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addresses the residual mixed-script case in #3796. PyPI 1.4.16 drops Latin/digit pinyin keys; current main already fixes that part, but still turns
这个端口into这个C端口for fuzzy hotwordC端.Require a complete phonetic key when a Latin-containing target replaces Chinese-only input. Preserve
爱助手 -> AI助手,AI助守 -> AI助手,C段 -> C端, explicit mappings and same-script fuzzy matching. No threshold or scoring changes.Verification
tests/test_postprocess_hotwords.pyandtests/test_rich_transcription_postprocess.py.git diff --checkpassed.These are pure-text CPU tests, not model/GPU inference, hosted CI or full-suite acceptance. The code only changes text postprocessing. Keep #3796 open for released-version/reporter verification.
Published using the official
createCommitOnBranchAPI with an expected-head guard and GitHub-verified signature plus DCO. The complete published tree is identical to the tested local candidate. No TLS verification, hook or repository protection was disabled. FunASR main review-count protection was explicitly changed to zero by the repository administrator on 2026-10-28; other protections remain enforced.Current-main integration and hosted CI
8f2701fcf2d70320b943c596349612ba26f29bf0has passing Python 3.10 and 3.12 text-postprocessing CI; each executes 22 tests with real pypinyin/rapidfuzz dependencies.19e33badf1dba6f7606c9410c32c622486b5df13integration tree1e028d232f7a3e14d4942aa89d95c85d43710c29was independently reconstructed and all 4154 blobs verified; 22 focused tests pass with no skips.