Skip to content

ja: use readings for the relations that work between the operands - #757

Open
yasumorishima wants to merge 6 commits into
daisy:jafrom
yasumorishima:ja-relation-symbols
Open

ja: use readings for the relations that work between the operands#757
yasumorishima wants to merge 6 commits into
daisy:jafrom
yasumorishima:ja-relation-symbols

Conversation

@yasumorishima

Copy link
Copy Markdown
Contributor

unicode.yaml puts the relation word between the two operands, so the word has to work in that position. Several did not, and definitions.yaml carried a second, different set of words for the same relations.

What was wrong

symbol / intent was now
> より大きい 大なり
より小さいか等しい 小なり オア イコール
より大きいか等しい 大なり オア イコール
等しくない ノット イコール
, (element of) 要素の / 属する 要素オブ
, (ClearSpeak SetMemberSymbol=In, inside a set) 中へ イン
最も肯定的な 最も正の
definitions.yaml element-of の要素 要素オブ
definitions.yaml less-than より小さい 小なり
definitions.yaml less-than-or-equal-to 以下 小なり オア イコール
definitions.yaml member-of, not-member-of に属する / に属さない 元 / 元でない
  • より strands its comparand. より is a postposition: the thing compared has to come before it. Emitted between the operands, "x は より大きい 5" parses as "x is a bigger 5" rather than "x is greater than 5". < in the same file already said 小なり, which does work in that position, so the file also disagreed with itself.
  • の attaches backwards. 要素の A reads as "A of an element", and definitions.yaml had the same problem the other way round with の要素. This is what ja: read the function-application of as オブ #731 fixed for function application, where the borrowed オブ replaced の.
  • and disagreed with each other for the same English: in the non-ClearSpeak branch said 属する where said 要素の.
  • 中へ is "into", a direction of motion, not membership.
  • 以下 is postfixed in Japanese ("y 以下"), so it cannot sit between the operands either.
  • 最も肯定的な is "most affirmative"; en means "most positive" in the numeric sense.
  • unicode.yaml and definitions.yaml disagreed wherever both name the same relation — less-than was より小さい in one and 小なり in the other, and member-of was に属する where unicode.yaml has said 元 all along (that pair is not a new choice of wording, just the two files agreeing). src/infer_intent.rs uses the definitions.yaml mapping whenever the MathML carries an intent, so both spellings could be heard from the same document.

Where the replacements come from

Yamaguchi, Kawane & Sawazaki, "日本語による数式読み上げ法の基本構成について", 日本数学教育学会誌 78(9) pp.239-247 (1996) — the source cited in the earlier ja PRs. Its appendix "日本語による数学記号の読み方(抜粋)" gives <「小なり」, >「大なり」, 「小なり・オア・イコール」, 「ノット・イコール」, 「要素オブ」, 「部分集合オブ」または「含まれる(イン)」.

The paper notes the is only a word separator and is not read aloud, so it is rendered here as a space. is not in the table; 大なり オア イコール is the symmetry with the listed .

This follows the paper's own rules (1) keep the English reading order rather than reversing into Japanese SOV order, and (3) borrow the English function words as katakana where Japanese has no word that works in that position — the same reason オブ and オーバー are already used in this translation.

Deliberately not in this PR

The negative set relations ( ) and the subset family ( ), in both files. The source gives 部分集合オブ for but nothing for the superset or for the negated forms, and I did not want to change half a family and leave and reading differently from each other.

Two lines are also left at t: rather than promoted: the ClearSpeak "is an element of" option outside a set. The Japanese there drops the "is" that en has, as its sibling options (元, に含まれる, 属する) also do, so the line does not correspond word-for-word to the en line beside it.

Checks

  • audit-translations ja: Untranslated text 3493 → 3481. That is −12: 14 lines promoted from t: to T: after checking each against the en line, minus the 2 above deliberately left alone. Missing/extra rules 0, missing/extra definitions 0, and Rule differences 28 → 28.
  • Tests: new ones for >, for / in the SimpleSpeak branch and in the ClearSpeak Element branch, for both inside-a-set options (In and Element, using the set-builder shape en/ClearSpeak/sets.rs uses), and for . Four existing tests that pinned the old wording were updated (comparison_with_equality, set_membership, number_set_names, and the doc comment recording the earlier seed bug).
  • This branch and the two other open ja branches (Translate the Japanese navigation command prefixes #752 and ja: read the remaining fractions denominator-first, and name the menclose marks #756) merge into ja cleanly in all six orders and give the same tree; git merge-tree was run for each order.

`unicode.yaml` puts the relation word between the two operands, so the word has
to work there. Several did not.

- `>` said より大きい. より needs its comparand in front of it, so "x は より大きい 5"
  parses as "x is a bigger 5". It also did not match the 小なり already used for
  `<` in the same file. Yamaguchi, Kawane & Sawazaki (1996) give the pair
  小なり / 大なり, and 小なり・オア・イコール for `≤` (the ・ is only a word
  separator and is not read), so `≥` follows as 大なり・オア・イコール.
- `≠` said 等しくない, a predicate with the same problem. The source gives
  ノット・イコール, which pairs with the イコール already used for `=`.
- `∈` and `∊` said 要素の for "element of". の attaches backwards: 要素の A is
  "A of an element". The source gives 要素オブ, the same borrowed オブ this
  translation already uses for "of" elsewhere. The two rules also disagreed with
  each other -- ∈ said 属する where ∊ said 要素の, for the same English.
- The ClearSpeak "In" option said 中へ, which is "into", a direction of motion.
  The source's reading for "in" is the borrowed イン.
- `∾` said 最も肯定的な, "most affirmative"; en is "most positive" in the numeric
  sense, so 最も正の.

Left alone: the negative set relations (∉ ⊄ ⊅) and the subset family
(⊂ ⊃ ⊆ ⊇). The source gives 部分集合オブ for ⊂ but nothing for the superset or
the negated forms, and I did not want to change half a family.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

1 participant