You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Upon deeper testing of fractions and units in Swedish it was found that the number 1 was erroneously spoken as neuter gendered ("ett" rather than "en"). This fix solves all cases except when there is a mixed fraction followed by a unit (e.g. 1 1/3 m should read "en och en tredjedels meter" but is currently read "ett och en tredjedels meter"), which I can't figure out how to fix.
Copy file name to clipboardExpand all lines: Rules/Languages/sv/SimpleSpeak_Rules.yaml
+21-11Lines changed: 21 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -59,11 +59,14 @@
59
59
- name: common-fraction
60
60
tag: fraction
61
61
match:
62
-
- "*[1][self::m:mn][not(contains(., $DecimalSeparators)) and text()<20] and"#NORWEGIAN: Changed decimal point to $DecimalSeparators
63
-
- "*[2][self::m:mn][not(contains(., $DecimalSeparators)) and 2<= text() and text()<=10]"
62
+
- "($ClearSpeak_Fractions='Auto' or $ClearSpeak_Fractions='Ordinal' or $ClearSpeak_Fractions='EndFrac') and"
63
+
- "*[1][self::m:mn][not(contains(., $DecimalSeparators)) and ($ClearSpeak_Fractions='Ordinal' or text()<20)] and"#NORWEGIAN: Changed decimal point to $DecimalSeparators
64
+
- "*[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.
64
65
variables:
65
-
- IsPlural: "not(*[1]=1 or preceding-sibling::*[1][self::m:mo and .='\u2064'])"# '\u2064' is invisible plus and is used in mixed fractions
test_prefs("sv","ClearSpeak",vec![("ClearSpeak_Fractions","Auto")], expr,", division, 1 halv genom 2 tredjedelar, slut division")?;
157
-
test_prefs("sv","ClearSpeak",vec![("ClearSpeak_Fractions","Ordinal")], expr,", division, 1 halv genom 2 tredjedelar, slut division")?;
156
+
test_prefs("sv","ClearSpeak",vec![("ClearSpeak_Fractions","Auto")], expr,", division, en halv genom 2 tredjedelar, slut division")?;
157
+
test_prefs("sv","ClearSpeak",vec![("ClearSpeak_Fractions","Ordinal")], expr,", division, en halv genom 2 tredjedelar, slut division")?;
158
158
test_prefs("sv","ClearSpeak",vec![("ClearSpeak_Fractions","Over")], expr,", division; bråk, 1 genom 2, slut bråk, genom, bråk, 2 genom 3, slut bråk; slut division")?;
"division med täljaren division med täljaren 1; och nämnaren 2; slut division; och nämnaren division med täljaren 2; och nämnaren 3; slut division; slut division")?;
test_prefs("sv","ClearSpeak",vec![("Verbosity","Medium"),("ClearSpeak_Exponents","Auto")], expr,"e upphöjt till minus 1 halv x kvadrat")?;
253
-
test_prefs("sv","ClearSpeak",vec![("Verbosity","Medium"),("ClearSpeak_Exponents","OrdinalPower")], expr,"e upphöjt till exponenten, minus 1 halv x upphöjt till 2; slut exponent")?;
254
-
test_prefs("sv","ClearSpeak",vec![("Verbosity","Medium"),("ClearSpeak_Exponents","AfterPower")], expr,"e upphöjt till exponenten, minus 1 halv x upphöjt till 2; slut exponent")?;
252
+
test_prefs("sv","ClearSpeak",vec![("Verbosity","Medium"),("ClearSpeak_Exponents","Auto")], expr,"e upphöjt till minus en halv x kvadrat")?;
253
+
test_prefs("sv","ClearSpeak",vec![("Verbosity","Medium"),("ClearSpeak_Exponents","OrdinalPower")], expr,"e upphöjt till exponenten, minus en halv x upphöjt till 2; slut exponent")?;
254
+
test_prefs("sv","ClearSpeak",vec![("Verbosity","Medium"),("ClearSpeak_Exponents","AfterPower")], expr,"e upphöjt till exponenten, minus en halv x upphöjt till 2; slut exponent")?;
"e upphöjt till exponenten, minus 1 halv gånger; vänster-parentes; division med täljaren; x minus my; och nämnaren sigma; höger-parentes kvadrat, slut exponent")?;
356
+
"e upphöjt till exponenten, minus en halv gånger; vänster-parentes; division med täljaren; x minus my; och nämnaren sigma; höger-parentes kvadrat, slut exponent")?;
"e upphöjt till exponenten, minus 1 halv gånger; vänster-parentes; division med täljaren; x minus my; och nämnaren sigma; höger-parentes upphöjt till 2; slut exponent")?;
358
+
"e upphöjt till exponenten, minus en halv gånger; vänster-parentes; division med täljaren; x minus my; och nämnaren sigma; höger-parentes upphöjt till 2; slut exponent")?;
"e upphöjt till exponenten, minus 1 halv gånger; vänster-parentes; division med täljaren; x minus my; och nämnaren sigma; höger-parentes upphöjt till 2; slut exponent")?;
360
+
"e upphöjt till exponenten, minus en halv gånger; vänster-parentes; division med täljaren; x minus my; och nämnaren sigma; höger-parentes upphöjt till 2; slut exponent")?;
"e upphöjt till exponenten, minus 1 halv gånger; vänster-parentes; division med täljaren; x minus my; och nämnaren sigma; höger-parentes upphöjt till 2; slut exponent")?;
362
+
"e upphöjt till exponenten, minus en halv gånger; vänster-parentes; division med täljaren; x minus my; och nämnaren sigma; höger-parentes upphöjt till 2; slut exponent")?;
test("sv","SimpleSpeak", expr,"e upphöjt till minus 1 halv gånger; vänster-parentes; division, x minus my, genom sigma, slut division; höger-parentes kvadrat")?;
358
+
test("sv","SimpleSpeak", expr,"e upphöjt till minus en halv gånger; vänster-parentes; division, x minus my, genom sigma, slut division; höger-parentes kvadrat")?;
0 commit comments