Skip to content

Commit 152a9e3

Browse files
Div. changes
GetBracketingIntentName to SpeakBracketingIntentName in default. Then NVDA works, but some tests fail. Smaller changes in unicode-full. Some changes for speaking log and ln in ClearSpeak.
1 parent 399b01f commit 152a9e3

File tree

9 files changed

+59
-62
lines changed

9 files changed

+59
-62
lines changed

Rules/Languages/nb/ClearSpeak_Rules.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@
205205
- pause: medium
206206
- T: "og nevner" # phrase(the fraction with numerator 5 'and denominator' 8)
207207
- x: "*[2]"
208-
- pause: long
208+
- pause: medium
209209
- test:
210210
if: "$ClearSpeak_Fractions='EndFrac' or $ClearSpeak_Fractions='GeneralEndFrac'"
211211
then:
@@ -567,12 +567,12 @@
567567
if: "$log_is_simple"
568568
then_test:
569569
- if: "*[1][.='log']"
570-
then: [{T: "log"}] # phrase(the 'log' of x)
570+
then: [{T: "log av"}] # phrase(the 'log' of x)
571571
- else_if: "*[1][.='lg']"
572-
then: [{spell: "'lg'"}] # phrase(the 'lg' of x)
573-
- else_if: $ClearSpeak_Log = 'LnAsNaturalLog'
574-
then: [{T: "den naturlige logaritmen"}] # phrase(the 'natural log' of the product of 2 numbers)
575-
else: [{spell: "'ln'"}]
572+
then: [{spell: "'lg'"}, {T: "av"}] # phrase(the 'lg' of x)
573+
- else_if: $ClearSpeak_Log = 'LnAsNaturalLog' or $Verbosity='Verbose'
574+
then: [{T: "den naturlige logaritmen av"}] # phrase(the 'natural log' of the product of 2 numbers)
575+
else: [{spell: "'ln'"}, {T: "av"}]
576576
else:
577577
- test:
578578
- if: "*[1][.='log']"

Rules/Languages/nb/SharedRules/default.yaml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@
648648
- x: "*"
649649
- test:
650650
if: "not( IsBracketed(., '', '') or IsNode(*[last()], 'simple') )"
651-
then: [x: "GetBracketingIntentName(name(.), $Verbosity, 'prefix', 'end')"]
651+
then: [x: "SpeakBracketingIntentName(name(.), $Verbosity, 'prefix', 'end')"]
652652
- test:
653653
if: "IsNode(., '2D')"
654654
then: [pause: short]
@@ -661,19 +661,18 @@
661661
replace:
662662
- test:
663663
if: "$Impairment = 'Blindness' and not( IsBracketed(., '', '') or IsNode(*[1], 'simple') )"
664-
then: [x: "GetBracketingIntentName(name(.), $Verbosity, 'postfix', 'start')"]
664+
then: [x: "SpeakBracketingIntentName(name(.), $Verbosity, 'postfix', 'start')"]
665665
- x: "*"
666666
- x: "SpeakIntentName(name(.), $Verbosity, 'postfix')"
667667

668-
669668
- name: infix-intent
670669
# uncaught intent -- the args have been inserted in the order of speech
671670
tag: "*"
672671
match: "count(*)>0 and contains(@data-intent-property, ':infix:')"
673672
replace:
674673
- test:
675674
if: "$Impairment = 'Blindness' and not( IsBracketed(., '', '') or IsNode(*[1], 'simple') )"
676-
then: [x: "GetBracketingIntentName(name(.), $Verbosity, 'infix', 'start')"]
675+
then: [x: "SpeakBracketingIntentName(name(.), $Verbosity, 'infix', 'start')"]
677676
- test:
678677
if: "count(*) = 1" # in cases such as continued-row, plus/minus might have just one child
679678
then:
@@ -686,13 +685,12 @@
686685
replace: [x: "SpeakIntentName(name(.), $Verbosity, 'infix')", pause: auto]
687686
- test:
688687
if: "$Impairment = 'Blindness' and not( IsBracketed(., '', '') or IsNode(*[last()], 'simple') )"
689-
then: [x: "GetBracketingIntentName(name(.), $Verbosity, 'infix', 'end')"]
688+
then: [x: "SpeakBracketingIntentName(name(.), $Verbosity, 'infix', 'end')"]
690689
- test:
691690
if: "IsNode(., '2D')" # add (probably) a slightly longer pause if this came from a 2D node
692691
then: [pause: short]
693692
else: [pause: auto]
694693

695-
696694
- name: function-intent
697695
# uncaught intent -- speak as foo of arg1 comma arg2 .... The MathML spec requires arguments to functions
698696
tag: "*"
@@ -712,7 +710,7 @@
712710
# SWEDISH: After correspondence with a mathematician we have decided to not have any punctuation between variables, but a short pause. Length of pause needs to be tested.
713711
- test:
714712
if: "$Impairment = 'Blindness' and not(*[last()][IsBracketed(., '', '') or IsNode(., 'simple')] )"
715-
then: [x: "GetBracketingIntentName(name(.), $Verbosity, 'function', 'end')"]
713+
then: [x: "SpeakBracketingIntentName(name(.), $Verbosity, 'function', 'end')"]
716714
- test:
717715
if: "IsNode(., '2D')"
718716
then: [pause: short]

Rules/Languages/nb/SharedRules/general.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@
462462
- test:
463463
if: "$Verbosity='Terse'"
464464
then: [T: "exp"] # phrase('exp' means exponential function)
465-
else: [T: "eksponentialfunksjonen"] # phrase('exponential' function)
465+
else: [T: "eksponensialfunksjonen"] # phrase('exponential' function) #Norwegian: Spelled wrong for correct pronunciation
466466

467467
# NORWEGIAN: Added this rule from English version, but removed test for Verbosity.
468468
- name: covariance

Rules/Languages/nb/SimpleSpeak_Rules.yaml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -268,13 +268,12 @@
268268
- " self::m:square-root or self::m:msqrt or self::m:root or self::m:mroot or"
269269
- " (self::m:msub or self::m:msubsup or"
270270
- " ((self::m:msup or self::m:power) and not(IsNode(*[1], 'leaf') and *[2][self::m:mn and (.=2 or '.=3')]))) and " # followed by msup, etc.
271-
- " (*[1][self::m:mrow[IsBracketed(., '(', ')') or IsBracketed(., '[', ']') or IsBracketed(., '|', '|')] or "
272-
- " self::m:matrix or self::m:determinant] or" # base has parens
273-
- " not(IsNode(*[2], 'simple')) or "
274-
- " (self::m:msubsup and not(IsNode(*[3], 'simple')))"
275-
- " )"
276-
- " ]"
277-
# other possibility is the preceding element has parens (but not the following)
271+
- " (*[1][self::m:mrow[IsBracketed(., '(', ')') or IsBracketed(., '[', ']') or IsBracketed(., '|', '|')] or "
272+
- " self::m:matrix or self::m:determinant] or" # base has parens
273+
- " not(IsNode(*[2], 'simple')) or "
274+
- " (self::m:msubsup and not(IsNode(*[3], 'simple')))"
275+
- " )"
276+
- " ]" # other possibility is the preceding element has parens (but not the following)
278277
- " or "
279278
- " preceding-sibling::*[1]["
280279
- " IsBracketed(., '(', ')') or IsBracketed(., '[', ']') or IsBracketed(., '|', '|')]" # followed by parens

0 commit comments

Comments
 (0)