Skip to content

Commit 8483622

Browse files
Changed placement of comment # audit-ignore
- Removed # audit-ignore for rules that are similar in Norwegian and English. The comment is only added to rules that differ, but are reviewed. - Rules for powers might need some changes. Made comments to remember that. - The rule for`ClearSpeak-multi-line` might need some changes. Made a comment to remember that.
1 parent 747fbca commit 8483622

1 file changed

Lines changed: 17 additions & 35 deletions

File tree

‎Rules/Languages/nb/ClearSpeak_Rules.yaml‎

Lines changed: 17 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
---
2-
# audit-ignore
32
- name: pause
43
tag: "!*"
54
match: "not(self::m:math) and not($MatchingPause) and @data-intent-property[contains(., ':pause')]"
@@ -15,14 +14,12 @@
1514
else: [pause: medium]
1615
- x: "."
1716

18-
# audit-ignore
1917
- name: intent-literal-silent
2018
tag: [mi, mo, mn]
2119
match: "contains(@data-intent-property, ':silent:')"
2220
# say nothing
2321
replace: []
2422

25-
# audit-ignore
2623
# handling of negative numbers that come from 'intent' is hard -- we do something that is close to right here
2724
- name: intent-literal-negative-number
2825
tag: mn
@@ -31,8 +28,7 @@
3128
- T: "minus" # phrase(10 'minus' 4 equals 6)
3229
- x: "translate(text(), '-_', '')"
3330

34-
# audit-ignore
35-
- name: default
31+
- name: default #audit-ignore
3632
tag: square-root
3733
match: "."
3834
replace:
@@ -59,8 +55,7 @@
5955
then: [pause: short]
6056
else: [pause: long]
6157

62-
# audit-ignore
63-
- name: default
58+
- name: default # audit-ignore
6459
tag: root
6560
match: "."
6661
replace:
@@ -100,7 +95,6 @@
10095
then: [pause: short]
10196
else: [pause: long]
10297

103-
# audit-ignore
10498
# The 'negative' rule interacts with the msqrt/mroot rules as those might pick off this case ("the negative square root of x")
10599
- name: negative_and_positive
106100
tag: [plus, minus]
@@ -122,10 +116,9 @@
122116
# Fraction rules
123117
# Mixed numbers mostly "just work" because the invisible char reads as "and" and other parts read properly on their own
124118

125-
# audit-ignore
126119
# Units (e.g., meters per second)
127120
# NORWEGIAN: Added rule for t="time"
128-
- name: per-fraction
121+
- name: per-fraction # audit-ignore
129122
tag: fraction
130123
match:
131124
- "$ClearSpeak_Fractions='Per' or"
@@ -142,9 +135,8 @@
142135
else:
143136
- x: "*[2]"
144137

145-
# audit-ignore
146138
# Note: if the bounds change for what is a common fraction, change them in general.yaml for units
147-
- name: common-fraction
139+
- name: common-fraction # audit-ignore
148140
tag: fraction
149141
match:
150142
- "($ClearSpeak_Fractions='Auto' or $ClearSpeak_Fractions='Ordinal' or $ClearSpeak_Fractions='EndFrac') and"
@@ -194,9 +186,8 @@
194186
then: [x: "DefinitionValue(*[2], 'Speech', 'OrdinalFractionalDenominatorsForUnits')"]
195187
else: [x: "*[2]", CT: "dels"] # this is wrong but shouldn't occur normally -- need to write a function to compute cardinal numbers as words
196188

197-
# audit-ignore
198189
# NORWEGIAN: Changed to English version, but changed decimal point to $DecimalSeparators
199-
- name: fraction-over-simple
190+
- name: fraction-over-simple # audit-ignore
200191
tag: fraction
201192
match:
202193
- "($ClearSpeak_Fractions='Over' or $ClearSpeak_Fractions='FracOver' or $ClearSpeak_Fractions='OverEndFrac') or"
@@ -221,7 +212,6 @@
221212
- T: "slutt brøk" # phrase(7 over 8 'end fraction')
222213
- pause: short
223214

224-
# audit-ignore
225215
- # fraction with text or numbers followed by text in both numerator and denominator
226216
name: fraction-over-text
227217
tag: fraction
@@ -251,7 +241,6 @@
251241
- T: "slutt brøk" # phrase(7 over 8 'end fraction')
252242
- pause: short
253243

254-
# audit-ignore
255244
# NORWEGIAN: Changed to English version
256245
- name: default
257246
tag: fraction
@@ -273,7 +262,6 @@
273262
- T: "slutt brøk" # phrase(the fraction with 3 over 4 'end fraction')
274263
- pause: short
275264

276-
# audit-ignore
277265
# rules for functions raised to a power
278266
# these could have been written on 'mrow' but putting them on msup seems more specific
279267
# to see if it is a function, we look right to see if the following sibling is apply-function
@@ -289,7 +277,6 @@
289277
then: [bookmark: "*[2]/@id", T: "arcus", x: "*[1]"] # phrase(the 'buelenge' of a circle)
290278
else: [bookmark: "*[2]/@id", T: "invers", x: "*[1]"] # default/Auto # phrase(8 over 5 is the 'inverse' of 5 over 8)
291279

292-
# audit-ignore
293280
- name: function-squared-or-cubed
294281
tag: power
295282
match:
@@ -303,6 +290,7 @@
303290
then: [T: "i andre"] # phrase(25 equals 5 'squared')
304291
else: [T: "i tredje"] # phrase(625 equals 5 'cubed')
305292

293+
# The following element is invisible function application. Used for expressions like sin^n x.
306294
- name: function-power
307295
tag: power
308296
match:
@@ -394,6 +382,7 @@
394382
# but the test cases all fall back to "raised to the exponent" when not "Auto"
395383
# If these are allowed for non-Auto values, then you end up with "...power power...".
396384
- # [xxx]^n
385+
# Norwegian: Consider to find a word similar to "power".
397386
name: nested-squared-or-cubed
398387
tag: power
399388
match:
@@ -412,6 +401,7 @@
412401
- x: "*[2]"
413402

414403
- # - [xxx]^n
404+
# Norwegian: Consider to find a word similar to "power".
415405
name: nested-negative-squared-or-cubed
416406
tag: power
417407
match:
@@ -432,6 +422,7 @@
432422
- x: "*[2]"
433423

434424
- # [xxx] var^n
425+
# Norwegian: Consider to find a word similar to "power".
435426
name: nested-var-squared-or-cubed
436427
tag: power
437428
match:
@@ -454,6 +445,7 @@
454445
- x: "*[2]"
455446

456447
- # -[xxx] var^n
448+
# Norwegian: Consider to find a word similar to "power".
457449
name: nested-negative-var-squared-or-cubed
458450
tag: power
459451
match:
@@ -489,6 +481,7 @@
489481
- pause: short
490482
- T: "slutt eksponent" # phrase(and now 'end exponent' has been reached)
491483

484+
# Norwegian: Consider to find a word similar to "power".
492485
- name: default
493486
tag: power
494487
match: "."
@@ -500,9 +493,8 @@
500493
#
501494
# Some rules on mrows
502495
#
503-
# audit-ignore
504496
- # the inference rules lump absolute value and cardinality together, so those rules are implemented here
505-
name: ClearSpeak-absolute-value
497+
name: ClearSpeak-absolute-value # audit-ignore
506498
tag: absolute-value
507499
match: "."
508500
# SWEDISH/NORWEGIAN: Differentiate between the initial and ending declaration of the terms.
@@ -521,8 +513,7 @@
521513
- x: "$EndToSay"
522514
- pause: short
523515

524-
# audit-ignore
525-
- name: set
516+
- name: set # audit-ignore
526517
tag: set
527518
match: "."
528519
replace:
@@ -559,8 +550,7 @@
559550

560551
# SWEDISH/NORWEGIAN: rewrote the intervals function to better deal with Swedish/Norwegian convention of speaking intervals
561552
# NORWEGIAN: Removed test for verbosity, cause you should always say "det åpne" etc.
562-
# audit-ignore
563-
- name: ClearSpeak-intervals # avoid overriding with default "intervals" name
553+
- name: ClearSpeak-intervals # avoid overriding with default "intervals" name # audit-ignore
564554
variables:
565555
- is_intervals_start_infinity: "*[1][self::m:minus and count(*)=1 and *[1][.='∞']]"
566556
- is_intervals_end_infinity: "*[2][.='∞'or (self::m:plus and count(*)=1 and *[1][.='∞'])]"
@@ -585,7 +575,6 @@
585575
then: [T: "og med"]
586576
- x: "*[2]"
587577

588-
# audit-ignore
589578
- name: binomial-frac-vector
590579
tag: matrix
591580
match:
@@ -596,7 +585,6 @@
596585
- T: "over" # phrase(the binomial coefficient n 'choose' m)
597586
- x: "*[2]/*[1]/*"
598587

599-
# audit-ignore
600588
- name: ClearSpeak-default
601589
tag: [mtr, mlabeledtr]
602590
match: "parent::m:matrix or parent::m:determinant"
@@ -618,7 +606,7 @@
618606
else: [x: "*"]
619607

620608
- # handle both log and ln
621-
name: ClearSpeak-log
609+
name: ClearSpeak-log # audit-ignore
622610
tag: mi
623611
variables: [log_is_simple: "IsNode(following-sibling::*[2],'simple')"] # skip function apply
624612
match: ".='log' or .='ln' or .='lg'"
@@ -653,8 +641,7 @@
653641
then: [T: "den naturlige logaritmen"] # phrase(the 'natural log' of x)
654642
else: [SPELL: "'ln'"]
655643

656-
# audit-ignore
657-
# NORWEGIAN: Changed to English version
644+
# Norwegian: The preference MultiLineLabel = none is handled differently than it is for English.
658645
- name: ClearSpeak-multi-line
659646
tag: [piecewise, system-of-equations, lines] # these are ignored in favor of the ClearSpeak prefs
660647
match: "."
@@ -708,7 +695,6 @@
708695
- pause: short
709696
- x: "*"
710697

711-
# audit-ignore
712698
# NORWEGIAN: Changed from Swedish to English version
713699
- name: ClearSpeak-default-multiline
714700
tag: [mtr, mlabeledtr]
@@ -749,8 +735,7 @@
749735
then: [x: "*[position()>1]"]
750736
else: [x: "*"]
751737

752-
# audit-ignore
753-
- name: ClearSpeak_Functions_None
738+
- name: ClearSpeak_Functions_None # audit-ignore
754739
tag: mo
755740
match:
756741
- ".='⁡' and $ClearSpeak_Functions = 'None' and"
@@ -761,7 +746,6 @@
761746
then: [T: ""]
762747
else: [T: "ganger"] # phrase(5 'times' 3 equals 15)
763748

764-
# audit-ignore
765749
- name: no-times
766750
tag: mo
767751
match:
@@ -770,7 +754,6 @@
770754
replace:
771755
- T: ""
772756

773-
# audit-ignore
774757
# NORWEGIAN: Changed to English version
775758
- name: ClearSpeak-times
776759
tag: mo
@@ -803,7 +786,6 @@
803786
replace:
804787
- T: "ganger" # phrase(5 'times' 3 equals 15)
805788

806-
# audit-ignore
807789
- name: no-say-parens
808790
tag: mrow
809791
match:

0 commit comments

Comments
 (0)