Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
2894695
added missing rules from en to default.yaml
olivierthiffault Apr 24, 2026
5060b1b
added missing rules from en to general.yaml
olivierthiffault Apr 24, 2026
4c9fc2b
minor corrections to definitions.yaml
olivierthiffault Apr 25, 2026
b80ce11
added comment to overview.yaml
olivierthiffault Apr 25, 2026
1ee0736
first pass in unicode.yaml
olivierthiffault May 7, 2026
788a748
modifications to unicode.yaml
olivierthiffault May 8, 2026
fb34d78
started test adjustments for functions.rs
olivierthiffault May 8, 2026
70d9289
added ClearSpeak_Rules.yaml
olivierthiffault May 11, 2026
5889a02
fixed rules and tests for intervals
olivierthiffault May 11, 2026
ba7088d
added SimpleSpeak/geometry.rs tests
olivierthiffault May 14, 2026
af3ea06
completed changes and tests for large_ops
olivierthiffault May 14, 2026
d00ec64
fixed grammar rule, majuscule a -> a majuscule
olivierthiffault May 14, 2026
5663cd6
completed changes and tests for linear_algebra
olivierthiffault May 14, 2026
15ec997
added tests mfrac.rs
olivierthiffault May 15, 2026
7fea11a
added tests and corrections for msup.rs
olivierthiffault May 15, 2026
8f990a5
added tests and corrections for multiline.rs
olivierthiffault May 15, 2026
61f6db0
draft sets.rs
olivierthiffault May 15, 2026
1f73276
completed sets.rs
olivierthiffault May 20, 2026
2093e98
added subscripts.rs tests
olivierthiffault May 20, 2026
83cda50
added test file and modifs for alphabets.rs
olivierthiffault May 20, 2026
41f7d3d
wip chemistry.rs
olivierthiffault May 21, 2026
4f0d7f7
completed corrections for chemistry.rs
olivierthiffault May 21, 2026
1f45cc0
added tests intent.rs
olivierthiffault May 21, 2026
42b2c7d
modified rules and completed tests for mtable.rs
olivierthiffault May 25, 2026
85b6ed8
corrections for tests shared.rs
olivierthiffault May 25, 2026
c7aaa5b
corrections to units.rs
olivierthiffault May 25, 2026
14e4fcc
fixed all unit tests
olivierthiffault Jun 3, 2026
730285b
cleanup
olivierthiffault Jun 3, 2026
16ddbc5
more cleanup
olivierthiffault Jun 3, 2026
8be4ab1
finalized rules, replaced t: -> T:, ct: -> CT:, ot: -> OT, spell: -> …
olivierthiffault Jun 4, 2026
b268810
removed AI generated comments
olivierthiffault Jun 4, 2026
1dfa1cd
added ClearSpeak/functions.rs tests and modified rules
olivierthiffault Jun 18, 2026
6032161
added ClearSpeak/large_ops.rs tests
olivierthiffault Jun 18, 2026
56ecdc2
added ClearSpeak/menclosure.rs tests and modified rules
olivierthiffault Jun 18, 2026
990dcf9
added tests ClearSpeak/mfrac.rs
olivierthiffault Jun 24, 2026
1596104
modified rules and added tests for ClearSpeak/mroot.rs
olivierthiffault Jun 24, 2026
479200a
draft on ClearSpeak/msup.rs
olivierthiffault Jun 29, 2026
fa33df5
completed tests and modifs for msup.rs
olivierthiffault Jul 1, 2026
fc29a3e
added tests and modifs for multiline.rs
olivierthiffault Jul 1, 2026
3449473
added tests and modifs for sets.rs
olivierthiffault Jul 1, 2026
0d363a0
added tests and modifs for symbols_and_adornments.rs
olivierthiffault Jul 1, 2026
908ed8f
resolve merge conflicts
olivierthiffault Jul 1, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
139 changes: 80 additions & 59 deletions Rules/Languages/fr/ClearSpeak_Rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@
- test:
if: "$Verbosity!='Terse'"
then: [T: "la"] # phrase('the' square root of 25)
- T: "racine carrée" # phrase(8 is the 'square root' of 64)
- test:
if: "$ClearSpeak_Roots = 'PosNegSqRoot' or $ClearSpeak_Roots = 'PosNegSqRootEnd'"
- if: "$ClearSpeak_Roots = 'PosNegSqRoot' or $ClearSpeak_Roots = 'PosNegSqRootEnd'"
then:
- bookmark: "*[1]/@id"
- test:
if: "parent::*[self::m:minus and count(*)=1]"
then: [T: "négatif"] # phrase(minus 4 is a 'negative' number)
else: [T: "positif"] # phrase(10 is a 'positive' number)
- T: "racine carrée" # phrase(8 is the 'square root' of 64)
then: [T: "négative"] # phrase(minus 4 is a 'negative' number)
else: [T: "positive"] # phrase(10 is a 'positive' number)
- test:
if: "$Verbosity!='Terse'"
then: [T: "de"] # phrase(the square root 'of' 5)
Expand All @@ -66,32 +66,32 @@
- test:
if: "$Verbosity!='Terse'"
then: [T: "la"] # phrase(6 is 'the' square root of 36)
- test:
if: "$ClearSpeak_Roots = 'PosNegSqRoot' or $ClearSpeak_Roots = 'PosNegSqRootEnd'"
then:
- test:
if: "parent::*[(self::m:minus or self::m:plus) and count(*)=1]"
then: [bookmark: "parent/@id"]
- test:
if: "parent::m:minus"
then: [T: "négatif"] # phrase(minus 6 is a 'negative' number)
else: [T: "positif"] # phrase(10 is a 'positive' number)
- test:
if: "*[2][self::m:mn and not(contains(., '.'))]"
then_test:
- if: "*[2][.='2']"
then: [T: "racine carrée"] # phrase(5 is the 'square root' of 25)
- else_if: "*[2][.='3']"
then: [T: "racine cubique"] # phrase(5 is the 'cube root' of 625)
- else: [x: "ToOrdinal(*[2])", T: "racine"] # phrase(the square 'root' of 25)
- else: [T: "racine", x: "ToOrdinal(*[2])"] # phrase(the square 'root' of 25)
else:
- T: "racine" # phrase(the square 'root' of 36)
- test:
if: "*[2][self::m:mi][string-length(.)=1]"
then:
- x: "*[2]"
- pronounce: [text: "-ième", ipa: "jɛm", sapi5: "ieme", eloquence: "ieme"]
else: [x: "*[2]"]
- T: "racine" # phrase(the square 'root' of 36)
- test:
if: "$ClearSpeak_Roots = 'PosNegSqRoot' or $ClearSpeak_Roots = 'PosNegSqRootEnd'"
then:
- test:
if: "parent::*[(self::m:minus or self::m:plus) and count(*)=1]"
then: [bookmark: "parent/@id"]
- test:
if: "parent::m:minus"
then: [T: "négative"] # phrase(minus 6 is a 'negative' number)
else: [T: "positive"] # phrase(10 is a 'positive' number)
- test:
if: "$Verbosity!='Terse'"
then: [T: "de"] # phrase(the square root 'of' 36)
Expand Down Expand Up @@ -236,11 +236,11 @@
replace:
- test:
if: "$ClearSpeak_Trig = 'TrigInverse'"
then: [x: "*[1]", bookmark: "*[2]/@id", T: "l'inverse"] # phrase(8 over 5 is the 'inverse' of 5 over 8)
then: [x: "*[1]", bookmark: "*[2]/@id", T: "inverse"] # phrase(8 over 5 is the 'inverse' of 5 over 8)
else_test:
if: "$ClearSpeak_Trig = 'ArcTrig'"
then: [bookmark: "*[2]/@id", T: "arc", x: "*[1]"] # phrase(the 'arc' of a circle)
else: [bookmark: "*[2]/@id", T: "l'inverse", x: "*[1]"] # default/Auto # phrase(8 over 5 is the 'inverse' of 5 over 8)
else: [x: "*[1]", bookmark: "*[2]/@id", T: "inverse"] # default/Auto # phrase(8 over 5 is the 'inverse' of 5 over 8)

- name: function-squared-or-cubed
tag: power
Expand All @@ -263,12 +263,17 @@
- test:
if: "$Verbosity!='Terse'"
then: [T: "la"] # phrase('the' third power of 2)
- bookmark: "*[2]/@id"
- test:
if: "*[2][self::m:mn][not(contains(., '.'))]"
then: [x: "ToOrdinal(*[2])"]
else: [x: "*[2]"]
- T: "puissance de" # phrase(the third 'power of' 6)
then:
- bookmark: "*[2]/@id"
- x: "ToOrdinal(*[2])"
- T: "puissance" # phrase(the third 'power' of 6)
else:
- T: "puissance" # phrase(the third 'power' of 6)
- bookmark: "*[2]/@id"
- x: "*[2]"
- T: "de" # phrase(the third power 'of' 6)
- pause: short
- x: "*[1]"

Expand All @@ -279,7 +284,7 @@
- "*[2][self::m:power or self::m:power or self::m:mrow[m:power]]"
replace:
- x: "*[1]"
- T: "à la puissance de" # phrase(5 'raised to the exponent' x plus 1)
- T: "élevé à l'exposant" # phrase(5 'raised to the exponent' x plus 1)
- pause: short
- x: "*[2]"
- pause: short
Expand All @@ -290,7 +295,7 @@
match: "$ClearSpeak_Exponents = 'AfterPower'"
replace:
- x: "*[1]"
- T: "à la puissance de" # phrase(x is 'raised to the power' 4)
- T: "élevé à la puissance" # phrase(x is 'raised to the power' 4)
- x: "*[2]"
- pause: short

Expand All @@ -312,31 +317,52 @@

- name: simple-integer
tag: power
match: "*[2][self::m:mn][not(contains(., '.'))]"
match: "*[2][self::m:mn][not(contains(., $DecimalSeparators))]"
replace:
- x: "*[1]"
- T: "à la" # phrase(2 raised 'to the' power 7)
- test:
if: "$ClearSpeak_Exponents = 'Ordinal' and *[2][.>0]"
then: [T: "au"] # phrase(x 'au' deuxième)
else: [T: "à la"] # phrase(2 raised 'à la' puissance or deuxième puissance)
- test:
if: "*[2][.>0]"
then: [x: "ToOrdinal(*[2])"]
else: [x: "*[2]"]
then:
- x: "ToOrdinal(*[2])"
- test:
if: "$ClearSpeak_Exponents != 'Ordinal'"
then: [T: "puissance"] # phrase(2 raised to the 'power' 7)
else:
- test:
if: "$ClearSpeak_Exponents != 'Ordinal'"
then: [T: "puissance"] # phrase(2 raised to the 'power' 7)
- x: "*[2]"

- name: simple-decimal
tag: power
match: "*[2][self::m:mn][contains(., $DecimalSeparators)]"
replace:
- x: "*[1]"
- test:
if: "$ClearSpeak_Exponents != 'Ordinal'"
then: [T: "puissance"] # phrase(2 raised to the 'power' 7)
if: "$ClearSpeak_Exponents = 'AfterPower'"
then: [T: "à la puissance de"] # phrase(x 'raised to the power' 5.0)
else: [T: "à la puissance"] # phrase(x 'raised to the power' 5.0)
- x: "*[2]"

- name: simple-negative-integer
tag: power
match:
- "*[2][self::m:minus and count(*)=1 and "
- " *[1][self::m:mn][not(contains(., '.'))]"
- " *[1][self::m:mn][not(contains(., $DecimalSeparators))]"
- " ]"
replace:
- x: "*[1]"
- T: "à la" # phrase(2 raised 'to the' power 7)
- x: "*[2]"
- test:
if: "$ClearSpeak_Exponents != 'Ordinal'"
then: [T: "puissance"] # phrase(2 raised to the 'power' 7)
- if: "$ClearSpeak_Exponents = 'AfterPower'"
then: [T: "élevé à la puissance"] # phrase(3 'raised to the power' negative 2)
- else_if: "$ClearSpeak_Exponents = 'Ordinal'"
then: [T: "à la"] # phrase(3 'to the' negative 2)
else: [T: "à la puissance"] # phrase(3 'to the power' negative 2)
- x: "*[2]"

- name: simple-var
tag: power
Expand Down Expand Up @@ -373,9 +399,8 @@
- " ]"
replace:
- x: "*[1]"
- T: "élevé à la" # phrase(x 'raised to the' second power)
- T: "élevé à la puissance" # phrase(x 'raised to the' second power)
- x: "*[2]"
- T: "puissance" # phrase(x raised to the second 'power')

- # - [xxx]^n
name: nested-negative-squared-or-cubed
Expand All @@ -394,9 +419,8 @@
- " ]"
replace:
- x: "*[1]"
- T: "élevé à la" # phrase(x 'raised to the' second power)
- T: "élevé à la puissance"
- x: "*[2]"
- T: "puissance" # phrase(x raised to the second 'power')

- # [xxx] var^n
name: nested-var-squared-or-cubed
Expand All @@ -417,9 +441,8 @@
- " ]"
replace:
- x: "*[1]"
- T: "élevé à la" # phrase(x 'raised to the' second power)
- T: "élevé à la puissance"
- x: "*[2]"
- T: "puissance" # phrase(x raised to the second 'power')

- # -[xxx] var^n
name: nested-negative-var-squared-or-cubed
Expand All @@ -442,9 +465,8 @@
- " ]"
replace:
- x: "*[1]"
- T: "élevé à la" # phrase(x 'raised to the' second power)
- T: "élevé à la puissance"
- x: "*[2]"
- T: "puissance" # phrase(x raised to the second 'power')

- name: default-exponent-power
tag: power
Expand All @@ -463,9 +485,8 @@
match: "."
replace:
- x: "*[1]"
- T: "élevé à la" # phrase(x 'raised to the' second power)
- T: "élevé à la puissance" # phrase(x 'raised to the power')
- x: "*[2]"
- T: "puissance" # phrase(x raised to the second 'power')

#
# Some rules on mrows
Expand Down Expand Up @@ -501,14 +522,14 @@
then:
- test:
if: "$Verbosity!='Terse'"
then: [T: "l'"] # phrase('the' empty set)
- T: "ensemble vide" # phrase(the 'empty set')
then: [T: "l'ensemble vide"] # phrase('the empty set')
else: [T: "ensemble vide"] # phrase('empty set')
- else_if: "count(*[1]/*)=3 and *[1]/*[2][self::m:mo][.=':' or .='|' or .='∣']"
then:
- test:
if: "$Verbosity!='Terse'"
then: [T: "l'"] # phrase('the' set of all integers)
- T: "ensemble de" # phrase(this is a 'set of' numbers)
then: [T: "l'ensemble de"] # phrase('the set of' all integers)
else: [T: "ensemble de"] # phrase(this is a 'set of' numbers)
- test:
if: "$ClearSpeak_Sets != 'woAll'"
then: [T: "tous"] # phrase(the set of 'all' integers)
Expand All @@ -521,8 +542,8 @@
then:
- test:
if: "$Verbosity!='Terse'"
then: [T: "l'"] # phrase('the' set of integers)
- T: "ensemble" # phrase(this is a 'set' of integers)
then: [T: "l'ensemble"] # phrase('the set' of integers)
else: [T: "ensemble"] # 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 All @@ -536,7 +557,7 @@
tag: [open-interval, open-closed-interval, closed-interval, closed-open-interval]
match: "."
replace:
- T: "l'invervalle de" # phrase('the interval from' a to b)
- T: "l'intervalle de" # phrase('the interval from' a to b)
- x: "*[1]"
- T: "à" # phrase(the interval from a 'to' b)
- x: "*[2]"
Expand All @@ -546,8 +567,8 @@
then:
- test:
if: "starts-with(name(.), 'open')"
then: [T: "sans"] # phrase(the interval from a to b 'not' including b)
- T: "inclure" # phrase(the interval from a to b not 'including' b)
then: [T: "n'incluant pas"] # phrase(the interval from a to b 'not including' b)
else: [T: "incluant"] # phrase(the interval from a to b 'including' b)
- x: "*[1]"
# logic to deal with [not] arg #1
- test:
Expand All @@ -568,8 +589,8 @@
then:
- test:
if: "name(.) = 'open-interval' or name(.) = 'closed-open-interval'"
then: [T: "n'"] # phrase(the interval 'not' including a)
- T: "incluant pas" # phrase(the interval not 'including' a)
then: [T: "n'incluant pas"] # phrase(the interval 'not including' a)
else: [T: "incluant"] # phrase(the interval 'including' a)
- x: "*[2]"

# onto the [not] [including]... part
Expand Down Expand Up @@ -611,7 +632,7 @@
- bookmark: "@id"
- test:
if: "$Verbosity!='Terse' and not(IsNode(following-sibling::*[2],'simple'))"
then: [T: "la"] # phrase('the' square root of 25)
then: [T: "le"] # phrase('the' square root of 25)
- test:
- if: ".='log'"
then: [T: "logarithme"]
Expand Down Expand Up @@ -647,8 +668,8 @@
then: [T: "étape"] # phrase(this is the first 'step' of three steps)
# else 'None -- don't say anything'
- test:
- if: "$LineCount != 1"
then: [CT: "s"] # plural # phrase(shown by the letter 's')
- if: "$LineCount != 1 and not(($ClearSpeak_MultiLineLabel = 'Auto' and self::m:piecewise) or $ClearSpeak_MultiLineLabel = 'Case')"
then: [CT: "s"] # plural (but not for 'cas' which is invariable in French)
- pause: short
- x: "*"
- pause: long
Expand Down
13 changes: 6 additions & 7 deletions Rules/Languages/fr/SharedRules/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -477,19 +477,18 @@
- test:
if: ".[ contains(concat(' ', normalize-space(@notation), ' '), ' left ') or contains(concat(' ', normalize-space(@notation), ' '), ' right ') or contains(@notation,'top') or contains(@notation,'bottom') ]"
then:
- T: "line on" # phrase(draw a straight 'line' on the page)
- test:
if: ".[contains(concat(' ', normalize-space(@notation), ' '), ' left ')]"
then: [T: "gauche", pause: short] # phrase(line on 'left' of the expression)
then: [T: "ligne à gauche", pause: short] # phrase('line on left' of the expression)
- test:
if: ".[contains(concat(' ', normalize-space(@notation), ' '), ' right ')]"
then: [T: "droite", pause: short] # phrase(line on 'right' of the expression)
then: [T: "ligne à droite", pause: short] # phrase('line on right' of the expression)
- test:
if: ".[contains(@notation,'top')]"
then: [T: "dessus", pause: short] # phrase(line on 'top' of the expression)
then: [T: "ligne au dessus", pause: short] # phrase('line on top' of the expression)
- test:
if: ".[contains(@notation,'bottom')]"
then: [T: "dessous", pause: short] # phrase(line on the 'bottom' of the expression)
then: [T: "ligne en dessous", pause: short] # phrase('line on the bottom' of the expression)
- test:
if: ".[ contains(@notation,'updiagonalstrike') or contains(@notation,'downdiagonalstrike') or contains(@notation,'verticalstrike') or contains(@notation,'horizontalstrike') ]"
then:
Expand All @@ -509,7 +508,7 @@
- test:
if: ".[contains(@notation,'horizontalstrike')]"
then: [T: "horizontale", pause: short] # phrase(the line is 'horizontal')
- T: "cross out" # phrase(please 'cross out' the incorrect answer)
- T: "barré" # phrase(please 'cross out' the incorrect answer)
- pause: short
- test:
if: ".[contains(@notation,'uparrow')]"
Expand Down Expand Up @@ -562,7 +561,7 @@
- test:
if: ".[contains(@notation,'radical')]"
then: [T: "racine carrée", pause: short] # phrase(5 is the 'square root' of 25)
- T: "enclosing" # phrase(parentheses are 'enclosing' part of the equation)
- T: "contenant" # phrase(parentheses are 'enclosing' part of the equation)
- test:
if: "*[self::m:mtext and .=' ']"
then: [T: "espace"] # otherwise there is complete silence # phrase(there is a 'space' between the words)
Expand Down
4 changes: 2 additions & 2 deletions Rules/Languages/fr/SharedRules/general.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
replace:
- x: "*[1]"
- pause: auto
- T: "évalués à" # phrase(results were 'evaluated at' a given point)
- T: "évalué à" # phrase(results were 'evaluated at' a given point)
- pause: auto
- x: "*[2]"

Expand All @@ -98,7 +98,7 @@
replace:
- x: "*[1]"
- pause: auto
- T: "évalués à" # phrase(results were 'evaluated at' this point)
- T: "évalué à" # phrase(results were 'evaluated at' this point)
- pause: auto
- x: "*[3]"
- T: "moins la même expression évaluée à" # phrase(this result is 'minus the same expression evaluated at' an earlier point)
Expand Down
4 changes: 2 additions & 2 deletions Rules/Languages/fr/definitions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -293,13 +293,13 @@
]

- NumbersOrdinalOnes: [
"zéroième", "premier", "deuxième", "troisième", "quatrième", "cinquième", "sixième", "septième", "huitième", "neuvième",
"zéroième", "et unième", "deuxième", "troisième", "quatrième", "cinquième", "sixième", "septième", "huitième", "neuvième",
"dixième", "onzième", "douzième", "treizième", "quatorzième", "quinzième", "seizième",
"dix-septième", "dix-huitième", "dix-neuvième"
]

- NumbersOrdinalPluralOnes: [
"zéroièmes", "premiers", "deuxièmes", "troisièmes", "quatrièmes", "cinquièmes", "sixièmes", "septièmes", "huitièmes", "neuvièmes",
"zéroièmes", "et unièmes", "deuxièmes", "troisièmes", "quatrièmes", "cinquièmes", "sixièmes", "septièmes", "huitièmes", "neuvièmes",
"dixièmes", "onzièmes", "douzièmes", "treizièmes", "quatorzièmes", "quinzièmes", "seizièmes",
"dix-septièmes", "dix-huitièmes", "dix-neuvièmes"
]
Expand Down
Loading
Loading