Skip to content

ja: read the function-application of as オブ - #731

Merged
NSoiffer merged 3 commits into
daisy:jafrom
yasumorishima:ja-function-of
Sep 2, 2026
Merged

ja: read the function-application of as オブ#731
NSoiffer merged 3 commits into
daisy:jafrom
yasumorishima:ja-function-of

Conversation

@yasumorishima

@yasumorishima yasumorishima commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Follows #730 on the ja branch. Same defect as the absolute value in #725 and the large operators in #726, but in the generic rules, so it covers every function application at once.

Rebased onto ja now that #728, #730 and #733 have landed, and extended to the sites I was holding back while they were open.

の does not mean "of" here

sin x was read サイン の x. Japanese の attaches the other way round, so that parses as "the sine belonging to x" — the operand ends up modifying the function name rather than being applied to it. The same reading appeared for roots (ルート の x) and for any uncaught intent through function-intent.

Yamaguchi, Kawane and Sawazaki (1996) introduce オブ as a borrowed preposition for exactly this position (item 3), and item 6 spells the readings out: ログ底 a オブ x for a logarithm and サイン・インバース(オブ)x for an inverse function. Item 1 says not to reorder into Japanese word order, so the fix is to keep the order and swap the connective.

There are two paths, not one

Changing SharedRules/default.yaml fixed the gradient but not the sine. The sine goes through the invisible function-apply character instead: unicode.yaml gives U+2061 a conditional reading when it follows a trig function or a geometry shape. Both paths are オブ:

  • SharedRules/default.yamlroot, root-with-index, apply-function, function-intent
  • unicode.yaml — U+2061

Three sites had the connective fused into the word

Grepping for a standalone t: "の" does not find them, which is why they survived the first pass: and in unicode.yaml, and the square-root-of prefix in definitions.yaml. en reads laplacian of and square root of as two words in the same places.

The square root in ClearSpeak_Rules.yaml, SimpleSpeak_Rules.yaml, SharedRules/general.yaml and overview.yaml is the same defect; those files were in #730, so they are here rather than in a conflict.

SharedRules/calculus.yaml is dormant, and fixed anyway

Neither ja nor en includes that file — only fi, es, vi, sv, id and zh-tw do. Its four vector calculus operators reach speech through the function= entries in definitions.yaml instead, and that is what vector_calculus_operators covers. Two of the four, divergence and gradient, had lost the connective in calculus.yaml altogether while laplacian and curl beside them kept theirs, so I brought all four in line rather than leave a file that is wrong the day someone includes it. Please say if you would rather I dropped that hunk.

What was deliberately left alone

is correct Japanese in most of the places it appears and must stay. The exponent reading added in #7213 の 2 乗, "3 to the 2nd power" — is ordinary Japanese, as are 分の in fractions and 正の / 負の. A blanket replacement would have broken all of them, so each site is matched individually.

順列の in SharedRules/general.yaml is left for now. en reads permutations of there, but the rule already reverses its two arguments, so the right Japanese wording is a decision rather than a swap, and I would rather not fold a judgement call into a mechanical one.

unicode-full.yaml is untouched, since you mentioned in #715 that it can be seeded from the MathPlayer Japanese data.

Checks

audit-translations ja is unchanged against the current ja: 3674 untranslated, 28 rule differences, on both. Test expectations are the actual CI output, including the comma the engine inserts in コタンジェント, オブ x.

These are the sites the first two commits could not reach while daisy#730 was
open — the square root in ClearSpeak_Rules, SimpleSpeak_Rules,
SharedRules/general and overview — plus three where the connector was fused
into the preceding word, so grepping for a standalone one missed them: ∆ and
√ in unicode.yaml, and the square-root-of prefix in definitions.yaml. en
reads "laplacian of" and "square root of" as two words in those same places.

The exponent readings keep の: 3 の 2 乗 is ordinary Japanese and correct, as
are 分の, 正の and 負の.

SharedRules/calculus.yaml is brought in line too, but it is dormant — neither
ja nor en includes it, only fi, es, vi, sv, id and zh-tw do. Its four
operators reach speech through the function= entries in definitions.yaml
instead, and that is the path the new test covers. Two of the four had lost
the connector in this file altogether while the two beside them kept it.

Left alone on purpose: 順列の in SharedRules/general.yaml. en reads
"permutations of" there, but that rule already reverses its two arguments, so
the right Japanese wording is a decision rather than a swap.
@yasumorishima
yasumorishima marked this pull request as ready for review September 1, 2026 16:27
@NSoiffer
NSoiffer merged commit 316b7d3 into daisy:ja Sep 2, 2026
10 checks passed
@github-project-automation github-project-automation Bot moved this from Triage to Done in MathCAT Project Board Sep 2, 2026
moritz-gross pushed a commit that referenced this pull request Sep 3, 2026
The pochhammer speech rule (reached from the nPk P-notation intents) copied
the en argument reversal and glued 順列の between the arguments, so 5 P 2 was
spoken as 2 順列の 5 — word salad in Japanese. en says "2 permutations of 5"
after Wikipedia's "k-permutations of n"; nb and sv rebuilt the phrase
entirely ("antalet permutationer av 2 element ur 5"). Japanese has a
standard school phrase that reads the notation in display order, so the
reversal is simply not needed: 5 個から 2 個取る順列, "permutations taking
2 out of 5".

The rule is marked audit-ignore the way nb's is, since the x:/T: sequence no
longer mirrors en. A speech test covers the msubsup form in ClearSpeak and
SimpleSpeak. audit-translations: untranslated text 3674 -> 3673, rule
differences 28 -> 28, missing/extra rules 0 -> 0.

This is the item #731's description left alone on purpose (順列の — "the
right Japanese wording is a decision rather than a swap").

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016JCoREgn1pJzcbdnUx4iuh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants