Skip to content

Commit 747fbca

Browse files
Changed placement of comment # audit-ignore
Removed # audit-ignore from rules that are similar in Norwegian and English. The comment is only added to rules that differ, but are reviewed.
1 parent c1f604c commit 747fbca

1 file changed

Lines changed: 11 additions & 31 deletions

File tree

‎Rules/Languages/nb/SimpleSpeak_Rules.yaml‎

Lines changed: 11 additions & 31 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')]"
@@ -14,15 +13,13 @@
1413
then: [pause: short]
1514
else: [pause: medium]
1615
- x: "."
17-
18-
# audit-ignore
16+
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(x 'minus' y)
3229
- x: "translate(text(), '-_', '')"
3330

34-
# audit-ignore
35-
- name: default
31+
- name: default # audit-ignore
3632
tag: square-root
3733
match: "."
3834
replace:
@@ -46,8 +42,7 @@
4642
then: [pause: short]
4743
else: [pause: short, T: "slutt rot", pause: short] # phrase(start the square root of x 'end of root')
4844

49-
# audit-ignore
50-
- name: default
45+
- name: default # audit-ignore
5146
tag: root
5247
match: "."
5348
replace:
@@ -71,11 +66,10 @@
7166
then: [pause: short]
7267
else: [pause: short, T: "slutt rot", pause: short] # phrase(start the fifth root of x 'end of root')
7368

74-
# audit-ignore
7569
# Fraction rules
7670
# Mixed numbers mostly "just work" because the invisible char reads as "and" and other parts read properly on their own
7771
# Note: if the bounds change for what is a common fraction, change them in general.yaml for units
78-
- name: common-fraction
72+
- name: common-fraction # audit-ignore
7973
tag: fraction
8074
match:
8175
- "*[1][self::m:mn][not(contains(., $DecimalSeparators)) and text()<20] and" # NORWEGIAN: Changed decimal point to $DecimalSeparators
@@ -122,10 +116,9 @@
122116
then: [x: "DefinitionValue(*[2], 'Speech', 'OrdinalFractionalDenominatorsForUnits')"]
123117
else: [x: "*[2]", CT: "dels"] # this is wrong but shouldn't occur normally -- need to write a function to compute cardinal numbers as words
124118

125-
# audit-ignore
126119
# Units (e.g., meters per second, m^2/s^2, (3m^2)/s)
127120
# NORWEGIAN: Added rule for t="time"
128-
- name: per-fraction
121+
- name: per-fraction # audit-ignore
129122
tag: fraction
130123
match:
131124
- "BaseNode(*[1])[contains(@data-intent-property, ':unit') or"
@@ -141,7 +134,6 @@
141134
else:
142135
- x: "*[2]"
143136

144-
# audit-ignore
145137
- name: simple
146138
# don't include nested fractions. E.g, fraction a plus b over c + 1 end fraction" is ambiguous
147139
# by simplistic SimpleSpeak's rules "b over c" is a fraction, but if we say nested fractions
@@ -156,8 +148,7 @@
156148
- x: "*[2]"
157149
- pause: short
158150

159-
# audit-ignore
160-
- name: default
151+
- name: default # audit-ignore
161152
tag: fraction
162153
match: "."
163154
replace:
@@ -176,7 +167,6 @@
176167
- T: "slutt brøk" # phrase(start 7 over 8 'end of fraction')
177168
- pause: medium
178169

179-
# audit-ignore
180170
# rules for functions raised to a power
181171
# these could have been written on 'mrow' but putting them on msup seems more specific
182172
# to see if it is a function, we look right to see if the following sibling is apply-function
@@ -187,7 +177,6 @@
187177
- T: "invers" # phrase(the 'inverse' of f)
188178
- x: "*[1]"
189179

190-
# audit-ignore
191180
- name: function-squared-or-cubed
192181
tag: power
193182
match:
@@ -201,7 +190,7 @@
201190
then: [T: "i andre"] # phrase(5 'squared' equals 25)
202191
else: [T: "i tredje"] # phrase(5 'cubed' equals 125)
203192

204-
# audit-ignore
193+
# The following element is invisible function application. Used for expressions like sin^n x.
205194
- name: function-power
206195
tag: power
207196
match:
@@ -213,7 +202,6 @@
213202
- x: "*[2]"
214203
- pause: short
215204

216-
# audit-ignore
217205
# non-function rules for power
218206
- name: squared-or-cubed
219207
tag: power
@@ -226,8 +214,7 @@
226214
then: [T: "i andre"] # phrase(5 'squared' equals 25)
227215
else: [T: "i tredje"] # phrase(5 'cubed' equals 125)
228216

229-
# audit-ignore
230-
- name: simple-integer
217+
- name: simple-integer # audit-ignore
231218
tag: power
232219
match: "*[2][self::m:mn][not(contains(., $DecimalSeparators))]" # NORWEGIAN: Changed decimal point to $DecimalSeparators
233220
replace:
@@ -236,8 +223,7 @@
236223
- x: "*[2]"
237224
- pause: short
238225

239-
# audit-ignore
240-
- name: simple-negative-integer
226+
- name: simple-negative-integer # audit-ignore
241227
tag: power
242228
match:
243229
- "*[2][self::m:minus and count(*)=1 and"
@@ -248,7 +234,6 @@
248234
- x: "*[2]"
249235
- pause: short
250236

251-
# audit-ignore
252237
- name: simple-var
253238
tag: power
254239
match: "*[2][self::m:mi][string-length(.)=1]"
@@ -258,7 +243,6 @@
258243
- x: "*[2]"
259244
- pause: short
260245

261-
# audit-ignore
262246
- name: simple
263247
tag: power
264248
match: "IsNode(*[2], 'leaf')"
@@ -268,8 +252,7 @@
268252
- x: "*[2]"
269253
- pause: short
270254

271-
# audit-ignore
272-
- name: nested
255+
- name: nested # audit-ignore
273256
# it won't end in "power" if the exponent is simple enough
274257
# FIX: not that important, but this misses the case where the nested exp is a negative integer (change test if this is fixed)
275258
# ending nested exponents with "...power power" sounds bad
@@ -297,8 +280,7 @@
297280

298281
#
299282
# Some rules on mrows
300-
# audit-ignore
301-
- name: set
283+
- name: set # audit-ignore
302284
tag: set
303285
match: "."
304286
replace:
@@ -316,7 +298,6 @@
316298
- T: "mengden" # phrase(here is a 'set' of numbers)
317299
- x: "*[1]"
318300

319-
# audit-ignore
320301
# NORWEGIAN: Added sqrt, so it, for example, says "sqrt a times sqrt b"
321302
- name: times
322303
tag: mo
@@ -346,7 +327,6 @@
346327
replace:
347328
- T: "ganger" # phrase(7 'times' 5 equals 35)
348329

349-
# audit-ignore
350330
- name: no-say-parens
351331
tag: mrow
352332
match:

0 commit comments

Comments
 (0)