Skip to content

[CodeStyle] Fix missing spaces between ASCII parentheses and Chinese in IO API docs#7812

Closed
ooooo-create wants to merge 1 commit intoPaddlePaddle:developfrom
StatefulDust:fix/cn-en-spacing-io-api-docs-835013a41c304f01
Closed

[CodeStyle] Fix missing spaces between ASCII parentheses and Chinese in IO API docs#7812
ooooo-create wants to merge 1 commit intoPaddlePaddle:developfrom
StatefulDust:fix/cn-en-spacing-io-api-docs-835013a41c304f01

Conversation

@ooooo-create
Copy link
Collaborator

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 parentheses
  • docs/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.

Generated by API Docs Checker

Generated by API Docs Checker


🔄 Synced from StatefulDust#21

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>
@paddle-bot
Copy link

paddle-bot bot commented Mar 1, 2026

感谢你贡献飞桨文档,文档预览构建中,Docs-New 跑完后即可预览,预览链接:http://preview-pr-7812.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/index_cn.html
预览工具的更多说明,请参考:飞桨文档预览工具

@github-actions
Copy link

github-actions bot commented Mar 1, 2026

📚 本次 PR 文档预览链接(点击展开)
ℹ️ 预览提醒
请等待 Docs-NEW 流水线运行完成后再点击预览链接,否则可能会看到旧版本内容或遇到链接无法访问的情况。

'''''''''

设置 epoch 数。当设置 ``shuffle=True`` 时,此 epoch 被用作随机种子。默认情况下,用户可以不用此接口设置,每个 epoch 时,所有的进程(workers)使用不同的顺序。如果每个 epoch 设置相同的数字,每个 epoch 数据的读取顺序将会相同。
设置 epoch 数。当设置 ``shuffle=True`` 时,此 epoch 被用作随机种子。默认情况下,用户可以不用此接口设置,每个 epoch 时,所有的进程workers使用不同的顺序。如果每个 epoch 设置相同的数字,每个 epoch 数据的读取顺序将会相同。
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

TODO:如果是全英文,用英文括号,前后加空格?

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

本 PR 针对 paddle.io 相关中文 API .rst 文档中,中英文混排时英文术语/标识被半角括号 () 紧贴中文的情况,统一改为中文全角括号 ( ),以符合中文文档排版规范并提升一致性。

Changes:

  • IterableDataset_cn.rst 中的 iterable style 描述从半角括号改为全角括号。
  • DataLoader_cn.rst 中两处说明性括号(包含行内字面量/代码)改为全角括号。
  • DistributedBatchSampler_cn.rstworkers 的括号改为全角括号。

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 的括号由半角改为全角以保持一致性

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.

3 participants