Skip to content

[action-translation] resync: stats_examples.md#152

Merged
mmcky merged 3 commits into
mainfrom
resync/stats_examples
Jul 19, 2026
Merged

[action-translation] resync: stats_examples.md#152
mmcky merged 3 commits into
mainfrom
resync/stats_examples

Conversation

@mmcky

@mmcky mmcky commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Forward Resync: stats_examples.md

Source: QuantEcon/lecture-python.mystlectures/stats_examples.md
Source commit: 2944402
This PR resyncs the translation to match the current source document.

Reason: The target consistently uses np.random.* functions instead of the rng = np.random.default_rng() / rng.* pattern used in the source code cells. The source defines 'rng = np.random.default_rng()' and uses rng.geometric, rng.negative_binomial, rng.normal, rng.random, rng.exponential, rng.geometric etc., while the target uses np.random.geometric, np.random.negative_binomial, np.random.normal, np.random.rand, np.random.exponential, np.random.geometric instead, and omits the rng initialization line entirely. This is a substantive code logic change (different RNG API usage), not just a stylistic difference, requiring re-translation/update of code blocks.

Changes

Whole-file resync applied. The entire document was resynced in a single pass.


Created by action-translation forward resync

Copilot AI review requested due to automatic review settings July 18, 2026 08:52
@mmcky mmcky added action-translation-sync Auto-created by action-translation resync Forward resync labels Jul 18, 2026
@netlify

netlify Bot commented Jul 18, 2026

Copy link
Copy Markdown

Deploy Preview for astonishing-narwhal-a8fc64 ready!

Name Link
🔨 Latest commit 2fa915b
🔍 Latest deploy log https://app.netlify.com/projects/astonishing-narwhal-a8fc64/deploys/6a5c4cdff071000008485a73
😎 Deploy Preview https://deploy-preview-152--astonishing-narwhal-a8fc64.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI 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.

Pull request overview

This PR forward-resyncs the Chinese translation of lectures/stats_examples.md against the upstream lecture-python.myst source commit 2944402, primarily aligning code cells with the rng = np.random.default_rng() / rng.* NumPy Generator API and updating translation metadata/state accordingly.

Changes:

  • Added YAML front-matter translation: metadata (title + heading mappings) for the lecture.
  • Updated random sampling code cells to use rng = np.random.default_rng() and rng.* calls instead of np.random.* / np.random.rand.
  • Added .translate/state/stats_examples.md.yml to record resync provenance (source SHA, date, model, etc.).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
lectures/stats_examples.md Resynced lecture content, added translation metadata, and updated RNG usage in code cells to default_rng() / rng.*.
.translate/state/stats_examples.md.yml Added resync state metadata for translation tooling (source commit/date/mode).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Univariate Gaussian distribution: 一元高斯分布
Uniform Distribution: 均匀分布
A Mixed Discrete-Continuous Distribution: 混合离散-连续分布
Drawing a Random Number from a Particular Distribution: 从特定分布中抽取随机数
Comment on lines 83 to 86
```{code-cell} ipython3
rng = np.random.default_rng()

# 指定参数
@mmcky mmcky added the action-translation PRs created by QuantEcon/action-translation label Jul 18, 2026
@github-actions

github-actions Bot commented Jul 18, 2026

Copy link
Copy Markdown

@github-actions
github-actions Bot temporarily deployed to pull request July 18, 2026 10:29 Inactive
The resynced file keeps Chinese plot labels but reverted the import
cell to the source's exact form, losing the Source Han Serif setup -
Chinese in figures would render as missing glyphs. Residual #107
class found in the merge review; applied wave-wide.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 18, 2026

Copy link
Copy Markdown

✅ Translation Quality Review

Verdict: PASS | Model: claude-sonnet-5 | Date: 2026-07-19


📝 Translation Quality

Criterion Score
Accuracy 9/10
Fluency 9/10
Terminology 9/10
Formatting 9/10
Overall 9/10

Summary: 翻译整体质量很高,准确传达了原文的统计学概念和数学表达,专业术语使用规范一致,代码注释翻译自然流畅。主要问题集中在'混合离散-连续分布'部分的标点符号使用不一致(英文标点混入中文语境),属于小瑕疵,不影响整体理解和技术准确性。 数学公式和LaTeX代码完整保留,未出现任何符号丢失或格式破坏 专业术语翻译准确,如'累积分布函数'、'概率质量函数'、'几何分布'、'负二项分布'等均符合术语表标准 代码块中的注释翻译准确且符合中文技术写作习惯 YAML frontmatter中的translation元数据正确添加,标题和各级标题映射清晰准确

Suggestions:

  • 混合离散-连续分布小故事段落中标点符号使用了英文半角逗号和句号(如'你要么通过要么失败。'前的逗号是英文逗号','而非中文逗号','),建议统一使用中文全角标点以保持与文档其余部分风格一致
  • 字体导入代码块(FONTPATH等)是翻译中新增的内容,源文档中没有此代码块,虽然这是常见的翻译适配惯例(为支持中文字体渲染),但建议在评估时确认这属于既定的翻译工具链约定而非误译

🔍 Diff Quality

Check Status
Scope Correct
Position Correct
Structure Preserved
Heading-map Correct
Overall 10/10

Summary: The target document's structure, section order, and heading-map correctly mirror the source after resync, aside from one extraneous font-setup code addition unrelated to translation sync.

Issues:

  • Target introduces an unrelated font-configuration code block (matplotlib font settings for Chinese characters) into the imports cell that has no corresponding change in the English source; this is extraneous content not present in either Before/After source
  • Target changes np.random.* calls to rng.* (e.g., rng.geometric, rng.negative_binomial, rng.normal, rng.random, rng.exponential) to match the source's rng-based API, which is a legitimate resync correction, not an issue

This review was generated automatically by action-translation review mode.

@github-actions
github-actions Bot temporarily deployed to pull request July 18, 2026 11:33 Inactive
@github-actions
github-actions Bot temporarily deployed to pull request July 19, 2026 04:28 Inactive
@mmcky
mmcky merged commit aa9ccb7 into main Jul 19, 2026
7 checks passed
@mmcky
mmcky deleted the resync/stats_examples branch July 19, 2026 04:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action-translation PRs created by QuantEcon/action-translation action-translation-sync Auto-created by action-translation resync Forward resync

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants