Skip to content
Open
12 changes: 11 additions & 1 deletion mathmaps/base/rules/clearspeak_base.json
Original file line number Diff line number Diff line change
Expand Up @@ -2748,12 +2748,22 @@
"self::overscore",
"children/*[2][@role=\"overaccent\"]"
],
[
"Precondition",
"overunderscript",
"default",
"self::overscore",
"children/*[2][@role!=\"overaccent\"]",
"name(children/*[1])=\"underscore\"",
"children/*[1]/children/*[2][@role!=\"underaccent\"]"
],
[
"Precondition",
"overscript-limits",
"default",
"self::overscore",
"children/*[2][@role!=\"overaccent\"]",
"name(children/*[1])=\"operator\" or name(children/*[1])=\"relation\"",
"name(children/*[1])=\"underscore\"",
"children/*[1]/children/*[2][@role!=\"underaccent\"]"
],
Expand All @@ -2768,7 +2778,7 @@
"underscript-limits",
"default",
"self::underscore",
"@role=\"underover\"",
"name(children/*[1])=\"operator\" or name(children/*[1])=\"relation\"",
"children/*[2][@role!=\"underaccent\"]"
],
[
Expand Down
15 changes: 10 additions & 5 deletions mathmaps/en/rules/clearspeak_english_actions.json
Original file line number Diff line number Diff line change
Expand Up @@ -992,7 +992,7 @@
[
"Action",
"limboth",
"[n] children/*[1]; [t] \"from\"; [n] children/*[2]; [t] \"to\"; [n] children/*[3]"
"[n] children/*[1]; [t] \"from\"; [n] children/*[2]; [t] \"to\"; [n] children/*[3] (pause:short)"
],
[
"Action",
Expand All @@ -1017,22 +1017,27 @@
[
"Action",
"overscript",
"[n] children/*[1]; [t] \"under\"; [n] children/*[2] (pause:short)"
"[n] children/*[1]; [t] \"with\"; [n] children/*[2]; [t] \"above\""
],
[
"Action",
"overunderscript",
"[n] children/*[1]/children/*[1]; [t] \"with\"; [n] children/*[1]/children/*[2]; [t] \"below\"; [t] \"and\"; [n] children/*[2]; [t] \"above\""
],
[
"Action",
"overscript-limits",
"[n] children/*[1]; [t] \"to\"; [n] children/*[2]"
"[n] children/*[1]; [t] \"under\"; [n] children/*[2] (pause:short)"
],
[
"Action",
"underscript",
"[n] children/*[1]; [t] \"over\"; [n] children/*[2] (pause:short)"
"[n] children/*[1]; [t] \"with\"; [n] children/*[2]; [t] \"below\""
],
[
"Action",
"underscript-limits",
"[n] children/*[1]; [t] \"from\"; [n] children/*[2]"
"[n] children/*[1]; [t] \"over\"; [n] children/*[2] (pause:short)"
],
[
"Action",
Expand Down
100 changes: 100 additions & 0 deletions testsuite/expected/en/clearspeak/clearspeak_coverage_limits.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
{
"name": "EnglishClearspeakCoverageLimits",
"locale": "en",
"factory": "clearspeak",
"base": "input/clearspeak/clearspeak_coverage_limits.json",
"information": "English Clearspeak Various Stacked Expressions tests.",
"active": "ClearspeakEnglish",
"tests": {
"rel1": {
"expected": "q from n equals 1 to c"
},
"rel2": {
"expected": "normal q, with c above"
},
"rel3": {
"expected": "q over n equals 1"
},
"rel4": {
"expected": "normal q, with n below"
},
"over": {
"expected": "a with y above"
},
"overaccent": {
"expected": "a right arrow"
},
"overunder-sep": {
"expected": "a with x below and y above"
},
"overunder": {
"expected": "a with x below and y above"
},
"overunderaccent": {
"expected": "a with right arrow below left arrow"
},
"under": {
"expected": "a with x below"
},
"underaccent": {
"expected": "a with left arrow below"
},
"cup1": {
"expected": "union from n equals 1 to c"
},
"cup2": {
"expected": "union over c"
},
"cup3": {
"expected": "union under n equals 1"
},
"cup4": {
"expected": "union sign with n over it"
},
"cup5": {
"expected": "union sign with c over it"
},
"cup6": {
"expected": "union over n equals 1"
},
"cup7": {
"expected": "union over n"
},
"let1": {
"expected": "normal q, with n equals 1 below and c above"
},
"let2": {
"expected": "normal q, with c above"
},
"let3": {
"expected": "normal q, with n equals 1 below"
},
"let4": {
"expected": "normal q, with n below"
},
"limits1": {
"expected": "q from n equals 1 to c"
},
"limits1a": {
"expected": "normal q, with n below and c above"
},
"limits2": {
"expected": "normal q, with n equals 1 below and c above"
},
"limits2a": {
"expected": "normal q, with n below and c above"
},
"sum1": {
"expected": "sum from n equals 1 to c"
},
"sum2": {
"expected": "sum under c"
},
"sum3": {
"expected": "sum over n equals 1"
},
"sum4": {
"expected": "sum over n"
}
}
}
78 changes: 78 additions & 0 deletions testsuite/expected/en/clearspeak/hidden.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
{
"name": "EnglishClearspeak",
"locale": "en",
"factory": "speech",
"base": "input/common/hidden.json",
"information": "English Clearspeak hidden elements tests.",
"domain": "clearspeak",
"active": "ClearspeakEnglish",
"exclude": [],
"tests": {
"SimplePhantom_0": {
"expected": "the fraction with numerator and denominator c"
},
"SimplePhantom_1": {
"expected": "the fraction with numerator a and denominator"
},
"SimplePhantom_2": {
"expected": "to the c-th power"
},
"SimplePhantom_3": {
"expected": "a"
},
"HiddenIgnoreElements_0": {
"expected": "a over b"
},
"HiddenIgnoreElements_1": {
"expected": "a d over b"
},
"HiddenIgnoreElements_2": {
"expected": "a over b"
},
"HiddenEmptyTokens_0": {
"expected": "vertical bar sub t"
},
"HiddenEmptyTokens_1": {
"expected": "vertical bar sub t"
},
"HiddenEmptyTokens_2": {
"expected": "vertical bar sub t"
},
"PseudoUnitChildren_0": {
"expected": "a"
},
"PseudoUnitChildren_1": {
"expected": "i"
},
"PseudoUnitChildren_2": {
"expected": "i"
},
"PseudoUnitChildren_3": {
"expected": "i"
},
"PseudoUnitChildren_4": {
"expected": "i"
},
"PseudoUnitChildren_5": {
"expected": "i"
},
"PseudoUnitChildren_6": {
"expected": "i j"
},
"InterspersedIgnore_0": {
"expected": "i j"
},
"InterspersedIgnore_1": {
"expected": "i plus j"
},
"InterspersedIgnore_2": {
"expected": "i plus j"
},
"InterspersedIgnore_3": {
"expected": "i j"
},
"InterspersedIgnore_4": {
"expected": "i plus j"
}
}
}
78 changes: 78 additions & 0 deletions testsuite/expected/en/mathspeak/hidden.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
{
"name": "EnglishMathspeak",
"locale": "en",
"factory": "speech",
"base": "input/common/hidden.json",
"information": "English Mathspeak hidden elements tests.",
"domain": "mathspeak",
"active": "MathspeakEnglish",
"exclude": [],
"tests": {
"SimplePhantom_0": {
"expected": "StartFraction Over c EndFraction"
},
"SimplePhantom_1": {
"expected": "StartFraction a Over EndFraction"
},
"SimplePhantom_2": {
"expected": "Superscript c"
},
"SimplePhantom_3": {
"expected": "a"
},
"HiddenIgnoreElements_0": {
"expected": "StartFraction a Over b EndFraction"
},
"HiddenIgnoreElements_1": {
"expected": "StartFraction a d Over b EndFraction"
},
"HiddenIgnoreElements_2": {
"expected": "StartFraction a Over b EndFraction"
},
"HiddenEmptyTokens_0": {
"expected": "vertical bar Subscript t Baseline"
},
"HiddenEmptyTokens_1": {
"expected": "vertical bar Subscript t Baseline"
},
"HiddenEmptyTokens_2": {
"expected": "vertical bar Subscript t Baseline"
},
"PseudoUnitChildren_0": {
"expected": "a"
},
"PseudoUnitChildren_1": {
"expected": "i"
},
"PseudoUnitChildren_2": {
"expected": "i"
},
"PseudoUnitChildren_3": {
"expected": "i"
},
"PseudoUnitChildren_4": {
"expected": "i"
},
"PseudoUnitChildren_5": {
"expected": "i"
},
"PseudoUnitChildren_6": {
"expected": "i j"
},
"InterspersedIgnore_0": {
"expected": "i j"
},
"InterspersedIgnore_1": {
"expected": "i plus j"
},
"InterspersedIgnore_2": {
"expected": "i plus j"
},
"InterspersedIgnore_3": {
"expected": "i j"
},
"InterspersedIgnore_4": {
"expected": "i plus j"
}
}
}
4 changes: 2 additions & 2 deletions testsuite/expected/semantic/enrich_mathml/issues.json

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions testsuite/expected/semantic/enrich_mathml/limits.json
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,18 @@
},
"Additional_18": {
"expected": "<math><munderover type=\"underover\" role=\"sum\" id=\"4\" children=\"0,1,2\" collapsed=\"(4 (3 0 1) 2)\"><mo type=\"largeop\" role=\"sum\" id=\"0\" parent=\"4\">∑</mo><mo type=\"punctuation\" role=\"underaccent\" annotation=\"accent:bar\" id=\"1\" parent=\"4\">_</mo><mo type=\"relation\" role=\"overaccent\" annotation=\"accent:tilde\" id=\"2\" parent=\"4\">~</mo></munderover></math>"
},
"Overaccent_0": {
"expected": "<math><munderover type=\"underover\" role=\"latinletter\" id=\"4\" children=\"0,2,1\" collapsed=\"(4 (3 0 2) 1)\"><mi type=\"identifier\" role=\"latinletter\" font=\"italic\" annotation=\"clearspeak:simple\" id=\"0\" parent=\"4\">X</mi><mo type=\"identifier\" role=\"latinletter\" font=\"normal\" annotation=\"clearspeak:simple\" id=\"1\" parent=\"4\">x</mo><mo type=\"punctuation\" role=\"overaccent\" annotation=\"accent:bar\" id=\"2\" parent=\"4\">_</mo></munderover></math>"
},
"Empty_0": {
"expected": "<math><munderover type=\"overscore\" role=\"latinletter\" id=\"3\" children=\"0,2\"><mi type=\"identifier\" role=\"latinletter\" font=\"italic\" annotation=\"clearspeak:simple\" id=\"0\" parent=\"3\">X</mi><mo/><mo type=\"punctuation\" role=\"overaccent\" annotation=\"accent:bar\" id=\"2\" parent=\"3\">_</mo></munderover></math>"
},
"Empty_1": {
"expected": "<math><munderover type=\"underscore\" role=\"latinletter\" id=\"3\" children=\"0,1\"><mi type=\"identifier\" role=\"latinletter\" font=\"italic\" annotation=\"clearspeak:simple\" id=\"0\" parent=\"3\">X</mi><mo type=\"punctuation\" role=\"underaccent\" annotation=\"accent:overaccent\" id=\"1\" parent=\"3\">^</mo><mo/></munderover></math>"
},
"Empty_2": {
"expected": "<math><munderover><mi type=\"identifier\" role=\"latinletter\" font=\"italic\" annotation=\"clearspeak:simple\" id=\"0\">X</mi><mo/><mo/></munderover></math>"
}
}
}
12 changes: 6 additions & 6 deletions testsuite/expected/semantic/enrich_mathml/tables.json
Original file line number Diff line number Diff line change
Expand Up @@ -680,28 +680,28 @@
"expected": "<math><mi type=\"identifier\" role=\"greekletter\" font=\"sans-serif-bold\" annotation=\"clearspeak:simple\" id=\"0\">𝝖</mi></math>"
},
"EmptyAccents_0": {
"expected": "<math><munderover type=\"underover\" role=\"arrow\" embellished=\"relation\" id=\"4\" children=\"0,1,2\" collapsed=\"(4 (3 0 1) 2)\"><mo type=\"relation\" role=\"arrow\" id=\"0\" parent=\"4\">→</mo><mo type=\"relation\" role=\"underaccent\" annotation=\"accent:equality\" id=\"1\" parent=\"4\">≅</mo><mrow type=\"empty\" role=\"unknown\" id=\"2\" parent=\"4\"/></munderover></math>"
"expected": "<math><munderover type=\"underscore\" role=\"arrow\" embellished=\"relation\" id=\"3\" children=\"0,1\"><mo type=\"relation\" role=\"arrow\" id=\"0\" parent=\"3\">→</mo><mo type=\"relation\" role=\"underaccent\" annotation=\"accent:equality\" id=\"1\" parent=\"3\">≅</mo><mrow/></munderover></math>"
},
"EmptyAccents_1": {
"expected": "<math><munderover type=\"underover\" role=\"arrow\" embellished=\"relation\" id=\"4\" children=\"0,2,1\" collapsed=\"(4 (3 0 2) 1)\"><mo type=\"relation\" role=\"arrow\" id=\"0\" parent=\"4\">→</mo><mrow type=\"empty\" role=\"unknown\" id=\"1\" parent=\"4\"/><mo type=\"relation\" role=\"overaccent\" annotation=\"accent:equality\" id=\"2\" parent=\"4\">≅</mo></munderover></math>"
"expected": "<math><munderover type=\"overscore\" role=\"arrow\" embellished=\"relation\" id=\"3\" children=\"0,2\"><mo type=\"relation\" role=\"arrow\" id=\"0\" parent=\"3\">→</mo><mrow/><mo type=\"relation\" role=\"overaccent\" annotation=\"accent:equality\" id=\"2\" parent=\"3\">≅</mo></munderover></math>"
},
"EmptyAccents_2": {
"expected": "<math><munderover type=\"underover\" role=\"arrow\" embellished=\"relation\" id=\"4\" children=\"0,1,2\" collapsed=\"(4 (3 0 1) 2)\"><mo type=\"relation\" role=\"arrow\" id=\"0\" parent=\"4\">→</mo><mo type=\"relation\" role=\"underaccent\" annotation=\"accent:equality\" id=\"1\" parent=\"4\">≅</mo><mo type=\"relation\" role=\"overaccent\" annotation=\"accent:equality\" id=\"2\" parent=\"4\">=</mo></munderover></math>"
},
"EmptyAccents_3": {
"expected": "<math><munderover type=\"underover\" role=\"latinletter\" id=\"4\" children=\"0,1,2\" collapsed=\"(4 (3 0 1) 2)\"><mi type=\"identifier\" role=\"latinletter\" font=\"italic\" annotation=\"clearspeak:simple\" id=\"0\" parent=\"4\">A</mi><mo type=\"relation\" role=\"underaccent\" annotation=\"accent:equality\" id=\"1\" parent=\"4\">≅</mo><mrow type=\"empty\" role=\"unknown\" id=\"2\" parent=\"4\"/></munderover></math>"
"expected": "<math><munderover type=\"underscore\" role=\"latinletter\" id=\"3\" children=\"0,1\"><mi type=\"identifier\" role=\"latinletter\" font=\"italic\" annotation=\"clearspeak:simple\" id=\"0\" parent=\"3\">A</mi><mo type=\"relation\" role=\"underaccent\" annotation=\"accent:equality\" id=\"1\" parent=\"3\">≅</mo><mrow/></munderover></math>"
},
"EmptyAccents_4": {
"expected": "<math><munderover type=\"underover\" role=\"latinletter\" id=\"4\" children=\"0,2,1\" collapsed=\"(4 (3 0 2) 1)\"><mi type=\"identifier\" role=\"latinletter\" font=\"italic\" annotation=\"clearspeak:simple\" id=\"0\" parent=\"4\">A</mi><mrow type=\"empty\" role=\"unknown\" id=\"1\" parent=\"4\"/><mo type=\"relation\" role=\"overaccent\" annotation=\"accent:equality\" id=\"2\" parent=\"4\">≅</mo></munderover></math>"
"expected": "<math><munderover type=\"overscore\" role=\"latinletter\" id=\"3\" children=\"0,2\"><mi type=\"identifier\" role=\"latinletter\" font=\"italic\" annotation=\"clearspeak:simple\" id=\"0\" parent=\"3\">A</mi><mrow/><mo type=\"relation\" role=\"overaccent\" annotation=\"accent:equality\" id=\"2\" parent=\"3\">≅</mo></munderover></math>"
},
"EmptyAccents_5": {
"expected": "<math><munderover type=\"underover\" role=\"latinletter\" id=\"4\" children=\"0,1,2\" collapsed=\"(4 (3 0 1) 2)\"><mi type=\"identifier\" role=\"latinletter\" font=\"italic\" annotation=\"clearspeak:simple\" id=\"0\" parent=\"4\">A</mi><mo type=\"relation\" role=\"underaccent\" annotation=\"accent:equality\" id=\"1\" parent=\"4\">≅</mo><mo type=\"relation\" role=\"overaccent\" annotation=\"accent:equality\" id=\"2\" parent=\"4\">=</mo></munderover></math>"
},
"EmptyAccents_6": {
"expected": "<math><msubsup type=\"subsup\" role=\"close\" embellished=\"fence\" id=\"4\" children=\"0,1,2\" collapsed=\"(4 (3 0 1) 2)\"><mo type=\"fence\" role=\"close\" id=\"0\" parent=\"4\">)</mo><mo type=\"relation\" role=\"equality\" id=\"1\" parent=\"4\">≅</mo><mrow type=\"empty\" role=\"unknown\" id=\"2\" parent=\"4\"/></msubsup></math>"
"expected": "<math><msubsup type=\"subscript\" role=\"close\" embellished=\"fence\" id=\"3\" children=\"0,1\"><mo type=\"fence\" role=\"close\" id=\"0\" parent=\"3\">)</mo><mo type=\"relation\" role=\"equality\" id=\"1\" parent=\"3\">≅</mo><mrow/></msubsup></math>"
},
"EmptyAccents_7": {
"expected": "<math><msubsup type=\"subsup\" role=\"close\" embellished=\"fence\" id=\"4\" children=\"0,1,2\" collapsed=\"(4 (3 0 1) 2)\"><mo type=\"fence\" role=\"close\" id=\"0\" parent=\"4\">)</mo><mrow type=\"empty\" role=\"unknown\" id=\"1\" parent=\"4\"/><mo type=\"relation\" role=\"equality\" id=\"2\" parent=\"4\">≅</mo></msubsup></math>"
"expected": "<math><msubsup type=\"superscript\" role=\"close\" embellished=\"fence\" id=\"3\" children=\"0,2\"><mo type=\"fence\" role=\"close\" id=\"0\" parent=\"3\">)</mo><mrow/><mo type=\"relation\" role=\"equality\" id=\"2\" parent=\"3\">≅</mo></msubsup></math>"
},
"EmptyAccents_8": {
"expected": "<math><msubsup type=\"subsup\" role=\"close\" embellished=\"fence\" id=\"4\" children=\"0,1,2\" collapsed=\"(4 (3 0 1) 2)\"><mo type=\"fence\" role=\"close\" id=\"0\" parent=\"4\">)</mo><mo type=\"relation\" role=\"equality\" id=\"1\" parent=\"4\">≅</mo><mo type=\"relation\" role=\"equality\" id=\"2\" parent=\"4\">=</mo></msubsup></math>"
Expand Down
Loading
Loading