Skip to content

preflight: ja shared rules cleanup - #17

Closed
yasumorishima wants to merge 4 commits into
jafrom
ja-shared-rules-cleanup
Closed

yasumorishima wants to merge 4 commits into
jafrom
ja-shared-rules-cleanup

Conversation

@yasumorishima

@yasumorishima yasumorishima commented Sep 5, 2026 •

Copy link
Copy Markdown
Owner

Preflight only (CI + CodeRabbit). Upstream PR will target daisy/MathCAT ja.

Summary by CodeRabbit

  • Bug Fixes

    • Improved Japanese speech output for fractions, including denominator-first ordering.
    • Corrected terminology for decimals, matrices, norms, annotations, enclosures, arrows, strike-throughs, actuarial symbols, and long-division notation.
    • Updated fraction narration in overview content for clearer, more consistent pronunciation.
  • Tests

    • Added comprehensive Japanese-language coverage for fraction ordering and corrected mathematical terminology across supported speech and overview modes.

…lose marks

Two groups of fixes in the shared rule files.

1. Three fraction rules read the fraction backwards. Japanese puts the
   denominator first: 3/4 is "4 分の 3", so "3 分の 4" is 4/3 -- a different
   number, not just an odd phrasing. ClearSpeak and SimpleSpeak already swap
   the operands (common-fraction), but the mfrac rules in SharedRules/default.yaml
   (used by LiteralSpeak) and the fraction rule in overview.yaml (used by the
   "describe" navigation command) did not.
   - literal-simple and overview-default now say the denominator first.
   - literal-default has explicit start/end markers, so it keeps the written
     order and uses the borrowed オーバー: 分数 A オーバー B 分数終了. It also
     opened with スタート, the English "start".

2. menclose notation names and two neighbouring rules were still the machine
   translation:
   - 上下矢印 for "up arrow" is an arrow with a head at each end, so uparrow,
     updownarrow, leftrightarrow and both diagonal double ended arrows all
     named the same thing.
   - ダブルは対角矢印を終了 / 二重は対角矢印を終了 ("double is ends diagonal
     arrow") are not sentences.
   - 行動シンボル is an "action symbol"; the actuarial symbol is 保険数理記号.
   - アラビア語の要素のシンボル reads "Arabic-language element symbol"; madrub
     is the factorial symbol written in Arabic script.
   - クロスアウト, ダウン矢印, ダウンの対角, サークル, ラウンドボックス, ボックス and
     ロングディビジョンシンボル are transliterations of the English.
   - 対角形 does not say which diagonal.
   - 詳しくはこちら ("click here for details") was used for "above" in the mover
     and munderover rules, opposite the 下 that is already there.
   - ノルダム is Notre-Dame; a norm is ノルム.
   - エントリー for a matrix entry is 成分, and a coordinate is 点, the word
     geometry.yaml already uses.

Every line that was checked against the en rule beside it is promoted to T:.
Tests cover both fraction paths, the overview path, the menclose marks, above
and below, the norm and the matrix entry.
@coderabbitai

coderabbitai Bot commented Sep 5, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: fcd1b0b1-6e10-4436-b95a-f6a61cfa4a45

📥 Commits

Reviewing files that changed from the base of the PR and between 8a25ad9 and d092b92.

📒 Files selected for processing (5)
  • Rules/Languages/ja/ClearSpeak_Rules.yaml
  • Rules/Languages/ja/SharedRules/default.yaml
  • Rules/Languages/ja/SimpleSpeak_Rules.yaml
  • Rules/Languages/ja/unicode.yaml
  • tests/Languages/ja/ja.rs
🚧 Files skipped from review as they are similar to previous changes (1)
  • Rules/Languages/ja/SharedRules/default.yaml

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

Japanese speech rules now use denominator-first fraction ordering and revised terminology for annotations, enclosures, arrows, decimal points, matrix entries, and norms. Tests cover LiteralSpeak, ClearSpeak, and overview navigation behavior.

Changes

Japanese speech rules

Layer / File(s) Summary
Fraction speech ordering
Rules/Languages/ja/SharedRules/default.yaml, Rules/Languages/ja/overview.yaml, Rules/Languages/ja/ClearSpeak_Rules.yaml, Rules/Languages/ja/SimpleSpeak_Rules.yaml, tests/Languages/ja/ja.rs
Fraction rules now speak the denominator before the numerator and use the T text token for 分の. Tests validate LiteralSpeak, SimpleSpeak, ClearSpeak, and overview output.
Annotation and enclosure terminology
Rules/Languages/ja/SharedRules/default.yaml, tests/Languages/ja/ja.rs
Japanese wording changed for annotations, enclosure shapes, strikes, arrows, actuarial and madrub symbols, and long division. ClearSpeak tests validate the updated terms.
General mathematical terminology
Rules/Languages/ja/SharedRules/general.yaml, Rules/Languages/ja/SharedRules/linear-algebra.yaml, Rules/Languages/ja/unicode.yaml, tests/Languages/ja/ja.rs
Decimal points use 点, matrix entries use 成分, and subscripted norms use ノルム. Tests validate the updated output.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to d092b

This updates Japanese mathematical speech terminology and fraction ordering with corresponding coverage; no current merge-blocking risk remains.

Suggested reviewers: moritz-gross

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies a cleanup of Japanese shared rules. It is concise and related to the main changes, although it does not mention the added tests or terminology corrections.
Docstring Coverage ✅ Passed 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 11 functions across 1 files. (4 skipped: 4…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ja-shared-rules-cleanup

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@yasumorishima

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 5, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@yasumorishima

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 5, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@yasumorishima

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 5, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@yasumorishima

Copy link
Copy Markdown
Owner Author

Preflight done; submitted upstream as daisy#756.

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.

1 participant