Repository navigation
ja: read an n-th root as n 乗根 - #5
yasumorishima wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughJapanese root speech rules now use consistent root-end wording and direct nth-root index pronunciation. New tests cover numeric and variable root indices. ChangesJapanese root speech
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to This change updates Japanese n-th-root and root-closing speech rules with corresponding tests; no actionable merge-blocking risk remains beyond normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 1 files. (4 skipped: 4 unsupported.) ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
|
|
@coderabbitai review |
|
|
@coderabbitai review |
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
Submitted upstream as daisy#723. Closing the preflight PR; CI results and any CodeRabbit findings stay readable here. |
Fourth of the small PRs from daisy#715, independent of daisy#720, daisy#721 and the negative-number one.
n-th roots
⁵√x is 「5 乗根」 — the index, then 乗根. English builds an ordinal for this ("the fifth root"), so the rules called
ToOrdinal(*[2]), and for a variable index they appended the-thpronunciation hint. Japanese has neither form: the number is read as it is and 乗根 follows. Both are removed from the root rules inClearSpeak_Rules.yaml,SimpleSpeak_Rules.yamlandoverview.yaml.Closing marker
根号終わり → 根号終了, the term the reference uses (and consistent with 分数終了 in daisy#720).
The literal
msqrt/mrootfallbacksThese are the rules for raw MathML with no intent, where the English comment says "not sure what really should be said for these since we should not assume they are square roots".
msqrtsaid 「根」. That is the character used inside words like 平方根 and 立方根, but on its own it is not a spoken word in Japanese. 「ルート」 is, and the reference names it as the everyday alternative to 平方根, so it is the natural choice for the case where we do not know more.mrootsaid 「インデックスとルート」 ("index and root") for "root with index", and closed with 「エンドルートシンボル」, which is "end root symbol" spelled out in katakana rather than translated. These become 「根指数」 and 「根号終了」. The rule's structure is unchanged.Tests
nth_root(⁵√x → 「5 乗根 の x」) in both styles, andvariable_index_root(ⁿ√x → 「n 乗根 の x」).Deliberately left alone
The reference also says the connector depends on what is inside the radical: 「平方根 9」 with nothing between them when it is a single token, and 「平方根オブ … 根号終了」 when it is not. The rules currently choose the connector by
Verbosityinstead. Changing that means the match no longer mirrorsen, and I have an open question in daisy#715 about whether a language may diverge structurally where the linguistic facts require it. I would rather settle that first than make the same unilateral call a third time, so 「平方根 の x」 is untouched here.Summary by CodeRabbit
Improvements
Tests