Skip to content

Commit b5aaa0e

Browse files
Minor clean-ups
- Some corrections in unicode-full - Removing some spaces in ClearSpeak
1 parent bfc16ba commit b5aaa0e

File tree

2 files changed

+28
-29
lines changed

2 files changed

+28
-29
lines changed

Rules/Languages/nb/ClearSpeak_Rules.yaml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
- if: "*[2][.='2']"
7676
then: [T: "kvadratroten"] # phrase(5 is the 'square root' of 25)
7777
- else_if: "*[2][.='3']"
78-
then: [T: "kubikkroten"] # phrase(5 is the 'cube root' of 625)
78+
then: [T: "kubikkroten"] # phrase(5 is the 'cube root' of 625)
7979
- else: [x: "ToOrdinal(*[2])", T: "roten"] # phrase(the square 'root' of 25)
8080
else:
8181
- T: "roten av grad" # phrase(the square 'root' of 36)
@@ -117,7 +117,7 @@
117117
# Mixed numbers mostly "just work" because the invisible char reads as "and" and other parts read properly on their own
118118

119119
# Units (e.g., meters per second)
120-
#NORWEGIAN: Added rule for t="time"
120+
# NORWEGIAN: Added rule for t="time"
121121
- name: per-fraction
122122
tag: fraction
123123
match:
@@ -139,20 +139,20 @@
139139
tag: fraction
140140
match:
141141
- "($ClearSpeak_Fractions='Auto' or $ClearSpeak_Fractions='Ordinal' or $ClearSpeak_Fractions='EndFrac') and"
142-
- "*[1][self::m:mn][not(contains(., $DecimalSeparators)) and ($ClearSpeak_Fractions='Ordinal' or text()<20)] and" #NORWEGIAN: Changed decimal point to $DecimalSeparators
143-
- "*[2][self::m:mn][not(contains(., $DecimalSeparators)) and (2<= text() and text()<=10)]" #NORWEGIAN: Removed $ClearSpeak_Fractions='Ordinal', cause the pattern for ordinal fractions is not right.
142+
- "*[1][self::m:mn][not(contains(., $DecimalSeparators)) and ($ClearSpeak_Fractions='Ordinal' or text()<20)] and" #NORWEGIAN: Changed decimal point to $DecimalSeparators
143+
- "*[2][self::m:mn][not(contains(., $DecimalSeparators)) and (2<= text() and text()<=10)]" #NORWEGIAN: Removed $ClearSpeak_Fractions='Ordinal', cause the pattern for ordinal fractions is not right.
144144
variables: [IsPlural: "*[1]!=1"]
145145
replace:
146-
- x: "*[1]"
146+
- x: "*[1]"
147147
- x: "ToOrdinal(*[2], true(), $IsPlural)" # extra args specify fractional ordinal and whether it is plural
148148

149149
- name: common-fraction-mixed-number
150150
tag: fraction
151151
match:
152152
- "preceding-sibling::*[1][self::m:mo][.='⁤'] and" # preceding element is invisible plus
153153
- "($ClearSpeak_Fractions='Auto' or $ClearSpeak_Fractions='Ordinal' or $ClearSpeak_Fractions='EndFrac') and"
154-
- "*[1][self::m:mn][not(contains(., $DecimalSeparators)) and ($ClearSpeak_Fractions='Ordinal' or text()<20)] and" #NORWEGIAN: Changed decimal point to $DecimalSeparators
155-
- "*[2][self::m:mn][not(contains(., $DecimalSeparators)) and (2<= text() and text()<=10)]" #NORWEGIAN: Removed $ClearSpeak_Fractions='Ordinal', cause the pattern for ordinal fractions is not right.
154+
- "*[1][self::m:mn][not(contains(., $DecimalSeparators)) and ($ClearSpeak_Fractions='Ordinal' or text()<20)] and" #NORWEGIAN: Changed decimal point to $DecimalSeparators
155+
- "*[2][self::m:mn][not(contains(., $DecimalSeparators)) and (2<= text() and text()<=10)]" #NORWEGIAN: Removed $ClearSpeak_Fractions='Ordinal', cause the pattern for ordinal fractions is not right.
156156
variables: [IsPlural: "*[1]!=1"]
157157
replace:
158158
- x: "*[1]"
@@ -354,7 +354,6 @@
354354
# but the test cases all fall back to "raised to the exponent" when not "Auto"
355355
# If these are allowed for non-Auto values, then you end up with "...power power...".
356356
- # [xxx]^n
357-
358357
name: nested-squared-or-cubed
359358
tag: power
360359
match:
@@ -770,7 +769,7 @@
770769
- "not( $ClearSpeak_ImpliedTimes = 'None' and "
771770
- " (preceding-sibling::*[1][.='⁢'] or following-sibling::*[1][.='⁢']) ) and "
772771
- "IsNode(*[2], 'simple') and"
773-
- "not(preceding-sibling::*[1][.='\u2062' and @data-function-guess]) and"
772+
- "not(preceding-sibling::*[1][.='\u2062' and @data-function-guess]) and"
774773
- "not(ancestor-or-self::*[contains(@data-intent-property, ':literal:')])"
775774
# missing clause: 'a positive fraction that is spoken as an ordinal
776775
# (either by the Ordinal preference or by the default rules)'

Rules/Languages/nb/unicode-full.yaml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
- "ʴ": [T: "med liten rotert r etter"] # 0x2b4 (en: 'modifier small turned r', google translation)
5050
- "ʵ": [T: "med liten rotert r med krok etter"] # 0x2b5 (en: 'modifier small turned r with hook', google translation)
5151
- "ʶ": # 0x2b6
52-
- T: "med liten rotert R etter" # (en: 'modifier small inverted', google translation)
52+
- T: "med liten rotert" # (en: 'modifier small inverted', google translation)
5353
- spell: "translate('R', 'R', 'R')"
5454
- "ʷ": [T: "med liten w etter"] # 0x2b7 (en: 'modifier small w', google translation)
5555
- "ʸ": [T: "med liten y etter"] # 0x2b8 (en: 'modifier small y', google translation)
@@ -1200,7 +1200,7 @@
12001200
# SWEDISH: misspelled to fix pronunciation
12011201
- "": [T: "snitt"] # 0x22c2 (en: 'intersection')
12021202
- "": [T: "union"] # 0x22c3
1203-
- "": [T: "diamant-operatør"] # 0x22c4
1203+
- "": [T: "diamant-operator"] # 0x22c4
12041204
- "": # 0x22c5
12051205
- test:
12061206
if: "@data-chem-formula-op"
@@ -1760,7 +1760,7 @@
17601760
- "": [T: "stiplet høyrepil"] # 0x290d (en: 'rightwards double dash arrow')
17611761
- "": [T: "stiplet venstrepil"] # 0x290e (en: 'leftwards triple dash arrow')
17621762
- "": [T: "stiplet høyrepil"] # 0x290f (en: 'rightwards triple dash arrow')
1763-
- "": [T: "stiplet høyrepil med tre pisser"] # 0x2910 (en: 'rightwards two headed triple dash arrow')
1763+
- "": [T: "stiplet høyrepil med to spisser"] # 0x2910 (en: 'rightwards two headed triple dash arrow')
17641764
- "": [T: "prikket høyrepil"] # 0x2911 (en: 'rightwards arrow with dotted stem')
17651765
- "": [T: "oppoverpil mot strek"] # 0x2912
17661766
- "": [T: "nedoverpil mot strek"] # 0x2913
@@ -2026,7 +2026,7 @@
20262026
- "": [T: "linjeintegral med rektangulær vei rundt pol"] # 0x2a12 (en: 'line integration with rectangular path around pole')
20272027
- "": [T: "linjeintegral med halvsirkel-vei rundt pol"] # 0x2a13 (en: 'line integration with semicircular path around pole')
20282028
- "": [T: "linjeintegral eksklusiv polen"] # 0x2a14 (en: 'line integration not including the pole', MathPlayer: 'line integration not including the pole', google: 'linjeintegration inkluderar inte polen')
2029-
- "": [T: "integral rundt punkt-operator"] # 0x2a15
2029+
- "": [T: "integral rund punkt-operator"] # 0x2a15
20302030
- "": [T: "integral med firkant"] # 0x2a16
20312031
- "": [T: "integral med venstrepil med krok"] # 0x2a17 (en: 'integral with leftwards arrow with hook')
20322032
- "": [T: "integral med multiplikasjonstegn"] # 0x2a18 (en: 'integral with times sign', google: 'integrerad med times sign')
@@ -2476,34 +2476,34 @@
24762476
- "": [T: "kvadratdesimeter"] # 0x3378 (en: 'decimeters squared', google translation)
24772477
- "": [T: "kubikkdesimeter"] # 0x3379 (en: 'decimeters cubed', google translation)
24782478
- "": [T: "kvadratisk I U"] # 0x337a (en: 'instrumental units', google translation)
2479-
- "": [T: "piko-ampere"] # 0x3380 (google translation) #More likely to be pronounced correctly with a hyphen
2479+
- "": [T: "piko-ampere"] # 0x3380 (google translation) #NORWEGIAN: More likely to be pronounced correctly with a hyphen
24802480
- "": [T: "nanoampere"] # 0x3381 (google translation)
24812481
- "": [T: "mikroampere"] # 0x3382 (google translation)
24822482
- "": [T: "milliampere"] # 0x3383 (google translation)
24832483
- "": [T: "kiloampere"] # 0x3384 (google translation)
24842484
- "": [T: "kilobyte"] # 0x3385 (google translation)
2485-
- "": [T: "mega-byte"] # 0x3386 (en: 'megabytes', google translation) #More likely to be pronounced correctly with a hyphen
2485+
- "": [T: "mega-byte"] # 0x3386 (en: 'megabytes', google translation) #NORWEGIAN: More likely to be pronounced correctly with a hyphen
24862486
- "": [T: "gigabyte"] # 0x3387 (en: 'gigabytes', google translation)
24872487
- "": [T: "kalorier"] # 0x3388 (en: 'calories', google translation)
24882488
- "": [T: "kilokalorier"] # 0x3389 (en: 'kilocalories', google translation)
2489-
- "": [T: "piko-farad"] # 0x338a (google translation) #More likely to be pronounced correctly with a hyphen
2490-
- "": [T: "nano-farad"] # 0x338b (google translation) #More likely to be pronounced correctly with a hyphen
2489+
- "": [T: "piko-farad"] # 0x338a (google translation) #NORWEGIAN: More likely to be pronounced correctly with a hyphen
2490+
- "": [T: "nano-farad"] # 0x338b (google translation) #NORWEGIAN: More likely to be pronounced correctly with a hyphen
24912491
- "": [T: "mikrofarad"] # 0x338c (google translation)
2492-
- "": [T: "mikro-gram"] # 0x338d (en: 'micrograms', google translation) #More likely to be pronounced correctly with a hyphen
2492+
- "": [T: "mikro-gram"] # 0x338d (en: 'micrograms', google translation) #NORWEGIAN: More likely to be pronounced correctly with a hyphen
24932493
- "": [T: "milligram"] # 0x338e (google translation)
24942494
- "": [T: "kilogram"] # 0x338f (en: 'kilograms', google translation)
24952495
- "": [T: "hertz"] # 0x3390 (google translation)
24962496
- "": [T: "kilohertz"] # 0x3391 (google translation)
24972497
- "": [T: "megahertz"] # 0x3392 (google translation)
24982498
- "": [T: "gigahertz"] # 0x3393 (google translation)
2499-
- "": [T: "tera-hertz"] # 0x3394 (google translation) #More likely to be pronounced correctly with a hyphen
2499+
- "": [T: "tera-hertz"] # 0x3394 (google translation) #NORWEGIAN: More likely to be pronounced correctly with a hyphen
25002500
- "": [T: "mikroliter"] # 0x3395 (google translation)
25012501
- "": [T: "milliliter"] # 0x3396 (google translation)
25022502
- "": [T: "desiliter"] # 0x3397 (google translation)
25032503
- "": [T: "kiloliter"] # 0x3398 (en: 'kiloliters', google translation)
2504-
- "": [T: "femto-meter"] # 0x3399 (en: 'femtometers', google translation) #More likely to be pronounced correctly with a hyphen
2504+
- "": [T: "femto-meter"] # 0x3399 (en: 'femtometers', google translation) #NORWEGIAN: More likely to be pronounced correctly with a hyphen
25052505
- "": [T: "nanometer"] # 0x339a (en: 'nanometers', google translation)
2506-
- "": [T: "mikro-meter"] # 0x339b (en: 'micrometers', google translation) #More likely to be pronounced correctly with a hyphen
2506+
- "": [T: "mikro-meter"] # 0x339b (en: 'micrometers', google translation) #NORWEGIAN: More likely to be pronounced correctly with a hyphen
25072507
- "": [T: "millimeter"] # 0x339c (en: 'millimeters', google translation)
25082508
- "": [T: "centimeter"] # 0x339d (en: 'centimeters', google translation)
25092509
- "": [T: "kilometer"] # 0x339e (en: 'kilometers', google translation)
@@ -2520,29 +2520,29 @@
25202520
- "": [T: "pascal"] # 0x33a9 (google translation)
25212521
- "": [T: "kilopascal"] # 0x33aa (google translation)
25222522
- "": [T: "megapascal"] # 0x33ab (google translation)
2523-
- "": [T: "giga-pascal"] # 0x33ac (google translation) #More likely to be pronounced correctly with a hyphen
2523+
- "": [T: "giga-pascal"] # 0x33ac (google translation) #NORWEGIAN: More likely to be pronounced correctly with a hyphen
25242524
- "": [T: "radianer"] # 0x33ad (google translation)
25252525
- "": [T: "radianer per sekund"] # 0x33ae (en: 'rads per second', google translation)
25262526
- "": [T: "radianer per sekund i andre"] # 0x33af (en: 'rads per second squared', google translation)
2527-
- "": [T: "piko-sekunder"] # 0x33b0 (en: 'picoseconds', google translation) #More likely to be pronounced correctly with a hyphen
2527+
- "": [T: "piko-sekunder"] # 0x33b0 (en: 'picoseconds', google translation) #NORWEGIAN: More likely to be pronounced correctly with a hyphen
25282528
- "": [T: "nanosekunder"] # 0x33b1 (en: 'nanoseconds', google translation)
25292529
- "": [T: "mikrosekunder"] # 0x33b2 (en: 'microseconds', google translation)
25302530
- "": [T: "millisekunder"] # 0x33b3 (en: 'milliseconds', google translation)
2531-
- "": [T: "piko-volt"] # 0x33b4 (google translation) #More likely to be pronounced correctly with a hyphen
2531+
- "": [T: "piko-volt"] # 0x33b4 (google translation) #NORWEGIAN: More likely to be pronounced correctly with a hyphen
25322532
- "": [T: "nanovolt"] # 0x33b5 (google translation)
25332533
- "": [T: "mikrovolt"] # 0x33b6 (google translation)
25342534
- "": [T: "millivolt"] # 0x33b7 (google translation)
25352535
- "": [T: "kilovolt"] # 0x33b8 (google translation)
25362536
- "": [T: "megavolt"] # 0x33b9 (google translation)
2537-
- "": [T: "piko-watt"] # 0x33ba (google translation) #More likely to be pronounced correctly with a hyphen
2538-
- "": [T: "nano-watt"] # 0x33bb (google translation) #More likely to be pronounced correctly with a hyphen
2537+
- "": [T: "piko-watt"] # 0x33ba (google translation) #NORWEGIAN: More likely to be pronounced correctly with a hyphen
2538+
- "": [T: "nano-watt"] # 0x33bb (google translation) #NORWEGIAN: More likely to be pronounced correctly with a hyphen
25392539
- "": [T: "mikrowatt"] # 0x33bc (en: 'microwatts', google translation)
25402540
- "": [T: "milliwatt"] # 0x33bd (google translation)
25412541
- "": [T: "kilowatt"] # 0x33be (google translation)
2542-
- "": [T: "mega-watt"] # 0x33bf (google translation) #More likely to be pronounced correctly with a hyphen
2542+
- "": [T: "mega-watt"] # 0x33bf (google translation) #NORWEGIAN: More likely to be pronounced correctly with a hyphen
25432543
- "": [T: "kiloohm"] # 0x33c0 (google translation)
25442544
- "": [T: "megaohm"] # 0x33c1 (google translation)
2545-
- "": [T: "atto-meter"] # 0x33c2 (en: 'attometers', google translation) #More likely to be pronounced correctly with a hyphen
2545+
- "": [T: "atto-meter"] # 0x33c2 (en: 'attometers', google translation) #NORWEGIAN: More likely to be pronounced correctly with a hyphen
25462546
- "": [T: "becquerel"] # 0x33c3 (google translation)
25472547
- "": [T: "kubikkcentimeter"] # 0x33c4 (en: 'cubic centimeters', google translation)
25482548
- "": [T: "candela"] # 0x33c5 (google translation)
@@ -2564,7 +2564,7 @@
25642564
- "": [T: "mill"] # 0x33d5 (google translation)
25652565
- "": [T: "mol"] # 0x33d6 (en: 'moles', google translation)
25662566
- "": [T: "p h"] # 0x33d7 (google translation)
2567-
- "": [T: "piko-meter"] # 0x33d8 (en: 'picometers', google translation) #More likely to be pronounced correctly with a hyphen
2567+
- "": [T: "piko-meter"] # 0x33d8 (en: 'picometers', google translation) #NORWEGIAN: More likely to be pronounced correctly with a hyphen
25682568
- "": [T: "milliondeler"] # 0x33d9 (en: 'parts per million', google translation)
25692569
- "": [T: "petarøntgen"] # 0x33da (google translation)
25702570
- "": [T: "steradianer"] # 0x33db (google translation)

0 commit comments

Comments
 (0)