Skip to content

feat(formatting): add CJK and ASCII spacing switch / 新增中英文数字间空格开关 - #65

Closed
stofancy wants to merge 2 commits into
LeonardNJU:masterfrom
stofancy:contrib/cjk-ascii-spacing
Closed

stofancy wants to merge 2 commits into
LeonardNJU:masterfrom
stofancy:contrib/cjk-ascii-spacing

Conversation

@stofancy

Copy link
Copy Markdown
Contributor

中文

在“数字与格式(ITN)”中新增默认关闭的“中文与英文/数字间空格”开关。

  • 开启后,仅在相邻中文与 ASCII 英文单词或阿拉伯数字之间添加空格。
  • 例如:使用Claude Code处理2026年数据 → 使用 Claude Code 处理 2026 年数据。
  • 英文、数字与标点内部结构保持不变,覆盖版本号和数字单位,如 v5.0.8、320m。
  • 设置写入共享 normalization.space_between_cjk_and_ascii,用于 Core 的最终规整与预览;同时同步 Fcitx5 的最终提交边界,防止 AI 后处理重新挤掉空格。

验证:Core 构建及 2 项 CTest 通过;Fcitx5 模块构建通过;vocotype-settings 构建通过;git diff --check 通过。

English

Add a disabled-by-default “space between CJK and English/numbers” switch to “Numbers and formatting (ITN)”.

  • When enabled, it adds spaces only between adjacent CJK characters and ASCII English-word or Arabic-numeral characters.
  • Example: 使用Claude Code处理2026年数据 becomes 使用 Claude Code 处理 2026 年数据.
  • It preserves the internal structure of English, numbers, and punctuation, including version strings and numeric units such as v5.0.8 and 320m.
  • The setting is stored in shared normalization.space_between_cjk_and_ascii, used by Core normalization and preview, and mirrored at the Fcitx5 final-commit boundary so AI post-processing cannot remove the spacing.

Validation: Core build and 2 CTests passed; the Fcitx5 module built successfully; vocotype-settings built successfully; git diff --check passed.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@stofancy

Copy link
Copy Markdown
Contributor Author

@codex, review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-16T01:23:43.672696Z 7f2c3c3 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7f2c3c39d8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/integrations/fcitx5/module/vocotype_module.cpp
Comment thread docs/guides/settings-center.md
Comment thread src/common/include/vocotype/common/spacing.hpp Outdated
@stofancy

stofancy commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor Author

@LeonardNJU 您好,Code Review 提出的最终提交边界格式化、macOS 设置入口及补充平面汉字支持问题均已修复,相关 threads 已 resolved。当前 head 为 15730a0;本地验证通过 Core 2/2、desktop 6/6、Fcitx 构建及 git diff --check。烦请您本人审阅,并在确认后 merge 此 PR,谢谢。

LeonardNJU added a commit that referenced this pull request Sep 20, 2026
LeonardNJU added a commit that referenced this pull request Sep 20, 2026
LeonardNJU added a commit that referenced this pull request Sep 20, 2026
LeonardNJU added a commit that referenced this pull request Sep 20, 2026
LeonardNJU added a commit that referenced this pull request Sep 20, 2026
LeonardNJU added a commit that referenced this pull request Sep 20, 2026
LeonardNJU added a commit that referenced this pull request Sep 20, 2026
LeonardNJU added a commit that referenced this pull request Sep 20, 2026
LeonardNJU added a commit that referenced this pull request Sep 20, 2026
* Integrate PR #65: src/common/include/vocotype/common/spacing.hpp

* Integrate PR #65: src/core/include/vocotype/core/config.hpp

* Integrate PR #65: src/core/include/vocotype/core/offline_asr.hpp

* Integrate PR #65: src/core/src/config.cpp

* Integrate PR #65: src/core/src/dispatcher.cpp

* Integrate PR #65: src/core/src/offline_asr.cpp

* Integrate PR #65: src/core/src/text_normalizer.cpp

* Integrate PR #65: src/core/src/transcription_tasks.cpp

* Integrate PR #65: src/core/tests/core_tests.cpp

* Integrate PR #65: src/integrations/fcitx5/module/vocotype_module.cpp

* Integrate PR #65: src/integrations/macos/VocoTypeApplicationController.mm

* Integrate PR #65 Settings toggle

* Integrate PR #65 Fcitx setting declaration

* Integrate PR #65 changelog

* Integrate PR #65 docs

Copy link
Copy Markdown
Owner

Integrated the change set on top of current master via #69, preserving the Core/Fcitx/macOS implementation and adapting only the conflicted Settings/Fcitx config wiring to current mainline. Your #62 was merged directly, so your contributor record is preserved as well. Closing this superseded PR.

@LeonardNJU LeonardNJU closed this Sep 20, 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