Skip to content

🌐 [translation-sync] New lecture: Fitting Distributions to Data - #279

Merged
mmcky merged 4 commits into
mainfrom
translation-sync-2026-08-03T18-51-27-pr-814
Aug 10, 2026
Merged

mmcky merged 4 commits into
mainfrom
translation-sync-2026-08-03T18-51-27-pr-814

Conversation

@mmcky

@mmcky mmcky commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Automated Translation Sync

This PR contains automated translations from QuantEcon/lecture-python-intro.

Source PR

#814 - New lecture: Fitting Distributions to Data

Files Added

  • lectures/fitting_distributions.md
  • .translate/state/fitting_distributions.md.yml

Files Updated

  • ✏️ lectures/_toc.yml

Details

  • Source Language: en
  • Target Language: zh-cn
  • Model: claude-sonnet-5

This PR was created automatically by the translation action.

Copilot AI review requested due to automatic review settings August 3, 2026 18:51
@mmcky mmcky added action-translation PRs created by QuantEcon/action-translation automated Automated sync PR opened by action-translation labels Aug 3, 2026
@netlify

netlify Bot commented Aug 3, 2026

Copy link
Copy Markdown

Deploy Preview for playful-platypus-17d3bb ready!

Name Link
🔨 Latest commit 9f30af5
🔍 Latest deploy log https://app.netlify.com/projects/playful-platypus-17d3bb/deploys/6a795afb1162140008090346
😎 Deploy Preview https://deploy-preview-279--playful-platypus-17d3bb.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.

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

✅ Translation Quality Review

Verdict: PASS | Model: claude-sonnet-5 | Date: 2026-08-10
Routing: editor — 1 minor finding(s) in gating categories (accuracy/terminology/syntax/diff-check/other)
Shadow gate: would NOT auto-merge (recorded only; no action taken)


📝 Translation Quality

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

Summary: 译文整体质量很高,准确传达了原文的统计学和概率论概念,术语使用规范一致,格式和代码块保留完整,未发现语法错误。仅有少量措辞可进一步优化,但均为风格性建议,不影响理解或专业准确性。 术语翻译准确一致,如'矩方法'、'科尔莫戈罗夫-斯米尔诺夫统计量'、'Q-Q 图'等均符合术语表规范 数学公式、代码块与 MyST 指令格式完整保留,未出现语法错误 长句拆分处理得当,专业内容(如矩方法推导、Q-Q 图原理、学生 t 分布拟合等)表达清晰准确 中英文之间、行内指令之间均正确使用了全角标点与空格,符合语言规范要求

Suggestions:

  • [minor · accuracy] lectures/fitting_distributions.md — ## 选择参数类, '对数正态分布胜出,伽马分布位居第二,正态分布则远远落后于第三。': 英文原句 'the normal a distant third' 意为正态分布远远落后(作为第三名),译文'正态分布则远远落后于第三'语义略有偏移,读起来像是'落后于第三名'而非'远远落后地排在第三名',容易引起歧义。 → 对数正态分布胜出,伽马分布位居第二,正态分布则远远落在第三位。
  • [minor · fluency] lectures/fitting_distributions.md — ## 计数数据, '这些正是泊松分布产生所需要的条件。': 此句翻译稍显生硬,英文原句 'Those are exactly the conditions under which the Poisson distribution arises' 更自然的表达是'正是在这些条件下,泊松分布才会出现'。 → 泊松分布正是在这些条件下产生的。
  • [nit · fluency] lectures/fitting_distributions.md — ### 一个尾部更重的候选者, '然后方差 $\nu \sigma^2 / (\nu - 2)$ 便确定了尺度参数。': 略微生硬,但含义准确,可以更自然地表达为'再由方差...确定尺度参数',不影响理解,属风格建议。 → 再由方差 $\nu \sigma^2 / (\nu - 2)$ 确定尺度参数。

🔍 Diff Quality

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

Summary: Scope, position, and structure are correctly preserved, but the heading-map keys do not follow the expected slugified-ID convention.

Issues:

  • Heading map keys use raw English heading text (e.g., 'Outline', 'The method of moments') instead of slugified IDs (e.g., 'outline', 'the-method-of-moments') as described in the translation metadata system convention

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

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 syncs in a newly translated zh-cn lecture on fitting probability distributions to data, and wires it into the book structure via the TOC and translation state tracking.

Changes:

  • Added new lecture: lectures/fitting_distributions.md
  • Updated the book TOC to include the new lecture (and other chapter entries)
  • Added translation sync state metadata for the new lecture

Reviewed changes

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

File Description
lectures/fitting_distributions.md New translated lecture content + code/figures for distribution fitting (currently contains unresolved cross-doc references and several non-localized figure labels/captions).
lectures/_toc.yml Updates navigation; currently adds several non-existent chapters and switches multiple captions to English, which is inconsistent with zh-cn and may break the build.
.translate/state/fitting_distributions.md.yml Records translation sync metadata for the new lecture.
Suppressed comments (15)

lectures/fitting_distributions.md:165

  • 该图的 figure caption 仍为英文(本仓库中文讲义的图题通常使用中文),建议翻译以保持本地化一致性。
    caption: Three fitted densities for house prices

lectures/fitting_distributions.md:170

  • 图例标签目前是英文分布名(normal/lognormal/gamma)。中文讲义中图例通常也做本地化(例如 prob_dist.md 使用“男性/女性”等),建议将这些 label 翻译为中文以提升可读性。
fits = {'normal': fit_normal(price),
        'lognormal': fit_lognormal(price),
        'gamma': fit_gamma(price)}

lectures/fitting_distributions.md:179

  • 坐标轴标签仍为英文(sale price / density)。考虑到该仓库为 zh-cn 译本且其它讲义普遍使用中文轴标签,建议翻译为中文以保持一致。
ax.set_xlabel('sale price (US$)')
ax.set_ylabel('density')

lectures/fitting_distributions.md:242

  • Q-Q 图函数的坐标轴标签仍为英文(fitted/sample quantiles)。为了与中文讲义整体风格一致,建议将标签翻译为中文。
    ax.set_xlabel('fitted quantiles')
    ax.set_ylabel('sample quantiles')

lectures/fitting_distributions.md:253

  • 该图的 figure caption 仍为英文,建议翻译为中文以保持本地化一致性。
    caption: Female heights against a fitted normal

lectures/fitting_distributions.md:274

  • 该图的 figure caption 仍为英文,建议翻译为中文以保持本地化一致性。
    caption: House prices against a fitted normal

lectures/fitting_distributions.md:297

  • 该图的 figure caption 仍为英文,建议翻译为中文以保持本地化一致性。
    caption: Log house prices against a normal

lectures/fitting_distributions.md:348

  • 该图的 figure caption 仍为英文,建议翻译为中文以保持本地化一致性。
    caption: Largest gap between ECDF and CDF

lectures/fitting_distributions.md:364

  • 该图中的图例标签仍为英文(fitted normal CDF / largest gap)。为中文译本读者,建议翻译这些标签;必要时可保留缩写 ECDF。
ax.step(x_sorted, np.arange(1, n+1) / n, where='post', lw=2, label='ECDF')
x_grid = np.linspace(x_sorted[0], x_sorted[-1], 200)
ax.plot(x_grid, u.cdf(x_grid), 'k--', lw=2, alpha=0.7, label='fitted normal CDF')
ax.vlines(x_sorted[i], F[i], (i+1) / n, color='C3', lw=3, label='largest gap')

lectures/fitting_distributions.md:366

  • 该图坐标轴标签仍为英文(log of sale price / probability),建议翻译为中文以保持与其它讲义一致。
ax.set_xlabel('log of sale price')
ax.set_ylabel('probability')

lectures/_toc.yml:41

  • _toc.yml 新增了 observed_distributions 章节,但仓库中不存在对应文件(lectures/observed_distributions.md)。这会导致构建失败;同时 fitting_distributions.md 也多处引用该页面。建议本 PR 同步补齐该讲义文件,或先移除该条目并统一修正引用。
  - file: observed_distributions

lectures/_toc.yml:52

  • _toc.yml 新增了 msy_fishery 章节,但仓库中不存在对应文件(lectures/msy_fishery.md)。这会导致 Jupyter Book 构建失败。建议在同步加入该讲义文件前先移除该条目,或在本 PR 一并补充文件。
  - file: msy_fishery

lectures/_toc.yml:92

  • _toc.yml 新增了 bayes_intro 章节,但仓库中不存在对应文件(lectures/bayes_intro.md)。这会导致 Jupyter Book 构建失败。建议在同步加入该讲义文件前先移除该条目,或在本 PR 一并补充文件。
  - file: bayes_intro

lectures/fitting_distributions.md:423

  • 该图坐标轴标签仍为英文(sale price / probability)。为保持中文译本一致性,建议翻译为中文。
ax.set_xlabel('sale price (US$)')
ax.set_ylabel('probability')

lectures/fitting_distributions.md:508

  • 该图的图例与坐标轴标签仍为英文(observed frequency / fitted Poisson / goals per match / probability)。建议翻译为中文以保持讲义本地化一致。
ax.bar(counts.index, frequencies, alpha=0.4, label='observed frequency')
ax.plot(S, u.pmf(S), linestyle='', marker='o', color='C1', label='fitted Poisson')
ax.vlines(S, 0, u.pmf(S), lw=0.5, color='C1')
ax.set_xlabel('goals per match')
ax.set_ylabel('probability')

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

Comment on lines +34 to +36
在 {doc}`prob_dist` 中,我们研究了一系列常见的概率分布。

在 {doc}`observed_distributions` 中,我们研究了观测数据。
Comment thread lectures/_toc.yml Outdated
Comment thread lectures/_toc.yml Outdated
Comment on lines +4 to +8
- caption: Introduction
numbered: true
chapters:
- file: about
- caption: 经济数据
- caption: Economic Data
@mmcky

mmcky commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

⚠️ Do not merge as-is — same caption revert as #278.

This PR's lectures/_toc.yml also reverts the 14 localised Chinese part captions to English. Full context, the field precedent on the sibling edition, and the durable fix are on #278; the engine issue is QuantEcon/action-translation#254.

Restore the Chinese captions on this branch before merging. Note also that #279 sits behind #278 in the dependency chain — its build fails with 8× unknown document: 'observed_distributions' until #278 lands.

@mmcky

mmcky commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

♻️ Automatically rebased after #278 was merged.

Overlapping files: lectures/_toc.yml

The translation content is preserved; only unchanged sections were updated to match the current main branch. Please re-review if needed.

@mmcky mmcky reopened this Aug 10, 2026
@github-actions

github-actions Bot commented Aug 10, 2026

Copy link
Copy Markdown

@github-actions
github-actions Bot temporarily deployed to pull request August 10, 2026 04:55 Inactive
The sync for QuantEcon/lecture-python-intro#814 overwrote lectures/_toc.yml
with upstream's English version, reverting every part caption to English
and adding entries for tax_smooth, msy_fishery and bayes_intro, none of
which are translated here.

Restored the translated toc and added just the one new entry, in the same
position upstream uses.

The translation itself matches its source: same two anchors, 11 headings
and 31 code cells as upstream at dc63dac. The (qq_plots)= anchor belongs
to QuantEcon/lecture-python-intro#815 and is handled in #280.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@mmcky
mmcky force-pushed the translation-sync-2026-08-03T18-51-27-pr-814 branch from a62600a to 9f30af5 Compare August 10, 2026 05:00
@github-actions
github-actions Bot temporarily deployed to pull request August 10, 2026 05:06 Inactive
@mmcky
mmcky merged commit 758f76b into main Aug 10, 2026
8 checks passed
@mmcky
mmcky deleted the translation-sync-2026-08-03T18-51-27-pr-814 branch August 10, 2026 05:12
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 automated Automated sync PR opened by action-translation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants