[CodeStyle] Fix missing spaces between ASCII parentheses and Chinese in IO API docs#7812
Closed
ooooo-create wants to merge 1 commit intoPaddlePaddle:developfrom
Closed
Conversation
Fixed missing spaces between ASCII parentheses/brackets and Chinese characters in 3 IO-related API documentation files. The standard requires spaces between Chinese and English text at the language/grammar level. - docs/api/paddle/io/IterableDataset_cn.rst: - `迭代式(iterable style)数据集` → `迭代式(iterable style)数据集` - docs/api/paddle/io/DataLoader_cn.rst: - `堆叠(同 np.stack(..., axis=0) )` → `堆叠(同 np.stack(..., axis=0) )` - `多进程模式下有效(即 num_workers > 0 )` → `多进程模式下有效(即 num_workers > 0 )` - `共享内存空间(如 Linux 系统下 /dev/shm/ 目录空间大小)` → full-width parens - docs/api/paddle/io/DistributedBatchSampler_cn.rst: - `进程(workers)使用` → `进程(workers)使用` Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
感谢你贡献飞桨文档,文档预览构建中,Docs-New 跑完后即可预览,预览链接:http://preview-pr-7812.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/index_cn.html |
ooooo-create
commented
Mar 1, 2026
| ''''''''' | ||
|
|
||
| 设置 epoch 数。当设置 ``shuffle=True`` 时,此 epoch 被用作随机种子。默认情况下,用户可以不用此接口设置,每个 epoch 时,所有的进程(workers)使用不同的顺序。如果每个 epoch 设置相同的数字,每个 epoch 数据的读取顺序将会相同。 | ||
| 设置 epoch 数。当设置 ``shuffle=True`` 时,此 epoch 被用作随机种子。默认情况下,用户可以不用此接口设置,每个 epoch 时,所有的进程(workers)使用不同的顺序。如果每个 epoch 设置相同的数字,每个 epoch 数据的读取顺序将会相同。 |
Collaborator
Author
There was a problem hiding this comment.
TODO:如果是全英文,用英文括号,前后加空格?
Contributor
There was a problem hiding this comment.
Pull request overview
本 PR 针对 paddle.io 相关中文 API .rst 文档中,中英文混排时英文术语/标识被半角括号 () 紧贴中文的情况,统一改为中文全角括号 ( ),以符合中文文档排版规范并提升一致性。
Changes:
- 将
IterableDataset_cn.rst中的iterable style描述从半角括号改为全角括号。 - 将
DataLoader_cn.rst中两处说明性括号(包含行内字面量/代码)改为全角括号。 - 将
DistributedBatchSampler_cn.rst中workers的括号改为全角括号。
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| docs/api/paddle/io/IterableDataset_cn.rst | 将 “iterable style” 相关括号由半角改为全角以匹配中文排版 |
| docs/api/paddle/io/DataLoader_cn.rst | 统一两处包含行内字面量的说明括号为全角括号 |
| docs/api/paddle/io/DistributedBatchSampler_cn.rst | 将 workers 的括号由半角改为全角以保持一致性 |
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
Fixed missing spaces between ASCII parentheses and Chinese characters in 3 IO-related API documentation files. This violates the documentation standard that requires a space between Chinese and English text (语法层面需要使用空格分隔).
The specific violation pattern is using ASCII parentheses
()when wrapping English terms/code within Chinese prose. The correct approach is to use full-width Chinese parentheses()in this context.Files Changed
docs/api/paddle/io/IterableDataset_cn.rst迭代式(iterable style)数据集→迭代式(iterable style)数据集docs/api/paddle/io/DataLoader_cn.rst第 0 维上堆叠(同 ``np.stack(..., axis=0)`` )→第 0 维上堆叠(同 ``np.stack(..., axis=0)`` )多进程模式下有效(即 ``num_workers > 0`` )→多进程模式下有效(即 ``num_workers > 0`` )共享内存空间(如 Linux 系统下 ``/dev/shm/`` 目录空间大小)→ full-width Chinese parenthesesdocs/api/paddle/io/DistributedBatchSampler_cn.rst所有的进程(workers)使用不同的顺序→所有的进程(workers)使用不同的顺序Standard Reference
Per the documentation guidelines in
.github/copilot-instructions.md:When ASCII parentheses
()are used adjacent to Chinese characters without spaces, this violates the rule. The fix uses full-width Chinese parentheses()which are the appropriate convention in Chinese documentation.