ja: read the remaining fractions denominator-first, and name the menclose marks - #756
Open
yasumorishima wants to merge 4 commits into
Open
ja: read the remaining fractions denominator-first, and name the menclose marks#756yasumorishima wants to merge 4 commits into
yasumorishima wants to merge 4 commits into
Conversation
…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.
This was referenced Sep 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two groups of fixes in the shared
jarule files. Everything stays insideRules/Languages/ja/andtests/Languages/ja/.1. Three fraction rules read the fraction backwards
Japanese states the denominator first: 3/4 is "4 分の 3". Numerator-first does not just sound odd, it names a different number — "3 分の 4" is 4/3.
common-fractioninClearSpeak_Rules.yamlandSimpleSpeak_Rules.yamlalready swaps the operands, but three rules were still numerator-first:SharedRules/default.yamlliteral-simple(tagmfrac, reached withSpeechStyle=LiteralSpeak, which is also what navigation falls back to in Character mode —src/navigate.rs:588)overview.yamloverview-default(whatDescribePrevious/Next/Currentspeak)Both now say the denominator first, with the same comment
common-fractioncarries.SharedRules/default.yamlliteral-defaulthas explicit start/end markers, so instead of swapping it keeps the written order and uses the borrowed オーバー — the form Yamaguchi, Kawane & Sawazaki (1996) give for a fraction that is not two plain numbers: 分数 A オーバー B 分数終了. It also opened with スタート, the English word "start".Note on scope:
literal-simplematches any two leaves, so it now says 分の forx/yas well as for3/4. The cited source reserves 分の for two numbers, but "b 分の a" is ordinary Japanese for a fraction of two symbols too, and this rule has no start/end markers to hang the オーバー form on.2. Names that were still the machine translation
SharedRules/default.yaml, menclose:uparrowdownarrowupdownarrowunicode-full.yaml:558already gives ↕leftrightarrowunicode-full.yaml:557already gives ↔northeastsouthwestarrowunicode-full.yaml:1824for ⤢northwestsoutheastarrowunicode-full.yaml:1823for ⤡updiagonalstrikedowndiagonalstrikebox/roundedbox/circleactuarialmadrublongdivAlso in
SharedRules/default.yaml, themoverandmunderoverrules said 詳しくはこちら for "above". That is the web phrase "click here for details"; the word wanted is 上, the partner of the 下 already in the rule beside it.And three single words:
SharedRules/linear-algebra.yaml— ノルダム is Notre-Dame. A norm is ノルム.SharedRules/general.yaml1x1-matrix— エントリー → 成分, the term for a matrix entry.SharedRules/general.yamldefault-pointandunicode.yaml.— ポイント → 点, which is whatgeometry.yaml:71already says for a coordinate and what a Japanese reader says for a decimal point.Checks
audit-translations ja: Untranslated text 3493 → 3462. That is exactly −31, the number of lines promoted fromt:toT:after checking each against theenline beside it. Missing rules 0, extra rules 0, and Rule differences 28 → 28, i.e. swapping the two operands did not make the rules diverge structurally fromen..character rule inunicode.yamlis the one change with no test: I could not build MathML that reaches itsparent::*[1][self::m:mn]branch — a plain<mn>3.5</mn>is spoken as one token.分のlines inClearSpeak_Rules.yamlandSimpleSpeak_Rules.yamlare promoted toT:as well, so the word is not verified in two files and unverified in two others.Left alone on purpose
unicode-full.yaml, waiting for the MathPlayer seed.navigate.yaml, which Translate the Japanese navigation command prefixes #752 is already touching. I checked that the two branches merge cleanly in either order and give the same tree.phasorangle(フェーザの角度) and the single compass arrows (北東矢印 etc.) are literal but not wrong, so I left them.unicode.yamlare inconsistent —<is 小なり but>is より大きい, and∈is 要素の where the source gives 要素オブ. That is a separate theme and will be a separate PR.