Skip to content
6 changes: 3 additions & 3 deletions Rules/Languages/ja/ClearSpeak_Rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -481,13 +481,13 @@
replace:
- test:
- if: "count(*)=0"
then: [t: "空のセット"] # phrase('the empty set')
then: [t: "空集合"] # phrase('the empty set')
- else_if: "count(*[1]/*)=3 and *[1]/*[2][self::m:mo][.=':' or .='|' or .='∣']"
then:
- test:
if: "$Verbosity!='Terse'"
then: [t: ""] # phrase('the' set of all integers)
- t: "セット" # phrase(this is a 'set of' numbers)
- t: "集合" # phrase(this is a 'set of' numbers)
- test:
if: "$ClearSpeak_Sets != 'woAll'"
then: [t: "すべて"] # phrase(the set of 'all' integers)
Expand All @@ -501,7 +501,7 @@
- test:
if: "$Verbosity!='Terse'"
then: [t: ""] # phrase('the' set of integers)
- t: "セット" # phrase(this is a 'set' of integers)
- t: "集合" # phrase(this is a 'set' of integers)
- x: "*[1]"

- # intervals are controlled by a ClearSpeak Preference -- parens/brackets don't have to match, so we avoid IsBracketed
Expand Down
70 changes: 35 additions & 35 deletions Rules/Languages/ja/SharedRules/general.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
- bookmark: "*[1]/@id"
- test:
- if: "*[1][.='ℂ']"
then: [t: "複雑な数字"] # phrase('complex numbers' consist of two parts)
then: [t: "複素数"] # phrase('complex numbers' consist of two parts)
- else_if: "*[1][.='ℕ']"
then: [t: "自然な数字"] # phrase('natural numbers' are numbers from 1 to infinity)
then: [t: "自然数"] # phrase('natural numbers' are numbers from 1 to infinity)
- else_if: "*[1][.='ℚ']"
then: [t: "合理的な番号"] # phrase('rational numbers' are the fraction of 2 integers)
then: [t: "有理数"] # phrase('rational numbers' are the fraction of 2 integers)
- else_if: "*[1][.='ℝ']"
then: [t: "実数"] # phrase('real numbers' can be both positive and negative)
- else_if: "*[1][.='ℤ']"
then: [t: "インテガーズ"] # phrase(positive 'integers' are natural numbers above 0)
then: [t: "整数"] # phrase(positive 'integers' are natural numbers above 0)
else: [x: "*[1][text()]"] # shouldn't happen

- name: dimension-number-sets
Expand Down Expand Up @@ -57,15 +57,15 @@
- bookmark: "@id"
- test:
- if: ".='ℂ'"
then: [t: "複雑な数字"] # phrase('the complex numbers' include 2 parts)
then: [t: "複素数"] # phrase('the complex numbers' include 2 parts)
- else_if: ".='ℕ'"
then: [t: "自然な数字"] # phrase('the natural numbers' begin at 1)
then: [t: "自然数"] # phrase('the natural numbers' begin at 1)
- else_if: ".='ℚ'"
then: [t: "合理的な数字"] # phrase('the rational numbers' are the fraction of 2 integers)
then: [t: "有理数"] # phrase('the rational numbers' are the fraction of 2 integers)
- else_if: ".='ℝ'"
then: [t: "実数"] # phrase('the real numbers' can be both positive and negative)
- else_if: ".='ℤ'"
then: [t: "整数者"] # phrase('the integers' are natural numbers above 0)
then: [t: "整数"] # phrase('the integers' are natural numbers above 0)
else: [x: "text()"] # shouldn't happen

- name: real-part
Expand Down Expand Up @@ -573,11 +573,11 @@
match: "count(*)=1 and *[self::m:mtr][count(*) = 1]"
replace:
- ot: "" # phrase('the' 1 by 1 matrix M)
- t: "1 によって 1" # phrase(the '1 by 1' matrix)
- t: "1 かける 1" # phrase(the '1 by 1' matrix)
- test:
if: "self::m:determinant" # just need to check the first bracket since we know it must be (, [, or |
then: [t: "行列式"] # phrase(the 2 by 2 'determinant'))
else: [t: "マトリクス"] # phrase(the 2 by 2 'matrix')
else: [t: "行列"] # phrase(the 2 by 2 'matrix')

- t: "エントリー" # phrase(the 2 by 2 matrix 'with entry' x)
- x: "*[1]/*"
Expand All @@ -590,9 +590,9 @@
replace:
- t: "" # phrase('the' 1 by 2 matrix M)
- x: count(*)
- t: "によって" # phrase(the 1 'by' 2 matrix)
- t: "かける" # phrase(the 1 'by' 2 matrix)
- x: count(*[self::m:mtr][1]/*)
- t: "ゼロマトリックス" # phrase(the 2 by 2 'zero matrix')
- t: "零行列" # phrase(the 2 by 2 'zero matrix')
- pause: long

- name: identity-matrix
Expand All @@ -605,9 +605,9 @@
replace:
- t: "" # phrase('the' 1 by 2 matrix M)
- x: count(*)
- t: "によって" # phrase(the 1 'by' 2 matrix)
- t: "かける" # phrase(the 1 'by' 2 matrix)
- x: count(*[self::m:mtr][1]/*)
- t: "アイデンティティ マトリックス" # phrase(the 2 by 2 'identity matrix')
- t: "単位行列" # phrase(the 2 by 2 'identity matrix')
- pause: long

- name: diagonal-matrix
Expand All @@ -622,9 +622,9 @@
replace:
- t: "" # phrase('the' 1 by 2 matrix)
- x: count(*)
- t: "によって" # phrase(the 1 'by' 2 matrix)
- t: "かける" # phrase(the 1 'by' 2 matrix)
- x: count(*[self::m:mtr][1]/*)
- t: "対角マトリックス" # phrase(the 2 by 2 'diagonal matrix')
- t: "対角行列" # phrase(the 2 by 2 'diagonal matrix')
- pause: long
- insert:
# this lists the diagonal 'mtd's to be read, and they say "column nnn" before reading the contents
Expand All @@ -650,7 +650,7 @@
- test:
if: "$ClearSpeak_Matrix = 'Vector' or $ClearSpeak_Matrix = 'EndVector'"
then: [t: "コンテンツ"] # phrase(the 2 by 2 'vector')
else: [t: "マトリクス"] # phrase(the 2 by 2 'matrix')
else: [t: "行列"] # phrase(the 2 by 2 'matrix')
- pause: long
- x: "*/*"
- test:
Expand All @@ -660,7 +660,7 @@
- test:
if: $ClearSpeak_Matrix = 'EndVector'
then: [t: "コンテンツ"] # phrase(the 2 column 'vector')
else: [t: "マトリクス"] # phrase(the 2 by 2 'matrix')
else: [t: "行列"] # phrase(the 2 by 2 'matrix')

- name: default-column-matrix
tag: matrix
Expand All @@ -673,12 +673,12 @@
- test:
if: "$ClearSpeak_Matrix = 'Vector' or $ClearSpeak_Matrix = 'EndVector'"
then: [t: "コンテンツ"] # phrase(the 2 column 'vector')
else: [t: "マトリクス"] # phrase(the 2 by 2 'matrix')
else: [t: "行列"] # phrase(the 2 by 2 'matrix')
- pause: long
- x: "*" # select the rows (mtr)
- test:
if: "$ClearSpeak_Matrix = 'EndMatrix' or $ClearSpeak_Matrix = 'EndVector'"
then: [t: "端のマトリックス"] # phrase(the 'end of matrix' has been reached)
then: [t: "行列終了"] # phrase(the 'end of matrix' has been reached)

- name: 1x2-or-3-matrix
tag: matrix
Expand All @@ -689,13 +689,13 @@
- count(*[1]/*)<=3 and # at least two cols
- IsNode(*/*/*,'simple') # IsNode() returns true if all the nodes are simple
replace:
- t: "1 によって" # phrase('the 1 by' 2 matrix)
- t: "1 かける" # phrase('the 1 by' 2 matrix)
- x: count(*/*)
- t: "行" # phrase(the 1 by 4 'row' matrix)
- test:
if: "$ClearSpeak_Matrix = 'Vector' or $ClearSpeak_Matrix = 'EndVector'"
then: [t: "コンテンツ"] # phrase('the 1 by' 2 row 'vector')
else: [t: "マトリクス"] # phrase('the 1 by' 2 'matrix')
else: [t: "行列"] # phrase('the 1 by' 2 'matrix')
- pause: long
- x: "*/*"
- test:
Expand All @@ -704,21 +704,21 @@
- t: "リリース" # phrase(the 'end' of matrix has been reached)
- test:
if: $ClearSpeak_Matrix = 'EndMatrix'
then: [t: "マトリクス"] # phrase(the 2 by 2 'matrix')
then: [t: "行列"] # phrase(the 2 by 2 'matrix')
else: [t: "コンテンツ"] # phrase(the 2 by 1 'vector')

- name: default-row-matrix
tag: matrix
variables: [IsColumnSilent: "$SpeechStyle = 'ClearSpeak' and $ClearSpeak_Matrix = 'SilentColNum'"]
match: "count(*)=1" # one row
replace:
- t: "1 によって" # phrase('the 1 by' 2 matrix)
- t: "1 かける" # phrase('the 1 by' 2 matrix)
- x: "count(*/*)"
- t: "行" # phrase(the 1 by 2 'row' matrix)
- test:
if: "$ClearSpeak_Matrix = 'Vector' or $ClearSpeak_Matrix = 'EndVector'"
then: [t: "コンテンツ"] # phrase(the 2 by 1 'vector')
else: [t: "マトリクス"] # phrase(the 2 by 2 'matrix')
else: [t: "行列"] # phrase(the 2 by 2 'matrix')
- pause: long
- pause: medium
- x: "*/*" # select the cols (mtd)
Expand All @@ -728,7 +728,7 @@
- t: "リリース" # phrase(the 'end' of matrix has been reached)
- test:
if: $ClearSpeak_Matrix = 'EndMatrix'
then: [t: "マトリクス"] # phrase(the 2 by 2 'matrix')
then: [t: "行列"] # phrase(the 2 by 2 'matrix')
else: [t: "コンテンツ"] # phrase(the 2 by 1 'vector')

- name: simple-small-matrix
Expand All @@ -741,16 +741,16 @@
replace:
- t: "" # phrase('the' 1 by 2 matrix M)
- x: count(*)
- t: "によって" # phrase(the 1 'by' 2 matrix)
- t: "かける" # phrase(the 1 'by' 2 matrix)
- x: count(*[self::m:mtr][1]/*)
- test:
if: "self::m:determinant"
then: [t: "行列式"] # phrase(the 2 by 2 'determinant')
else:
- test:
if: "@columnlines and (contains(normalize-space(@columnlines), 'solid') or contains(normalize-space(@columnlines), 'dashed'))"
then: [t: "拡張されたマトリックス"] # phrase(the 2 by 2 'augmented matrix')
else: [t: "マトリクス"] # phrase(the 2 by 2 'matrix')
then: [t: "拡大行列"] # phrase(the 2 by 2 'augmented matrix')
else: [t: "行列"] # phrase(the 2 by 2 'matrix')
- pause: long
- x: "*"
- test:
Expand All @@ -760,7 +760,7 @@
- test:
if: "self::m:determinant"
then: [t: "行列式"] # phrase(the 2 by 2 'determinant')
else: [t: "マトリクス"] # phrase(the 2 by 2 'matrix')
else: [t: "行列"] # phrase(the 2 by 2 'matrix')

- name: default-matrix
tag: [matrix, determinant]
Expand All @@ -769,16 +769,16 @@
replace:
- t: "" # phrase('the' 1 by 2 matrix M)
- x: "count(*)"
- t: "によって" # phrase(the 1 'by' 2 matrix)
- t: "かける" # phrase(the 1 'by' 2 matrix)
- x: "count(*[self::m:mtr][1]/*)"
- test:
if: "self::m:determinant"
then: [t: "行列式"] # phrase(the 2 by 2 'determinant')
else:
- test:
if: "@columnlines and (contains(normalize-space(@columnlines), 'solid') or contains(normalize-space(@columnlines), 'dashed'))"
then: [t: "拡張されたマトリックス"] # phrase(the 2 by 2 'augmented matrix')
else: [t: "マトリクス"] # phrase(the 2 by 2 'matrix')
then: [t: "拡大行列"] # phrase(the 2 by 2 'augmented matrix')
else: [t: "行列"] # phrase(the 2 by 2 'matrix')
- pause: long
- x: "*"
- test:
Expand All @@ -788,7 +788,7 @@
- test:
if: "self::m:determinant"
then: [t: "行列式"] # phrase(the 2 by 2 'determinant')
else: [t: "マトリクス"] # phrase(the 2 by 2 'matrix's)
else: [t: "行列"] # phrase(the 2 by 2 'matrix's)

- name: chemistry-msub
tag: [chemical-formula]
Expand All @@ -809,7 +809,7 @@
replace:
- insert:
nodes: "*"
replace: [t: "によって", pause: auto] # phrase(3 'by' 5 matrix)
replace: [t: "かける", pause: auto] # phrase(3 'by' 5 matrix)

- name: chemistry-msup
tag: [chemical-formula]
Expand Down
6 changes: 3 additions & 3 deletions Rules/Languages/ja/SimpleSpeak_Rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -278,21 +278,21 @@
- test:
if: "$Verbosity!='Terse'"
then: [t: ""] # phrase('the' empty set)
- t: "空のセット" # phrase(when a set contains no value it is called an 'empty set' and this is valid)
- t: "空集合" # phrase(when a set contains no value it is called an 'empty set' and this is valid)
- else_if: "count(*[1]/*)=3 and *[1]/*[2][self::m:mo][.=':' or .='|' or .='∣']"
then:
- test:
if: "$Verbosity!='Terse'"
then: [t: ""] # phrase('the' set of all integers)
- t: "すべてのセット" # phrase(the 'set of all' positive integers less than 10)
- t: "すべての集合" # phrase(the 'set of all' positive integers less than 10)
- x: "*[1]/*[1]"
- t: "そのようなこと" # phrase(x 'such that' x is less than y)
- x: "*[1]/*[3]"
else:
- test:
if: "$Verbosity!='Terse'"
then: [t: ""] # phrase('the' set of integers)
- t: "セット" # phrase(here is a 'set' of numbers)
- t: "集合" # phrase(here is a 'set' of numbers)
- x: "*[1]"

- name: times
Expand Down
Loading