Skip to content

Keep one space between numbers in replace_blank - #1952

Open
SashaMIT wants to merge 1 commit into
QwenAudio:mainfrom
SashaMIT:codered-blank-space
Open

SashaMIT wants to merge 1 commit into
QwenAudio:mainfrom
SashaMIT:codered-blank-space

Conversation

@SashaMIT

Copy link
Copy Markdown

Summary

replace_blank drops every space in a run. Chinese text normalization uses that helper, so 版本 12 34 comes back as 版本1234. A single space between ASCII characters is already kept. A doubled space now collapses to that same one space, and a space next to a Chinese character is still removed.

Test plan

  • python -m unittest test_frontend_utils.py fails on the current helper (版本1234, and a b becomes ab) and passes after the change
  • 版本 12 34 stays 版本12 34, 你 a stays 你a, and a b stays a b

replace_blank dropped every space in a run, so a doubled gap turned 12 and 34 into 1234.
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