jekyll-theme-hydejack 8.5.0 → 9.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/LICENSE.md +9 -3
- data/NOTICE.md +289 -0
- data/README.md +126 -86
- data/_config.yml +73 -0
- data/_includes/base-classes +9 -0
- data/_includes/body/analytics.html +1 -1
- data/_includes/body/comments.html +1 -1
- data/_includes/body/footer.html +3 -3
- data/_includes/body/index.html +17 -16
- data/_includes/body/main.html +3 -13
- data/_includes/body/menu.html +3 -14
- data/_includes/body/nav.html +4 -4
- data/_includes/body/scripts.html +3 -5
- data/_includes/body/sidebar-bg.html +13 -0
- data/_includes/body/sidebar-sticky.html +25 -0
- data/_includes/body/sidebar.html +7 -40
- data/_includes/components/about.html +1 -1
- data/_includes/components/author.html +3 -3
- data/_includes/components/hy-img.html +15 -26
- data/_includes/components/link.html +1 -1
- data/_includes/components/message.html +1 -1
- data/_includes/components/post-list-item.html +3 -3
- data/_includes/components/post.html +14 -11
- data/_includes/components/related-posts.html +14 -4
- data/_includes/components/tag-list.html +5 -1
- data/_includes/head/css/inline +1 -0
- data/_includes/head/index.html +14 -8
- data/_includes/head/links-static.html +27 -0
- data/_includes/head/links.html +1 -34
- data/_includes/head/meta-static.html +17 -0
- data/_includes/head/meta.html +8 -24
- data/_includes/head/page-style.html +1 -3
- data/_includes/head/scripts.html +12 -7
- data/_includes/head/styles-inline.html +19 -0
- data/_includes/head/styles-layout.html +4 -0
- data/_includes/head/styles-no-inline.html +8 -0
- data/_includes/head/styles.html +5 -34
- data/_includes/header.txt +1 -1
- data/_includes/if-non-null +7 -0
- data/_includes/my-body.html +1 -1
- data/_includes/my-scripts.html +1 -1
- data/_includes/scripts/load-js.min.js +1 -1
- data/_includes/scripts/nomodule.js +21 -0
- data/_includes/scripts/nomodule.min.js +1 -0
- data/_includes/smart-url +1 -0
- data/_includes/smart-url.txt +1 -1
- data/_includes/styles/common.scss +18 -0
- data/_includes/styles/inline.scss +16 -28
- data/_includes/styles/page-style.scss +7 -62
- data/_includes/styles/style.scss +25 -36
- data/_includes/styles/variables.scss +62 -0
- data/_includes/templates/animation.html +1 -1
- data/_includes/templates/back.html +2 -2
- data/_includes/templates/error.html +1 -1
- data/_includes/templates/forward.html +2 -2
- data/_includes/templates/index.html +10 -11
- data/_includes/templates/loading.html +1 -1
- data/_includes/templates/permalink.html +2 -2
- data/_layouts/about.html +1 -1
- data/_layouts/base.html +9 -4
- data/_layouts/blog.html +9 -7
- data/_layouts/compress.html +1 -1
- data/_layouts/default.html +4 -4
- data/_layouts/list.html +11 -17
- data/_layouts/page.html +1 -0
- data/_layouts/post.html +5 -3
- data/_sass/_mixins.scss +7 -21
- data/_sass/_spinner.scss +1 -1
- data/_sass/_syntax.scss +142 -130
- data/_sass/_variables.scss +2 -43
- data/_sass/html.scss +42 -0
- data/_sass/hydejack/__inline__/_avatar.scss +10 -10
- data/_sass/hydejack/__inline__/_base.scss +7 -21
- data/_sass/hydejack/__inline__/_content.scss +9 -2
- data/_sass/hydejack/__inline__/_images.scss +1 -3
- data/_sass/hydejack/__inline__/_links.scss +28 -13
- data/_sass/hydejack/__inline__/_menu.scss +42 -13
- data/_sass/hydejack/__inline__/_sidebar.scss +40 -14
- data/_sass/hydejack/__inline__/_social.scss +3 -0
- data/_sass/hydejack/__inline__/_toc.scss +55 -0
- data/_sass/hydejack/__inline__/_utilities.scss +3 -0
- data/_sass/hydejack/__link__/_avatar.scss +0 -4
- data/_sass/hydejack/__link__/_base.scss +1 -2
- data/_sass/hydejack/__link__/_break-layout.scss +17 -8
- data/_sass/hydejack/__link__/_content.scss +1 -0
- data/_sass/hydejack/__link__/_footer.scss +6 -8
- data/_sass/hydejack/__link__/_images.scss +5 -40
- data/_sass/hydejack/__link__/_katex.scss +1 -26
- data/_sass/hydejack/__link__/_links.scss +29 -20
- data/_sass/hydejack/__link__/_mark-external.scss +2 -7
- data/_sass/hydejack/__link__/_menu.scss +63 -8
- data/_sass/hydejack/__link__/_sidebar.scss +12 -9
- data/_sass/hydejack/__link__/_toc.scss +53 -0
- data/_sass/hydejack/__link__/_utilities.scss +3 -0
- data/_sass/hydejack/_avatar.pre.scss +10 -12
- data/_sass/hydejack/_base.pre.scss +7 -23
- data/_sass/hydejack/_break-layout.pre.scss +19 -10
- data/_sass/hydejack/_content.pre.scss +10 -2
- data/_sass/hydejack/_footer.pre.scss +6 -8
- data/_sass/hydejack/_images.pre.scss +6 -42
- data/_sass/hydejack/_katex.pre.scss +3 -28
- data/_sass/hydejack/_links.pre.scss +49 -19
- data/_sass/hydejack/_mark-external.pre.scss +2 -7
- data/_sass/hydejack/_menu.pre.scss +91 -22
- data/_sass/hydejack/_sidebar.pre.scss +48 -22
- data/_sass/hydejack/_social.pre.scss +3 -0
- data/_sass/hydejack/_toc.pre.scss +65 -0
- data/_sass/hydejack/_utilities.pre.scss +3 -0
- data/_sass/my-inline.scss +2 -16
- data/_sass/my-style.scss +0 -9
- data/_sass/pooleparty/__inline__/_base.scss +10 -9
- data/_sass/pooleparty/__inline__/_message.scss +31 -0
- data/_sass/pooleparty/__inline__/_posts.scss +19 -2
- data/_sass/pooleparty/__inline__/_table.scss +0 -28
- data/_sass/pooleparty/__inline__/_type.scss +81 -15
- data/_sass/pooleparty/__link__/_base.scss +11 -5
- data/_sass/pooleparty/__link__/_code.scss +40 -7
- data/_sass/pooleparty/__link__/_footnotes.scss +4 -5
- data/_sass/pooleparty/__link__/_pagination.scss +3 -2
- data/_sass/pooleparty/__link__/_posts.scss +11 -6
- data/_sass/pooleparty/__link__/_read-more.scss +1 -1
- data/_sass/pooleparty/__link__/_table.scss +27 -16
- data/_sass/pooleparty/__link__/_type.scss +56 -19
- data/_sass/pooleparty/_base.pre.scss +25 -18
- data/_sass/pooleparty/_code.pre.scss +40 -7
- data/_sass/pooleparty/_footnotes.pre.scss +4 -5
- data/_sass/pooleparty/_message.pre.scss +33 -2
- data/_sass/pooleparty/_pagination.pre.scss +5 -4
- data/_sass/pooleparty/_posts.pre.scss +34 -12
- data/_sass/pooleparty/_read-more.pre.scss +1 -1
- data/_sass/pooleparty/_table.pre.scss +13 -20
- data/_sass/pooleparty/_type.pre.scss +100 -35
- data/assets/bower_components/MathJax/.bower.json +28 -0
- data/assets/bower_components/MathJax/LICENSE +202 -0
- data/assets/bower_components/MathJax/bower.json +11 -0
- data/assets/bower_components/MathJax/composer.json +14 -0
- data/assets/bower_components/MathJax/es5/a11y/assistive-mml.js +1 -0
- data/assets/bower_components/MathJax/es5/a11y/complexity.js +1 -0
- data/assets/bower_components/MathJax/es5/a11y/explorer.js +1 -0
- data/assets/bower_components/MathJax/es5/a11y/semantic-enrich.js +1 -0
- data/assets/bower_components/MathJax/es5/adaptors/liteDOM.js +1 -0
- data/assets/bower_components/MathJax/es5/core.js +1 -0
- data/assets/bower_components/MathJax/es5/input/asciimath.js +1 -0
- data/assets/bower_components/MathJax/es5/input/mml.js +1 -0
- data/assets/bower_components/MathJax/es5/input/mml/entities.js +1 -0
- data/assets/bower_components/MathJax/es5/input/tex-base.js +1 -0
- data/assets/bower_components/MathJax/es5/input/tex-full.js +1 -0
- data/assets/bower_components/MathJax/es5/input/tex.js +1 -0
- data/assets/bower_components/MathJax/es5/input/tex/extensions/action.js +1 -0
- data/assets/bower_components/MathJax/es5/input/tex/extensions/all-packages.js +1 -0
- data/assets/bower_components/MathJax/es5/input/tex/extensions/ams.js +1 -0
- data/assets/bower_components/MathJax/es5/input/tex/extensions/amscd.js +1 -0
- data/assets/bower_components/MathJax/es5/input/tex/extensions/autoload.js +1 -0
- data/assets/bower_components/MathJax/es5/input/tex/extensions/bbox.js +1 -0
- data/assets/bower_components/MathJax/es5/input/tex/extensions/boldsymbol.js +1 -0
- data/assets/bower_components/MathJax/es5/input/tex/extensions/braket.js +1 -0
- data/assets/bower_components/MathJax/es5/input/tex/extensions/bussproofs.js +1 -0
- data/assets/bower_components/MathJax/es5/input/tex/extensions/cancel.js +1 -0
- data/assets/bower_components/MathJax/es5/input/tex/extensions/color.js +1 -0
- data/assets/bower_components/MathJax/es5/input/tex/extensions/colorV2.js +1 -0
- data/assets/bower_components/MathJax/es5/input/tex/extensions/configMacros.js +1 -0
- data/assets/bower_components/MathJax/es5/input/tex/extensions/enclose.js +1 -0
- data/assets/bower_components/MathJax/es5/input/tex/extensions/extpfeil.js +1 -0
- data/assets/bower_components/MathJax/es5/input/tex/extensions/html.js +1 -0
- data/assets/bower_components/MathJax/es5/input/tex/extensions/mhchem.js +1 -0
- data/assets/bower_components/MathJax/es5/input/tex/extensions/newcommand.js +1 -0
- data/assets/bower_components/MathJax/es5/input/tex/extensions/noerrors.js +1 -0
- data/assets/bower_components/MathJax/es5/input/tex/extensions/noundefined.js +1 -0
- data/assets/bower_components/MathJax/es5/input/tex/extensions/physics.js +1 -0
- data/assets/bower_components/MathJax/es5/input/tex/extensions/require.js +1 -0
- data/assets/bower_components/MathJax/es5/input/tex/extensions/tagFormat.js +1 -0
- data/assets/bower_components/MathJax/es5/input/tex/extensions/unicode.js +1 -0
- data/assets/bower_components/MathJax/es5/input/tex/extensions/verb.js +1 -0
- data/assets/bower_components/MathJax/es5/latest.js +1 -0
- data/assets/bower_components/MathJax/es5/loader.js +1 -0
- data/assets/bower_components/MathJax/es5/mml-chtml.js +1 -0
- data/assets/bower_components/MathJax/es5/mml-svg.js +1 -0
- data/assets/bower_components/MathJax/es5/node-main.js +1 -0
- data/assets/bower_components/MathJax/es5/output/chtml.js +1 -0
- data/assets/bower_components/MathJax/es5/output/chtml/fonts/tex.js +1 -0
- data/assets/bower_components/MathJax/es5/output/chtml/fonts/woff-v2/MathJax_AMS-Regular.woff +0 -0
- data/assets/bower_components/MathJax/es5/output/chtml/fonts/woff-v2/MathJax_Calligraphic-Bold.woff +0 -0
- data/assets/bower_components/MathJax/es5/output/chtml/fonts/woff-v2/MathJax_Calligraphic-Regular.woff +0 -0
- data/assets/bower_components/MathJax/es5/output/chtml/fonts/woff-v2/MathJax_Fraktur-Bold.woff +0 -0
- data/assets/bower_components/MathJax/es5/output/chtml/fonts/woff-v2/MathJax_Fraktur-Regular.woff +0 -0
- data/assets/bower_components/MathJax/es5/output/chtml/fonts/woff-v2/MathJax_Main-Bold.woff +0 -0
- data/assets/bower_components/MathJax/es5/output/chtml/fonts/woff-v2/MathJax_Main-Italic.woff +0 -0
- data/assets/bower_components/MathJax/es5/output/chtml/fonts/woff-v2/MathJax_Main-Regular.woff +0 -0
- data/assets/bower_components/MathJax/es5/output/chtml/fonts/woff-v2/MathJax_Math-BoldItalic.woff +0 -0
- data/assets/bower_components/MathJax/es5/output/chtml/fonts/woff-v2/MathJax_Math-Italic.woff +0 -0
- data/assets/bower_components/MathJax/es5/output/chtml/fonts/woff-v2/MathJax_Math-Regular.woff +0 -0
- data/assets/bower_components/MathJax/es5/output/chtml/fonts/woff-v2/MathJax_SansSerif-Bold.woff +0 -0
- data/assets/bower_components/MathJax/es5/output/chtml/fonts/woff-v2/MathJax_SansSerif-Italic.woff +0 -0
- data/assets/bower_components/MathJax/es5/output/chtml/fonts/woff-v2/MathJax_SansSerif-Regular.woff +0 -0
- data/assets/bower_components/MathJax/es5/output/chtml/fonts/woff-v2/MathJax_Script-Regular.woff +0 -0
- data/assets/bower_components/MathJax/es5/output/chtml/fonts/woff-v2/MathJax_Size1-Regular.woff +0 -0
- data/assets/bower_components/MathJax/es5/output/chtml/fonts/woff-v2/MathJax_Size2-Regular.woff +0 -0
- data/assets/bower_components/MathJax/es5/output/chtml/fonts/woff-v2/MathJax_Size3-Regular.woff +0 -0
- data/assets/bower_components/MathJax/es5/output/chtml/fonts/woff-v2/MathJax_Size4-Regular.woff +0 -0
- data/assets/bower_components/MathJax/es5/output/chtml/fonts/woff-v2/MathJax_Typewriter-Regular.woff +0 -0
- data/assets/bower_components/MathJax/es5/output/chtml/fonts/woff-v2/MathJax_Vector-Bold.woff +0 -0
- data/assets/bower_components/MathJax/es5/output/chtml/fonts/woff-v2/MathJax_Vector-Regular.woff +0 -0
- data/assets/bower_components/MathJax/es5/output/chtml/fonts/woff-v2/MathJax_Zero.woff +0 -0
- data/assets/bower_components/MathJax/es5/output/svg.js +1 -0
- data/assets/bower_components/MathJax/es5/output/svg/fonts/tex.js +1 -0
- data/assets/bower_components/MathJax/es5/sre/mathmaps/en.js +104 -0
- data/assets/bower_components/MathJax/es5/sre/mathmaps/es.js +104 -0
- data/assets/bower_components/MathJax/es5/sre/mathmaps/fr.js +104 -0
- data/assets/bower_components/MathJax/es5/sre/mathmaps/mathmaps_ie.js +410 -0
- data/assets/bower_components/MathJax/es5/sre/mathmaps/nemeth.js +104 -0
- data/assets/bower_components/MathJax/es5/sre/sre_browser.js +1709 -0
- data/assets/bower_components/MathJax/es5/startup.js +1 -0
- data/assets/bower_components/MathJax/es5/tex-chtml-full.js +1 -0
- data/assets/bower_components/MathJax/es5/tex-chtml.js +1 -0
- data/assets/bower_components/MathJax/es5/tex-mml-chtml.js +1 -0
- data/assets/bower_components/MathJax/es5/tex-mml-svg.js +1 -0
- data/assets/bower_components/MathJax/es5/tex-svg-full.js +1 -0
- data/assets/bower_components/MathJax/es5/tex-svg.js +1 -0
- data/assets/bower_components/MathJax/es5/ui/menu.js +1 -0
- data/assets/bower_components/MathJax/package.json +59 -0
- data/assets/bower_components/katex/.bower.json +2 -3
- data/assets/css/{hydejack-7.5.2.css → hydejack-9.0.2.css} +0 -0
- data/assets/icomoon/fonts/icomoon.eot +0 -0
- data/assets/icomoon/fonts/icomoon.svg +8 -2
- data/assets/icomoon/fonts/icomoon.ttf +0 -0
- data/assets/icomoon/fonts/icomoon.woff +0 -0
- data/assets/icomoon/selection.json +1 -1
- data/assets/icomoon/style.css +31 -12
- data/assets/icons/favicon.ico +0 -0
- data/assets/icons/icon-128x128.png +0 -0
- data/assets/icons/icon-144x144.png +0 -0
- data/assets/icons/icon-152x152.png +0 -0
- data/assets/icons/icon-192x192.png +0 -0
- data/assets/icons/icon-384x384.png +0 -0
- data/assets/icons/icon-512x512.png +0 -0
- data/assets/icons/icon-72x72.png +0 -0
- data/assets/icons/icon-96x96.png +0 -0
- data/assets/img/logo.png +0 -0
- data/assets/img/sidebar-bg.jpg +0 -0
- data/assets/js/.gitkeep +0 -0
- data/assets/js/LEGACY-drawer-hydejack-9.0.2.js +14 -0
- data/assets/js/LEGACY-fetch-hydejack-9.0.2.js +14 -0
- data/assets/js/LEGACY-hydejack-9.0.2.js +28 -0
- data/assets/js/LEGACY-navbar-hydejack-9.0.2.js +14 -0
- data/assets/js/LEGACY-push-state-hydejack-9.0.2.js +14 -0
- data/assets/js/LEGACY-resize-observer-hydejack-9.0.2.js +14 -0
- data/assets/js/LEGACY-shadydom-hydejack-9.0.2.js +14 -0
- data/assets/js/LEGACY-vendors~drawer-hydejack-9.0.2.js +47 -0
- data/assets/js/LEGACY-vendors~drawer~push-state-hydejack-9.0.2.js +215 -0
- data/assets/js/LEGACY-vendors~fetch-hydejack-9.0.2.js +14 -0
- data/assets/js/LEGACY-vendors~intersection-observer-hydejack-9.0.2.js +14 -0
- data/assets/js/LEGACY-vendors~push-state-hydejack-9.0.2.js +33 -0
- data/assets/js/LEGACY-vendors~shadydom-hydejack-9.0.2.js +155 -0
- data/assets/js/LEGACY-vendors~webanimations-hydejack-9.0.2.js +14 -0
- data/assets/js/LEGACY-vendors~webcomponents-hydejack-9.0.2.js +34 -0
- data/assets/js/LEGACY-webcomponents-hydejack-9.0.2.js +14 -0
- data/assets/js/drawer-hydejack-9.0.2.js +14 -0
- data/assets/js/fetch-hydejack-9.0.2.js +14 -0
- data/assets/js/hydejack-9.0.2.js +28 -0
- data/assets/js/navbar-hydejack-9.0.2.js +14 -0
- data/assets/js/push-state-hydejack-9.0.2.js +14 -0
- data/assets/js/resize-observer-hydejack-9.0.2.js +14 -0
- data/assets/js/shadydom-hydejack-9.0.2.js +14 -0
- data/assets/js/vendors~drawer-hydejack-9.0.2.js +47 -0
- data/assets/js/vendors~drawer~push-state-hydejack-9.0.2.js +163 -0
- data/assets/js/vendors~intersection-observer-hydejack-9.0.2.js +14 -0
- data/assets/js/vendors~push-state-hydejack-9.0.2.js +33 -0
- data/assets/js/vendors~shadydom-hydejack-9.0.2.js +146 -0
- data/assets/js/vendors~webanimations-hydejack-9.0.2.js +14 -0
- data/assets/js/webcomponents-hydejack-9.0.2.js +14 -0
- data/assets/site.webmanifest +65 -0
- data/assets/version.json +3 -2
- data/licenses/PRO.md +4 -0
- data/licenses/README.md +1 -1
- data/licenses/{W3C.md → W3C-20150513.md} +0 -0
- metadata +186 -56
- data/_includes/scripts.html +0 -33
- data/assets/Resume.pdf +0 -0
- data/assets/css/hydejack-8.5.0.css +0 -3
- data/assets/icons/icon.png +0 -0
- data/assets/icons/icon@0,25x.png +0 -0
- data/assets/icons/icon@0,5x.png +0 -0
- data/assets/icons/icon@0,75x.png +0 -0
- data/assets/icons/icon@2x.png +0 -0
- data/assets/icons/icon@3x.png +0 -0
- data/assets/icons/tile-large.png +0 -0
- data/assets/icons/tile-medium.png +0 -0
- data/assets/icons/tile-small.png +0 -0
- data/assets/icons/tile-wide.png +0 -0
- data/assets/ieconfig.xml +0 -15
- data/assets/img/blog/COLOURlovers.com-Hydejack.png +0 -0
- data/assets/img/blog/blog-layout.jpg +0 -0
- data/assets/img/blog/caleb-george-old.jpg +0 -0
- data/assets/img/blog/caleb-george.jpg +0 -0
- data/assets/img/blog/cover-page.jpg +0 -0
- data/assets/img/blog/dark-mode-ii.jpg +0 -0
- data/assets/img/blog/dark-mode.jpg +0 -0
- data/assets/img/blog/example-content-ii.jpg +0 -0
- data/assets/img/blog/example-content-iii.jpg +0 -0
- data/assets/img/blog/hydejack-8.png +0 -0
- data/assets/img/blog/hydejack-8@0,25x.png +0 -0
- data/assets/img/blog/hydejack-8@0,5x.png +0 -0
- data/assets/img/blog/lazy-images.jpg +0 -0
- data/assets/img/blog/louis-hansel.jpg +0 -0
- data/assets/img/blog/resume.png +0 -0
- data/assets/img/blog/steve-harvey.jpg +0 -0
- data/assets/img/blog/w3m.png +0 -0
- data/assets/img/blog/wade-lambert.jpg +0 -0
- data/assets/img/docs/google-fonts.png +0 -0
- data/assets/img/projects/hy-drawer.svg +0 -12
- data/assets/img/projects/hy-img.svg +0 -17
- data/assets/img/projects/hy-push-state.svg +0 -13
- data/assets/js/hydejack-8.5.0.js +0 -162
- data/assets/js/hydejack-8.5.0.js.map +0 -1
- data/assets/js/hydejack-legacy-8.5.0.js +0 -191
- data/assets/js/hydejack-legacy-8.5.0.js.map +0 -1
- data/assets/manifest.json +0 -46
- data/assets/video/blog-layout.mp4 +0 -0
- data/assets/video/cover-page.mp4 +0 -0
- data/assets/video/dark-mode.mp4 +0 -0
- data/assets/video/lazy-images.mp4 +0 -0
@@ -0,0 +1,1709 @@
|
|
1
|
+
// Copyright 2014-2019 Volker Sorge
|
2
|
+
//
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
// you may not use this file except in compliance with the License.
|
5
|
+
// You may obtain a copy of the License at
|
6
|
+
//
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
//
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
// See the License for the specific language governing permissions and
|
13
|
+
// limitations under the License.
|
14
|
+
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}};$jscomp.arrayIterator=function(a){return{next:$jscomp.arrayIteratorImpl(a)}};$jscomp.makeIterator=function(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):$jscomp.arrayIterator(a)};$jscomp.arrayFromIterator=function(a){for(var b,c=[];!(b=a.next()).done;)c.push(b.value);return c};
|
15
|
+
$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};
|
16
|
+
$jscomp.getGlobal=function(a){a=["object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global,a];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);$jscomp.SYMBOL_PREFIX="jscomp_symbol_";$jscomp.initSymbol=function(){$jscomp.initSymbol=function(){};$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol)};
|
17
|
+
$jscomp.SymbolClass=function(a,b){this.$jscomp$symbol$id_=a;$jscomp.defineProperty(this,"description",{configurable:!0,writable:!0,value:b})};$jscomp.SymbolClass.prototype.toString=function(){return this.$jscomp$symbol$id_};$jscomp.Symbol=function(){function a(c){if(this instanceof a)throw new TypeError("Symbol is not a constructor");return new $jscomp.SymbolClass($jscomp.SYMBOL_PREFIX+(c||"")+"_"+b++,c)}var b=0;return a}();
|
18
|
+
$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var a=$jscomp.global.Symbol.iterator;a||(a=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("Symbol.iterator"));"function"!=typeof Array.prototype[a]&&$jscomp.defineProperty(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return $jscomp.iteratorPrototype($jscomp.arrayIteratorImpl(this))}});$jscomp.initSymbolIterator=function(){}};
|
19
|
+
$jscomp.initSymbolAsyncIterator=function(){$jscomp.initSymbol();var a=$jscomp.global.Symbol.asyncIterator;a||(a=$jscomp.global.Symbol.asyncIterator=$jscomp.global.Symbol("Symbol.asyncIterator"));$jscomp.initSymbolAsyncIterator=function(){}};$jscomp.iteratorPrototype=function(a){$jscomp.initSymbolIterator();a={next:a};a[$jscomp.global.Symbol.iterator]=function(){return this};return a};
|
20
|
+
$jscomp.iteratorFromArray=function(a,b){$jscomp.initSymbolIterator();a instanceof String&&(a+="");var c=0,d={next:function(){if(c<a.length){var e=c++;return{value:b(e,a[e]),done:!1}}d.next=function(){return{done:!0,value:void 0}};return d.next()}};d[Symbol.iterator]=function(){return d};return d};
|
21
|
+
$jscomp.polyfill=function(a,b,c,d){if(b){c=$jscomp.global;a=a.split(".");for(d=0;d<a.length-1;d++){var e=a[d];e in c||(c[e]={});c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&$jscomp.defineProperty(c,a,{configurable:!0,writable:!0,value:b})}};$jscomp.findInternal=function(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,e=0;e<d;e++){var f=a[e];if(b.call(c,f,e,a))return{i:e,v:f}}return{i:-1,v:void 0}};
|
22
|
+
$jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(a,c){return $jscomp.findInternal(this,a,c).v}},"es6","es3");$jscomp.checkStringArgs=function(a,b,c){if(null==a)throw new TypeError("The 'this' value for String.prototype."+c+" must not be null or undefined");if(b instanceof RegExp)throw new TypeError("First argument to String.prototype."+c+" must not be a regular expression");return a+""};var COMPILED=!0,goog=goog||{};goog.global=this||self;
|
23
|
+
goog.isDef=function(a){return void 0!==a};goog.isString=function(a){return"string"==typeof a};goog.isBoolean=function(a){return"boolean"==typeof a};goog.isNumber=function(a){return"number"==typeof a};goog.exportPath_=function(a,b,c){a=a.split(".");c=c||goog.global;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)!a.length&&goog.isDef(b)?c[d]=b:c=c[d]&&c[d]!==Object.prototype[d]?c[d]:c[d]={}};
|
24
|
+
goog.define=function(a,b){if(!COMPILED){var c=goog.global.CLOSURE_UNCOMPILED_DEFINES,d=goog.global.CLOSURE_DEFINES;c&&void 0===c.nodeType&&Object.prototype.hasOwnProperty.call(c,a)?b=c[a]:d&&void 0===d.nodeType&&Object.prototype.hasOwnProperty.call(d,a)&&(b=d[a])}return b};goog.FEATURESET_YEAR=2012;goog.DEBUG=!0;goog.LOCALE="en";goog.TRUSTED_SITE=!0;goog.STRICT_MODE_COMPATIBLE=!1;goog.DISALLOW_TEST_ONLY_CODE=COMPILED&&!goog.DEBUG;goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING=!1;
|
25
|
+
goog.provide=function(a){if(goog.isInModuleLoader_())throw Error("goog.provide cannot be used within a module.");if(!COMPILED&&goog.isProvided_(a))throw Error('Namespace "'+a+'" already declared.');goog.constructNamespace_(a)};goog.constructNamespace_=function(a,b){if(!COMPILED){delete goog.implicitNamespaces_[a];for(var c=a;(c=c.substring(0,c.lastIndexOf(".")))&&!goog.getObjectByName(c);)goog.implicitNamespaces_[c]=!0}goog.exportPath_(a,b)};
|
26
|
+
goog.getScriptNonce=function(a){if(a&&a!=goog.global)return goog.getScriptNonce_(a.document);null===goog.cspNonce_&&(goog.cspNonce_=goog.getScriptNonce_(goog.global.document));return goog.cspNonce_};goog.NONCE_PATTERN_=/^[\w+/_-]+[=]{0,2}$/;goog.cspNonce_=null;goog.getScriptNonce_=function(a){return(a=a.querySelector&&a.querySelector("script[nonce]"))&&(a=a.nonce||a.getAttribute("nonce"))&&goog.NONCE_PATTERN_.test(a)?a:""};goog.VALID_MODULE_RE_=/^[a-zA-Z_$][a-zA-Z0-9._$]*$/;
|
27
|
+
goog.module=function(a){if(!goog.isString(a)||!a||-1==a.search(goog.VALID_MODULE_RE_))throw Error("Invalid module identifier");if(!goog.isInGoogModuleLoader_())throw Error("Module "+a+" has been loaded incorrectly. Note, modules cannot be loaded as normal scripts. They require some kind of pre-processing step. You're likely trying to load a module via a script tag or as a part of a concatenated bundle without rewriting the module. For more info see: https://github.com/google/closure-library/wiki/goog.module:-an-ES6-module-like-alternative-to-goog.provide.");
|
28
|
+
if(goog.moduleLoaderState_.moduleName)throw Error("goog.module may only be called once per module.");goog.moduleLoaderState_.moduleName=a;if(!COMPILED){if(goog.isProvided_(a))throw Error('Namespace "'+a+'" already declared.');delete goog.implicitNamespaces_[a]}};goog.module.get=function(a){return goog.module.getInternal_(a)};
|
29
|
+
goog.module.getInternal_=function(a){if(!COMPILED){if(a in goog.loadedModules_)return goog.loadedModules_[a].exports;if(!goog.implicitNamespaces_[a])return a=goog.getObjectByName(a),null!=a?a:null}return null};goog.ModuleType={ES6:"es6",GOOG:"goog"};goog.moduleLoaderState_=null;goog.isInModuleLoader_=function(){return goog.isInGoogModuleLoader_()||goog.isInEs6ModuleLoader_()};goog.isInGoogModuleLoader_=function(){return!!goog.moduleLoaderState_&&goog.moduleLoaderState_.type==goog.ModuleType.GOOG};
|
30
|
+
goog.isInEs6ModuleLoader_=function(){if(goog.moduleLoaderState_&&goog.moduleLoaderState_.type==goog.ModuleType.ES6)return!0;var a=goog.global.$jscomp;return a?"function"!=typeof a.getCurrentModulePath?!1:!!a.getCurrentModulePath():!1};
|
31
|
+
goog.module.declareLegacyNamespace=function(){if(!COMPILED&&!goog.isInGoogModuleLoader_())throw Error("goog.module.declareLegacyNamespace must be called from within a goog.module");if(!COMPILED&&!goog.moduleLoaderState_.moduleName)throw Error("goog.module must be called prior to goog.module.declareLegacyNamespace.");goog.moduleLoaderState_.declareLegacyNamespace=!0};
|
32
|
+
goog.declareModuleId=function(a){if(!COMPILED){if(!goog.isInEs6ModuleLoader_())throw Error("goog.declareModuleId may only be called from within an ES6 module");if(goog.moduleLoaderState_&&goog.moduleLoaderState_.moduleName)throw Error("goog.declareModuleId may only be called once per module.");if(a in goog.loadedModules_)throw Error('Module with namespace "'+a+'" already exists.');}if(goog.moduleLoaderState_)goog.moduleLoaderState_.moduleName=a;else{var b=goog.global.$jscomp;if(!b||"function"!=typeof b.getCurrentModulePath)throw Error('Module with namespace "'+
|
33
|
+
a+'" has been loaded incorrectly.');b=b.require(b.getCurrentModulePath());goog.loadedModules_[a]={exports:b,type:goog.ModuleType.ES6,moduleId:a}}};goog.setTestOnly=function(a){if(goog.DISALLOW_TEST_ONLY_CODE)throw a=a||"",Error("Importing test-only code into non-debug environment"+(a?": "+a:"."));};goog.forwardDeclare=function(a){};
|
34
|
+
COMPILED||(goog.isProvided_=function(a){return a in goog.loadedModules_||!goog.implicitNamespaces_[a]&&goog.isDefAndNotNull(goog.getObjectByName(a))},goog.implicitNamespaces_={"goog.module":!0});goog.getObjectByName=function(a,b){a=a.split(".");b=b||goog.global;for(var c=0;c<a.length;c++)if(b=b[a[c]],!goog.isDefAndNotNull(b))return null;return b};goog.globalize=function(a,b){b=b||goog.global;for(var c in a)b[c]=a[c]};
|
35
|
+
goog.addDependency=function(a,b,c,d){!COMPILED&&goog.DEPENDENCIES_ENABLED&&goog.debugLoader_.addDependency(a,b,c,d)};goog.ENABLE_DEBUG_LOADER=!0;goog.logToConsole_=function(a){goog.global.console&&goog.global.console.error(a)};
|
36
|
+
goog.require=function(a){if(!COMPILED){goog.ENABLE_DEBUG_LOADER&&goog.debugLoader_.requested(a);if(goog.isProvided_(a)){if(goog.isInModuleLoader_())return goog.module.getInternal_(a)}else if(goog.ENABLE_DEBUG_LOADER){var b=goog.moduleLoaderState_;goog.moduleLoaderState_=null;try{goog.debugLoader_.load_(a)}finally{goog.moduleLoaderState_=b}}return null}};goog.requireType=function(a){return{}};goog.basePath="";goog.nullFunction=function(){};
|
37
|
+
goog.abstractMethod=function(){throw Error("unimplemented abstract method");};goog.addSingletonGetter=function(a){a.instance_=void 0;a.getInstance=function(){if(a.instance_)return a.instance_;goog.DEBUG&&(goog.instantiatedSingletons_[goog.instantiatedSingletons_.length]=a);return a.instance_=new a}};goog.instantiatedSingletons_=[];goog.LOAD_MODULE_USING_EVAL=!0;goog.SEAL_MODULE_EXPORTS=goog.DEBUG;goog.loadedModules_={};goog.DEPENDENCIES_ENABLED=!COMPILED&&goog.ENABLE_DEBUG_LOADER;goog.TRANSPILE="detect";
|
38
|
+
goog.ASSUME_ES_MODULES_TRANSPILED=!1;goog.TRANSPILE_TO_LANGUAGE="";goog.TRANSPILER="transpile.js";goog.hasBadLetScoping=null;goog.useSafari10Workaround=function(){if(null==goog.hasBadLetScoping){try{var a=!eval('"use strict";let x = 1; function f() { return typeof x; };f() == "number";')}catch(b){a=!1}goog.hasBadLetScoping=a}return goog.hasBadLetScoping};goog.workaroundSafari10EvalBug=function(a){return"(function(){"+a+"\n;})();\n"};
|
39
|
+
goog.loadModule=function(a){var b=goog.moduleLoaderState_;try{goog.moduleLoaderState_={moduleName:"",declareLegacyNamespace:!1,type:goog.ModuleType.GOOG};if(goog.isFunction(a))var c=a.call(void 0,{});else if(goog.isString(a))goog.useSafari10Workaround()&&(a=goog.workaroundSafari10EvalBug(a)),c=goog.loadModuleFromSource_.call(void 0,a);else throw Error("Invalid module definition");var d=goog.moduleLoaderState_.moduleName;if(goog.isString(d)&&d)goog.moduleLoaderState_.declareLegacyNamespace?goog.constructNamespace_(d,
|
40
|
+
c):goog.SEAL_MODULE_EXPORTS&&Object.seal&&"object"==typeof c&&null!=c&&Object.seal(c),goog.loadedModules_[d]={exports:c,type:goog.ModuleType.GOOG,moduleId:goog.moduleLoaderState_.moduleName};else throw Error('Invalid module name "'+d+'"');}finally{goog.moduleLoaderState_=b}};goog.loadModuleFromSource_=function(a){eval(a);return{}};goog.normalizePath_=function(a){a=a.split("/");for(var b=0;b<a.length;)"."==a[b]?a.splice(b,1):b&&".."==a[b]&&a[b-1]&&".."!=a[b-1]?a.splice(--b,2):b++;return a.join("/")};
|
41
|
+
goog.loadFileSync_=function(a){if(goog.global.CLOSURE_LOAD_FILE_SYNC)return goog.global.CLOSURE_LOAD_FILE_SYNC(a);try{var b=new goog.global.XMLHttpRequest;b.open("get",a,!1);b.send();return 0==b.status||200==b.status?b.responseText:null}catch(c){return null}};
|
42
|
+
goog.transpile_=function(a,b,c){var d=goog.global.$jscomp;d||(goog.global.$jscomp=d={});var e=d.transpile;if(!e){var f=goog.basePath+goog.TRANSPILER,g=goog.loadFileSync_(f);if(g){(function(){(0,eval)(g+"\n//# sourceURL="+f)}).call(goog.global);if(goog.global.$gwtExport&&goog.global.$gwtExport.$jscomp&&!goog.global.$gwtExport.$jscomp.transpile)throw Error('The transpiler did not properly export the "transpile" method. $gwtExport: '+JSON.stringify(goog.global.$gwtExport));goog.global.$jscomp.transpile=
|
43
|
+
goog.global.$gwtExport.$jscomp.transpile;d=goog.global.$jscomp;e=d.transpile}}e||(e=d.transpile=function(a,b){goog.logToConsole_(b+" requires transpilation but no transpiler was found.");return a});return e(a,b,c)};
|
44
|
+
goog.typeOf=function(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";
|
45
|
+
else if("function"==b&&"undefined"==typeof a.call)return"object";return b};goog.isNull=function(a){return null===a};goog.isDefAndNotNull=function(a){return null!=a};goog.isArray=function(a){return"array"==goog.typeOf(a)};goog.isArrayLike=function(a){var b=goog.typeOf(a);return"array"==b||"object"==b&&"number"==typeof a.length};goog.isDateLike=function(a){return goog.isObject(a)&&"function"==typeof a.getFullYear};goog.isFunction=function(a){return"function"==goog.typeOf(a)};
|
46
|
+
goog.isObject=function(a){var b=typeof a;return"object"==b&&null!=a||"function"==b};goog.getUid=function(a){return a[goog.UID_PROPERTY_]||(a[goog.UID_PROPERTY_]=++goog.uidCounter_)};goog.hasUid=function(a){return!!a[goog.UID_PROPERTY_]};goog.removeUid=function(a){null!==a&&"removeAttribute"in a&&a.removeAttribute(goog.UID_PROPERTY_);try{delete a[goog.UID_PROPERTY_]}catch(b){}};goog.UID_PROPERTY_="closure_uid_"+(1E9*Math.random()>>>0);goog.uidCounter_=0;goog.getHashCode=goog.getUid;
|
47
|
+
goog.removeHashCode=goog.removeUid;goog.cloneObject=function(a){var b=goog.typeOf(a);if("object"==b||"array"==b){if("function"===typeof a.clone)return a.clone();b="array"==b?[]:{};for(var c in a)b[c]=goog.cloneObject(a[c]);return b}return a};goog.bindNative_=function(a,b,c){return a.call.apply(a.bind,arguments)};
|
48
|
+
goog.bindJs_=function(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var c=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(c,d);return a.apply(b,c)}}return function(){return a.apply(b,arguments)}};goog.bind=function(a,b,c){Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?goog.bind=goog.bindNative_:goog.bind=goog.bindJs_;return goog.bind.apply(null,arguments)};
|
49
|
+
goog.partial=function(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=c.slice();b.push.apply(b,arguments);return a.apply(this,b)}};goog.mixin=function(a,b){for(var c in b)a[c]=b[c]};goog.now=goog.TRUSTED_SITE&&Date.now||function(){return+new Date};
|
50
|
+
goog.globalEval=function(a){if(goog.global.execScript)goog.global.execScript(a,"JavaScript");else if(goog.global.eval){if(null==goog.evalWorksForGlobals_){try{goog.global.eval("var _evalTest_ = 1;")}catch(d){}if("undefined"!=typeof goog.global._evalTest_){try{delete goog.global._evalTest_}catch(d){}goog.evalWorksForGlobals_=!0}else goog.evalWorksForGlobals_=!1}if(goog.evalWorksForGlobals_)goog.global.eval(a);else{var b=goog.global.document,c=b.createElement("SCRIPT");c.type="text/javascript";c.defer=
|
51
|
+
!1;c.appendChild(b.createTextNode(a));b.head.appendChild(c);b.head.removeChild(c)}}else throw Error("goog.globalEval not available");};goog.evalWorksForGlobals_=null;
|
52
|
+
goog.getCssName=function(a,b){if("."==String(a).charAt(0))throw Error('className passed in goog.getCssName must not start with ".". You passed: '+a);var c=function(a){return goog.cssNameMapping_[a]||a},d=function(a){a=a.split("-");for(var b=[],d=0;d<a.length;d++)b.push(c(a[d]));return b.join("-")};d=goog.cssNameMapping_?"BY_WHOLE"==goog.cssNameMappingStyle_?c:d:function(a){return a};a=b?a+"-"+d(b):d(a);return goog.global.CLOSURE_CSS_NAME_MAP_FN?goog.global.CLOSURE_CSS_NAME_MAP_FN(a):a};
|
53
|
+
goog.setCssNameMapping=function(a,b){goog.cssNameMapping_=a;goog.cssNameMappingStyle_=b};!COMPILED&&goog.global.CLOSURE_CSS_NAME_MAPPING&&(goog.cssNameMapping_=goog.global.CLOSURE_CSS_NAME_MAPPING);goog.getMsg=function(a,b){b&&(a=a.replace(/\{\$([^}]+)}/g,function(a,d){return null!=b&&d in b?b[d]:a}));return a};goog.getMsgWithFallback=function(a,b){return a};goog.exportSymbol=function(a,b,c){goog.exportPath_(a,b,c)};goog.exportProperty=function(a,b,c){a[b]=c};
|
54
|
+
goog.inherits=function(a,b){function c(){}c.prototype=b.prototype;a.superClass_=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.base=function(a,c,f){for(var d=Array(arguments.length-2),e=2;e<arguments.length;e++)d[e-2]=arguments[e];return b.prototype[c].apply(a,d)}};
|
55
|
+
goog.base=function(a,b,c){var d=arguments.callee.caller;if(goog.STRICT_MODE_COMPATIBLE||goog.DEBUG&&!d)throw Error("arguments.caller not defined. goog.base() cannot be used with strict mode code. See http://www.ecma-international.org/ecma-262/5.1/#sec-C");if("undefined"!==typeof d.superClass_){for(var e=Array(arguments.length-1),f=1;f<arguments.length;f++)e[f-1]=arguments[f];return d.superClass_.constructor.apply(a,e)}if("string"!=typeof b&&"symbol"!=typeof b)throw Error("method names provided to goog.base must be a string or a symbol");
|
56
|
+
e=Array(arguments.length-2);for(f=2;f<arguments.length;f++)e[f-2]=arguments[f];f=!1;for(var g=a.constructor.prototype;g;g=Object.getPrototypeOf(g))if(g[b]===d)f=!0;else if(f)return g[b].apply(a,e);if(a[b]===d)return a.constructor.prototype[b].apply(a,e);throw Error("goog.base called from a method of one name to a method of a different name");};goog.scope=function(a){if(goog.isInModuleLoader_())throw Error("goog.scope is not supported within a module.");a.call(goog.global)};
|
57
|
+
COMPILED||(goog.global.COMPILED=COMPILED);goog.defineClass=function(a,b){var c=b.constructor,d=b.statics;c&&c!=Object.prototype.constructor||(c=function(){throw Error("cannot instantiate an interface (no constructor defined).");});c=goog.defineClass.createSealingConstructor_(c,a);a&&goog.inherits(c,a);delete b.constructor;delete b.statics;goog.defineClass.applyProperties_(c.prototype,b);null!=d&&(d instanceof Function?d(c):goog.defineClass.applyProperties_(c,d));return c};
|
58
|
+
goog.defineClass.SEAL_CLASS_INSTANCES=goog.DEBUG;goog.defineClass.createSealingConstructor_=function(a,b){if(!goog.defineClass.SEAL_CLASS_INSTANCES)return a;var c=!goog.defineClass.isUnsealable_(b),d=function(){var b=a.apply(this,arguments)||this;b[goog.UID_PROPERTY_]=b[goog.UID_PROPERTY_];this.constructor===d&&c&&Object.seal instanceof Function&&Object.seal(b);return b};return d};goog.defineClass.isUnsealable_=function(a){return a&&a.prototype&&a.prototype[goog.UNSEALABLE_CONSTRUCTOR_PROPERTY_]};
|
59
|
+
goog.defineClass.OBJECT_PROTOTYPE_FIELDS_="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");goog.defineClass.applyProperties_=function(a,b){for(var c in b)Object.prototype.hasOwnProperty.call(b,c)&&(a[c]=b[c]);for(var d=0;d<goog.defineClass.OBJECT_PROTOTYPE_FIELDS_.length;d++)c=goog.defineClass.OBJECT_PROTOTYPE_FIELDS_[d],Object.prototype.hasOwnProperty.call(b,c)&&(a[c]=b[c])};
|
60
|
+
goog.tagUnsealableClass=function(a){!COMPILED&&goog.defineClass.SEAL_CLASS_INSTANCES&&(a.prototype[goog.UNSEALABLE_CONSTRUCTOR_PROPERTY_]=!0)};goog.UNSEALABLE_CONSTRUCTOR_PROPERTY_="goog_defineClass_legacy_unsealable";
|
61
|
+
!COMPILED&&goog.DEPENDENCIES_ENABLED&&(goog.inHtmlDocument_=function(){var a=goog.global.document;return null!=a&&"write"in a},goog.isDocumentLoading_=function(){var a=goog.global.document;return a.attachEvent?"complete"!=a.readyState:"loading"==a.readyState},goog.findBasePath_=function(){if(goog.isDef(goog.global.CLOSURE_BASE_PATH)&&goog.isString(goog.global.CLOSURE_BASE_PATH))goog.basePath=goog.global.CLOSURE_BASE_PATH;else if(goog.inHtmlDocument_()){var a=goog.global.document,b=a.currentScript;
|
62
|
+
a=b?[b]:a.getElementsByTagName("SCRIPT");for(b=a.length-1;0<=b;--b){var c=a[b].src,d=c.lastIndexOf("?");d=-1==d?c.length:d;if("base.js"==c.substr(d-7,7)){goog.basePath=c.substr(0,d-7);break}}}},goog.findBasePath_(),goog.Transpiler=function(){this.requiresTranspilation_=null;this.transpilationTarget_=goog.TRANSPILE_TO_LANGUAGE},goog.Transpiler.prototype.createRequiresTranspilation_=function(){function a(a,b){e?d[a]=!0:b()?(c=a,d[a]=!1):e=d[a]=!0}function b(a){try{return!!eval(a)}catch(h){return!1}}
|
63
|
+
var c="es3",d={es3:!1},e=!1,f=goog.global.navigator&&goog.global.navigator.userAgent?goog.global.navigator.userAgent:"";a("es5",function(){return b("[1,].length==1")});a("es6",function(){return f.match(/Edge\/(\d+)(\.\d)*/i)?!1:b('(()=>{"use strict";class X{constructor(){if(new.target!=String)throw 1;this.x=42}}let q=Reflect.construct(X,[],String);if(q.x!=42||!(q instanceof String))throw 1;for(const a of[2,3]){if(a==2)continue;function f(z={a}){let a=0;return z.a}{function f(){return 0;}}return f()==3}})()')});
|
64
|
+
a("es7",function(){return b("2 ** 2 == 4")});a("es8",function(){return b("async () => 1, true")});a("es9",function(){return b("({...rest} = {}), true")});a("es_next",function(){return!1});return{target:c,map:d}},goog.Transpiler.prototype.needsTranspile=function(a,b){if("always"==goog.TRANSPILE)return!0;if("never"==goog.TRANSPILE)return!1;if(!this.requiresTranspilation_){var c=this.createRequiresTranspilation_();this.requiresTranspilation_=c.map;this.transpilationTarget_=this.transpilationTarget_||
|
65
|
+
c.target}if(a in this.requiresTranspilation_)return this.requiresTranspilation_[a]?!0:!goog.inHtmlDocument_()||"es6"!=b||"noModule"in goog.global.document.createElement("script")?!1:!0;throw Error("Unknown language mode: "+a);},goog.Transpiler.prototype.transpile=function(a,b){return goog.transpile_(a,b,this.transpilationTarget_)},goog.transpiler_=new goog.Transpiler,goog.protectScriptTag_=function(a){return a.replace(/<\/(SCRIPT)/ig,"\\x3c/$1")},goog.DebugLoader_=function(){this.dependencies_={};
|
66
|
+
this.idToPath_={};this.written_={};this.loadingDeps_=[];this.depsToLoad_=[];this.paused_=!1;this.factory_=new goog.DependencyFactory(goog.transpiler_);this.deferredCallbacks_={};this.deferredQueue_=[]},goog.DebugLoader_.prototype.bootstrap=function(a,b){function c(){d&&(goog.global.setTimeout(d,0),d=null)}var d=b;if(a.length){b=[];for(var e=0;e<a.length;e++){var f=this.getPathFromDeps_(a[e]);if(!f)throw Error("Unregonized namespace: "+a[e]);b.push(this.dependencies_[f])}f=goog.require;var g=0;for(e=
|
67
|
+
0;e<a.length;e++)f(a[e]),b[e].onLoad(function(){++g==a.length&&c()})}else c()},goog.DebugLoader_.prototype.loadClosureDeps=function(){this.depsToLoad_.push(this.factory_.createDependency(goog.normalizePath_(goog.basePath+"deps.js"),"deps.js",[],[],{},!1));this.loadDeps_()},goog.DebugLoader_.prototype.requested=function(a,b){(a=this.getPathFromDeps_(a))&&(b||this.areDepsLoaded_(this.dependencies_[a].requires))&&(b=this.deferredCallbacks_[a])&&(delete this.deferredCallbacks_[a],b())},goog.DebugLoader_.prototype.setDependencyFactory=
|
68
|
+
function(a){this.factory_=a},goog.DebugLoader_.prototype.load_=function(a){if(this.getPathFromDeps_(a)){var b=this,c=[],d=function(a){var e=b.getPathFromDeps_(a);if(!e)throw Error("Bad dependency path or symbol: "+a);if(!b.written_[e]){b.written_[e]=!0;a=b.dependencies_[e];for(e=0;e<a.requires.length;e++)goog.isProvided_(a.requires[e])||d(a.requires[e]);c.push(a)}};d(a);a=!!this.depsToLoad_.length;this.depsToLoad_=this.depsToLoad_.concat(c);this.paused_||a||this.loadDeps_()}else throw a="goog.require could not find: "+
|
69
|
+
a,goog.logToConsole_(a),Error(a);},goog.DebugLoader_.prototype.loadDeps_=function(){for(var a=this,b=this.paused_;this.depsToLoad_.length&&!b;)(function(){var c=!1,d=a.depsToLoad_.shift(),e=!1;a.loading_(d);var f={pause:function(){if(c)throw Error("Cannot call pause after the call to load.");b=!0},resume:function(){c?a.resume_():b=!1},loaded:function(){if(e)throw Error("Double call to loaded.");e=!0;a.loaded_(d)},pending:function(){for(var b=[],c=0;c<a.loadingDeps_.length;c++)b.push(a.loadingDeps_[c]);
|
70
|
+
return b},setModuleState:function(a){goog.moduleLoaderState_={type:a,moduleName:"",declareLegacyNamespace:!1}},registerEs6ModuleExports:function(a,b,c){c&&(goog.loadedModules_[c]={exports:b,type:goog.ModuleType.ES6,moduleId:c||""})},registerGoogModuleExports:function(a,b){goog.loadedModules_[a]={exports:b,type:goog.ModuleType.GOOG,moduleId:a}},clearModuleState:function(){goog.moduleLoaderState_=null},defer:function(b){if(c)throw Error("Cannot register with defer after the call to load.");a.defer_(d,
|
71
|
+
b)},areDepsLoaded:function(){return a.areDepsLoaded_(d.requires)}};try{d.load(f)}finally{c=!0}})();b&&this.pause_()},goog.DebugLoader_.prototype.pause_=function(){this.paused_=!0},goog.DebugLoader_.prototype.resume_=function(){this.paused_&&(this.paused_=!1,this.loadDeps_())},goog.DebugLoader_.prototype.loading_=function(a){this.loadingDeps_.push(a)},goog.DebugLoader_.prototype.loaded_=function(a){for(var b=0;b<this.loadingDeps_.length;b++)if(this.loadingDeps_[b]==a){this.loadingDeps_.splice(b,1);
|
72
|
+
break}for(b=0;b<this.deferredQueue_.length;b++)if(this.deferredQueue_[b]==a.path){this.deferredQueue_.splice(b,1);break}if(this.loadingDeps_.length==this.deferredQueue_.length&&!this.depsToLoad_.length)for(;this.deferredQueue_.length;)this.requested(this.deferredQueue_.shift(),!0);a.loaded()},goog.DebugLoader_.prototype.areDepsLoaded_=function(a){for(var b=0;b<a.length;b++){var c=this.getPathFromDeps_(a[b]);if(!c||!(c in this.deferredCallbacks_||goog.isProvided_(a[b])))return!1}return!0},goog.DebugLoader_.prototype.getPathFromDeps_=
|
73
|
+
function(a){return a in this.idToPath_?this.idToPath_[a]:a in this.dependencies_?a:null},goog.DebugLoader_.prototype.defer_=function(a,b){this.deferredCallbacks_[a.path]=b;this.deferredQueue_.push(a.path)},goog.LoadController=function(){},goog.LoadController.prototype.pause=function(){},goog.LoadController.prototype.resume=function(){},goog.LoadController.prototype.loaded=function(){},goog.LoadController.prototype.pending=function(){},goog.LoadController.prototype.registerEs6ModuleExports=function(a,
|
74
|
+
b,c){},goog.LoadController.prototype.setModuleState=function(a){},goog.LoadController.prototype.clearModuleState=function(){},goog.LoadController.prototype.defer=function(a){},goog.LoadController.prototype.areDepsLoaded=function(){},goog.Dependency=function(a,b,c,d,e){this.path=a;this.relativePath=b;this.provides=c;this.requires=d;this.loadFlags=e;this.loaded_=!1;this.loadCallbacks_=[]},goog.Dependency.prototype.getPathName=function(){var a=this.path,b=a.indexOf("://");0<=b&&(a=a.substring(b+3),b=
|
75
|
+
a.indexOf("/"),0<=b&&(a=a.substring(b+1)));return a},goog.Dependency.prototype.onLoad=function(a){this.loaded_?a():this.loadCallbacks_.push(a)},goog.Dependency.prototype.loaded=function(){this.loaded_=!0;var a=this.loadCallbacks_;this.loadCallbacks_=[];for(var b=0;b<a.length;b++)a[b]()},goog.Dependency.defer_=!1,goog.Dependency.callbackMap_={},goog.Dependency.registerCallback_=function(a){var b=Math.random().toString(32);goog.Dependency.callbackMap_[b]=a;return b},goog.Dependency.unregisterCallback_=
|
76
|
+
function(a){delete goog.Dependency.callbackMap_[a]},goog.Dependency.callback_=function(a,b){if(a in goog.Dependency.callbackMap_){for(var c=goog.Dependency.callbackMap_[a],d=[],e=1;e<arguments.length;e++)d.push(arguments[e]);c.apply(void 0,d)}else throw Error("Callback key "+a+" does not exist (was base.js loaded more than once?).");},goog.Dependency.prototype.load=function(a){if(goog.global.CLOSURE_IMPORT_SCRIPT)goog.global.CLOSURE_IMPORT_SCRIPT(this.path)?a.loaded():a.pause();else if(goog.inHtmlDocument_()){var b=
|
77
|
+
goog.global.document;if("complete"==b.readyState&&!goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING){if(/\bdeps.js$/.test(this.path)){a.loaded();return}throw Error('Cannot write "'+this.path+'" after document load');}if(!goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING&&goog.isDocumentLoading_()){var c=goog.Dependency.registerCallback_(function(b){goog.DebugLoader_.IS_OLD_IE_&&"complete"!=b.readyState||(goog.Dependency.unregisterCallback_(c),a.loaded())}),d=!goog.DebugLoader_.IS_OLD_IE_&&goog.getScriptNonce()?
|
78
|
+
' nonce="'+goog.getScriptNonce()+'"':"";d='<script src="'+this.path+'" '+(goog.DebugLoader_.IS_OLD_IE_?"onreadystatechange":"onload")+"=\"goog.Dependency.callback_('"+c+'\', this)" type="text/javascript" '+(goog.Dependency.defer_?"defer":"")+d+">\x3c/script>";b.write(goog.TRUSTED_TYPES_POLICY_?goog.TRUSTED_TYPES_POLICY_.createHTML(d):d)}else{var e=b.createElement("script");e.defer=goog.Dependency.defer_;e.async=!1;e.type="text/javascript";(d=goog.getScriptNonce())&&e.setAttribute("nonce",d);goog.DebugLoader_.IS_OLD_IE_?
|
79
|
+
(a.pause(),e.onreadystatechange=function(){if("loaded"==e.readyState||"complete"==e.readyState)a.loaded(),a.resume()}):e.onload=function(){e.onload=null;a.loaded()};e.src=goog.TRUSTED_TYPES_POLICY_?goog.TRUSTED_TYPES_POLICY_.createScriptURL(this.path):this.path;b.head.appendChild(e)}}else goog.logToConsole_("Cannot use default debug loader outside of HTML documents."),"deps.js"==this.relativePath?(goog.logToConsole_("Consider setting CLOSURE_IMPORT_SCRIPT before loading base.js, or setting CLOSURE_NO_DEPS to true."),
|
80
|
+
a.loaded()):a.pause()},goog.Es6ModuleDependency=function(a,b,c,d,e){goog.Dependency.call(this,a,b,c,d,e)},goog.inherits(goog.Es6ModuleDependency,goog.Dependency),goog.Es6ModuleDependency.prototype.load=function(a){function b(a,b){a=b?'<script type="module" crossorigin>'+b+"\x3c/script>":'<script type="module" crossorigin src="'+a+'">\x3c/script>';d.write(goog.TRUSTED_TYPES_POLICY_?goog.TRUSTED_TYPES_POLICY_.createHTML(a):a)}function c(a,b){var c=d.createElement("script");c.defer=!0;c.async=!1;c.type=
|
81
|
+
"module";c.setAttribute("crossorigin",!0);var e=goog.getScriptNonce();e&&c.setAttribute("nonce",e);b?c.textContent=goog.TRUSTED_TYPES_POLICY_?goog.TRUSTED_TYPES_POLICY_.createScript(b):b:c.src=goog.TRUSTED_TYPES_POLICY_?goog.TRUSTED_TYPES_POLICY_.createScriptURL(a):a;d.head.appendChild(c)}if(goog.global.CLOSURE_IMPORT_SCRIPT)goog.global.CLOSURE_IMPORT_SCRIPT(this.path)?a.loaded():a.pause();else if(goog.inHtmlDocument_()){var d=goog.global.document,e=this;if(goog.isDocumentLoading_()){var f=b;goog.Dependency.defer_=
|
82
|
+
!0}else f=c;var g=goog.Dependency.registerCallback_(function(){goog.Dependency.unregisterCallback_(g);a.setModuleState(goog.ModuleType.ES6)});f(void 0,'goog.Dependency.callback_("'+g+'")');f(this.path,void 0);var h=goog.Dependency.registerCallback_(function(b){goog.Dependency.unregisterCallback_(h);a.registerEs6ModuleExports(e.path,b,goog.moduleLoaderState_.moduleName)});f(void 0,'import * as m from "'+this.path+'"; goog.Dependency.callback_("'+h+'", m)');var k=goog.Dependency.registerCallback_(function(){goog.Dependency.unregisterCallback_(k);
|
83
|
+
a.clearModuleState();a.loaded()});f(void 0,'goog.Dependency.callback_("'+k+'")')}else goog.logToConsole_("Cannot use default debug loader outside of HTML documents."),a.pause()},goog.TransformedDependency=function(a,b,c,d,e){goog.Dependency.call(this,a,b,c,d,e);this.contents_=null;this.lazyFetch_=!goog.inHtmlDocument_()||!("noModule"in goog.global.document.createElement("script"))},goog.inherits(goog.TransformedDependency,goog.Dependency),goog.TransformedDependency.prototype.load=function(a){function b(){e.contents_=
|
84
|
+
goog.loadFileSync_(e.path);e.contents_&&(e.contents_=e.transform(e.contents_),e.contents_&&(e.contents_+="\n//# sourceURL="+e.path))}function c(){e.lazyFetch_&&b();if(e.contents_){f&&a.setModuleState(goog.ModuleType.ES6);try{var c=e.contents_;e.contents_=null;goog.globalEval(c);if(f)var d=goog.moduleLoaderState_.moduleName}finally{f&&a.clearModuleState()}f&&goog.global.$jscomp.require.ensure([e.getPathName()],function(){a.registerEs6ModuleExports(e.path,goog.global.$jscomp.require(e.getPathName()),
|
85
|
+
d)});a.loaded()}}function d(){var a=goog.global.document,b=goog.Dependency.registerCallback_(function(){goog.Dependency.unregisterCallback_(b);c()}),d='<script type="text/javascript">'+goog.protectScriptTag_('goog.Dependency.callback_("'+b+'");')+"\x3c/script>";a.write(goog.TRUSTED_TYPES_POLICY_?goog.TRUSTED_TYPES_POLICY_.createHTML(d):d)}var e=this;if(goog.global.CLOSURE_IMPORT_SCRIPT)b(),this.contents_&&goog.global.CLOSURE_IMPORT_SCRIPT("",this.contents_)?(this.contents_=null,a.loaded()):a.pause();
|
86
|
+
else{var f=this.loadFlags.module==goog.ModuleType.ES6;this.lazyFetch_||b();var g=1<a.pending().length,h=g&&goog.DebugLoader_.IS_OLD_IE_;g=goog.Dependency.defer_&&(g||goog.isDocumentLoading_());if(h||g)a.defer(function(){c()});else{var k=goog.global.document;h=goog.inHtmlDocument_()&&"ActiveXObject"in goog.global;if(f&&goog.inHtmlDocument_()&&goog.isDocumentLoading_()&&!h){goog.Dependency.defer_=!0;a.pause();var l=k.onreadystatechange;k.onreadystatechange=function(){"interactive"==k.readyState&&(k.onreadystatechange=
|
87
|
+
l,c(),a.resume());goog.isFunction(l)&&l.apply(void 0,arguments)}}else!goog.DebugLoader_.IS_OLD_IE_&&goog.inHtmlDocument_()&&goog.isDocumentLoading_()?d():c()}}},goog.TransformedDependency.prototype.transform=function(a){},goog.TranspiledDependency=function(a,b,c,d,e,f){goog.TransformedDependency.call(this,a,b,c,d,e);this.transpiler=f},goog.inherits(goog.TranspiledDependency,goog.TransformedDependency),goog.TranspiledDependency.prototype.transform=function(a){return this.transpiler.transpile(a,this.getPathName())},
|
88
|
+
goog.PreTranspiledEs6ModuleDependency=function(a,b,c,d,e){goog.TransformedDependency.call(this,a,b,c,d,e)},goog.inherits(goog.PreTranspiledEs6ModuleDependency,goog.TransformedDependency),goog.PreTranspiledEs6ModuleDependency.prototype.transform=function(a){return a},goog.GoogModuleDependency=function(a,b,c,d,e,f,g){goog.TransformedDependency.call(this,a,b,c,d,e);this.needsTranspile_=f;this.transpiler_=g},goog.inherits(goog.GoogModuleDependency,goog.TransformedDependency),goog.GoogModuleDependency.prototype.transform=
|
89
|
+
function(a){this.needsTranspile_&&(a=this.transpiler_.transpile(a,this.getPathName()));return goog.LOAD_MODULE_USING_EVAL&&goog.isDef(goog.global.JSON)?"goog.loadModule("+goog.global.JSON.stringify(a+"\n//# sourceURL="+this.path+"\n")+");":'goog.loadModule(function(exports) {"use strict";'+a+"\n;return exports});\n//# sourceURL="+this.path+"\n"},goog.DebugLoader_.IS_OLD_IE_=!(goog.global.atob||!goog.global.document||!goog.global.document.all),goog.DebugLoader_.prototype.addDependency=function(a,b,
|
90
|
+
c,d){b=b||[];a=a.replace(/\\/g,"/");var e=goog.normalizePath_(goog.basePath+a);d&&"boolean"!==typeof d||(d=d?{module:goog.ModuleType.GOOG}:{});c=this.factory_.createDependency(e,a,b,c,d,goog.transpiler_.needsTranspile(d.lang||"es3",d.module));this.dependencies_[e]=c;for(c=0;c<b.length;c++)this.idToPath_[b[c]]=e;this.idToPath_[a]=e},goog.DependencyFactory=function(a){this.transpiler=a},goog.DependencyFactory.prototype.createDependency=function(a,b,c,d,e,f){return e.module==goog.ModuleType.GOOG?new goog.GoogModuleDependency(a,
|
91
|
+
b,c,d,e,f,this.transpiler):f?new goog.TranspiledDependency(a,b,c,d,e,this.transpiler):e.module==goog.ModuleType.ES6?"never"==goog.TRANSPILE&&goog.ASSUME_ES_MODULES_TRANSPILED?new goog.PreTranspiledEs6ModuleDependency(a,b,c,d,e):new goog.Es6ModuleDependency(a,b,c,d,e):new goog.Dependency(a,b,c,d,e)},goog.debugLoader_=new goog.DebugLoader_,goog.loadClosureDeps=function(){goog.debugLoader_.loadClosureDeps()},goog.setDependencyFactory=function(a){goog.debugLoader_.setDependencyFactory(a)},goog.global.CLOSURE_NO_DEPS||
|
92
|
+
goog.debugLoader_.loadClosureDeps(),goog.bootstrap=function(a,b){goog.debugLoader_.bootstrap(a,b)});goog.TRUSTED_TYPES_POLICY_NAME="";goog.identity_=function(a){return a};goog.createTrustedTypesPolicy=function(a){var b=null;if("undefined"===typeof TrustedTypes||!TrustedTypes.createPolicy)return b;try{b=TrustedTypes.createPolicy(a,{createHTML:goog.identity_,createScript:goog.identity_,createScriptURL:goog.identity_,createURL:goog.identity_})}catch(c){goog.logToConsole_(c.message)}return b};
|
93
|
+
goog.TRUSTED_TYPES_POLICY_=goog.TRUSTED_TYPES_POLICY_NAME?goog.createTrustedTypesPolicy(goog.TRUSTED_TYPES_POLICY_NAME+"#base"):null;var sre={Variables:function(){}};sre.Variables.VERSION="3.0.0-beta.10";sre.Variables.LOCALES=["en","es","fr","nemeth"];sre.Variables.mathjaxVersion="3.0.0";sre.Variables.url="https://cdn.jsdelivr.net/npm/speech-rule-engine@"+sre.Variables.VERSION+"/lib/mathmaps";sre.Variables.WGXpath="https://cdn.jsdelivr.net/npm/wicked-good-xpath@1.3.0/dist/wgxpath.install.js";sre.SystemExternal=function(){};sre.SystemExternal.require=function(a){return"undefined"!==typeof process&&"undefined"!==typeof require?require(a):null};sre.SystemExternal.documentSupported=function(){return"undefined"!=typeof document};sre.SystemExternal.process=sre.SystemExternal.require("process");sre.SystemExternal.xmldom=sre.SystemExternal.documentSupported()?window:sre.SystemExternal.require("xmldom-sre");
|
94
|
+
sre.SystemExternal.document=sre.SystemExternal.documentSupported()?document:(new sre.SystemExternal.xmldom.DOMImplementation).createDocument("","",0);sre.SystemExternal.xpath=sre.SystemExternal.documentSupported()?document:function(){var a={document:{},XPathResult:{}};sre.SystemExternal.require("wicked-good-xpath").install(a);a.document.XPathResult=a.XPathResult;return a.document}();sre.SystemExternal.commander=sre.SystemExternal.documentSupported()?null:sre.SystemExternal.require("commander");
|
95
|
+
sre.SystemExternal.fs=sre.SystemExternal.documentSupported()?null:sre.SystemExternal.require("fs");sre.SystemExternal.url=sre.Variables.url;sre.SystemExternal.jsonPath=function(){return(sre.SystemExternal.process&&"undefined"!==typeof global?sre.SystemExternal.process.env.SRE_JSON_PATH||global.SRE_JSON_PATH||sre.SystemExternal.process.cwd():sre.SystemExternal.url)+"/"}();sre.SystemExternal.WGXpath=sre.Variables.WGXpath;sre.SystemExternal.wgxpath=null;sre.BrowserUtil={};sre.BrowserUtil.detectIE=function(){if(!("undefined"!==typeof window&&"ActiveXObject"in window&&"clipboardData"in window))return!1;sre.BrowserUtil.loadMapsForIE_();sre.BrowserUtil.loadWGXpath_();return!0};sre.BrowserUtil.detectEdge=function(){if(!("undefined"!==typeof window&&"MSGestureEvent"in window&&"chrome"in window&&null==window.chrome.loadTimes))return!1;document.evaluate=null;sre.BrowserUtil.loadWGXpath_(!0);return!0};sre.BrowserUtil.mapsForIE=null;
|
96
|
+
sre.BrowserUtil.loadWGXpath_=function(a){sre.BrowserUtil.loadScript(sre.SystemExternal.WGXpath);sre.BrowserUtil.installWGXpath_(a)};
|
97
|
+
sre.BrowserUtil.installWGXpath_=function(a,b){var c=b||1;"undefined"===typeof wgxpath&&10>c?setTimeout(function(){sre.BrowserUtil.installWGXpath_(a,c++)},200):10<=c||(sre.SystemExternal.wgxpath=wgxpath,a?sre.SystemExternal.wgxpath.install({document:document}):sre.SystemExternal.wgxpath.install(),sre.XpathUtil.xpathEvaluate=document.evaluate,sre.XpathUtil.xpathResult=XPathResult,sre.XpathUtil.createNSResolver=document.createNSResolver)};
|
98
|
+
sre.BrowserUtil.loadMapsForIE_=function(){sre.BrowserUtil.loadScript(sre.SystemExternal.jsonPath+"mathmaps_ie.js")};sre.BrowserUtil.loadScript=function(a){var b=sre.SystemExternal.document.createElement("script");b.type="text/javascript";b.src=a;sre.SystemExternal.document.head?sre.SystemExternal.document.head.appendChild(b):sre.SystemExternal.document.body.appendChild(b)};sre.DynamicProperties=function(a,b){this.properties_=a;this.order_=b||Object.keys(a)};sre.DynamicProperties.prototype.getProperties=function(){return this.properties_};sre.DynamicProperties.prototype.getOrder=function(){return this.order_};sre.DynamicProperties.prototype.getAxes=function(){return this.order_};sre.DynamicProperties.prototype.getProperty=function(a){return this.properties_[a]};sre.DynamicProperties.prototype.updateProperties=function(a){this.properties_=a};
|
99
|
+
sre.DynamicProperties.prototype.allProperties=function(){var a=[];this.order_.forEach(goog.bind(function(b){a.push(this.getProperty(b).slice())},this));return a};sre.DynamicProperties.prototype.toString=function(){var a=[];this.order_.forEach(goog.bind(function(b){a.push(b+": "+this.getProperty(b).toString())},this));return a.join("\n")};
|
100
|
+
sre.DynamicCstr=function(a,b){this.components_=a;var c={},d;for(d in a){var e=a[d];c[d]=[e];sre.DynamicCstr.Values_.getInstance().add(d,e)}sre.DynamicProperties.call(this,c,b)};goog.inherits(sre.DynamicCstr,sre.DynamicProperties);sre.DynamicCstr.prototype.getComponents=function(){return this.components_};sre.DynamicCstr.prototype.getValue=function(a){return this.components_[a]};
|
101
|
+
sre.DynamicCstr.prototype.getValues=function(){var a=[];this.order_.forEach(goog.bind(function(b){a.push(this.getValue(b))},this));return a};sre.DynamicCstr.prototype.allProperties=function(){for(var a=sre.DynamicCstr.superClass_.allProperties.call(this),b=0,c,d;c=a[b],d=this.order_[b];b++)d=this.getValue(d),-1===c.indexOf(d)&&c.unshift(d);return a};sre.DynamicCstr.prototype.toString=function(){return this.getValues().join(".")};
|
102
|
+
sre.DynamicCstr.prototype.equal=function(a){var b=a.getAxes();if(this.order_.length!==b.length)return!1;for(var c=0,d;d=b[c];c++){var e=this.getValue(d);if(!e||a.getValue(d)!==e)return!1}return!0};sre.DynamicCstr.Axis={DOMAIN:"domain",STYLE:"style",LOCALE:"locale",TOPIC:"topic",MODALITY:"modality"};sre.DynamicCstr.Values_=function(){this.axisToValues=sre.DynamicCstr.Values_.makeAxisValueObject_()};goog.addSingletonGetter(sre.DynamicCstr.Values_);
|
103
|
+
sre.DynamicCstr.Values_.prototype.add=function(a,b){this.axisToValues[a][b]=!0};sre.DynamicCstr.Values_.prototype.get=function(){var a={},b=sre.DynamicCstr.Values_.getInstance().axisToValues,c;for(c in b)a[c]=Object.keys(b[c]);return a};sre.DynamicCstr.Values_.makeAxisValueObject_=function(){var a={},b;for(b in sre.DynamicCstr.Axis)a[sre.DynamicCstr.Axis[b]]={};return a};sre.DynamicCstr.getAxisValues=function(){return sre.DynamicCstr.Values_.getInstance().get()};
|
104
|
+
sre.DynamicCstr.DEFAULT_ORDER=[sre.DynamicCstr.Axis.LOCALE,sre.DynamicCstr.Axis.MODALITY,sre.DynamicCstr.Axis.DOMAIN,sre.DynamicCstr.Axis.STYLE,sre.DynamicCstr.Axis.TOPIC];sre.DynamicCstr.DEFAULT_VALUE="default";sre.DynamicCstr.DEFAULT_VALUES={};sre.DynamicCstr.DEFAULT_VALUES[sre.DynamicCstr.Axis.LOCALE]="en";sre.DynamicCstr.DEFAULT_VALUES[sre.DynamicCstr.Axis.DOMAIN]=sre.DynamicCstr.DEFAULT_VALUE;sre.DynamicCstr.DEFAULT_VALUES[sre.DynamicCstr.Axis.STYLE]=sre.DynamicCstr.DEFAULT_VALUE;
|
105
|
+
sre.DynamicCstr.DEFAULT_VALUES[sre.DynamicCstr.Axis.TOPIC]=sre.DynamicCstr.DEFAULT_VALUE;sre.DynamicCstr.DEFAULT_VALUES[sre.DynamicCstr.Axis.MODALITY]="speech";sre.DynamicCstr.Parser=function(a){this.order_=a};sre.DynamicCstr.Parser.prototype.parse=function(a){a=a.split(".");var b={};if(a.length>this.order_.length)throw Error("Invalid dynamic constraint: "+b);for(var c=0,d;d=this.order_[c],a.length;c++){var e=a.shift();b[d]=e}return new sre.DynamicCstr(b,this.order_.slice(0,c))};
|
106
|
+
sre.DynamicCstr.Comparator=function(){};sre.DynamicCstr.Comparator.prototype.getReference=function(){};sre.DynamicCstr.Comparator.prototype.setReference=function(a,b){};sre.DynamicCstr.Comparator.prototype.match=function(a){};sre.DynamicCstr.Comparator.prototype.compare=function(a,b){};sre.DynamicCstr.DefaultComparator=function(a,b){this.reference_=a;this.fallback_=b||new sre.DynamicProperties(a.getProperties(),a.getOrder());this.order_=this.reference_.getOrder()};
|
107
|
+
sre.DynamicCstr.DefaultComparator.prototype.getReference=function(){return this.reference_};sre.DynamicCstr.DefaultComparator.prototype.setReference=function(a,b){this.reference_=a;this.fallback_=b||new sre.DynamicProperties(a.getProperties(),a.getOrder());this.order_=this.reference_.getOrder()};
|
108
|
+
sre.DynamicCstr.DefaultComparator.prototype.match=function(a){var b=a.getAxes();return b.length===this.reference_.getAxes().length&&b.every(goog.bind(function(b){var c=a.getValue(b);return c===this.reference_.getValue(b)||-1!==this.fallback_.getProperty(b).indexOf(c)},this))};
|
109
|
+
sre.DynamicCstr.DefaultComparator.prototype.compare=function(a,b){for(var c=!1,d=0,e;e=this.order_[d];d++){var f=a.getValue(e),g=b.getValue(e);if(!c){var h=this.reference_.getValue(e);if(h===f&&h!==g)return-1;if(h===g&&h!==f)return 1;if(h===f&&h===g)continue;h!==f&&h!==g&&(c=!0)}e=this.fallback_.getProperty(e);f=e.indexOf(f);g=e.indexOf(g);if(f<g)return-1;if(g<f)return 1}return 0};sre.DynamicCstr.DefaultComparator.prototype.toString=function(){return this.reference_.toString()+"\n"+this.fallback_.toString()};
|
110
|
+
sre.DynamicProperties.create=function(a){for(var b=sre.DynamicCstr.DEFAULT_ORDER,c={},d=Array.prototype.slice.call(arguments,0),e=0,f=d.length,g=b.length;e<f&&e<g;e++)c[b[e]]=d[e];return new sre.DynamicProperties(c)};sre.DynamicCstr.create=function(a){for(var b=sre.DynamicCstr.DEFAULT_ORDER,c={},d=Array.prototype.slice.call(arguments,0),e=0,f=d.length,g=b.length;e<f&&e<g;e++)c[b[e]]=d[e];return new sre.DynamicCstr(c)};
|
111
|
+
sre.DynamicCstr.defaultCstr=function(){return sre.DynamicCstr.create.apply(null,sre.DynamicCstr.DEFAULT_ORDER.map(function(a){return sre.DynamicCstr.DEFAULT_VALUES[a]}))};sre.DynamicCstr.validOrder=function(a){var b=sre.DynamicCstr.DEFAULT_ORDER.slice();return a.every(function(a){a=b.indexOf(a);return-1!==a&&b.splice(a,1)})};sre.Engine=function(){this.alternativeHost=this.activeHost=null;this.evaluator=sre.Engine.defaultEvaluator;this.parser=this.defaultParser=new sre.DynamicCstr.Parser(sre.DynamicCstr.DEFAULT_ORDER);this.parsers={};this.dynamicCstr=sre.DynamicCstr.defaultCstr();this.comparator=null;this.comparators={};this.domain=sre.DynamicCstr.DEFAULT_VALUES[sre.DynamicCstr.Axis.DOMAIN];this.style=sre.DynamicCstr.DEFAULT_VALUES[sre.DynamicCstr.Axis.STYLE];this.locale=sre.DynamicCstr.DEFAULT_VALUES[sre.DynamicCstr.Axis.LOCALE];
|
112
|
+
this.modality=sre.DynamicCstr.DEFAULT_VALUES[sre.DynamicCstr.Axis.MODALITY];this.walker="Table";this.semantics=!0;this.mode=sre.Engine.Mode.SYNC;this.speech=sre.Engine.Speech.NONE;this.structure=!1;this.ruleSets=[];this.cache=!0;this.markup=sre.Engine.Markup.NONE;this.isEdge=this.isIE=this.strict=!1;this.rate="100";this.pprint=!1;this.setupTests_=[];this.config=!1};goog.addSingletonGetter(sre.Engine);sre.Engine.personalityProps={PITCH:"pitch",RATE:"rate",VOLUME:"volume",PAUSE:"pause",JOIN:"join"};
|
113
|
+
sre.Engine.Mode={SYNC:"sync",ASYNC:"async",HTTP:"http"};sre.Engine.Speech={NONE:"none",SHALLOW:"shallow",DEEP:"deep"};sre.Engine.Markup={NONE:"none",PUNCTUATION:"punctuation",SSML:"ssml",SSML_STEP:"ssml_step",ACSS:"acss",SABLE:"sable",VOICEXML:"voicexml"};sre.Engine.registerTest=function(a){sre.Engine.getInstance().setupTests_.push(a)};sre.Engine.isReady=function(){return sre.Engine.getInstance().setupTests_.every(function(a){return a()})};
|
114
|
+
sre.Engine.prototype.setupBrowsers=function(){this.isIE=sre.BrowserUtil.detectIE();this.isEdge=sre.BrowserUtil.detectEdge()};sre.Engine.prototype.getAxisValues=function(){return sre.DynamicCstr.getAxisValues()};sre.Engine.defaultEvaluator=function(a,b){return a};sre.Engine.prototype.getRate=function(){var a=parseInt(this.rate,10);return isNaN(a)?100:a};sre.Engine.Error=function(a){Error.call(this);this.message=a||"";this.name="SRE Error"};goog.inherits(sre.Engine.Error,Error);
|
115
|
+
sre.Engine.BINARY_FEATURES=["strict","cache","semantics","structure","pprint"];sre.Engine.STRING_FEATURES="markup style domain speech walker locale modality rate".split(" ");
|
116
|
+
sre.Engine.prototype.setDynamicCstr=function(a){if(a)for(var b=Object.keys(a),c=0;c<b.length;c++){var d=b[c];-1!==sre.DynamicCstr.DEFAULT_ORDER.indexOf(d)&&(this[d]=a[d])}sre.Engine.DOMAIN_TO_STYLES[this.domain]=this.style;a=[this.locale,this.modality,this.domain,this.style].join(".");b=sre.DynamicProperties.create([sre.DynamicCstr.DEFAULT_VALUES[sre.DynamicCstr.Axis.LOCALE]],[sre.DynamicCstr.DEFAULT_VALUES[sre.DynamicCstr.Axis.MODALITY]],[sre.DynamicCstr.DEFAULT_VALUES[sre.DynamicCstr.Axis.DOMAIN]],
|
117
|
+
[sre.DynamicCstr.DEFAULT_VALUES[sre.DynamicCstr.Axis.STYLE]]);c=this.comparators[this.domain];this.parser=(d=this.parsers[this.domain])?d:this.defaultParser;this.dynamicCstr=this.parser.parse(a);this.dynamicCstr.updateProperties(b.getProperties());this.comparator=c?c():new sre.DynamicCstr.DefaultComparator(this.dynamicCstr)};sre.Engine.DOMAIN_TO_STYLES={mathspeak:"default",clearspeak:"default"};sre.BaseUtil={};sre.BaseUtil.removeEmpty=function(a){return a.filter(function(a){return a})};sre.BaseUtil.interleaveLists=function(a,b){for(var c=[];a.length||b.length;)a.length&&c.push(a.shift()),b.length&&c.push(b.shift());return c};sre.BaseUtil.setdifference=function(a,b){return a?b?a.filter(function(a){return 0>b.indexOf(a)}):a:[]};sre.BaseUtil.union=function(a,b){return a&&b?a.concat(sre.BaseUtil.setdifference(b,a)):a||b||[]};sre.BaseUtil.makePath=function(a){return a.match("/$")?a:a+"/"};sre.Debugger=function(){this.isActive_=!1;this.outputFunction_=console.info;this.stream_=null};goog.addSingletonGetter(sre.Debugger);sre.Debugger.prototype.init=function(a){a&&this.startDebugFile_(a);this.isActive_=!0};
|
118
|
+
sre.Debugger.prototype.startDebugFile_=function(a){this.stream_=sre.SystemExternal.fs.createWriteStream(a);this.outputFunction_=goog.bind(function(a){var b=Array.prototype.slice.call(arguments,0);this.stream_.write(b.join(" "));this.stream_.write("\n")},this);this.stream_.on("error",goog.bind(function(a){console.info("Invalid log file. Debug information sent to console.");this.outputFunction_=console.info},this));this.stream_.on("finish",function(){console.info("Finalizing debug file.")})};
|
119
|
+
sre.Debugger.prototype.output_=function(a){this.outputFunction_.apply(console.info===this.outputFunction_?console:this.outputFunction_,["Speech Rule Engine Debugger:"].concat(a))};sre.Debugger.prototype.output=function(a){this.isActive_&&this.output_(Array.prototype.slice.call(arguments,0))};sre.Debugger.prototype.generateOutput=function(a){this.isActive_&&this.output_(a.apply(a,[]))};sre.Debugger.prototype.exit=function(a){this.isActive_&&this.stream_&&this.stream_.end("","",a||function(){})};sre.Grammar=function(){this.parameters_={};this.corrections_={};this.preprocessors_={};this.stateStack_=[];this.currentFlags={}};goog.addSingletonGetter(sre.Grammar);sre.Grammar.ATTRIBUTE="grammar";sre.Grammar.prototype.clear=function(){this.parameters_={};this.stateStack_=[]};sre.Grammar.prototype.setParameter=function(a,b){var c=this.parameters_[a];b?this.parameters_[a]=b:delete this.parameters_[a];return c};sre.Grammar.prototype.getParameter=function(a){return this.parameters_[a]};
|
120
|
+
sre.Grammar.prototype.setCorrection=function(a,b){this.corrections_[a]=b};sre.Grammar.prototype.setPreprocessor=function(a,b){this.preprocessors_[a]=b};sre.Grammar.prototype.getCorrection=function(a){return this.corrections_[a]};sre.Grammar.prototype.getState=function(){var a=[],b;for(b in this.parameters_){var c=this.parameters_[b];a.push("string"===typeof c?b+":"+c:b)}return a.join(" ")};sre.Grammar.prototype.pushState=function(a){for(var b in a)a[b]=this.setParameter(b,a[b]);this.stateStack_.push(a)};
|
121
|
+
sre.Grammar.prototype.popState=function(){var a=this.stateStack_.pop(),b;for(b in a)this.setParameter(b,a[b])};sre.Grammar.prototype.setAttribute=function(a){if(a&&a.nodeType===sre.DomUtil.NodeType.ELEMENT_NODE){var b=this.getState();b&&a.setAttribute(sre.Grammar.ATTRIBUTE,b)}};sre.Grammar.prototype.preprocess=function(a){return this.runProcessors_(a,this.preprocessors_)};sre.Grammar.prototype.correct=function(a){return this.runProcessors_(a,this.corrections_)};
|
122
|
+
sre.Grammar.prototype.runProcessors_=function(a,b){for(var c in this.parameters_){var d=b[c];if(d){var e=this.parameters_[c];a=!0===e?d(a):d(a,e)}}return a};sre.Grammar.translateString_=function(a){var b=sre.Engine.getInstance();return b.evaluator(a,b.dynamicCstr)||a};
|
123
|
+
sre.Grammar.prototype.apply=function(a,b){this.currentFlags=b||{};a=this.currentFlags.adjust||this.currentFlags.preprocess?sre.Grammar.getInstance().preprocess(a):a;if(this.parameters_.translate||this.currentFlags.translate)a=sre.Grammar.translateString_(a);a=this.currentFlags.adjust||this.currentFlags.correct?sre.Grammar.getInstance().correct(a):a;this.currentFlags={};return a};
|
124
|
+
sre.Grammar.parseState=function(a){var b={};a=a.split(" ");for(var c=0,d=a.length;c<d;c++){var e=a[c].split(":"),f=e[1];b[e[0]]=f?f:!0}return b};sre.Grammar.parseInput=function(a){var b={};a=a.split(":");for(var c=0,d=a.length;c<d;c++){var e=a[c].split("="),f=e[0].trim();e[1]?b[f]=e[1].trim():f.match(/^!/)?b[f.slice(1)]=!1:b[f]=!0}return b};sre.Grammar.correctFont_=function(a,b){if(!b||!a)return a;b=sre.Messages.MS_FUNC.FONT_REGEXP(sre.Locale.localFont(b));return a.replace(b,"")};
|
125
|
+
sre.Grammar.addAnnotation_=function(a,b){return a+":"+b};sre.Grammar.noTranslateText_=function(a){a.match(new RegExp("^["+sre.Messages.REGEXP.TEXT+"]+$"))&&(sre.Grammar.getInstance().currentFlags.translate=!1);return a};sre.Grammar.getInstance().setCorrection("ignoreFont",sre.Grammar.correctFont_);sre.Grammar.getInstance().setPreprocessor("annotation",sre.Grammar.addAnnotation_);sre.Grammar.getInstance().setPreprocessor("noTranslateText",sre.Grammar.noTranslateText_);
|
126
|
+
sre.Grammar.getInstance().setCorrection("ignoreCaps",sre.Grammar.correctFont_);sre.XpathUtil={};sre.XpathUtil.xpathSupported=function(){return"undefined"==typeof XPathResult?!1:!0};sre.XpathUtil.currentDocument=null;sre.XpathUtil.xpathEvaluate=sre.XpathUtil.xpathSupported()?document.evaluate:sre.SystemExternal.xpath.evaluate;sre.XpathUtil.xpathResult=sre.XpathUtil.xpathSupported()?XPathResult:sre.SystemExternal.xpath.XPathResult;sre.XpathUtil.createNSResolver=sre.XpathUtil.xpathSupported()?document.createNSResolver:sre.SystemExternal.xpath.createNSResolver;
|
127
|
+
sre.XpathUtil.nameSpaces_={xhtml:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",mml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};sre.XpathUtil.resolveNameSpace=function(a){return sre.XpathUtil.nameSpaces_[a]||null};sre.XpathUtil.resolver_=function(){this.lookupNamespaceURI=sre.XpathUtil.resolveNameSpace};
|
128
|
+
sre.XpathUtil.evaluateXpath_=function(a,b,c){var d=sre.Engine.getInstance();return d.mode!==sre.Engine.Mode.HTTP||d.isIE||d.isEdge?sre.XpathUtil.xpathEvaluate(a,b,new sre.XpathUtil.resolver_,c,null):sre.XpathUtil.currentDocument.evaluate(a,b,sre.XpathUtil.resolveNameSpace,c,null)};sre.XpathUtil.evalXPath=function(a,b){try{var c=sre.XpathUtil.evaluateXpath_(a,b,sre.XpathUtil.xpathResult.ORDERED_NODE_ITERATOR_TYPE)}catch(d){return[]}a=[];for(b=c.iterateNext();b;b=c.iterateNext())a.push(b);return a};
|
129
|
+
sre.XpathUtil.getLeafNodes=function(a){return sre.XpathUtil.evalXPath(".//*[count(*)=0]",a)};sre.XpathUtil.evaluateBoolean=function(a,b){try{var c=sre.XpathUtil.evaluateXpath_(a,b,sre.XpathUtil.xpathResult.BOOLEAN_TYPE)}catch(d){return!1}return c.booleanValue};sre.XpathUtil.evaluateString=function(a,b){try{var c=sre.XpathUtil.evaluateXpath_(a,b,sre.XpathUtil.xpathResult.STRING_TYPE)}catch(d){return""}return c.stringValue};sre.DomUtil={};sre.DomUtil.toArray=function(a){for(var b=[],c=0,d=a.length;c<d;c++)b.push(a[c]);return b};sre.DomUtil.trimInput_=function(a){a=a.replace(/ /g,"\u00a0");return a.replace(/>[ \f\n\r\t\v\u200b]+</g,"><").trim()};sre.DomUtil.XML_ENTITIES={"<":!0,">":!0,"&":!0,""":!0,"'":!0};
|
130
|
+
sre.DomUtil.parseInput=function(a,b){b=b||sre.Engine.Error;var c=new sre.SystemExternal.xmldom.DOMParser;a=sre.DomUtil.trimInput_(a);var d=!!a.match(/&(?!lt|gt|amp|quot|apos)\w+;/g);if(!a)throw new b("Empty input!");try{var e=c.parseFromString(a,d?"text/html":"text/xml");return sre.Engine.getInstance().mode===sre.Engine.Mode.HTTP?(sre.XpathUtil.currentDocument=e,d?e.body.childNodes[0]:e.documentElement):e.documentElement}catch(f){throw new b("Illegal input: "+f.message);}};
|
131
|
+
sre.DomUtil.NodeType={ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12};sre.DomUtil.replaceNode=function(a,b){a.parentNode&&(a.parentNode.insertBefore(b,a),a.parentNode.removeChild(a))};sre.DomUtil.createElement=function(a){return sre.SystemExternal.document.createElement(a)};
|
132
|
+
sre.DomUtil.createElementNS=function(a,b){return sre.SystemExternal.document.createElementNS(a,b)};sre.DomUtil.createTextNode=function(a){return sre.SystemExternal.document.createTextNode(a)};
|
133
|
+
sre.DomUtil.formatXml=function(a){var b="",c=/(>)(<)(\/*)/g;a=a.replace(c,"$1\r\n$2$3");var d=0;a=a.split("\r\n");c=/(\.)*(<)(\/*)/g;for(a=a.map(function(a){return a.replace(c,"$1\r\n$2$3").split("\r\n")}).reduce(function(a,b){return a.concat(b)},[]);a.length;){var e=a.shift();if(e){var f=0;if(e.match(/^<\w[^>\/]*>[^>]+$/)){var g=sre.DomUtil.matchingStartEnd_(e,a[0]);g[0]?g[1]?(e+=a.shift().slice(0,-g[1].length),g[1].trim()&&a.unshift(g[1])):e+=a.shift():f=1}else e.match(/^<\/\w/)?0!=d&&--d:e.match(/^<\w[^>]*[^\/]>.*$/)?
|
134
|
+
f=1:e.match(/^<\w[^>]*\/>.+$/)?(g=e.indexOf(">")+1,e.slice(g).trim()&&a.unshift(),e=e.slice(0,g)):f=0;b+=Array(d+1).join(" ")+e+"\r\n";d+=f}}return b};sre.DomUtil.matchingStartEnd_=function(a,b){if(!b)return[!1,""];a=a.match(/^<([^> ]+).*>/);b=b.match(/^<\/([^>]+)>(.*)/);return a&&b&&a[1]===b[1]?[!0,b[2]]:[!1,""]};sre.DomUtil.dataAttribute=function(a){a.match(/^data-/)&&(a=a.substr(5));return a.replace(/-([a-z])/g,function(a,c){return c.toUpperCase()})};
|
135
|
+
sre.DomUtil.getDataAttribute=function(a,b){return a.dataset?a.dataset[sre.DomUtil.dataAttribute(b)]:a.getAttribute(b)};sre.DomUtil.querySelectorAllByAttr=function(a,b){return a.querySelectorAll?sre.DomUtil.toArray(a.querySelectorAll("["+b+"]")):sre.XpathUtil.evalXPath(".//*[@"+b+"]",a)};sre.DomUtil.querySelectorAllByAttrValue=function(a,b,c){return a.querySelectorAll?sre.DomUtil.toArray(a.querySelectorAll("["+b+'="'+c+'"]')):sre.XpathUtil.evalXPath(".//*[@"+b+'="'+c+'"]',a)};
|
136
|
+
sre.DomUtil.querySelectorAll=function(a,b){return a.querySelectorAll?sre.DomUtil.toArray(a.querySelectorAll(b)):sre.XpathUtil.evalXPath(".//"+b,a)};sre.DomUtil.tagName=function(a){return a.tagName.toUpperCase()};sre.Messages={};sre.Messages.MS={START:"",FRAC_V:"",FRAC_B:"",FRAC_S:"",END:"",FRAC_OVER:"",TWICE:"",NEST_FRAC:"",ENDFRAC:"",SUPER:"",SUB:"",SUP:"",SUPERSCRIPT:"",SUBSCRIPT:"",BASELINE:"",BASE:"",NESTED:"",NEST_ROOT:"",STARTROOT:"",ENDROOT:"",ROOTINDEX:"",ROOT:"",INDEX:"",UNDER:"",UNDERSCRIPT:"",OVER:"",OVERSCRIPT:""};sre.Messages.MS_FUNC={FRAC_NEST_DEPTH:function(a){return!1},RADICAL_NEST_DEPTH:function(a){return""},COMBINE_ROOT_INDEX:function(a,b){return a}};sre.Messages.MS_ROOT_INDEX={};
|
137
|
+
sre.Messages.FONT={bold:"","bold-fraktur":"","bold-italic":"","bold-script":"",caligraphic:"","caligraphic-bold":"","double-struck":"","double-struck-italic":"",fraktur:"",italic:"",monospace:"",normal:"",oldstyle:"","oldstyle-bold":"",script:"","sans-serif":"","sans-serif-italic":"","sans-serif-bold":"","sans-serif-bold-italic":"",unknown:""};
|
138
|
+
sre.Messages.EMBELLISH={"super":"",sub:"",circled:"",parenthesized:"",period:"","negative-circled":"","double-circled":"","circled-sans-serif":"","negative-circled-sans-serif":"",blackboard:"",comma:"",squared:"","negative-squared":""};
|
139
|
+
sre.Messages.ROLE={addition:"",multiplication:"",subtraction:"",division:"",equality:"",inequality:"",element:"",arrow:"",determinant:"",rowvector:"",binomial:"",squarematrix:"","set empty":"","set extended":"","set singleton":"","set collection":"",label:"",multiline:"",matrix:"",vector:"",cases:"",table:"",unknown:""};
|
140
|
+
sre.Messages.ENCLOSE={longdiv:"",actuarial:"",radical:"",box:"",roundedbox:"",circle:"",left:"",right:"",top:"",bottom:"",updiagonalstrike:"",downdiagonalstrike:"",verticalstrike:"",horizontalstrike:"",madruwb:"",updiagonalarrow:"",phasorangle:"",unknown:""};sre.Messages.NAVIGATE={COLLAPSIBLE:"",EXPANDABLE:"",LEVEL:""};sre.Messages.REGEXP={TEXT:"a-zA-Z",NUMBER:"",DECIMAL_MARK:"",DIGIT_GROUP:"",JOINER_SUBSUPER:" "};sre.Messages.PLURAL_UNIT={};
|
141
|
+
sre.Messages.PLURAL=function(a){return/.*s$/.test(a)?a:a+"s"};sre.Messages.NUMBERS={wordOrdinal:function(a){return a.toString()},simpleOrdinal:function(a){return a.toString()},numberToWords:function(a){return a.toString()},numberToOrdinal:function(a,b){return a.toString()},vulgarSep:"-"};sre.Messages.ALPHABETS={latinSmall:[],latinCap:[],greekSmall:[],greekCap:[]};sre.Messages.ALPHABET_PREFIXES={capPrefix:{default:""},smallPrefix:{default:""},digitPrefix:{default:""}};
|
142
|
+
sre.Messages.ALPHABET_TRANSFORMERS={digit:{default:function(a){return a.toString()}},letter:{default:function(a){return a}}};sre.Messages.ALPHABET_COMBINER=function(a,b,c){return a};sre.NumbersUtil={};sre.NumbersUtil.ordinalCounter=function(a,b){var c=0;return function(){return sre.Messages.NUMBERS.simpleOrdinal(++c)+" "+b}};
|
143
|
+
sre.NumbersUtil.convertVulgarFraction_=function(a){if(!a.childNodes||!a.childNodes[0]||!a.childNodes[0].childNodes||2>a.childNodes[0].childNodes.length||a.childNodes[0].childNodes[0].tagName!==sre.SemanticAttr.Type.NUMBER||a.childNodes[0].childNodes[0].getAttribute("role")!==sre.SemanticAttr.Role.INTEGER||a.childNodes[0].childNodes[1].tagName!==sre.SemanticAttr.Type.NUMBER||a.childNodes[0].childNodes[1].getAttribute("role")!==sre.SemanticAttr.Role.INTEGER)return{convertible:!1,content:a.textContent};
|
144
|
+
var b=a.childNodes[0].childNodes[1].textContent;a=a.childNodes[0].childNodes[0].textContent;var c=Number(b),d=Number(a);return isNaN(c)||isNaN(d)?{convertible:!1,content:a+" "+sre.Messages.MS.FRAC_OVER+" "+b}:{convertible:!0,enumerator:d,denominator:c}};
|
145
|
+
sre.NumbersUtil.vulgarFraction=function(a){a=sre.NumbersUtil.convertVulgarFraction_(a);return a.convertible&&a.enumerator&&a.denominator?sre.Messages.NUMBERS.numberToWords(a.enumerator)+sre.Messages.NUMBERS.vulgarSep+sre.Messages.NUMBERS.numberToOrdinal(a.denominator,1!==a.enumerator):a.content||""};sre.NumbersUtil.vulgarFractionSmall=function(a,b,c){var d=sre.NumbersUtil.convertVulgarFraction_(a);return d.convertible?(a=d.enumerator,d=d.denominator,0<a&&a<b&&0<d&&d<c):!1};
|
146
|
+
sre.NumbersUtil.ordinalPosition=function(a){var b=sre.DomUtil.toArray(a.parentNode.childNodes);return sre.Messages.NUMBERS.simpleOrdinal(b.indexOf(a)+1).toString()};sre.SemanticUtil=function(){};sre.SemanticUtil.objectsToKeys=function(a){a=Array.prototype.slice.call(arguments,0);var b=[];return b.concat.apply(b,a.map(Object.keys))};sre.SemanticUtil.objectsToValues=function(a){a=Array.prototype.slice.call(arguments,0);var b=[];a.forEach(function(a){for(var c in a)b.push(a[c])});return b};
|
147
|
+
sre.SemanticUtil.unicodeToNumber=function(a){if(!a||2<a.length)return null;if(2==a.length){var b=a.charCodeAt(0);a=a.charCodeAt(1);return 55296<=b&&56319>=b&&!isNaN(a)?1024*(b-55296)+(a-56320)+65536:null}return a.charCodeAt(0)};sre.SemanticUtil.numberToUnicode=function(a){return 65536>a?String.fromCharCode(a):String.fromCharCode((a-65536)/1024+55296,(a-65536)%1024+56320)};
|
148
|
+
sre.SemanticUtil.splitUnicode=function(a){a=a.split("");for(var b=[],c=0,d;d=a[c];c++)"\ud800"<=d&&"\udbff">=d&&a[c+1]?b.push(d+a[++c]):b.push(d);return b};sre.SemanticUtil.LEAFTAGS=["MO","MI","MN","MTEXT","MS"];sre.SemanticUtil.IGNORETAGS="MERROR MPHANTOM MSPACE MALIGNGROUP MALIGNMARK MPRESCRIPTS ANNOTATION ANNOTATION-XML".split(" ");sre.SemanticUtil.EMPTYTAGS="MATH MROW MPADDED MACTION NONE MSTYLE SEMANTICS".split(" ");sre.SemanticUtil.hasMathTag=function(a){return!!a&&"MATH"===sre.DomUtil.tagName(a)};
|
149
|
+
sre.SemanticUtil.hasIgnoreTag=function(a){return!!a&&-1!==sre.SemanticUtil.IGNORETAGS.indexOf(sre.DomUtil.tagName(a))};sre.SemanticUtil.hasEmptyTag=function(a){return!!a&&-1!==sre.SemanticUtil.EMPTYTAGS.indexOf(sre.DomUtil.tagName(a))};sre.SemanticUtil.purgeNodes=function(a){for(var b=[],c=0,d;d=a[c];c++){var e=sre.DomUtil.tagName(d);-1!=sre.SemanticUtil.IGNORETAGS.indexOf(e)||-1!=sre.SemanticUtil.EMPTYTAGS.indexOf(e)&&0==d.childNodes.length||b.push(d)}return b};
|
150
|
+
sre.SemanticUtil.isZeroLength=function(a){return a?-1!=="negativeveryverythinmathspace negativeverythinmathspace negativethinmathspace negativemediummathspace negativethickmathspace negativeverythickmathspace negativeveryverythickmathspace".split(" ").indexOf(a)?!0:(a=a.match(/[0-9\.]+/))?0===parseFloat(a)?!0:!1:!1:!1};sre.SemanticAttr=function(){this.generalPunctuations='!"#%&:;?@\\\u00a1\u00a7\u00b6\u00bf\u2017\u2020\u2021\u2022\u2023\u2024\u2025\u2027\u2030\u2031\u2038\u203b\u203c\u203d\u203e\u2041\u2042\u2043\u2047\u2048\u2049\u204b\u204c\u204d\u204e\u204f\u2050\u2051\u2053\u2055\u2056\u2058\u2059\u205a\u205b\u205c\u205d\u205e\ufe10\ufe13\ufe14\ufe15\ufe16\ufe30\ufe45\ufe46\ufe49\ufe4a\ufe4b\ufe4c\ufe50\ufe54\ufe55\ufe56\ufe57\ufe5f\ufe60\ufe61\ufe68\ufe6a\ufe6b\uff01\uff02\uff03\uff05\uff06\uff07\uff0a\uff0c\uff0f\uff1a\uff1b\uff1f\uff20\uff3c'.split("");
|
151
|
+
this.colons=[":","\uff1a","\ufe55"];this.invisibleComma_=sre.SemanticUtil.numberToUnicode(8291);this.commas=[",",this.invisibleComma_];this.ellipses="\u2026\u22ee\u22ef\u22f0\u22f1\ufe19".split("");this.fullStops=[".","\ufe52","\uff0e"];this.dashes="\u2012\u2013\u2014\u2015\u301c\ufe31\ufe32\ufe58".split("");this.primes="'\u2032\u2033\u2034\u2035\u2036\u2037\u2057".split("");this.degrees=["\u00b0"];this.openClosePairs={"(":")","[":"]","{":"}","\u2045":"\u2046","\u2329":"\u232a","\u2768":"\u2769",
|
152
|
+
"\u276a":"\u276b","\u276c":"\u276d","\u276e":"\u276f","\u2770":"\u2771","\u2772":"\u2773","\u2774":"\u2775","\u27c5":"\u27c6","\u27e6":"\u27e7","\u27e8":"\u27e9","\u27ea":"\u27eb","\u27ec":"\u27ed","\u27ee":"\u27ef","\u2983":"\u2984","\u2985":"\u2986","\u2987":"\u2988","\u2989":"\u298a","\u298b":"\u298c","\u298d":"\u298e","\u298f":"\u2990","\u2991":"\u2992","\u2993":"\u2994","\u2995":"\u2996","\u2997":"\u2998","\u29d8":"\u29d9","\u29da":"\u29db","\u29fc":"\u29fd","\u2e22":"\u2e23","\u2e24":"\u2e25",
|
153
|
+
"\u2e26":"\u2e27","\u2e28":"\u2e29","\u3008":"\u3009","\u300a":"\u300b","\u300c":"\u300d","\u300e":"\u300f","\u3010":"\u3011","\u3014":"\u3015","\u3016":"\u3017","\u3018":"\u3019","\u301a":"\u301b","\u301d":"\u301e","\ufd3e":"\ufd3f","\ufe17":"\ufe18","\ufe59":"\ufe5a","\ufe5b":"\ufe5c","\ufe5d":"\ufe5e","\uff08":"\uff09","\uff3b":"\uff3d","\uff5b":"\uff5d","\uff5f":"\uff60","\uff62":"\uff63","\u2308":"\u2309","\u230a":"\u230b","\u230c":"\u230d","\u230e":"\u230f","\u231c":"\u231d","\u231e":"\u231f",
|
154
|
+
"\u239b":"\u239e","\u239c":"\u239f","\u239d":"\u23a0","\u23a1":"\u23a4","\u23a2":"\u23a5","\u23a3":"\u23a6","\u23a7":"\u23ab","\u23a8":"\u23ac","\u23a9":"\u23ad","\u23b0":"\u23b1","\u23b8":"\u23b9"};this.topBottomPairs={"\u23b4":"\u23b5","\u23dc":"\u23dd","\u23de":"\u23df","\u23e0":"\u23e1","\ufe35":"\ufe36","\ufe37":"\ufe38","\ufe39":"\ufe3a","\ufe3b":"\ufe3c","\ufe3d":"\ufe3e","\ufe3f":"\ufe40","\ufe41":"\ufe42","\ufe43":"\ufe44","\ufe47":"\ufe48"};this.leftFences=sre.SemanticUtil.objectsToKeys(this.openClosePairs);
|
155
|
+
this.rightFences=sre.SemanticUtil.objectsToValues(this.openClosePairs);this.rightFences.push("\u301f");this.topFences=sre.SemanticUtil.objectsToKeys(this.topBottomPairs);this.bottomFences=sre.SemanticUtil.objectsToValues(this.topBottomPairs);this.neutralFences="|\u00a6\u2016\u2758\u2980\u2af4\uffe4\uff5c".split("");this.allFences=this.neutralFences.concat(this.leftFences,this.rightFences,this.topFences,this.bottomFences);this.capitalLatin="ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("");this.smallLatin="abcdefghijklmnopqrstuvwxyz\u0131\u0237".split("");
|
156
|
+
this.capitalLatinFullWidth="\uff21\uff22\uff23\uff24\uff25\uff26\uff27\uff28\uff29\uff2a\uff2b\uff2c\uff2d\uff2e\uff2f\uff30\uff31\uff32\uff33\uff34\uff35\uff36\uff37\uff38\uff39\uff3a".split("");this.smallLatinFullWidth="\uff41\uff42\uff43\uff44\uff45\uff46\uff47\uff48\uff49\uff4a\uff4b\uff4c\uff4d\uff4e\uff4f\uff50\uff51\uff52\uff53\uff54\uff55\uff56\uff57\uff58\uff59\uff5a".split("");this.capitalLatinBold="\ud835\udc00 \ud835\udc01 \ud835\udc02 \ud835\udc03 \ud835\udc04 \ud835\udc05 \ud835\udc06 \ud835\udc07 \ud835\udc08 \ud835\udc09 \ud835\udc0a \ud835\udc0b \ud835\udc0c \ud835\udc0d \ud835\udc0e \ud835\udc0f \ud835\udc10 \ud835\udc11 \ud835\udc12 \ud835\udc13 \ud835\udc14 \ud835\udc15 \ud835\udc16 \ud835\udc17 \ud835\udc18 \ud835\udc19".split(" ");
|
157
|
+
this.smallLatinBold="\ud835\udc1a \ud835\udc1b \ud835\udc1c \ud835\udc1d \ud835\udc1e \ud835\udc1f \ud835\udc20 \ud835\udc21 \ud835\udc22 \ud835\udc23 \ud835\udc24 \ud835\udc25 \ud835\udc26 \ud835\udc27 \ud835\udc28 \ud835\udc29 \ud835\udc2a \ud835\udc2b \ud835\udc2c \ud835\udc2d \ud835\udc2e \ud835\udc2f \ud835\udc30 \ud835\udc31 \ud835\udc32 \ud835\udc33".split(" ");this.capitalLatinItalic="\ud835\udc34 \ud835\udc35 \ud835\udc36 \ud835\udc37 \ud835\udc38 \ud835\udc39 \ud835\udc3a \ud835\udc3b \ud835\udc3c \ud835\udc3d \ud835\udc3e \ud835\udc3f \ud835\udc40 \ud835\udc41 \ud835\udc42 \ud835\udc43 \ud835\udc44 \ud835\udc45 \ud835\udc46 \ud835\udc47 \ud835\udc48 \ud835\udc49 \ud835\udc4a \ud835\udc4b \ud835\udc4c \ud835\udc4d".split(" ");
|
158
|
+
this.smallLatinItalic="\ud835\udc4e \ud835\udc4f \ud835\udc50 \ud835\udc51 \ud835\udc52 \ud835\udc53 \ud835\udc54 \u210e \ud835\udc56 \ud835\udc57 \ud835\udc58 \ud835\udc59 \ud835\udc5a \ud835\udc5b \ud835\udc5c \ud835\udc5d \ud835\udc5e \ud835\udc5f \ud835\udc60 \ud835\udc61 \ud835\udc62 \ud835\udc63 \ud835\udc64 \ud835\udc65 \ud835\udc66 \ud835\udc67 \ud835\udea4 \ud835\udea5".split(" ");this.capitalLatinScript="\ud835\udc9c \u212c \ud835\udc9e \ud835\udc9f \u2130 \u2131 \ud835\udca2 \u210b \u2110 \ud835\udca5 \ud835\udca6 \u2112 \u2133 \ud835\udca9 \ud835\udcaa \ud835\udcab \ud835\udcac \u211b \ud835\udcae \ud835\udcaf \ud835\udcb0 \ud835\udcb1 \ud835\udcb2 \ud835\udcb3 \ud835\udcb4 \ud835\udcb5 \u2118".split(" ");
|
159
|
+
this.smallLatinScript="\ud835\udcb6 \ud835\udcb7 \ud835\udcb8 \ud835\udcb9 \u212f \ud835\udcbb \u210a \ud835\udcbd \ud835\udcbe \ud835\udcbf \ud835\udcc0 \ud835\udcc1 \ud835\udcc2 \ud835\udcc3 \u2134 \ud835\udcc5 \ud835\udcc6 \ud835\udcc7 \ud835\udcc8 \ud835\udcc9 \ud835\udcca \ud835\udccb \ud835\udccc \ud835\udccd \ud835\udcce \ud835\udccf \u2113".split(" ");this.capitalLatinBoldScript="\ud835\udcd0 \ud835\udcd1 \ud835\udcd2 \ud835\udcd3 \ud835\udcd4 \ud835\udcd5 \ud835\udcd6 \ud835\udcd7 \ud835\udcd8 \ud835\udcd9 \ud835\udcda \ud835\udcdb \ud835\udcdc \ud835\udcdd \ud835\udcde \ud835\udcdf \ud835\udce0 \ud835\udce1 \ud835\udce2 \ud835\udce3 \ud835\udce4 \ud835\udce5 \ud835\udce6 \ud835\udce7 \ud835\udce8 \ud835\udce9".split(" ");
|
160
|
+
this.smallLatinBoldScript="\ud835\udcea \ud835\udceb \ud835\udcec \ud835\udced \ud835\udcee \ud835\udcef \ud835\udcf0 \ud835\udcf1 \ud835\udcf2 \ud835\udcf3 \ud835\udcf4 \ud835\udcf5 \ud835\udcf6 \ud835\udcf7 \ud835\udcf8 \ud835\udcf9 \ud835\udcfa \ud835\udcfb \ud835\udcfc \ud835\udcfd \ud835\udcfe \ud835\udcff \ud835\udd00 \ud835\udd01 \ud835\udd02 \ud835\udd03".split(" ");this.capitalLatinFraktur="\ud835\udd04 \ud835\udd05 \u212d \ud835\udd07 \ud835\udd08 \ud835\udd09 \ud835\udd0a \u210c \u2111 \ud835\udd0d \ud835\udd0e \ud835\udd0f \ud835\udd10 \ud835\udd11 \ud835\udd12 \ud835\udd13 \ud835\udd14 \u211c \ud835\udd16 \ud835\udd17 \ud835\udd18 \ud835\udd19 \ud835\udd1a \ud835\udd1b \ud835\udd1c \u2128".split(" ");
|
161
|
+
this.smallLatinFraktur="\ud835\udd1e \ud835\udd1f \ud835\udd20 \ud835\udd21 \ud835\udd22 \ud835\udd23 \ud835\udd24 \ud835\udd25 \ud835\udd26 \ud835\udd27 \ud835\udd28 \ud835\udd29 \ud835\udd2a \ud835\udd2b \ud835\udd2c \ud835\udd2d \ud835\udd2e \ud835\udd2f \ud835\udd30 \ud835\udd31 \ud835\udd32 \ud835\udd33 \ud835\udd34 \ud835\udd35 \ud835\udd36 \ud835\udd37".split(" ");this.capitalLatinDoubleStruck="\ud835\udd38 \ud835\udd39 \u2102 \ud835\udd3b \ud835\udd3c \ud835\udd3d \ud835\udd3e \u210d \ud835\udd40 \ud835\udd41 \ud835\udd42 \ud835\udd43 \ud835\udd44 \u2115 \ud835\udd46 \u2119 \u211a \u211d \ud835\udd4a \ud835\udd4b \ud835\udd4c \ud835\udd4d \ud835\udd4e \ud835\udd4f \ud835\udd50 \u2124".split(" ");
|
162
|
+
this.smallLatinDoubleStruck="\ud835\udd52 \ud835\udd53 \ud835\udd54 \ud835\udd55 \ud835\udd56 \ud835\udd57 \ud835\udd58 \ud835\udd59 \ud835\udd5a \ud835\udd5b \ud835\udd5c \ud835\udd5d \ud835\udd5e \ud835\udd5f \ud835\udd60 \ud835\udd61 \ud835\udd62 \ud835\udd63 \ud835\udd64 \ud835\udd65 \ud835\udd66 \ud835\udd67 \ud835\udd68 \ud835\udd69 \ud835\udd6a \ud835\udd6b".split(" ");this.capitalLatinBoldFraktur="\ud835\udd6c \ud835\udd6d \ud835\udd6e \ud835\udd6f \ud835\udd70 \ud835\udd71 \ud835\udd72 \ud835\udd73 \ud835\udd74 \ud835\udd75 \ud835\udd76 \ud835\udd77 \ud835\udd78 \ud835\udd79 \ud835\udd7a \ud835\udd7b \ud835\udd7c \ud835\udd7d \ud835\udd7e \ud835\udd7f \ud835\udd80 \ud835\udd81 \ud835\udd82 \ud835\udd83 \ud835\udd84 \ud835\udd85".split(" ");
|
163
|
+
this.smallLatinBoldFraktur="\ud835\udd86 \ud835\udd87 \ud835\udd88 \ud835\udd89 \ud835\udd8a \ud835\udd8b \ud835\udd8c \ud835\udd8d \ud835\udd8e \ud835\udd8f \ud835\udd90 \ud835\udd91 \ud835\udd92 \ud835\udd93 \ud835\udd94 \ud835\udd95 \ud835\udd96 \ud835\udd97 \ud835\udd98 \ud835\udd99 \ud835\udd9a \ud835\udd9b \ud835\udd9c \ud835\udd9d \ud835\udd9e \ud835\udd9f".split(" ");this.capitalLatinSansSerif="\ud835\udda0 \ud835\udda1 \ud835\udda2 \ud835\udda3 \ud835\udda4 \ud835\udda5 \ud835\udda6 \ud835\udda7 \ud835\udda8 \ud835\udda9 \ud835\uddaa \ud835\uddab \ud835\uddac \ud835\uddad \ud835\uddae \ud835\uddaf \ud835\uddb0 \ud835\uddb1 \ud835\uddb2 \ud835\uddb3 \ud835\uddb4 \ud835\uddb5 \ud835\uddb6 \ud835\uddb7 \ud835\uddb8 \ud835\uddb9".split(" ");
|
164
|
+
this.smallLatinSansSerif="\ud835\uddba \ud835\uddbb \ud835\uddbc \ud835\uddbd \ud835\uddbe \ud835\uddbf \ud835\uddc0 \ud835\uddc1 \ud835\uddc2 \ud835\uddc3 \ud835\uddc4 \ud835\uddc5 \ud835\uddc6 \ud835\uddc7 \ud835\uddc8 \ud835\uddc9 \ud835\uddca \ud835\uddcb \ud835\uddcc \ud835\uddcd \ud835\uddce \ud835\uddcf \ud835\uddd0 \ud835\uddd1 \ud835\uddd2 \ud835\uddd3".split(" ");this.capitalLatinSansSerifBold="\ud835\uddd4 \ud835\uddd5 \ud835\uddd6 \ud835\uddd7 \ud835\uddd8 \ud835\uddd9 \ud835\uddda \ud835\udddb \ud835\udddc \ud835\udddd \ud835\uddde \ud835\udddf \ud835\udde0 \ud835\udde1 \ud835\udde2 \ud835\udde3 \ud835\udde4 \ud835\udde5 \ud835\udde6 \ud835\udde7 \ud835\udde8 \ud835\udde9 \ud835\uddea \ud835\uddeb \ud835\uddec \ud835\udded".split(" ");
|
165
|
+
this.smallLatinSansSerifBold="\ud835\uddee \ud835\uddef \ud835\uddf0 \ud835\uddf1 \ud835\uddf2 \ud835\uddf3 \ud835\uddf4 \ud835\uddf5 \ud835\uddf6 \ud835\uddf7 \ud835\uddf8 \ud835\uddf9 \ud835\uddfa \ud835\uddfb \ud835\uddfc \ud835\uddfd \ud835\uddfe \ud835\uddff \ud835\ude00 \ud835\ude01 \ud835\ude02 \ud835\ude03 \ud835\ude04 \ud835\ude05 \ud835\ude06 \ud835\ude07".split(" ");this.capitalLatinSansSerifItalic="\ud835\ude08 \ud835\ude09 \ud835\ude0a \ud835\ude0b \ud835\ude0c \ud835\ude0d \ud835\ude0e \ud835\ude0f \ud835\ude10 \ud835\ude11 \ud835\ude12 \ud835\ude13 \ud835\ude14 \ud835\ude15 \ud835\ude16 \ud835\ude17 \ud835\ude18 \ud835\ude19 \ud835\ude1a \ud835\ude1b \ud835\ude1c \ud835\ude1d \ud835\ude1e \ud835\ude1f \ud835\ude20 \ud835\ude21".split(" ");
|
166
|
+
this.smallLatinSansSerifItalic="\ud835\ude22 \ud835\ude23 \ud835\ude24 \ud835\ude25 \ud835\ude26 \ud835\ude27 \ud835\ude28 \ud835\ude29 \ud835\ude2a \ud835\ude2b \ud835\ude2c \ud835\ude2d \ud835\ude2e \ud835\ude2f \ud835\ude30 \ud835\ude31 \ud835\ude32 \ud835\ude33 \ud835\ude34 \ud835\ude35 \ud835\ude36 \ud835\ude37 \ud835\ude38 \ud835\ude39 \ud835\ude3a \ud835\ude3b".split(" ");this.capitalLatinMonospace="\ud835\ude70 \ud835\ude71 \ud835\ude72 \ud835\ude73 \ud835\ude74 \ud835\ude75 \ud835\ude76 \ud835\ude77 \ud835\ude78 \ud835\ude79 \ud835\ude7a \ud835\ude7b \ud835\ude7c \ud835\ude7d \ud835\ude7e \ud835\ude7f \ud835\ude80 \ud835\ude81 \ud835\ude82 \ud835\ude83 \ud835\ude84 \ud835\ude85 \ud835\ude86 \ud835\ude87 \ud835\ude88 \ud835\ude89".split(" ");
|
167
|
+
this.smallLatinMonospace="\ud835\ude8a \ud835\ude8b \ud835\ude8c \ud835\ude8d \ud835\ude8e \ud835\ude8f \ud835\ude90 \ud835\ude91 \ud835\ude92 \ud835\ude93 \ud835\ude94 \ud835\ude95 \ud835\ude96 \ud835\ude97 \ud835\ude98 \ud835\ude99 \ud835\ude9a \ud835\ude9b \ud835\ude9c \ud835\ude9d \ud835\ude9e \ud835\ude9f \ud835\udea0 \ud835\udea1 \ud835\udea2 \ud835\udea3".split(" ");this.latinDoubleStruckItalic=["\u2145","\u2146","\u2147","\u2148","\u2149"];this.capitalGreek="\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039a\u039b\u039c\u039d\u039e\u039f\u03a0\u03a1\u03a3\u03a4\u03a5\u03a6\u03a7\u03a8\u03a9".split("");
|
168
|
+
this.smallGreek="\u03b1\u03b2\u03b3\u03b4\u03b5\u03b6\u03b7\u03b8\u03b9\u03ba\u03bb\u03bc\u03bd\u03be\u03bf\u03c0\u03c1\u03c2\u03c3\u03c4\u03c5\u03c6\u03c7\u03c8\u03c9".split("");this.capitalGreekBold="\ud835\udea8 \ud835\udea9 \ud835\udeaa \ud835\udeab \ud835\udeac \ud835\udead \ud835\udeae \ud835\udeaf \ud835\udeb0 \ud835\udeb1 \ud835\udeb2 \ud835\udeb3 \ud835\udeb4 \ud835\udeb5 \ud835\udeb6 \ud835\udeb7 \ud835\udeb8 \ud835\udeba \ud835\udebb \ud835\udebc \ud835\udebd \ud835\udebe \ud835\udebf \ud835\udec0".split(" ");
|
169
|
+
this.smallGreekBold="\ud835\udec2 \ud835\udec3 \ud835\udec4 \ud835\udec5 \ud835\udec6 \ud835\udec7 \ud835\udec8 \ud835\udec9 \ud835\udeca \ud835\udecb \ud835\udecc \ud835\udecd \ud835\udece \ud835\udecf \ud835\uded0 \ud835\uded1 \ud835\uded2 \ud835\uded3 \ud835\uded4 \ud835\uded5 \ud835\uded6 \ud835\uded7 \ud835\uded8 \ud835\uded9 \ud835\udeda".split(" ");this.capitalGreekItalic="\ud835\udee2 \ud835\udee3 \ud835\udee4 \ud835\udee5 \ud835\udee6 \ud835\udee7 \ud835\udee8 \ud835\udee9 \ud835\udeea \ud835\udeeb \ud835\udeec \ud835\udeed \ud835\udeee \ud835\udeef \ud835\udef0 \ud835\udef1 \ud835\udef2 \ud835\udef4 \ud835\udef5 \ud835\udef6 \ud835\udef7 \ud835\udef8 \ud835\udef9 \ud835\udefa".split(" ");
|
170
|
+
this.smallGreekItalic="\ud835\udefc \ud835\udefd \ud835\udefe \ud835\udeff \ud835\udf00 \ud835\udf01 \ud835\udf02 \ud835\udf03 \ud835\udf04 \ud835\udf05 \ud835\udf06 \ud835\udf07 \ud835\udf08 \ud835\udf09 \ud835\udf0a \ud835\udf0b \ud835\udf0c \ud835\udf0d \ud835\udf0e \ud835\udf0f \ud835\udf10 \ud835\udf11 \ud835\udf12 \ud835\udf13 \ud835\udf14".split(" ");this.capitalGreekSansSerifBold="\ud835\udf56 \ud835\udf57 \ud835\udf58 \ud835\udf59 \ud835\udf5a \ud835\udf5b \ud835\udf5c \ud835\udf5d \ud835\udf5e \ud835\udf5f \ud835\udf60 \ud835\udf61 \ud835\udf62 \ud835\udf63 \ud835\udf64 \ud835\udf65 \ud835\udf66 \ud835\udf68 \ud835\udf69 \ud835\udf6a \ud835\udf6b \ud835\udf6c \ud835\udf6d \ud835\udf6e".split(" ");
|
171
|
+
this.smallGreekSansSerifBold="\ud835\udf70 \ud835\udf71 \ud835\udf72 \ud835\udf73 \ud835\udf74 \ud835\udf75 \ud835\udf76 \ud835\udf77 \ud835\udf78 \ud835\udf79 \ud835\udf7a \ud835\udf7b \ud835\udf7c \ud835\udf7d \ud835\udf7e \ud835\udf7f \ud835\udf80 \ud835\udf81 \ud835\udf82 \ud835\udf83 \ud835\udf84 \ud835\udf85 \ud835\udf86 \ud835\udf87 \ud835\udf88".split(" ");this.greekDoubleStruck=["\u213c","\u213d","\u213e","\u213f"];this.greekSpecial="\u03d0\u03d1\u03d5\u03d6\u03d7\u03f0\u03f1\u03f5\u03f6\u03f4".split("");
|
172
|
+
this.greekSpecialBold="\ud835\udedc \ud835\udedd \ud835\udede \ud835\udedf \ud835\udee0 \ud835\udee1".split(" ");this.greekSpecialItalic="\ud835\udf16 \ud835\udf17 \ud835\udf18 \ud835\udf19 \ud835\udf1a \ud835\udf1b".split(" ");this.greekSpecialSansSerifBold="\ud835\udf8a \ud835\udf8b \ud835\udf8c \ud835\udf8d \ud835\udf8e \ud835\udf8f".split(" ");this.hebrewLetters=["\u2135","\u2136","\u2137","\u2138"];this.allLetters=this.capitalLatin.concat(this.smallLatin,this.capitalLatinFullWidth,this.smallLatinFullWidth,
|
173
|
+
this.capitalLatinBold,this.smallLatinBold,this.capitalLatinItalic,this.smallLatinItalic,this.capitalLatinScript,this.smallLatinScript,this.capitalLatinBoldScript,this.smallLatinBoldScript,this.capitalLatinFraktur,this.smallLatinFraktur,this.capitalLatinDoubleStruck,this.smallLatinDoubleStruck,this.capitalLatinBoldFraktur,this.smallLatinBoldFraktur,this.capitalLatinSansSerif,this.smallLatinSansSerif,this.capitalLatinSansSerifBold,this.smallLatinSansSerifBold,this.capitalLatinSansSerifItalic,this.smallLatinSansSerifItalic,
|
174
|
+
this.capitalLatinMonospace,this.smallLatinMonospace,this.latinDoubleStruckItalic,this.capitalGreek,this.smallGreek,this.capitalGreekBold,this.smallGreekBold,this.capitalGreekItalic,this.smallGreekItalic,this.capitalGreekSansSerifBold,this.smallGreekSansSerifBold,this.greekDoubleStruck,this.greekSpecial,this.greekSpecialBold,this.greekSpecialItalic,this.greekSpecialSansSerifBold,this.hebrewLetters);this.additions="+\u00b1\u2213\u2214\u2227\u2228\u2229\u222a\u228c\u2293\u2294\u229d\u229e\u22a4\u22a5\u22ba\u22bb\u22bc\u22c4\u22ce\u22cf\u22d2\u22d3\u25b3\u25b7\u25bd\u25c1\u2a5e\u2295".split("");
|
175
|
+
this.invisiblePlus_=sre.SemanticUtil.numberToUnicode(8292);this.additions.push(this.invisiblePlus_);this.multiplications="\u2020\u2021\u2210\u2217\u2218\u2219\u2240\u229a\u229b\u22a0\u22a1\u22c5\u22c6\u22c7\u22c9\u22ca\u22cb\u22cc\u25cb\u00b7*".split("");this.invisibleTimes_=sre.SemanticUtil.numberToUnicode(8290);this.multiplications.push(this.invisibleTimes_);this.subtractions="-\u2052\u207b\u208b\u2212\u2216\u2238\u2242\u2296\u229f\u2796\u2a29\u2a2a\u2a2b\u2a2c\u2a3a\u2a41\u2a6c\ufe63\uff0d\u2010\u2011".split("");
|
176
|
+
this.divisions="/\u00f7\u2044\u2215\u2298\u27cc\u29bc\u2a38".split("");this.functionApplication_=sre.SemanticUtil.numberToUnicode(8289);this.equalities="=~\u207c\u208c\u223c\u223d\u2243\u2245\u2248\u224a\u224b\u224c\u224d\u224e\u2251\u2252\u2253\u2254\u2255\u2256\u2257\u2258\u2259\u225a\u225b\u225c\u225d\u225e\u225f\u2261\u2263\u29e4\u2a66\u2a6e\u2a6f\u2a70\u2a71\u2a72\u2a73\u2a74\u2a75\u2a76\u2a77\u2a78\u22d5\u2a6d\u2a6a\u2a6b\u2a6c\ufe66\uff1d".split("");this.inequalities="<>\u2241\u2242\u2244\u2246\u2247\u2249\u224f\u2250\u2260\u2262\u2264\u2265\u2266\u2267\u2268\u2269\u226a\u226b\u226c\u226d\u226e\u226f\u2270\u2271\u2272\u2273\u2274\u2275\u2276\u2277\u2278\u2279\u227a\u227b\u227c\u227d\u227e\u227f\u2280\u2281\u22d6\u22d7\u22d8\u22d9\u22da\u22db\u22dc\u22dd\u22de\u22df\u22e0\u22e1\u22e2\u22e3\u22e4\u22e5\u22e6\u22e7\u22e8\u22e9\u2a79\u2a7a\u2a7b\u2a7c\u2a7d\u2a7e\u2a7f\u2a80\u2a81\u2a82\u2a83\u2a84\u2a85\u2a86\u2a87\u2a88\u2a89\u2a8a\u2a8b\u2a8c\u2a8d\u2a8e\u2a8f\u2a90\u2a91\u2a92\u2a93\u2a94\u2a95\u2a96\u2a97\u2a98\u2a99\u2a9a\u2a9b\u2a9c\u2a9d\u2a9e\u2a9f\u2aa0\u2aa1\u2aa2\u2aa3\u2aa4\u2aa5\u2aa6\u2aa7\u2aa8\u2aa9\u2aaa\u2aab\u2aac\u2aad\u2aae\u2aaf\u2ab0\u2ab1\u2ab2\u2ab3\u2ab4\u2ab5\u2ab6\u2ab7\u2ab8\u2ab9\u2aba\u2abb\u2abc\u2af7\u2af8\u2af9\u2afa\u29c0\u29c1\ufe64\ufe65\uff1c\uff1e".split("");
|
177
|
+
this.relations=[];this.arrows="\u2190\u2191\u2192\u2193\u2194\u2195\u2196\u2197\u2198\u2199\u219a\u219b\u219c\u219d\u219e\u219f\u21a0\u21a1\u21a2\u21a3\u21a4\u21a5\u21a6\u21a7\u21a8\u21a9\u21aa\u21ab\u21ac\u21ad\u21ae\u21af\u21b0\u21b1\u21b2\u21b3\u21b4\u21b5\u21b6\u21b7\u21b8\u21b9\u21ba\u21bb\u21c4\u21c5\u21c6\u21c7\u21c8\u21c9\u21ca\u21cd\u21ce\u21cf\u21d0\u21d1\u21d2\u21d3\u21d4\u21d5\u21d6\u21d7\u21d8\u21d9\u21da\u21db\u21dc\u21dd\u21de\u21df\u21e0\u21e1\u21e2\u21e3\u21e4\u21e5\u21e6\u21e7\u21e8\u21e9\u21ea\u21eb\u21ec\u21ed\u21ee\u21ef\u21f0\u21f1\u21f2\u21f3\u21f4\u21f5\u21f6\u21f7\u21f8\u21f9\u21fa\u21fb\u21fc\u21fd\u21fe\u21ff\u2301\u2303\u2304\u2324\u238b\u2794\u2798\u2799\u279a\u279b\u279c\u279d\u279e\u279f\u27a0\u27a1\u27a2\u27a3\u27a4\u27a5\u27a6\u27a7\u27a8\u27a9\u27aa\u27ab\u27ac\u27ad\u27ae\u27af\u27b1\u27b2\u27b3\u27b4\u27b5\u27b6\u27b7\u27b8\u27b9\u27ba\u27bb\u27bc\u27bd\u27be\u27f0\u27f1\u27f2\u27f3\u27f4\u27f5\u27f6\u27f7\u27f8\u27f9\u27fa\u27fb\u27fc\u27fd\u27fe\u27ff\u2900\u2901\u2902\u2903\u2904\u2905\u2906\u2907\u2908\u2909\u290a\u290b\u290c\u290d\u290e\u290f\u2910\u2911\u2912\u2913\u2914\u2915\u2916\u2917\u2918\u2919\u291a\u291b\u291c\u291d\u291e\u291f\u2920\u2921\u2922\u2923\u2924\u2925\u2926\u2927\u2928\u2929\u292a\u292d\u292e\u292f\u2930\u2931\u2932\u2933\u2934\u2935\u2936\u2937\u2938\u2939\u293a\u293b\u293c\u293d\u293e\u293f\u2940\u2941\u2942\u2943\u2944\u2945\u2946\u2947\u2948\u2949\u2970\u2971\u2972\u2973\u2974\u2975\u2976\u2977\u2978\u2979\u297a\u297b\u29b3\u29b4\u29bd\u29ea\u29ec\u29ed\u2a17\u2b00\u2b01\u2b02\u2b03\u2b04\u2b05\u2b06\u2b07\u2b08\u2b09\u2b0a\u2b0b\u2b0c\u2b0d\u2b0e\u2b0f\u2b10\u2b11\u2b30\u2b31\u2b32\u2b33\u2b34\u2b35\u2b36\u2b37\u2b38\u2b39\u2b3a\u2b3b\u2b3c\u2b3d\u2b3e\u2b3f\u2b40\u2b41\u2b42\u2b43\u2b44\u2b45\u2b46\u2b47\u2b48\u2b49\u2b4a\u2b4b\u2b4c\uffe9\uffea\uffeb\uffec\u21bc\u21bd\u21be\u21bf\u21c0\u21c1\u21c2\u21c3\u21cb\u21cc\u294a\u294b\u294c\u294d\u294e\u294f\u2950\u2951\u2952\u2953\u2954\u2955\u2956\u2957\u2958\u2959\u295a\u295b\u295c\u295d\u295e\u295f\u2960\u2961\u2962\u2963\u2964\u2965\u2966\u2967\u2968\u2969\u296a\u296b\u296c\u296d\u296e\u296f\u297c\u297d\u297e\u297f".split("");
|
178
|
+
this.sumOps="\u2140\u220f\u2210\u2211\u22c0\u22c1\u22c2\u22c3\u2a00\u2a01\u2a02\u2a03\u2a04\u2a05\u2a06\u2a07\u2a08\u2a09\u2a0a\u2a0b\u2afc\u2aff".split("");this.intOps="\u222b\u222c\u222d\u222e\u222f\u2230\u2231\u2232\u2233\u2a0c\u2a0d\u2a0e\u2a0f\u2a10\u2a11\u2a12\u2a13\u2a14\u2a15\u2a16\u2a17\u2a18\u2a19\u2a1a\u2a1b\u2a1c".split("");this.prefixOps="\u2200\u2203\u2206\u2207\u2202\u2201\u2204".split("");this.prefixOpsBold=["\ud835\udec1","\ud835\udedb","\ud835\udfca","\ud835\udfcb"];this.prefixOpsItalic=
|
179
|
+
["\ud835\udefb","\ud835\udf15"];this.prefixOpsSansSerifBold=["\ud835\udf6f","\ud835\udf89"];this.operatorBits="\u2320\u2321\u23b6\u23aa\u23ae\u23af\u23b2\u23b3\u23b7".split("");this.digitsNormal="0123456789".split("");this.digitsFullWidth="\uff10\uff11\uff12\uff13\uff14\uff15\uff16\uff17\uff18\uff19".split("");this.digitsBold="\ud835\udfce \ud835\udfcf \ud835\udfd0 \ud835\udfd1 \ud835\udfd2 \ud835\udfd3 \ud835\udfd4 \ud835\udfd5 \ud835\udfd6 \ud835\udfd7".split(" ");this.digitsDoubleStruck="\ud835\udfd8 \ud835\udfd9 \ud835\udfda \ud835\udfdb \ud835\udfdc \ud835\udfdd \ud835\udfde \ud835\udfdf \ud835\udfe0 \ud835\udfe1".split(" ");
|
180
|
+
this.digitsSansSerif="\ud835\udfe2 \ud835\udfe3 \ud835\udfe4 \ud835\udfe5 \ud835\udfe6 \ud835\udfe7 \ud835\udfe8 \ud835\udfe9 \ud835\udfea \ud835\udfeb".split(" ");this.digitsSansSerifBold="\ud835\udfec \ud835\udfed \ud835\udfee \ud835\udfef \ud835\udff0 \ud835\udff1 \ud835\udff2 \ud835\udff3 \ud835\udff4 \ud835\udff5".split(" ");this.digitsMonospace="\ud835\udff6 \ud835\udff7 \ud835\udff8 \ud835\udff9 \ud835\udffa \ud835\udffb \ud835\udffc \ud835\udffd \ud835\udffe \ud835\udfff".split(" ");this.digitsSuperscript=
|
181
|
+
"\u00b2\u00b3\u00b9\u2070\u2074\u2075\u2076\u2077\u2078\u2079".split("");this.digitsSubscript="\u2080\u2081\u2082\u2083\u2084\u2085\u2086\u2087\u2088\u2089".split("");this.fractions="\u00bc\u00bd\u00be\u2150\u2151\u2152\u2153\u2154\u2155\u2156\u2157\u2158\u2159\u215a\u215b\u215c\u215d\u215e\u215f\u2189".split("");this.enclosedNumbers="\u2460\u2461\u2462\u2463\u2464\u2465\u2466\u2467\u2468\u2469\u246a\u246b\u246c\u246d\u246e\u246f\u2470\u2471\u2472\u2473\u24ea\u24eb\u24ec\u24ed\u24ee\u24ef\u24f0\u24f1\u24f2\u24f3\u24f4\u24f5\u24f6\u24f7\u24f8\u24f9\u24fa\u24fb\u24fc\u24fd\u24fe\u24ff\u2776\u2777\u2778\u2779\u277a\u277b\u277c\u277d\u277e\u277f\u2780\u2781\u2782\u2783\u2784\u2785\u2786\u2787\u2788\u2789\u278a\u278b\u278c\u278d\u278e\u278f\u2790\u2791\u2792\u2793\u3248\u3249\u324a\u324b\u324c\u324d\u324e\u324f\u3251\u3252\u3253\u3254\u3255\u3256\u3257\u3258\u3259\u325a\u325b\u325c\u325d\u325e\u325f\u32b1\u32b2\u32b3\u32b4\u32b5\u32b6\u32b7\u32b8\u32b9\u32ba\u32bb\u32bc\u32bd\u32be\u32bf".split("");
|
182
|
+
this.fencedNumbers="\u2474\u2475\u2476\u2477\u2478\u2479\u247a\u247b\u247c\u247d\u247e\u247f\u2480\u2481\u2482\u2483\u2484\u2485\u2486\u2487".split("");this.punctuatedNumbers="\u2488 \u2489 \u248a \u248b \u248c \u248d \u248e \u248f \u2490 \u2491 \u2492 \u2493 \u2494 \u2495 \u2496 \u2497 \u2498 \u2499 \u249a \u249b \ud83c\udd00 \ud83c\udd01 \ud83c\udd02 \ud83c\udd03 \ud83c\udd04 \ud83c\udd05 \ud83c\udd06 \ud83c\udd07 \ud83c\udd08 \ud83c\udd09 \ud83c\udd0a".split(" ");this.digits=this.digitsNormal.concat(this.digitsFullWidth,
|
183
|
+
this.digitsBold,this.digitsDoubleStruck,this.digitsSansSerif,this.digitsSansSerifBold,this.digitsMonospace);this.numbers=this.fractions.concat(this.digitsSuperscript,this.digitsSubscript,this.enclosedNumbers,this.fencedNumbers,this.punctuatedNumbers);this.allNumbers=this.digits.concat(this.numbers);this.trigonometricFunctions="cos cot csc sec sin tan arccos arccot arccsc arcsec arcsin arctan".split(" ");this.hyperbolicFunctions="cosh coth csch sech sinh tanh arcosh arcoth arcsch arsech arsinh artanh arccosh arccoth arccsch arcsech arcsinh arctanh".split(" ");
|
184
|
+
this.algebraicFunctions="deg det dim hom ker Tr tr".split(" ");this.elementaryFunctions="log ln lg exp expt gcd gcd arg im re Pr".split(" ");this.prefixFunctions=this.trigonometricFunctions.concat(this.hyperbolicFunctions,this.algebraicFunctions,this.elementaryFunctions);this.limitFunctions="inf lim liminf limsup max min sup injlim projlim".split(" ");this.infixFunctions=["mod","rem"];this.symbolSetToSemantic_=[{set:this.generalPunctuations,type:sre.SemanticAttr.Type.PUNCTUATION,role:sre.SemanticAttr.Role.UNKNOWN},
|
185
|
+
{set:this.colons,type:sre.SemanticAttr.Type.PUNCTUATION,role:sre.SemanticAttr.Role.COLON},{set:this.commas,type:sre.SemanticAttr.Type.PUNCTUATION,role:sre.SemanticAttr.Role.COMMA},{set:this.ellipses,type:sre.SemanticAttr.Type.PUNCTUATION,role:sre.SemanticAttr.Role.ELLIPSIS},{set:this.fullStops,type:sre.SemanticAttr.Type.PUNCTUATION,role:sre.SemanticAttr.Role.FULLSTOP},{set:this.dashes,type:sre.SemanticAttr.Type.PUNCTUATION,role:sre.SemanticAttr.Role.DASH},{set:this.primes,type:sre.SemanticAttr.Type.PUNCTUATION,
|
186
|
+
role:sre.SemanticAttr.Role.PRIME},{set:this.degrees,type:sre.SemanticAttr.Type.PUNCTUATION,role:sre.SemanticAttr.Role.DEGREE},{set:this.leftFences,type:sre.SemanticAttr.Type.FENCE,role:sre.SemanticAttr.Role.OPEN},{set:this.rightFences,type:sre.SemanticAttr.Type.FENCE,role:sre.SemanticAttr.Role.CLOSE},{set:this.topFences,type:sre.SemanticAttr.Type.FENCE,role:sre.SemanticAttr.Role.TOP},{set:this.bottomFences,type:sre.SemanticAttr.Type.FENCE,role:sre.SemanticAttr.Role.BOTTOM},{set:this.neutralFences,
|
187
|
+
type:sre.SemanticAttr.Type.FENCE,role:sre.SemanticAttr.Role.NEUTRAL},{set:this.smallLatin,type:sre.SemanticAttr.Type.IDENTIFIER,role:sre.SemanticAttr.Role.LATINLETTER,font:sre.SemanticAttr.Font.NORMAL},{set:this.capitalLatin,type:sre.SemanticAttr.Type.IDENTIFIER,role:sre.SemanticAttr.Role.LATINLETTER,font:sre.SemanticAttr.Font.NORMAL},{set:this.smallLatinFullWidth,type:sre.SemanticAttr.Type.IDENTIFIER,role:sre.SemanticAttr.Role.LATINLETTER,font:sre.SemanticAttr.Font.NORMAL},{set:this.capitalLatinFullWidth,
|
188
|
+
type:sre.SemanticAttr.Type.IDENTIFIER,role:sre.SemanticAttr.Role.LATINLETTER,font:sre.SemanticAttr.Font.NORMAL},{set:this.smallLatinBold,type:sre.SemanticAttr.Type.IDENTIFIER,role:sre.SemanticAttr.Role.LATINLETTER,font:sre.SemanticAttr.Font.BOLD},{set:this.capitalLatinBold,type:sre.SemanticAttr.Type.IDENTIFIER,role:sre.SemanticAttr.Role.LATINLETTER,font:sre.SemanticAttr.Font.BOLD},{set:this.smallLatinItalic,type:sre.SemanticAttr.Type.IDENTIFIER,role:sre.SemanticAttr.Role.LATINLETTER,font:sre.SemanticAttr.Font.ITALIC},
|
189
|
+
{set:this.capitalLatinItalic,type:sre.SemanticAttr.Type.IDENTIFIER,role:sre.SemanticAttr.Role.LATINLETTER,font:sre.SemanticAttr.Font.ITALIC},{set:this.smallLatinScript,type:sre.SemanticAttr.Type.IDENTIFIER,role:sre.SemanticAttr.Role.LATINLETTER,font:sre.SemanticAttr.Font.SCRIPT},{set:this.capitalLatinScript,type:sre.SemanticAttr.Type.IDENTIFIER,role:sre.SemanticAttr.Role.LATINLETTER,font:sre.SemanticAttr.Font.SCRIPT},{set:this.smallLatinBoldScript,type:sre.SemanticAttr.Type.IDENTIFIER,role:sre.SemanticAttr.Role.LATINLETTER,
|
190
|
+
font:sre.SemanticAttr.Font.BOLDSCRIPT},{set:this.capitalLatinBoldScript,type:sre.SemanticAttr.Type.IDENTIFIER,role:sre.SemanticAttr.Role.LATINLETTER,font:sre.SemanticAttr.Font.BOLDSCRIPT},{set:this.smallLatinFraktur,type:sre.SemanticAttr.Type.IDENTIFIER,role:sre.SemanticAttr.Role.LATINLETTER,font:sre.SemanticAttr.Font.FRAKTUR},{set:this.capitalLatinFraktur,type:sre.SemanticAttr.Type.IDENTIFIER,role:sre.SemanticAttr.Role.LATINLETTER,font:sre.SemanticAttr.Font.FRAKTUR},{set:this.smallLatinDoubleStruck,
|
191
|
+
type:sre.SemanticAttr.Type.IDENTIFIER,role:sre.SemanticAttr.Role.LATINLETTER,font:sre.SemanticAttr.Font.DOUBLESTRUCK},{set:this.capitalLatinDoubleStruck,type:sre.SemanticAttr.Type.IDENTIFIER,role:sre.SemanticAttr.Role.LATINLETTER,font:sre.SemanticAttr.Font.DOUBLESTRUCK},{set:this.smallLatinBoldFraktur,type:sre.SemanticAttr.Type.IDENTIFIER,role:sre.SemanticAttr.Role.LATINLETTER,font:sre.SemanticAttr.Font.BOLDFRAKTUR},{set:this.capitalLatinBoldFraktur,type:sre.SemanticAttr.Type.IDENTIFIER,role:sre.SemanticAttr.Role.LATINLETTER,
|
192
|
+
font:sre.SemanticAttr.Font.BOLDFRAKTUR},{set:this.smallLatinSansSerif,type:sre.SemanticAttr.Type.IDENTIFIER,role:sre.SemanticAttr.Role.LATINLETTER,font:sre.SemanticAttr.Font.SANSSERIF},{set:this.capitalLatinSansSerif,type:sre.SemanticAttr.Type.IDENTIFIER,role:sre.SemanticAttr.Role.LATINLETTER,font:sre.SemanticAttr.Font.SANSSERIF},{set:this.smallLatinSansSerifBold,type:sre.SemanticAttr.Type.IDENTIFIER,role:sre.SemanticAttr.Role.LATINLETTER,font:sre.SemanticAttr.Font.SANSSERIFBOLD},{set:this.capitalLatinSansSerifBold,
|
193
|
+
type:sre.SemanticAttr.Type.IDENTIFIER,role:sre.SemanticAttr.Role.LATINLETTER,font:sre.SemanticAttr.Font.SANSSERIFBOLD},{set:this.smallLatinSansSerifItalic,type:sre.SemanticAttr.Type.IDENTIFIER,role:sre.SemanticAttr.Role.LATINLETTER,font:sre.SemanticAttr.Font.SANSSERIFITALIC},{set:this.capitalLatinSansSerifItalic,type:sre.SemanticAttr.Type.IDENTIFIER,role:sre.SemanticAttr.Role.LATINLETTER,font:sre.SemanticAttr.Font.SANSSERIFITALIC},{set:this.smallLatinMonospace,type:sre.SemanticAttr.Type.IDENTIFIER,
|
194
|
+
role:sre.SemanticAttr.Role.LATINLETTER,font:sre.SemanticAttr.Font.MONOSPACE},{set:this.capitalLatinMonospace,type:sre.SemanticAttr.Type.IDENTIFIER,role:sre.SemanticAttr.Role.LATINLETTER,font:sre.SemanticAttr.Font.MONOSPACE},{set:this.latinDoubleStruckItalic,type:sre.SemanticAttr.Type.IDENTIFIER,role:sre.SemanticAttr.Role.LATINLETTER,font:sre.SemanticAttr.Font.DOUBLESTRUCKITALIC},{set:this.smallGreek,type:sre.SemanticAttr.Type.IDENTIFIER,role:sre.SemanticAttr.Role.GREEKLETTER,font:sre.SemanticAttr.Font.NORMAL},
|
195
|
+
{set:this.capitalGreek,type:sre.SemanticAttr.Type.IDENTIFIER,role:sre.SemanticAttr.Role.GREEKLETTER,font:sre.SemanticAttr.Font.NORMAL},{set:this.smallGreekBold,type:sre.SemanticAttr.Type.IDENTIFIER,role:sre.SemanticAttr.Role.GREEKLETTER,font:sre.SemanticAttr.Font.BOLD},{set:this.capitalGreekBold,type:sre.SemanticAttr.Type.IDENTIFIER,role:sre.SemanticAttr.Role.GREEKLETTER,font:sre.SemanticAttr.Font.BOLD},{set:this.smallGreekItalic,type:sre.SemanticAttr.Type.IDENTIFIER,role:sre.SemanticAttr.Role.GREEKLETTER,
|
196
|
+
font:sre.SemanticAttr.Font.ITALIC},{set:this.capitalGreekItalic,type:sre.SemanticAttr.Type.IDENTIFIER,role:sre.SemanticAttr.Role.GREEKLETTER,font:sre.SemanticAttr.Font.ITALIC},{set:this.smallGreekSansSerifBold,type:sre.SemanticAttr.Type.IDENTIFIER,role:sre.SemanticAttr.Role.GREEKLETTER,font:sre.SemanticAttr.Font.SANSSERIFBOLD},{set:this.capitalGreekSansSerifBold,type:sre.SemanticAttr.Type.IDENTIFIER,role:sre.SemanticAttr.Role.GREEKLETTER,font:sre.SemanticAttr.Font.SANSSERIFBOLD},{set:this.greekDoubleStruck,
|
197
|
+
type:sre.SemanticAttr.Type.IDENTIFIER,role:sre.SemanticAttr.Role.GREEKLETTER,font:sre.SemanticAttr.Font.DOUBLESTRUCK},{set:this.greekSpecial,type:sre.SemanticAttr.Type.IDENTIFIER,role:sre.SemanticAttr.Role.GREEKLETTER,font:sre.SemanticAttr.Font.NORMAL},{set:this.greekSpecialBold,type:sre.SemanticAttr.Type.IDENTIFIER,role:sre.SemanticAttr.Role.GREEKLETTER,font:sre.SemanticAttr.Font.BOLD},{set:this.greekSpecialItalic,type:sre.SemanticAttr.Type.IDENTIFIER,role:sre.SemanticAttr.Role.GREEKLETTER,font:sre.SemanticAttr.Font.ITALIC},
|
198
|
+
{set:this.greekSpecialSansSerifBold,type:sre.SemanticAttr.Type.IDENTIFIER,role:sre.SemanticAttr.Role.GREEKLETTER,font:sre.SemanticAttr.Font.SANSSERIFBOLD},{set:this.hebrewLetters,type:sre.SemanticAttr.Type.IDENTIFIER,role:sre.SemanticAttr.Role.OTHERLETTER,font:sre.SemanticAttr.Font.NORMAL},{set:this.digitsNormal,type:sre.SemanticAttr.Type.NUMBER,role:sre.SemanticAttr.Role.INTEGER,font:sre.SemanticAttr.Font.NORMAL},{set:this.digitsFullWidth,type:sre.SemanticAttr.Type.NUMBER,role:sre.SemanticAttr.Role.INTEGER,
|
199
|
+
font:sre.SemanticAttr.Font.NORMAL},{set:this.digitsBold,type:sre.SemanticAttr.Type.NUMBER,role:sre.SemanticAttr.Role.INTEGER,font:sre.SemanticAttr.Font.BOLD},{set:this.digitsDoubleStruck,type:sre.SemanticAttr.Type.NUMBER,role:sre.SemanticAttr.Role.INTEGER,font:sre.SemanticAttr.Font.DOUBLESTRUCK},{set:this.digitsSansSerif,type:sre.SemanticAttr.Type.NUMBER,role:sre.SemanticAttr.Role.INTEGER,font:sre.SemanticAttr.Font.SANSSERIF},{set:this.digitsSansSerifBold,type:sre.SemanticAttr.Type.NUMBER,role:sre.SemanticAttr.Role.INTEGER,
|
200
|
+
font:sre.SemanticAttr.Font.SANSSERIFBOLD},{set:this.digitsMonospace,type:sre.SemanticAttr.Type.NUMBER,role:sre.SemanticAttr.Role.INTEGER,font:sre.SemanticAttr.Font.MONOSPACE},{set:this.numbers,type:sre.SemanticAttr.Type.NUMBER,role:sre.SemanticAttr.Role.FLOAT},{set:this.additions,type:sre.SemanticAttr.Type.OPERATOR,role:sre.SemanticAttr.Role.ADDITION},{set:this.multiplications,type:sre.SemanticAttr.Type.OPERATOR,role:sre.SemanticAttr.Role.MULTIPLICATION},{set:this.subtractions,type:sre.SemanticAttr.Type.OPERATOR,
|
201
|
+
role:sre.SemanticAttr.Role.SUBTRACTION},{set:this.divisions,type:sre.SemanticAttr.Type.OPERATOR,role:sre.SemanticAttr.Role.DIVISION},{set:this.prefixOps,type:sre.SemanticAttr.Type.OPERATOR,role:sre.SemanticAttr.Role.PREFIXOP},{set:this.prefixOpsBold,type:sre.SemanticAttr.Type.OPERATOR,role:sre.SemanticAttr.Role.PREFIXOP,font:sre.SemanticAttr.Font.BOLD},{set:this.prefixOpsItalic,type:sre.SemanticAttr.Type.OPERATOR,role:sre.SemanticAttr.Role.PREFIXOP,font:sre.SemanticAttr.Font.ITALIC},{set:this.prefixOpsSansSerifBold,
|
202
|
+
type:sre.SemanticAttr.Type.OPERATOR,role:sre.SemanticAttr.Role.PREFIXOP,font:sre.SemanticAttr.Font.SANSSERIFBOLD},{set:this.equalities,type:sre.SemanticAttr.Type.RELATION,role:sre.SemanticAttr.Role.EQUALITY},{set:this.inequalities,type:sre.SemanticAttr.Type.RELATION,role:sre.SemanticAttr.Role.INEQUALITY},{set:this.relations,type:sre.SemanticAttr.Type.RELATION,role:sre.SemanticAttr.Role.UNKNOWN},{set:this.arrows,type:sre.SemanticAttr.Type.RELATION,role:sre.SemanticAttr.Role.ARROW},{set:this.sumOps,
|
203
|
+
type:sre.SemanticAttr.Type.LARGEOP,role:sre.SemanticAttr.Role.SUM},{set:this.intOps,type:sre.SemanticAttr.Type.LARGEOP,role:sre.SemanticAttr.Role.INTEGRAL},{set:this.limitFunctions,type:sre.SemanticAttr.Type.FUNCTION,role:sre.SemanticAttr.Role.LIMFUNC},{set:this.prefixFunctions,type:sre.SemanticAttr.Type.FUNCTION,role:sre.SemanticAttr.Role.PREFIXFUNC},{set:this.infixFunctions,type:sre.SemanticAttr.Type.OPERATOR,role:sre.SemanticAttr.Role.INFIXFUNC}];this.meaning_=this.initMeaning_()};goog.addSingletonGetter(sre.SemanticAttr);
|
204
|
+
sre.SemanticAttr.Type={PUNCTUATION:"punctuation",FENCE:"fence",NUMBER:"number",IDENTIFIER:"identifier",TEXT:"text",OPERATOR:"operator",RELATION:"relation",LARGEOP:"largeop",FUNCTION:"function",ACCENT:"accent",FENCED:"fenced",FRACTION:"fraction",PUNCTUATED:"punctuated",RELSEQ:"relseq",MULTIREL:"multirel",INFIXOP:"infixop",PREFIXOP:"prefixop",POSTFIXOP:"postfixop",APPL:"appl",INTEGRAL:"integral",BIGOP:"bigop",SQRT:"sqrt",ROOT:"root",LIMUPPER:"limupper",LIMLOWER:"limlower",LIMBOTH:"limboth",SUBSCRIPT:"subscript",
|
205
|
+
SUPERSCRIPT:"superscript",UNDERSCORE:"underscore",OVERSCORE:"overscore",TENSOR:"tensor",TABLE:"table",MULTILINE:"multiline",MATRIX:"matrix",VECTOR:"vector",CASES:"cases",ROW:"row",LINE:"line",CELL:"cell",ENCLOSE:"enclose",INFERENCE:"inference",RULELABEL:"rulelabel",CONCLUSION:"conclusion",PREMISES:"premises",UNKNOWN:"unknown",EMPTY:"empty"};
|
206
|
+
sre.SemanticAttr.Role={COMMA:"comma",ELLIPSIS:"ellipsis",FULLSTOP:"fullstop",DASH:"dash",PRIME:"prime",DEGREE:"degree",VBAR:"vbar",COLON:"colon",OPENFENCE:"openfence",CLOSEFENCE:"closefence",APPLICATION:"application",DUMMY:"dummy",UNIT:"unit",LABEL:"label",OPEN:"open",CLOSE:"close",TOP:"top",BOTTOM:"bottom",NEUTRAL:"neutral",LATINLETTER:"latinletter",GREEKLETTER:"greekletter",OTHERLETTER:"otherletter",INTEGER:"integer",FLOAT:"float",OTHERNUMBER:"othernumber",MIXED:"mixed",MULTIACCENT:"multiaccent",
|
207
|
+
OVERACCENT:"overaccent",UNDERACCENT:"underaccent",UNDEROVER:"underover",SUBSUP:"subsup",LEFTSUB:"leftsub",LEFTSUPER:"leftsuper",RIGHTSUB:"rightsub",RIGHTSUPER:"rightsuper",LEFTRIGHT:"leftright",ABOVEBELOW:"abovebelow",SETEMPTY:"set empty",SETEXT:"set extended",SETSINGLE:"set singleton",SETCOLLECT:"set collection",STRING:"string",SEQUENCE:"sequence",ENDPUNCT:"endpunct",STARTPUNCT:"startpunct",TEXT:"text",NEGATIVE:"negative",POSITIVE:"positive",NEGATION:"negation",MULTIOP:"multiop",PREFIXOP:"prefix operator",
|
208
|
+
POSTFIXOP:"postfix operator",LIMFUNC:"limit function",INFIXFUNC:"infix function",PREFIXFUNC:"prefix function",POSTFIXFUNC:"postfix function",SIMPLEFUNC:"simple function",COMPFUNC:"composed function",SUM:"sum",INTEGRAL:"integral",ADDITION:"addition",MULTIPLICATION:"multiplication",SUBTRACTION:"subtraction",IMPLICIT:"implicit",DIVISION:"division",VULGAR:"vulgar",EQUALITY:"equality",INEQUALITY:"inequality",ELEMENT:"element",ARROW:"arrow",DETERMINANT:"determinant",ROWVECTOR:"rowvector",BINOMIAL:"binomial",
|
209
|
+
SQUAREMATRIX:"squarematrix",MULTILINE:"multiline",MATRIX:"matrix",VECTOR:"vector",CASES:"cases",TABLE:"table",PROOF:"proof",LEFT:"left",RIGHT:"right",UP:"up",DOWN:"down",FINAL:"final",SINGLE:"single",HYP:"hyp",AXIOM:"axiom",UNKNOWN:"unknown"};
|
210
|
+
sre.SemanticAttr.Font={BOLD:"bold",BOLDFRAKTUR:"bold-fraktur",BOLDITALIC:"bold-italic",BOLDSCRIPT:"bold-script",CALIGRAPHIC:"caligraphic",CALIGRAPHICBOLD:"caligraphic-bold",DOUBLESTRUCK:"double-struck",DOUBLESTRUCKITALIC:"double-struck-italic",FRAKTUR:"fraktur",ITALIC:"italic",MONOSPACE:"monospace",NORMAL:"normal",OLDSTYLE:"oldstyle",OLDSTYLEBOLD:"oldstyle-bold",SCRIPT:"script",SANSSERIF:"sans-serif",SANSSERIFITALIC:"sans-serif-italic",SANSSERIFBOLD:"sans-serif-bold",SANSSERIFBOLDITALIC:"sans-serif-bold-italic",
|
211
|
+
UNKNOWN:"unknown"};sre.SemanticAttr.equal=function(a,b){return a.type===b.type&&a.role===b.role&&a.font===b.font};sre.SemanticAttr.prototype.lookupType=function(a){return sre.SemanticAttr.Type.UNKNOWN};sre.SemanticAttr.prototype.lookupRole=function(a){return sre.SemanticAttr.Role.UNKNOWN};sre.SemanticAttr.lookupMeaning=function(a){return sre.SemanticAttr.getInstance().lookupMeaning_(a)};sre.SemanticAttr.invisibleTimes=function(){return sre.SemanticAttr.getInstance().invisibleTimes_};
|
212
|
+
sre.SemanticAttr.invisibleComma=function(){return sre.SemanticAttr.getInstance().invisibleComma_};sre.SemanticAttr.functionApplication=function(){return sre.SemanticAttr.getInstance().functionApplication_};sre.SemanticAttr.isMatchingFenceRole=function(a,b){return a==sre.SemanticAttr.Role.OPEN&&b==sre.SemanticAttr.Role.CLOSE||a==sre.SemanticAttr.Role.NEUTRAL&&b==sre.SemanticAttr.Role.NEUTRAL||a==sre.SemanticAttr.Role.TOP&&b==sre.SemanticAttr.Role.BOTTOM};
|
213
|
+
sre.SemanticAttr.isMatchingFence=function(a,b){return sre.SemanticAttr.getInstance().isMatchingFence_(a,b)};sre.SemanticAttr.isOpeningFence=function(a){return a==sre.SemanticAttr.Role.OPEN||a==sre.SemanticAttr.Role.NEUTRAL};sre.SemanticAttr.isClosingFence=function(a){return a==sre.SemanticAttr.Role.CLOSE||a==sre.SemanticAttr.Role.NEUTRAL};
|
214
|
+
sre.SemanticAttr.isEmbellishedType=function(a){return a===sre.SemanticAttr.Type.OPERATOR||a===sre.SemanticAttr.Type.RELATION||a===sre.SemanticAttr.Type.FENCE||a===sre.SemanticAttr.Type.PUNCTUATION};sre.SemanticAttr.isCharacterD=function(a){return-1!="d \u2146 \uff44 \ud835\udc1d \ud835\udc51 \ud835\udcb9 \ud835\udced \ud835\udd21 \ud835\udd55 \ud835\udd89 \ud835\uddbd \ud835\uddf1 \ud835\ude25 \ud835\ude8d".split(" ").indexOf(a)};
|
215
|
+
sre.SemanticAttr.prototype.isMatchingFence_=function(a,b){return-1!=this.neutralFences.indexOf(a)?a==b:this.openClosePairs[a]==b||this.topBottomPairs[a]==b};sre.SemanticAttr.prototype.initMeaning_=function(){for(var a={},b=0,c;c=this.symbolSetToSemantic_[b];b++)c.set.forEach(function(b){a[b]={role:c.role||sre.SemanticAttr.Role.UNKNOWN,type:c.type||sre.SemanticAttr.Type.UNKNOWN,font:c.font||sre.SemanticAttr.Font.UNKNOWN}});return a};
|
216
|
+
sre.SemanticAttr.prototype.lookupMeaning_=function(a){return this.meaning_[a]||{role:sre.SemanticAttr.Role.UNKNOWN,type:sre.SemanticAttr.Type.UNKNOWN,font:sre.SemanticAttr.Font.UNKNOWN}};sre.SemanticNode=function(a){this.id=a;this.mathml=[];this.parent=null;this.type=sre.SemanticAttr.Type.UNKNOWN;this.role=sre.SemanticAttr.Role.UNKNOWN;this.font=sre.SemanticAttr.Font.UNKNOWN;this.embellished=null;this.fencePointer="";this.childNodes=[];this.textContent="";this.mathmlTree=null;this.contentNodes=[];this.annotation={};this.attributes={}};
|
217
|
+
sre.SemanticNode.prototype.querySelectorAll=function(a){for(var b=[],c=0,d;d=this.childNodes[c];c++)b=b.concat(d.querySelectorAll(a));for(c=0;d=this.contentNodes[c];c++)b=b.concat(d.querySelectorAll(a));a(this)&&b.unshift(this);return b};sre.SemanticNode.Attribute={EMBELLISHED:"embellished",FENCEPOINTER:"fencepointer",FONT:"font",ID:"id",ANNOTATION:"annotation",ROLE:"role",TYPE:"type",CHILDREN:"children",CONTENT:"content",TEXT:"$t"};
|
218
|
+
sre.SemanticNode.prototype.xml=function(a,b){var c=function(c,d){d=d.map(function(c){return c.xml(a,b)});c=a.createElementNS("",c);for(var e=0,f;f=d[e];e++)c.appendChild(f);return c},d=a.createElementNS("",this.type);b||this.xmlAttributes_(d);d.textContent=this.textContent;0<this.contentNodes.length&&d.appendChild(c(sre.SemanticNode.Attribute.CONTENT,this.contentNodes));0<this.childNodes.length&&d.appendChild(c(sre.SemanticNode.Attribute.CHILDREN,this.childNodes));return d};
|
219
|
+
sre.SemanticNode.prototype.toString=function(a){var b=new sre.SystemExternal.xmldom.XMLSerializer,c=(new sre.SystemExternal.xmldom.DOMParser).parseFromString("<snode/>","text/xml");return b.serializeToString(this.xml(c,a))};sre.SemanticNode.prototype.xmlAttributes_=function(a){for(var b=this.allAttributes(),c=0,d;d=b[c];c++)a.setAttribute(d[0],d[1]);this.addExternalAttributes_(a)};
|
220
|
+
sre.SemanticNode.prototype.allAttributes=function(){var a=[];a.push([sre.SemanticNode.Attribute.ROLE,this.role]);this.font!=sre.SemanticAttr.Font.UNKNOWN&&a.push([sre.SemanticNode.Attribute.FONT,this.font]);Object.keys(this.annotation).length&&a.push([sre.SemanticNode.Attribute.ANNOTATION,this.xmlAnnotation()]);this.embellished&&a.push([sre.SemanticNode.Attribute.EMBELLISHED,this.embellished]);this.fencePointer&&a.push([sre.SemanticNode.Attribute.FENCEPOINTER,this.fencePointer]);a.push([sre.SemanticNode.Attribute.ID,
|
221
|
+
this.id]);return a};sre.SemanticNode.prototype.addExternalAttributes_=function(a){for(var b in this.attributes)a.setAttribute(b,this.attributes[b])};sre.SemanticNode.prototype.xmlAnnotation=function(){var a=[],b;for(b in this.annotation)this.annotation[b].forEach(function(c){a.push(b+":"+c)});return a.join(";")};
|
222
|
+
sre.SemanticNode.prototype.toJson=function(){var a={};a[sre.SemanticNode.Attribute.TYPE]=this.type;for(var b=this.allAttributes(),c=0,d;d=b[c];c++)a[d[0]]=d[1].toString();this.textContent&&(a[sre.SemanticNode.Attribute.TEXT]=this.textContent);this.childNodes.length&&(a[sre.SemanticNode.Attribute.CHILDREN]=this.childNodes.map(function(a){return a.toJson()}));this.contentNodes.length&&(a[sre.SemanticNode.Attribute.CONTENT]=this.contentNodes.map(function(a){return a.toJson()}));return a};
|
223
|
+
sre.SemanticNode.prototype.updateContent=function(a,b){b=(void 0===b?0:b)?a.replace(/^[ \f\n\r\t\v\u200b]*/,"").replace(/[ \f\n\r\t\v\u200b]*$/,""):a.trim();a=a&&!b?a:b;this.textContent!=a&&(b=sre.SemanticAttr.lookupMeaning(a),this.textContent=a,this.role=b.role,this.type=b.type,this.font=b.font)};sre.SemanticNode.prototype.addMathmlNodes=function(a){for(var b=0,c;c=a[b];b++)-1==this.mathml.indexOf(c)&&this.mathml.push(c)};
|
224
|
+
sre.SemanticNode.prototype.removeMathmlNodes_=function(a){for(var b=this.mathml,c=0,d;d=a[c];c++)d=b.indexOf(d),-1!=d&&b.splice(d,1);this.mathml=b};sre.SemanticNode.prototype.appendChild=function(a){this.childNodes.push(a);this.addMathmlNodes(a.mathml);a.parent=this};
|
225
|
+
sre.SemanticNode.prototype.replaceChild=function(a,b){var c=this.childNodes.indexOf(a);if(-1!=c){a.parent=null;b.parent=this;this.childNodes[c]=b;c=a.mathml.filter(function(a){return-1==b.mathml.indexOf(a)});var d=b.mathml.filter(function(b){return-1==a.mathml.indexOf(b)});this.removeMathmlNodes_(c);this.addMathmlNodes(d)}};sre.SemanticNode.prototype.appendContentNode=function(a){a&&(this.contentNodes.push(a),this.addMathmlNodes(a.mathml),a.parent=this)};
|
226
|
+
sre.SemanticNode.prototype.removeContentNode=function(a){a&&(a=this.contentNodes.indexOf(a),-1!=a&&this.contentNodes.slice(a,1))};
|
227
|
+
sre.SemanticNode.prototype.equals=function(a){if(!a||this.type!==a.type||this.role!==a.role||this.textContent!==a.textContent||this.childNodes.length!==a.childNodes.length||this.contentNodes.length!==a.contentNodes.length)return!1;for(var b=0,c,d;c=this.childNodes[b],d=a.childNodes[b];b++)if(!c.equals(d))return!1;for(b=0;c=this.contentNodes[b],d=a.contentNodes[b];b++)if(!c.equals(d))return!1;return!0};sre.SemanticNode.prototype.displayTree=function(){console.info(this.displayTree_(0))};
|
228
|
+
sre.SemanticNode.prototype.displayTree_=function(a){a++;var b=Array(a).join(" "),c="";c+="\n"+b+this.toString();c+="\n"+b+"MathmlTree:";c+="\n"+b+this.mathmlTreeString_();c+="\n"+b+"MathML:";for(var d=0,e;e=this.mathml[d];d++)c+="\n"+b+e.toString();c+="\n"+b+"Begin Content";this.contentNodes.forEach(function(b){c+=b.displayTree_(a)});c+="\n"+b+"End Content";c+="\n"+b+"Begin Children";this.childNodes.forEach(function(b){c+=b.displayTree_(a)});return c+="\n"+b+"End Children"};
|
229
|
+
sre.SemanticNode.prototype.mathmlTreeString_=function(){return this.mathmlTree?this.mathmlTree.toString():"EMPTY"};sre.SemanticNode.prototype.addAnnotation=function(a,b){b&&this.addAnnotation_(a,b)};sre.SemanticNode.prototype.addAnnotation_=function(a,b){var c=this.annotation[a];c?c.push(b):this.annotation[a]=[b]};sre.SemanticNode.prototype.getAnnotation=function(a){return(a=this.annotation[a])?a:[]};
|
230
|
+
sre.SemanticNode.prototype.hasAnnotation=function(a,b){return(a=this.annotation[a])?-1!==a.indexOf(b):!1};sre.SemanticNode.prototype.parseAnnotation=function(a){a=a.split(";");for(var b=0,c=a.length;b<c;b++){var d=a[b].split(":");this.addAnnotation(d[0],d[1])}};sre.SemanticNode.prototype.meaning=function(){return{type:this.type,role:this.role,font:this.font}};sre.SemanticAnnotator=function(a,b){this.domain=a;this.func=b;this.name=a};sre.SemanticAnnotator.prototype.annotate=function(a){a.childNodes.forEach(goog.bind(this.annotate,this));a.addAnnotation(this.domain,this.func(a))};sre.SemanticVisitor=function(a,b,c){this.domain=a;this.func=b;this.name=a;this.def=c||{}};sre.SemanticVisitor.prototype.visit=function(a,b){b=this.func(a,b);a.addAnnotation(this.domain,b[0]);for(var c=0,d;d=a.childNodes[c];c++)b=this.visit(d,b[1]);return b};sre.SemanticAnnotations=function(){this.annotators={};this.visitors={};this.counter=0};goog.addSingletonGetter(sre.SemanticAnnotations);sre.SemanticAnnotations.prototype.register=function(a){a.name=a.domain+this.counter++;(a instanceof sre.SemanticAnnotator?this.annotators:this.visitors)[a.name]=a};sre.SemanticAnnotations.prototype.unregister=function(a){delete this.annotators[a];delete this.visitors[a]};
|
231
|
+
sre.SemanticAnnotations.prototype.annotate=function(a){for(var b in this.annotators)this.annotators[b].annotate(a);for(var c in this.visitors)this.visitors[c].visit(a,this.visitors[c].def)};sre.SemanticOrdering=function(){this.comparators=[]};goog.addSingletonGetter(sre.SemanticOrdering);sre.SemanticOrdering.prototype.add=function(a){this.comparators.push(a)};sre.SemanticOrdering.prototype.apply=function(a,b){for(var c=0,d;d=this.comparators[c];c++)if(d=d.compare(a,b),0!==d)return d;return 0};sre.SemanticOrdering.prototype.sort=function(a){a.sort(goog.bind(this.apply,this))};
|
232
|
+
sre.SemanticOrdering.prototype.reduce=function(a){if(1>=a.length)return a;a=a.slice();this.sort(a);var b=[];do{var c=a.pop();b.push(c)}while(c&&a.length&&0===this.apply(a[a.length-1],c));return b};sre.SemanticComparator=function(a,b){this.comparator=a;this.type=b||null;sre.SemanticOrdering.getInstance().add(this)};sre.SemanticComparator.prototype.compare=function(a,b){return this.type&&this.type===a.type&&this.type===b.type?this.comparator(a,b):0};
|
233
|
+
sre.SemanticOrdering.simpleFunction=function(a,b){return a.role===sre.SemanticAttr.Role.SIMPLEFUNC?1:b.role===sre.SemanticAttr.Role.SIMPLEFUNC?-1:0};new sre.SemanticComparator(sre.SemanticOrdering.simpleFunction,sre.SemanticAttr.Type.IDENTIFIER);sre.SemanticDefault=function(){this.map_={}};sre.SemanticDefault.prototype.add=function(a,b){this.map_[sre.SemanticDefault.key_(a,b.font)]=b};sre.SemanticDefault.prototype.addNode=function(a){this.add(a.textContent,a.meaning())};sre.SemanticDefault.prototype.retrieve=function(a,b){return this.map_[sre.SemanticDefault.key_(a,b)]};sre.SemanticDefault.prototype.retrieveNode=function(a){return this.retrieve(a.textContent,a.font)};sre.SemanticDefault.key_=function(a,b){return b?a+":"+b:a};
|
234
|
+
sre.SemanticDefault.prototype.size=function(){return Object.keys(this.map_).length};sre.SemanticCollator_=function(){this.map_={}};sre.SemanticCollator_.prototype.add=function(a,b){a=sre.SemanticDefault.key_(a,b.font);var c=this.map_[a];c?c.push(b):this.map_[a]=[b]};sre.SemanticCollator_.prototype.addNode=function(a){this.add(a.textContent,a)};sre.SemanticCollator_.prototype.retrieve=function(a,b){return this.map_[sre.SemanticDefault.key_(a,b)]};
|
235
|
+
sre.SemanticCollator_.prototype.retrieveNode=function(a){return this.retrieve(a.textContent,a.font)};sre.SemanticCollator_.prototype.copy_=goog.abstractMethod;sre.SemanticCollator_.prototype.copy=function(){var a=this.copy_(),b;for(b in this.map_)a.map_[b]=this.map_[b];return a};sre.SemanticCollator_.prototype.minimize=function(){for(var a in this.map_)1===this.map_[a].length&&delete this.map_[a]};
|
236
|
+
sre.SemanticCollator_.prototype.reduce=function(){for(var a in this.map_)1!==this.map_[a].length&&(this.map_[a]=sre.SemanticOrdering.getInstance().reduce(this.map_[a]))};sre.SemanticCollator_.prototype.minimalCollator=function(){var a=this.copy(),b;for(b in a.map_)1===a.map_[b].length&&delete a.map_[b];return a};sre.SemanticCollator_.prototype.isMultiValued=function(){for(var a in this.map_)if(1<this.map_[a].length)return!0;return!1};sre.SemanticCollator_.prototype.isEmpty=function(){return!Object.keys(this.map_).length};
|
237
|
+
sre.SemanticNodeCollator=function(){sre.SemanticCollator_.call(this)};goog.inherits(sre.SemanticNodeCollator,sre.SemanticCollator_);sre.SemanticNodeCollator.prototype.copy_=function(){return new sre.SemanticNodeCollator};sre.SemanticNodeCollator.prototype.toString=function(){var a=[],b;for(b in this.map_){for(var c=Array(b.length+3).join(" "),d=this.map_[b],e=[],f=0,g;g=d[f];f++)e.push(g.toString());a.push(b+": "+e.join("\n"+c))}return a.join("\n")};
|
238
|
+
sre.SemanticNodeCollator.prototype.collateMeaning=function(){var a=new sre.SemanticMeaningCollator,b;for(b in this.map_)a.map_[b]=this.map_[b].map(function(a){return a.meaning()});return a};sre.SemanticMeaningCollator=function(){sre.SemanticCollator_.call(this)};goog.inherits(sre.SemanticMeaningCollator,sre.SemanticCollator_);sre.SemanticMeaningCollator.prototype.copy_=function(){return new sre.SemanticMeaningCollator};sre.SemanticMeaningCollator.prototype.addKey=function(a,b){};
|
239
|
+
sre.SemanticMeaningCollator.prototype.add=function(a,b){var c=this.retrieve(a,b.font);c&&c.find(function(a){return sre.SemanticAttr.equal(a,b)})||sre.SemanticMeaningCollator.superClass_.add.call(this,a,b)};sre.SemanticMeaningCollator.prototype.addNode=function(a){this.add(a.textContent,a.meaning())};
|
240
|
+
sre.SemanticMeaningCollator.prototype.toString=function(){var a=[],b;for(b in this.map_){for(var c=Array(b.length+3).join(" "),d=this.map_[b],e=[],f=0,g;g=d[f];f++)e.push("{type: "+g.type+", role: "+g.role+", font: "+g.font+"}");a.push(b+": "+e.join("\n"+c))}return a.join("\n")};sre.SemanticMeaningCollator.prototype.default=function(){var a=new sre.SemanticDefault,b;for(b in this.map_)1===this.map_[b].length&&(a.map_[b]=this.map_[b][0]);return a};
|
241
|
+
sre.SemanticMeaningCollator.prototype.newDefault=function(){var a=this.default();this.reduce();var b=this.default();return a.size()!==b.size()?b:null};sre.SemanticNodeFactory=function(){this.idCounter_=-1;this.leafMap=new sre.SemanticNodeCollator;this.defaultMap=new sre.SemanticDefault};sre.SemanticNodeFactory.prototype.createNode_=function(a){"undefined"!==typeof a?this.idCounter_=Math.max(this.idCounter_,a):a=++this.idCounter_;return new sre.SemanticNode(a)};sre.SemanticNodeFactory.prototype.makeNode=function(a){return this.createNode_(a)};sre.SemanticNodeFactory.prototype.makeUnprocessed=function(a){var b=this.createNode_();b.mathml=[a];return b};
|
242
|
+
sre.SemanticNodeFactory.prototype.makeEmptyNode=function(){var a=this.createNode_();a.type=sre.SemanticAttr.Type.EMPTY;return a};sre.SemanticNodeFactory.prototype.makeContentNode=function(a){var b=this.createNode_();b.updateContent(a);return b};sre.SemanticNodeFactory.prototype.makeMultipleContentNodes=function(a,b){for(var c=[],d=0;d<a;d++)c.push(this.makeContentNode(b));return c};
|
243
|
+
sre.SemanticNodeFactory.prototype.makeLeafNode=function(a,b){if(!a)return this.makeEmptyNode();a=this.makeContentNode(a);a.font=b||a.font;if(b=this.defaultMap.retrieveNode(a))a.type=b.type,a.role=b.role,a.font=b.font;this.leafMap.addNode(a);return a};sre.SemanticNodeFactory.prototype.makeBranchNode=function(a,b,c,d){var e=this.createNode_();d&&e.updateContent(d);e.type=a;e.childNodes=b;e.contentNodes=c;b.concat(c).forEach(function(a){a.parent=e;e.addMathmlNodes(a.mathml)});return e};sre.SemanticParser=function(){};sre.SemanticParser.prototype.parse=function(a){};sre.SemanticParser.prototype.parseList=function(a){};sre.SemanticParser.prototype.getFactory=function(){};sre.SemanticParser.prototype.setFactory=function(a){};sre.SemanticParser.prototype.getType=function(){};sre.SemanticAbstractParser=function(a){this.type_=a;this.factory_=new sre.SemanticNodeFactory};sre.SemanticAbstractParser.prototype.getFactory=function(){return this.factory_};
|
244
|
+
sre.SemanticAbstractParser.prototype.setFactory=function(a){this.factory_=a};sre.SemanticAbstractParser.prototype.getType=function(){return this.type_};sre.SemanticAbstractParser.prototype.parse=goog.abstractMethod;sre.SemanticAbstractParser.prototype.parseList=function(a){for(var b=[],c=0,d;d=a[c];c++)b.push(this.parse(d));return b};sre.SemanticPred={};sre.SemanticPred.isAttribute=function(a,b){return function(c){c=c[a];a:switch(a){case "role":var d=sre.SemanticAttr.Role[b];break a;case "font":d=sre.SemanticAttr.Font[b];break a;default:d=sre.SemanticAttr.Type[b]}return c===d}};
|
245
|
+
sre.SemanticPred.isAccent=function(a){return sre.SemanticPred.isAttribute("type","FENCE")(a)||sre.SemanticPred.isAttribute("type","PUNCTUATION")(a)||sre.SemanticPred.isAttribute("type","OPERATOR")(a)||sre.SemanticPred.isAttribute("type","RELATION")(a)||sre.SemanticPred.isAttribute("type","IDENTIFIER")(a)&&sre.SemanticPred.isAttribute("role","UNKNOWN")(a)&&!a.textContent.match(new RegExp(sre.SemanticAttr.getInstance().allLetters.join("|")))};
|
246
|
+
sre.SemanticPred.isSimpleFunctionScope=function(a){a=a.childNodes;if(0===a.length)return!0;if(1<a.length)return!1;a=a[0];return a.type!==sre.SemanticAttr.Type.INFIXOP||a.role===sre.SemanticAttr.Role.IMPLICIT&&!a.childNodes.some(sre.SemanticPred.isAttribute("type","INFIXOP"))?!0:!1};sre.SemanticPred.isPrefixFunctionBoundary=function(a){return sre.SemanticPred.isOperator(a)||sre.SemanticPred.isAttribute("type","APPL")(a)||sre.SemanticPred.isGeneralFunctionBoundary(a)};
|
247
|
+
sre.SemanticPred.isBigOpBoundary=function(a){return sre.SemanticPred.isOperator(a)||sre.SemanticPred.isGeneralFunctionBoundary(a)};sre.SemanticPred.isIntegralDxBoundary=function(a,b){return!!b&&sre.SemanticPred.isAttribute("type","IDENTIFIER")(b)&&sre.SemanticAttr.isCharacterD(a.textContent)};sre.SemanticPred.isIntegralDxBoundarySingle=function(a){if(sre.SemanticPred.isAttribute("type","IDENTIFIER")(a)){var b=a.textContent[0];return b&&a.textContent[1]&&sre.SemanticAttr.isCharacterD(b)}return!1};
|
248
|
+
sre.SemanticPred.isGeneralFunctionBoundary=function(a){return sre.SemanticPred.isRelation(a)||sre.SemanticPred.isPunctuation(a)};sre.SemanticPred.isEmbellished=function(a){return a.embellished?a.embellished:sre.SemanticAttr.isEmbellishedType(a.type)?a.type:null};sre.SemanticPred.isOperator=function(a){return sre.SemanticPred.isAttribute("type","OPERATOR")(a)||sre.SemanticPred.isAttribute("embellished","OPERATOR")(a)};
|
249
|
+
sre.SemanticPred.isRelation=function(a){return sre.SemanticPred.isAttribute("type","RELATION")(a)||sre.SemanticPred.isAttribute("embellished","RELATION")(a)};sre.SemanticPred.isPunctuation=function(a){return sre.SemanticPred.isAttribute("type","PUNCTUATION")(a)||sre.SemanticPred.isAttribute("embellished","PUNCTUATION")(a)};sre.SemanticPred.isFence=function(a){return sre.SemanticPred.isAttribute("type","FENCE")(a)||sre.SemanticPred.isAttribute("embellished","FENCE")(a)};
|
250
|
+
sre.SemanticPred.isElligibleEmbellishedFence=function(a){if(!a||!sre.SemanticPred.isFence(a))return!1;if(!a.embellished)return!0;var b=function(a){return a.embellished?!(!sre.SemanticPred.isAttribute("type","TENSOR")(a)||sre.SemanticPred.isAttribute("type","EMPTY")(a.childNodes[1])&&sre.SemanticPred.isAttribute("type","EMPTY")(a.childNodes[2])||sre.SemanticPred.isAttribute("type","EMPTY")(a.childNodes[3])&&sre.SemanticPred.isAttribute("type","EMPTY")(a.childNodes[4]))||sre.SemanticPred.isAttribute("role",
|
251
|
+
"CLOSE")(a)&&sre.SemanticPred.isAttribute("type","TENSOR")(a)||sre.SemanticPred.isAttribute("role","OPEN")(a)&&(sre.SemanticPred.isAttribute("type","SUBSCRIPT")(a)||sre.SemanticPred.isAttribute("type","SUPERSCRIPT")(a))?!1:b(a.childNodes[0]):!0};return b(a)};sre.SemanticPred.isTableOrMultiline=function(a){return!!a&&(sre.SemanticPred.isAttribute("type","TABLE")(a)||sre.SemanticPred.isAttribute("type","MULTILINE")(a))};
|
252
|
+
sre.SemanticPred.tableIsMatrixOrVector=function(a){return!!a&&sre.SemanticPred.isFencedElement(a)&&sre.SemanticPred.isTableOrMultiline(a.childNodes[0])};sre.SemanticPred.isFencedElement=function(a){return!!a&&sre.SemanticPred.isAttribute("type","FENCED")(a)&&(sre.SemanticPred.isAttribute("role","LEFTRIGHT")(a)||sre.SemanticPred.isAttribute("role","NEUTRAL")(a))&&1===a.childNodes.length};
|
253
|
+
sre.SemanticPred.tableIsCases=function(a,b){return 0<b.length&&sre.SemanticPred.isAttribute("role","OPENFENCE")(b[b.length-1])};sre.SemanticPred.tableIsMultiline=function(a){return a.childNodes.every(function(a){return 1>=a.childNodes.length})};sre.SemanticPred.isBinomial=function(a){return 2===a.childNodes.length};
|
254
|
+
sre.SemanticPred.isLimitBase=function(a){return sre.SemanticPred.isAttribute("type","LARGEOP")(a)||sre.SemanticPred.isAttribute("type","LIMBOTH")(a)||sre.SemanticPred.isAttribute("type","LIMLOWER")(a)||sre.SemanticPred.isAttribute("type","LIMUPPER")(a)||sre.SemanticPred.isAttribute("type","FUNCTION")(a)&&sre.SemanticPred.isAttribute("role","LIMFUNC")(a)};
|
255
|
+
sre.SemanticPred.isSimpleFunctionHead=function(a){return a.type===sre.SemanticAttr.Type.IDENTIFIER||a.role===sre.SemanticAttr.Role.LATINLETTER||a.role===sre.SemanticAttr.Role.GREEKLETTER||a.role===sre.SemanticAttr.Role.OTHERLETTER};sre.SemanticPred.singlePunctAtPosition=function(a,b,c){return 1===b.length&&(a[c].type===sre.SemanticAttr.Type.PUNCTUATION||a[c].embellished===sre.SemanticAttr.Type.PUNCTUATION)&&a[c]===b[0]};
|
256
|
+
sre.SemanticPred.isSimpleFunction=function(a){return sre.SemanticPred.isAttribute("type","IDENTIFIER")(a)&&sre.SemanticPred.isAttribute("role","SIMPLEFUNC")(a)};sre.SemanticPred.isLeftBrace=function(a){var b=["{","\ufe5b","\uff5b"];return!!a&&-1!==b.indexOf(a.textContent)};sre.SemanticPred.isRightBrace=function(a){var b=["}","\ufe5c","\uff5d"];return!!a&&-1!==b.indexOf(a.textContent)};sre.SemanticPred.isSetNode=function(a){return sre.SemanticPred.isLeftBrace(a.contentNodes[0])&&sre.SemanticPred.isRightBrace(a.contentNodes[1])};sre.SemanticProcessor=function(){this.factory_=new sre.SemanticNodeFactory};goog.addSingletonGetter(sre.SemanticProcessor);sre.SemanticProcessor.prototype.setNodeFactory=function(a){this.factory_=a};
|
257
|
+
sre.SemanticProcessor.prototype.identifierNode=function(a,b,c){a=sre.SemanticProcessor.getInstance().factory_.makeLeafNode(a,b);if("MathML-Unit"===c)a.type=sre.SemanticAttr.Type.IDENTIFIER,a.role=sre.SemanticAttr.Role.UNIT;else if(!b&&1===a.textContent.length&&(a.role===sre.SemanticAttr.Role.INTEGER||a.role===sre.SemanticAttr.Role.LATINLETTER||a.role===sre.SemanticAttr.Role.GREEKLETTER)&&a.font===sre.SemanticAttr.Font.NORMAL)return a.font=sre.SemanticAttr.Font.ITALIC,a;a.type===sre.SemanticAttr.Type.UNKNOWN&&
|
258
|
+
(a.type=sre.SemanticAttr.Type.IDENTIFIER);sre.SemanticProcessor.exprFont_(a);return a};
|
259
|
+
sre.SemanticProcessor.prototype.implicitNode_=function(a){a=sre.SemanticProcessor.getInstance().getMixedNumbers_(a);a=sre.SemanticProcessor.getInstance().combineUnits_(a);if(1===a.length)return a[0];var b=sre.SemanticProcessor.getInstance().factory_.makeMultipleContentNodes(a.length-1,sre.SemanticAttr.invisibleTimes()),c=sre.SemanticProcessor.getInstance().infixNode_(a,b[0]);c.role=sre.SemanticAttr.Role.IMPLICIT;b.forEach(function(a){a.parent=c});c.contentNodes=b;return c};
|
260
|
+
sre.SemanticProcessor.prototype.infixNode_=function(a,b){a=sre.SemanticProcessor.getInstance().factory_.makeBranchNode(sre.SemanticAttr.Type.INFIXOP,a,[b],sre.SemanticProcessor.getEmbellishedInner_(b).textContent);a.role=b.role;this.propagateSimpleFunction(a);return a};
|
261
|
+
sre.SemanticProcessor.prototype.concatNode_=function(a,b,c){if(0===b.length)return a;var d=b.map(function(a){return sre.SemanticProcessor.getEmbellishedInner_(a).textContent}).join(" ");a=sre.SemanticProcessor.getInstance().factory_.makeBranchNode(c,[a],b,d);1<b.length&&(a.role=sre.SemanticAttr.Role.MULTIOP);return a};
|
262
|
+
sre.SemanticProcessor.prototype.prefixNode_=function(a,b){b=sre.SemanticProcessor.partitionNodes_(b,sre.SemanticPred.isAttribute("role","SUBTRACTION"));a=sre.SemanticProcessor.getInstance().concatNode_(a,b.comp.pop(),sre.SemanticAttr.Type.PREFIXOP);1===a.contentNodes.length&&a.contentNodes[0].role===sre.SemanticAttr.Role.ADDITION&&"+"===a.contentNodes[0].textContent&&(a.role=sre.SemanticAttr.Role.POSITIVE);for(;0<b.rel.length;)a=sre.SemanticProcessor.getInstance().concatNode_(a,[b.rel.pop()],sre.SemanticAttr.Type.PREFIXOP),
|
263
|
+
a.role=sre.SemanticAttr.Role.NEGATIVE,a=sre.SemanticProcessor.getInstance().concatNode_(a,b.comp.pop(),sre.SemanticAttr.Type.PREFIXOP);return a};sre.SemanticProcessor.prototype.postfixNode_=function(a,b){return b.length?sre.SemanticProcessor.getInstance().concatNode_(a,b,sre.SemanticAttr.Type.POSTFIXOP):a};
|
264
|
+
sre.SemanticProcessor.prototype.text=function(a,b,c){if(!a)return sre.SemanticProcessor.getInstance().factory_.makeEmptyNode();b=sre.SemanticProcessor.getInstance().factory_.makeLeafNode(a,b);b.updateContent(a,!0);b.type=sre.SemanticAttr.Type.TEXT;"MS"===c&&(b.role=sre.SemanticAttr.Role.STRING);sre.SemanticProcessor.exprFont_(b);return b};
|
265
|
+
sre.SemanticProcessor.prototype.row=function(a){a=a.filter(function(a){return!sre.SemanticPred.isAttribute("type","EMPTY")(a)});if(0===a.length)return sre.SemanticProcessor.getInstance().factory_.makeEmptyNode();a=sre.SemanticProcessor.getInstance().getFencesInRow_(a);a=sre.SemanticProcessor.getInstance().tablesInRow(a);a=sre.SemanticProcessor.getInstance().getPunctuationInRow_(a);a=sre.SemanticProcessor.getInstance().getTextInRow_(a);a=sre.SemanticProcessor.getInstance().getFunctionsInRow_(a);return sre.SemanticProcessor.getInstance().relationsInRow_(a)};
|
266
|
+
sre.SemanticProcessor.prototype.combineUnits_=function(a){var b=sre.SemanticProcessor.partitionNodes_(a,function(a){return!sre.SemanticPred.isAttribute("role","UNIT")(a)});if(a.length===b.rel.length)return b.rel;a=[];do{var c=b.comp.shift(),d=b.rel.shift();1===c.length&&(a=a.concat(c));if(1<c.length){var e=sre.SemanticProcessor.getInstance().factory_.makeContentNode(sre.SemanticAttr.invisibleTimes());c=sre.SemanticProcessor.getInstance().infixNode_(c,e);c.role=sre.SemanticAttr.Role.UNIT;a.push(c)}d&&
|
267
|
+
a.push(d)}while(d);return a};
|
268
|
+
sre.SemanticProcessor.prototype.getMixedNumbers_=function(a){var b=sre.SemanticProcessor.partitionNodes_(a,function(a){return sre.SemanticPred.isAttribute("type","FRACTION")(a)&&sre.SemanticPred.isAttribute("role","VULGAR")(a)});if(!b.rel.length)return a;a=[];for(var c=0,d;d=b.rel[c];c++){var e=b.comp[c],f=e.length-1;e[f]&&sre.SemanticPred.isAttribute("type","NUMBER")(e[f])&&sre.SemanticPred.isAttribute("role","INTEGER")(e[f])?(d=sre.SemanticProcessor.getInstance().factory_.makeBranchNode(sre.SemanticAttr.Type.NUMBER,[e[f],
|
269
|
+
d],[]),d.role=sre.SemanticAttr.Role.MIXED,a=a.concat(e.slice(0,f)),a.push(d)):(a=a.concat(e),a.push(d))}return a.concat(b.comp[b.comp.length-1])};
|
270
|
+
sre.SemanticProcessor.prototype.getTextInRow_=function(a){if(1>=a.length)return a;var b=sre.SemanticProcessor.partitionNodes_(a,sre.SemanticPred.isAttribute("type","TEXT"));if(0===b.rel.length)return a;a=[];var c=b.comp[0];0<c.length&&a.push(sre.SemanticProcessor.getInstance().row(c));for(var d=0;c=b.rel[d];d++)a.push(c),c=b.comp[d+1],0<c.length&&a.push(sre.SemanticProcessor.getInstance().row(c));return[sre.SemanticProcessor.getInstance().dummyNode_(a)]};
|
271
|
+
sre.SemanticProcessor.prototype.relationsInRow_=function(a){var b=sre.SemanticProcessor.partitionNodes_(a,sre.SemanticPred.isRelation),c=b.rel[0];if(!c)return sre.SemanticProcessor.getInstance().operationsInRow_(a);if(1===a.length)return a[0];a=b.comp.map(goog.bind(sre.SemanticProcessor.getInstance().operationsInRow_,this));if(b.rel.some(function(a){return!a.equals(c)}))return a=sre.SemanticProcessor.getInstance().factory_.makeBranchNode(sre.SemanticAttr.Type.MULTIREL,a,b.rel),b.rel.every(function(a){return a.role===
|
272
|
+
c.role})&&(a.role=c.role),a;a=sre.SemanticProcessor.getInstance().factory_.makeBranchNode(sre.SemanticAttr.Type.RELSEQ,a,b.rel,sre.SemanticProcessor.getEmbellishedInner_(c).textContent);a.role=c.role;return a};
|
273
|
+
sre.SemanticProcessor.prototype.operationsInRow_=function(a){if(0===a.length)return sre.SemanticProcessor.getInstance().factory_.makeEmptyNode();if(1===a.length)return a[0];for(var b=[];0<a.length&&sre.SemanticPred.isOperator(a[0]);)b.push(a.shift());if(0===a.length)return sre.SemanticProcessor.getInstance().prefixNode_(b.pop(),b);if(1===a.length)return sre.SemanticProcessor.getInstance().prefixNode_(a[0],b);a=sre.SemanticProcessor.sliceNodes_(a,sre.SemanticPred.isOperator);b=sre.SemanticProcessor.getInstance().prefixNode_(sre.SemanticProcessor.getInstance().implicitNode_(a.head),
|
274
|
+
b);return a.div?sre.SemanticProcessor.getInstance().operationsTree_(a.tail,b,a.div):b};
|
275
|
+
sre.SemanticProcessor.prototype.operationsTree_=function(a,b,c,d){d=d||[];if(0===a.length)return d.unshift(c),b.type===sre.SemanticAttr.Type.INFIXOP?(d=sre.SemanticProcessor.getInstance().postfixNode_(b.childNodes.pop(),d),b.appendChild(d),b):sre.SemanticProcessor.getInstance().postfixNode_(b,d);a=sre.SemanticProcessor.sliceNodes_(a,sre.SemanticPred.isOperator);if(0===a.head.length)return d.push(a.div),sre.SemanticProcessor.getInstance().operationsTree_(a.tail,b,c,d);d=sre.SemanticProcessor.getInstance().prefixNode_(sre.SemanticProcessor.getInstance().implicitNode_(a.head),
|
276
|
+
d);b=sre.SemanticProcessor.getInstance().appendOperand_(b,c,d);return a.div?sre.SemanticProcessor.getInstance().operationsTree_(a.tail,b,a.div,[]):b};
|
277
|
+
sre.SemanticProcessor.prototype.appendOperand_=function(a,b,c){return a.type!==sre.SemanticAttr.Type.INFIXOP?sre.SemanticProcessor.getInstance().infixNode_([a,c],b):sre.SemanticProcessor.getInstance().appendExistingOperator_(a,b,c)?a:b.role===sre.SemanticAttr.Role.MULTIPLICATION?sre.SemanticProcessor.getInstance().appendMultiplicativeOp_(a,b,c):sre.SemanticProcessor.getInstance().appendAdditiveOp_(a,b,c)};
|
278
|
+
sre.SemanticProcessor.prototype.appendMultiplicativeOp_=function(a,b,c){if(a.role===sre.SemanticAttr.Role.IMPLICIT)return sre.SemanticProcessor.getInstance().infixNode_([a,c],b);for(var d=a,e=a.childNodes[a.childNodes.length-1];e&&e.type===sre.SemanticAttr.Type.INFIXOP;)d=e,e=d.childNodes[a.childNodes.length-1];b=sre.SemanticProcessor.getInstance().infixNode_([d.childNodes.pop(),c],b);d.appendChild(b);return a};
|
279
|
+
sre.SemanticProcessor.prototype.appendAdditiveOp_=function(a,b,c){return sre.SemanticProcessor.getInstance().infixNode_([a,c],b)};sre.SemanticProcessor.prototype.appendExistingOperator_=function(a,b,c){return a&&a.type===sre.SemanticAttr.Type.INFIXOP&&a.role!==sre.SemanticAttr.Role.IMPLICIT?a.contentNodes[0].equals(b)?(a.appendContentNode(b),a.appendChild(c),!0):sre.SemanticProcessor.getInstance().appendExistingOperator_(a.childNodes[a.childNodes.length-1],b,c):!1};
|
280
|
+
sre.SemanticProcessor.prototype.getFencesInRow_=function(a){a=sre.SemanticProcessor.partitionNodes_(a,sre.SemanticPred.isFence);a=sre.SemanticProcessor.purgeFences_(a);var b=a.comp.shift();return sre.SemanticProcessor.getInstance().fences_(a.rel,a.comp,[],[b])};
|
281
|
+
sre.SemanticProcessor.prototype.fences_=function(a,b,c,d){if(0===a.length&&0===c.length)return d[0];var e=sre.SemanticPred.isAttribute("role","OPEN");if(0===a.length){for(a=d.shift();0<c.length;){if(e(c[0]))b=c.shift(),sre.SemanticProcessor.fenceToPunct_(b),a.push(b);else{c=sre.SemanticProcessor.sliceNodes_(c,e);var f=c.head.length-1,g=sre.SemanticProcessor.getInstance().neutralFences_(c.head,d.slice(0,f));d=d.slice(f);a.push.apply(a,g);c.div&&c.tail.unshift(c.div);c=c.tail}a.push.apply(a,d.shift())}return a}f=
|
282
|
+
c[c.length-1];g=a[0].role;if(g===sre.SemanticAttr.Role.OPEN||g===sre.SemanticAttr.Role.NEUTRAL&&(!f||a[0].textContent!==f.textContent))return c.push(a.shift()),(e=b.shift())&&d.push(e),sre.SemanticProcessor.getInstance().fences_(a,b,c,d);if(f&&(g===sre.SemanticAttr.Role.CLOSE&&f.role===sre.SemanticAttr.Role.OPEN||g===sre.SemanticAttr.Role.NEUTRAL&&a[0].textContent===f.textContent))return e=sre.SemanticProcessor.getInstance().horizontalFencedNode_(c.pop(),a.shift(),d.pop()),d.push(d.pop().concat([e],
|
283
|
+
b.shift())),sre.SemanticProcessor.getInstance().fences_(a,b,c,d);if(f&&g===sre.SemanticAttr.Role.CLOSE&&f.role===sre.SemanticAttr.Role.NEUTRAL&&c.some(e))return c=sre.SemanticProcessor.sliceNodes_(c,e,!0),e=d.pop(),f=d.length-c.tail.length+1,g=sre.SemanticProcessor.getInstance().neutralFences_(c.tail,d.slice(f)),d=d.slice(0,f),e=sre.SemanticProcessor.getInstance().horizontalFencedNode_(c.div,a.shift(),d.pop().concat(g,e)),d.push(d.pop().concat([e],b.shift())),sre.SemanticProcessor.getInstance().fences_(a,
|
284
|
+
b,c.head,d);e=a.shift();sre.SemanticProcessor.fenceToPunct_(e);d.push(d.pop().concat([e],b.shift()));return sre.SemanticProcessor.getInstance().fences_(a,b,c,d)};
|
285
|
+
sre.SemanticProcessor.prototype.neutralFences_=function(a,b){if(0===a.length)return a;if(1===a.length)return sre.SemanticProcessor.fenceToPunct_(a[0]),a;var c=a.shift(),d=sre.SemanticProcessor.sliceNodes_(a,function(a){return sre.SemanticProcessor.getEmbellishedInner_(a).textContent==sre.SemanticProcessor.getEmbellishedInner_(c).textContent});if(!d.div)return sre.SemanticProcessor.fenceToPunct_(c),d=b.shift(),d.unshift(c),d.concat(sre.SemanticProcessor.getInstance().neutralFences_(a,b));b=sre.SemanticProcessor.getInstance().combineFencedContent_(c,
|
286
|
+
d.div,d.head,b);return 0<d.tail.length?(a=b.shift(),d=sre.SemanticProcessor.getInstance().neutralFences_(d.tail,b),a.concat(d)):b[0]};
|
287
|
+
sre.SemanticProcessor.prototype.combineFencedContent_=function(a,b,c,d){if(0===c.length)return a=sre.SemanticProcessor.getInstance().horizontalFencedNode_(a,b,d.shift()),0<d.length?d[0].unshift(a):d=[[a]],d;var e=d.shift(),f=c.length-1,g=d.slice(0,f);d=d.slice(f);f=d.shift();c=sre.SemanticProcessor.getInstance().neutralFences_(c,g);e.push.apply(e,c);e.push.apply(e,f);a=sre.SemanticProcessor.getInstance().horizontalFencedNode_(a,b,e);0<d.length?d[0].unshift(a):d=[[a]];return d};
|
288
|
+
sre.SemanticProcessor.FENCE_TO_PUNCT_={};sre.SemanticProcessor.FENCE_TO_PUNCT_[sre.SemanticAttr.Role.NEUTRAL]=sre.SemanticAttr.Role.VBAR;sre.SemanticProcessor.FENCE_TO_PUNCT_[sre.SemanticAttr.Role.OPEN]=sre.SemanticAttr.Role.OPENFENCE;sre.SemanticProcessor.FENCE_TO_PUNCT_[sre.SemanticAttr.Role.CLOSE]=sre.SemanticAttr.Role.CLOSEFENCE;
|
289
|
+
sre.SemanticProcessor.fenceToPunct_=function(a){var b=sre.SemanticProcessor.FENCE_TO_PUNCT_[a.role];if(b){for(;a.embellished;)a.embellished=sre.SemanticAttr.Type.PUNCTUATION,a.role=b,a=a.childNodes[0];a.type=sre.SemanticAttr.Type.PUNCTUATION;a.role=b}};
|
290
|
+
sre.SemanticProcessor.prototype.horizontalFencedNode_=function(a,b,c){c=sre.SemanticProcessor.getInstance().row(c);b=sre.SemanticProcessor.getInstance().factory_.makeBranchNode(sre.SemanticAttr.Type.FENCED,[c],[a,b]);a.role===sre.SemanticAttr.Role.OPEN?(this.classifyHorizontalFence_(b),this.propagateComposedFunction(b)):b.role=a.role;return sre.SemanticProcessor.rewriteFencedNode_(b)};
|
291
|
+
sre.SemanticProcessor.prototype.classifyHorizontalFence_=function(a){a.role=sre.SemanticAttr.Role.LEFTRIGHT;var b=a.childNodes;if(sre.SemanticPred.isSetNode(a)&&!(1<b.length)){var c=b[0].type;if(0===b.length||b[0].type===sre.SemanticAttr.Type.EMPTY)a.role=sre.SemanticAttr.Role.SETEMPTY;else if(c===sre.SemanticAttr.Type.IDENTIFIER||c===sre.SemanticAttr.Type.NUMBER)a.role=sre.SemanticAttr.Role.SETSINGLE;else{var d=b[0].role;c===sre.SemanticAttr.Type.PUNCTUATED&&d===sre.SemanticAttr.Role.SEQUENCE&&(b[0].contentNodes[0].role===
|
292
|
+
sre.SemanticAttr.Role.COMMA?a.role=sre.SemanticAttr.Role.SETCOLLECT:1!==b[0].contentNodes.length||b[0].contentNodes[0].role!==sre.SemanticAttr.Role.VBAR&&b[0].contentNodes[0].role!==sre.SemanticAttr.Role.COLON||(a.role=sre.SemanticAttr.Role.SETEXT,this.setExtension_(a)))}}};
|
293
|
+
sre.SemanticProcessor.prototype.setExtension_=function(a){(a=a.childNodes[0].childNodes[0])&&a.type===sre.SemanticAttr.Type.INFIXOP&&1===a.contentNodes.length&&a.contentNodes[0].role===sre.SemanticAttr.Role.UNKNOWN&&(a.contentNodes[0].role=sre.SemanticAttr.Role.SETEXT)};
|
294
|
+
sre.SemanticProcessor.prototype.getPunctuationInRow_=function(a){if(1>=a.length)return a;var b=sre.SemanticProcessor.partitionNodes_(a,function(a){return sre.SemanticPred.isPunctuation(a)&&!sre.SemanticPred.isAttribute("role","ELLIPSIS")(a)});if(0===b.rel.length)return a;a=[];var c=b.comp.shift();0<c.length&&a.push(sre.SemanticProcessor.getInstance().row(c));for(var d=0;0<b.comp.length;)a.push(b.rel[d++]),c=b.comp.shift(),0<c.length&&a.push(sre.SemanticProcessor.getInstance().row(c));return[sre.SemanticProcessor.getInstance().punctuatedNode_(a,
|
295
|
+
b.rel)]};
|
296
|
+
sre.SemanticProcessor.prototype.punctuatedNode_=function(a,b){var c=sre.SemanticProcessor.getInstance().factory_.makeBranchNode(sre.SemanticAttr.Type.PUNCTUATED,a,b);if(b.length===a.length){var d=b[0].role;if(d!==sre.SemanticAttr.Role.UNKNOWN&&b.every(function(a){return a.role===d}))return c.role=d,c}sre.SemanticPred.singlePunctAtPosition(a,b,0)?c.role=sre.SemanticAttr.Role.STARTPUNCT:sre.SemanticPred.singlePunctAtPosition(a,b,a.length-1)?c.role=sre.SemanticAttr.Role.ENDPUNCT:b.every(sre.SemanticPred.isAttribute("role","DUMMY"))?
|
297
|
+
c.role=sre.SemanticAttr.Role.TEXT:c.role=sre.SemanticAttr.Role.SEQUENCE;return c};sre.SemanticProcessor.prototype.dummyNode_=function(a){var b=sre.SemanticProcessor.getInstance().factory_.makeMultipleContentNodes(a.length-1,sre.SemanticAttr.invisibleComma());b.forEach(function(a){a.role=sre.SemanticAttr.Role.DUMMY});return sre.SemanticProcessor.getInstance().punctuatedNode_(a,b)};
|
298
|
+
sre.SemanticProcessor.MML_TO_LIMIT_={MSUB:sre.SemanticAttr.Type.LIMLOWER,MUNDER:sre.SemanticAttr.Type.LIMLOWER,MSUP:sre.SemanticAttr.Type.LIMUPPER,MOVER:sre.SemanticAttr.Type.LIMUPPER,MSUBSUP:sre.SemanticAttr.Type.LIMBOTH,MUNDEROVER:sre.SemanticAttr.Type.LIMBOTH};
|
299
|
+
sre.SemanticProcessor.prototype.limitNode=function(a,b){var c=b[0];if(sre.SemanticPred.isLimitBase(c))a=sre.SemanticProcessor.MML_TO_LIMIT_[a];else switch(a){case "MSUB":a=sre.SemanticAttr.Type.SUBSCRIPT;break;case "MSUP":a=sre.SemanticAttr.Type.SUPERSCRIPT;break;case "MSUBSUP":var d=sre.SemanticProcessor.getInstance().factory_.makeBranchNode(sre.SemanticAttr.Type.SUBSCRIPT,[c,b[1]],[]);d.role=sre.SemanticAttr.Role.SUBSUP;b=[d,b[2]];a=sre.SemanticAttr.Type.SUPERSCRIPT;break;case "MOVER":a=sre.SemanticAttr.Type.OVERSCORE;
|
300
|
+
sre.SemanticPred.isAccent(b[1])&&(b[1].role=sre.SemanticAttr.Role.OVERACCENT);break;case "MUNDER":a=sre.SemanticAttr.Type.UNDERSCORE;sre.SemanticPred.isAccent(b[1])&&(b[1].role=sre.SemanticAttr.Role.UNDERACCENT);break;default:d=sre.SemanticPred.isAccent(b[1]),a=sre.SemanticPred.isAccent(b[2]),d&&(b[1].role=sre.SemanticAttr.Role.UNDERACCENT),a&&(b[2].role=sre.SemanticAttr.Role.OVERACCENT),a&&!d?(d=sre.SemanticProcessor.getInstance().factory_.makeBranchNode(sre.SemanticAttr.Type.OVERSCORE,[c,b[2]],
|
301
|
+
[]),b=[d,b[1]],a=sre.SemanticAttr.Type.UNDERSCORE):(d=sre.SemanticProcessor.getInstance().factory_.makeBranchNode(sre.SemanticAttr.Type.UNDERSCORE,[c,b[1]],[]),b=[d,b[2]],a=sre.SemanticAttr.Type.OVERSCORE),d.role=sre.SemanticAttr.Role.UNDEROVER}b=sre.SemanticProcessor.getInstance().factory_.makeBranchNode(a,b,[]);a=sre.SemanticPred.isEmbellished(c);d&&(d.embellished=a);b.embellished=a;b.role=c.role;return b};
|
302
|
+
sre.SemanticProcessor.prototype.getFunctionsInRow_=function(a,b){b=b||[];if(0===a.length)return b;var c=a.shift(),d=sre.SemanticProcessor.classifyFunction_(c,a);if(!d)return b.push(c),sre.SemanticProcessor.getInstance().getFunctionsInRow_(a,b);a=sre.SemanticProcessor.getInstance().getFunctionsInRow_(a,[]);a=sre.SemanticProcessor.getInstance().getFunctionArgs_(c,a,d);return b.concat(a)};sre.SemanticProcessor.CLASSIFY_FUNCTION_={};
|
303
|
+
sre.SemanticProcessor.CLASSIFY_FUNCTION_[sre.SemanticAttr.Role.INTEGRAL]="integral";sre.SemanticProcessor.CLASSIFY_FUNCTION_[sre.SemanticAttr.Role.SUM]="bigop";sre.SemanticProcessor.CLASSIFY_FUNCTION_[sre.SemanticAttr.Role.PREFIXFUNC]="prefix";sre.SemanticProcessor.CLASSIFY_FUNCTION_[sre.SemanticAttr.Role.LIMFUNC]="prefix";sre.SemanticProcessor.CLASSIFY_FUNCTION_[sre.SemanticAttr.Role.SIMPLEFUNC]="prefix";sre.SemanticProcessor.CLASSIFY_FUNCTION_[sre.SemanticAttr.Role.COMPFUNC]="prefix";
|
304
|
+
sre.SemanticProcessor.classifyFunction_=function(a,b){if(a.type===sre.SemanticAttr.Type.APPL||a.type===sre.SemanticAttr.Type.BIGOP||a.type===sre.SemanticAttr.Type.INTEGRAL)return"";if(b[0]&&b[0].textContent===sre.SemanticAttr.functionApplication()){b.shift();b=sre.SemanticAttr.Role.SIMPLEFUNC;if(a.role===sre.SemanticAttr.Role.PREFIXFUNC||a.role===sre.SemanticAttr.Role.LIMFUNC)b=a.role;sre.SemanticProcessor.propagateFunctionRole_(a,b);return"prefix"}return(b=sre.SemanticProcessor.CLASSIFY_FUNCTION_[a.role])?
|
305
|
+
b:sre.SemanticPred.isSimpleFunctionHead(a)?"simple":""};sre.SemanticProcessor.propagateFunctionRole_=function(a,b){a&&(sre.SemanticPred.isAttribute("role","SUBSUP")(a)||(a.role=b),sre.SemanticProcessor.propagateFunctionRole_(a.childNodes[0],b))};
|
306
|
+
sre.SemanticProcessor.prototype.getFunctionArgs_=function(a,b,c){switch(c){case "integral":return b=sre.SemanticProcessor.getInstance().getIntegralArgs_(b),c=sre.SemanticProcessor.getInstance().row(b.integrand),a=sre.SemanticProcessor.getInstance().integralNode_(a,c,b.intvar),b.rest.unshift(a),b.rest;case "prefix":if(b[0]&&b[0].type===sre.SemanticAttr.Type.FENCED){var d=b.shift();d.role!==sre.SemanticAttr.Role.NEUTRAL&&(d.role=sre.SemanticAttr.Role.LEFTRIGHT);a=sre.SemanticProcessor.getInstance().functionNode_(a,
|
307
|
+
d);b.unshift(a);return b}c=sre.SemanticProcessor.sliceNodes_(b,sre.SemanticPred.isPrefixFunctionBoundary);if(c.head.length)d=sre.SemanticProcessor.getInstance().row(c.head),c.div&&c.tail.unshift(c.div);else{if(!c.div||!sre.SemanticPred.isAttribute("type","APPL")(c.div))return b.unshift(a),b;d=c.div}a=sre.SemanticProcessor.getInstance().functionNode_(a,d);c.tail.unshift(a);return c.tail;case "bigop":c=sre.SemanticProcessor.sliceNodes_(b,sre.SemanticPred.isBigOpBoundary);if(!c.head.length)return b.unshift(a),
|
308
|
+
b;d=sre.SemanticProcessor.getInstance().row(c.head);a=sre.SemanticProcessor.getInstance().bigOpNode_(a,d);c.div&&c.tail.unshift(c.div);c.tail.unshift(a);return c.tail;default:if(0===b.length)return[a];c=b[0];if(c.type===sre.SemanticAttr.Type.FENCED&&c.role!==sre.SemanticAttr.Role.NEUTRAL&&sre.SemanticPred.isSimpleFunctionScope(c))return c.role=sre.SemanticAttr.Role.LEFTRIGHT,sre.SemanticProcessor.propagateFunctionRole_(a,sre.SemanticAttr.Role.SIMPLEFUNC),a=sre.SemanticProcessor.getInstance().functionNode_(a,
|
309
|
+
b.shift()),b.unshift(a),b;b.unshift(a);return b}};
|
310
|
+
sre.SemanticProcessor.prototype.getIntegralArgs_=function(a,b){b=b||[];if(0===a.length)return{integrand:b,intvar:null,rest:a};var c=a[0];if(sre.SemanticPred.isGeneralFunctionBoundary(c))return{integrand:b,intvar:null,rest:a};if(sre.SemanticPred.isIntegralDxBoundarySingle(c))return{integrand:b,intvar:c,rest:a.slice(1)};if(a[1]&&sre.SemanticPred.isIntegralDxBoundary(c,a[1])){var d=sre.SemanticProcessor.getInstance().factory_.makeContentNode(sre.SemanticAttr.invisibleComma());c=sre.SemanticProcessor.getInstance().punctuatedNode_([c,
|
311
|
+
d,a[1]],[d]);c.role=sre.SemanticAttr.Role.INTEGRAL;return{integrand:b,intvar:c,rest:a.slice(2)}}b.push(a.shift());return sre.SemanticProcessor.getInstance().getIntegralArgs_(a,b)};
|
312
|
+
sre.SemanticProcessor.prototype.functionNode_=function(a,b){var c=sre.SemanticProcessor.getInstance().factory_.makeContentNode(sre.SemanticAttr.functionApplication());c.type=sre.SemanticAttr.Type.PUNCTUATION;c.role=sre.SemanticAttr.Role.APPLICATION;var d=sre.SemanticProcessor.getFunctionOp_(a,function(a){return sre.SemanticPred.isAttribute("type","FUNCTION")(a)||sre.SemanticPred.isAttribute("type","IDENTIFIER")(a)&&sre.SemanticPred.isAttribute("role","SIMPLEFUNC")(a)});return sre.SemanticProcessor.getInstance().functionalNode_(sre.SemanticAttr.Type.APPL,
|
313
|
+
[a,b],d,[c])};sre.SemanticProcessor.prototype.bigOpNode_=function(a,b){var c=sre.SemanticProcessor.getFunctionOp_(a,sre.SemanticPred.isAttribute("type","LARGEOP"));return sre.SemanticProcessor.getInstance().functionalNode_(sre.SemanticAttr.Type.BIGOP,[a,b],c,[])};
|
314
|
+
sre.SemanticProcessor.prototype.integralNode_=function(a,b,c){b=b||sre.SemanticProcessor.getInstance().factory_.makeEmptyNode();c=c||sre.SemanticProcessor.getInstance().factory_.makeEmptyNode();var d=sre.SemanticProcessor.getFunctionOp_(a,sre.SemanticPred.isAttribute("type","LARGEOP"));return sre.SemanticProcessor.getInstance().functionalNode_(sre.SemanticAttr.Type.INTEGRAL,[a,b,c],d,[])};
|
315
|
+
sre.SemanticProcessor.prototype.functionalNode_=function(a,b,c,d){var e=b[0];if(c){var f=c.parent;d.push(c)}a=sre.SemanticProcessor.getInstance().factory_.makeBranchNode(a,b,d);a.role=e.role;f&&(c.parent=f);return a};sre.SemanticProcessor.getFunctionOp_=function(a,b){if(b(a))return a;for(var c=0,d;d=a.childNodes[c];c++)if(d=sre.SemanticProcessor.getFunctionOp_(d,b))return d;return null};
|
316
|
+
sre.SemanticProcessor.prototype.tablesInRow=function(a){a=sre.SemanticProcessor.partitionNodes_(a,sre.SemanticPred.tableIsMatrixOrVector);for(var b=[],c=0,d;d=a.rel[c];c++)b=b.concat(a.comp.shift()),b.push(sre.SemanticProcessor.tableToMatrixOrVector_(d));b=b.concat(a.comp.shift());a=sre.SemanticProcessor.partitionNodes_(b,sre.SemanticPred.isTableOrMultiline);b=[];for(c=0;d=a.rel[c];c++){var e=a.comp.shift();sre.SemanticPred.tableIsCases(d,e)&&sre.SemanticProcessor.tableToCases_(d,e.pop());b=b.concat(e);
|
317
|
+
b.push(d)}return b.concat(a.comp.shift())};sre.SemanticProcessor.tableToMatrixOrVector_=function(a){var b=a.childNodes[0];sre.SemanticPred.isAttribute("type","MULTILINE")(b)?sre.SemanticProcessor.tableToVector_(a):sre.SemanticProcessor.tableToMatrix_(a);a.contentNodes.forEach(goog.bind(b.appendContentNode,b));a=0;for(var c;c=b.childNodes[a];a++)sre.SemanticProcessor.assignRoleToRow_(c,sre.SemanticProcessor.getComponentRoles_(b));b.parent=null;return b};
|
318
|
+
sre.SemanticProcessor.tableToVector_=function(a){var b=a.childNodes[0];b.type=sre.SemanticAttr.Type.VECTOR;1===b.childNodes.length?sre.SemanticProcessor.tableToSquare_(a):sre.SemanticProcessor.binomialForm_(b)};sre.SemanticProcessor.binomialForm_=function(a){sre.SemanticPred.isBinomial(a)&&(a.role=sre.SemanticAttr.Role.BINOMIAL,a.childNodes[0].role=sre.SemanticAttr.Role.BINOMIAL,a.childNodes[1].role=sre.SemanticAttr.Role.BINOMIAL)};
|
319
|
+
sre.SemanticProcessor.tableToMatrix_=function(a){var b=a.childNodes[0];b.type=sre.SemanticAttr.Type.MATRIX;b.childNodes&&0<b.childNodes.length&&b.childNodes[0].childNodes&&b.childNodes.length===b.childNodes[0].childNodes.length?sre.SemanticProcessor.tableToSquare_(a):b.childNodes&&1===b.childNodes.length&&(b.role=sre.SemanticAttr.Role.ROWVECTOR)};
|
320
|
+
sre.SemanticProcessor.tableToSquare_=function(a){var b=a.childNodes[0];sre.SemanticPred.isAttribute("role","NEUTRAL")(a)?b.role=sre.SemanticAttr.Role.DETERMINANT:b.role=sre.SemanticAttr.Role.SQUAREMATRIX};sre.SemanticProcessor.getComponentRoles_=function(a){var b=a.role;return b&&b!==sre.SemanticAttr.Role.UNKNOWN?b:sre.SemanticAttr.Role[a.type.toUpperCase()]||sre.SemanticAttr.Role.UNKNOWN};
|
321
|
+
sre.SemanticProcessor.tableToCases_=function(a,b){for(var c=0,d;d=a.childNodes[c];c++)sre.SemanticProcessor.assignRoleToRow_(d,sre.SemanticAttr.Role.CASES);a.type=sre.SemanticAttr.Type.CASES;a.appendContentNode(b);sre.SemanticPred.tableIsMultiline(a)&&sre.SemanticProcessor.binomialForm_(a);return a};
|
322
|
+
sre.SemanticProcessor.tableToMultiline=function(a){if(sre.SemanticPred.tableIsMultiline(a)){a.type=sre.SemanticAttr.Type.MULTILINE;for(var b=0,c;c=a.childNodes[b];b++)sre.SemanticProcessor.rowToLine_(c,sre.SemanticAttr.Role.MULTILINE);1===a.childNodes.length&&sre.SemanticPred.isFencedElement(a.childNodes[0].childNodes[0])&&sre.SemanticProcessor.tableToMatrixOrVector_(sre.SemanticProcessor.rewriteFencedLine_(a));sre.SemanticProcessor.binomialForm_(a);sre.SemanticProcessor.classifyMultiline(a)}else sre.SemanticProcessor.classifyTable(a)};
|
323
|
+
sre.SemanticProcessor.rewriteFencedLine_=function(a){var b=a.childNodes[0],c=a.childNodes[0].childNodes[0],d=a.childNodes[0].childNodes[0].childNodes[0];c.parent=a.parent;a.parent=c;d.parent=b;c.childNodes=[a];b.childNodes=[d];return c};
|
324
|
+
sre.SemanticProcessor.rowToLine_=function(a,b){b=b||sre.SemanticAttr.Role.UNKNOWN;sre.SemanticPred.isAttribute("type","ROW")(a)&&(a.type=sre.SemanticAttr.Type.LINE,a.role=b,1===a.childNodes.length&&sre.SemanticPred.isAttribute("type","CELL")(a.childNodes[0])&&(a.childNodes=a.childNodes[0].childNodes,a.childNodes.forEach(function(b){b.parent=a})))};
|
325
|
+
sre.SemanticProcessor.assignRoleToRow_=function(a,b){if(sre.SemanticPred.isAttribute("type","LINE")(a))a.role=b;else if(sre.SemanticPred.isAttribute("type","ROW")(a)){a.role=b;var c=sre.SemanticPred.isAttribute("type","CELL");a.childNodes.forEach(function(a){c(a)&&(a.role=b)})}};
|
326
|
+
sre.SemanticProcessor.sliceNodes_=function(a,b,c){c&&a.reverse();for(var d=[],e=0,f;f=a[e];e++){if(b(f))return c?{head:a.slice(e+1).reverse(),div:f,tail:d.reverse()}:{head:d,div:f,tail:a.slice(e+1)};d.push(f)}return c?{head:[],div:null,tail:d.reverse()}:{head:d,div:null,tail:[]}};sre.SemanticProcessor.partitionNodes_=function(a,b){var c=[],d=[];do{var e=sre.SemanticProcessor.sliceNodes_(a,b);d.push(e.head);c.push(e.div);a=e.tail}while(e.div);c.pop();return{rel:c,comp:d}};
|
327
|
+
sre.SemanticProcessor.prototype.mfenced=function(a,b,c,d){if(c&&0<d.length){var e=sre.MathUtil.nextSeparatorFunction(c),f=[d.shift()];d.forEach(goog.bind(function(a){f.push(sre.SemanticProcessor.getInstance().factory_.makeContentNode(e()));f.push(a)},this));d=f}if(a&&b)return sre.SemanticProcessor.getInstance().horizontalFencedNode_(sre.SemanticProcessor.getInstance().factory_.makeContentNode(a),sre.SemanticProcessor.getInstance().factory_.makeContentNode(b),d);a&&d.unshift(sre.SemanticProcessor.getInstance().factory_.makeContentNode(a));
|
328
|
+
b&&d.push(sre.SemanticProcessor.getInstance().factory_.makeContentNode(b));return sre.SemanticProcessor.getInstance().row(d)};sre.SemanticProcessor.number=function(a){if(a.type===sre.SemanticAttr.Type.UNKNOWN||a.type===sre.SemanticAttr.Type.IDENTIFIER)a.type=sre.SemanticAttr.Type.NUMBER;sre.SemanticProcessor.numberRole_(a);sre.SemanticProcessor.exprFont_(a)};
|
329
|
+
sre.SemanticProcessor.numberRole_=function(a){if(a.role===sre.SemanticAttr.Role.UNKNOWN){var b=sre.SemanticUtil.splitUnicode(a.textContent).map(sre.SemanticAttr.lookupMeaning);b.every(function(a){return a.type===sre.SemanticAttr.Type.NUMBER&&a.role===sre.SemanticAttr.Role.INTEGER||a.type===sre.SemanticAttr.Type.PUNCTUATION&&a.role===sre.SemanticAttr.Role.COMMA})?a.role=sre.SemanticAttr.Role.INTEGER:b.every(function(a){return a.type===sre.SemanticAttr.Type.NUMBER&&a.role===sre.SemanticAttr.Role.INTEGER||
|
330
|
+
a.type===sre.SemanticAttr.Type.PUNCTUATION})?a.role=sre.SemanticAttr.Role.FLOAT:a.role=sre.SemanticAttr.Role.OTHERNUMBER}};sre.SemanticProcessor.exprFont_=function(a){if(a.font===sre.SemanticAttr.Font.UNKNOWN){var b=sre.SemanticUtil.splitUnicode(a.textContent).map(sre.SemanticAttr.lookupMeaning).reduce(function(a,b){return a&&b.font&&b.font!==sre.SemanticAttr.Font.UNKNOWN&&b.font!==a?a===sre.SemanticAttr.Font.UNKNOWN?b.font:null:a},sre.SemanticAttr.Font.UNKNOWN);b&&(a.font=b)}};
|
331
|
+
sre.SemanticProcessor.prototype.fractionLikeNode=function(a,b,c){return sre.SemanticUtil.isZeroLength(a)?(a=sre.SemanticProcessor.getInstance().factory_.makeBranchNode(sre.SemanticAttr.Type.LINE,[b],[]),c=sre.SemanticProcessor.getInstance().factory_.makeBranchNode(sre.SemanticAttr.Type.LINE,[c],[]),c=sre.SemanticProcessor.getInstance().factory_.makeBranchNode(sre.SemanticAttr.Type.MULTILINE,[a,c],[]),sre.SemanticProcessor.binomialForm_(c),sre.SemanticProcessor.classifyMultiline(c),c):sre.SemanticProcessor.getInstance().fractionNode_(b,
|
332
|
+
c)};
|
333
|
+
sre.SemanticProcessor.prototype.fractionNode_=function(a,b){a=sre.SemanticProcessor.getInstance().factory_.makeBranchNode(sre.SemanticAttr.Type.FRACTION,[a,b],[]);a.role=a.childNodes.every(function(a){return sre.SemanticPred.isAttribute("type","NUMBER")(a)&&sre.SemanticPred.isAttribute("role","INTEGER")(a)})?sre.SemanticAttr.Role.VULGAR:a.childNodes.every(function(a){return sre.SemanticPred.isAttribute("role","UNIT")(a)})?sre.SemanticAttr.Role.UNIT:sre.SemanticAttr.Role.DIVISION;this.propagateSimpleFunction(a);return a};
|
334
|
+
sre.SemanticProcessor.prototype.tensor=function(a,b,c,d,e){b=sre.SemanticProcessor.getInstance().factory_.makeBranchNode(sre.SemanticAttr.Type.TENSOR,[a,sre.SemanticProcessor.getInstance().scriptNode_(b,sre.SemanticAttr.Role.LEFTSUB),sre.SemanticProcessor.getInstance().scriptNode_(c,sre.SemanticAttr.Role.LEFTSUPER),sre.SemanticProcessor.getInstance().scriptNode_(d,sre.SemanticAttr.Role.RIGHTSUB),sre.SemanticProcessor.getInstance().scriptNode_(e,sre.SemanticAttr.Role.RIGHTSUPER)],[]);b.role=a.role;
|
335
|
+
b.embellished=sre.SemanticPred.isEmbellished(a);return b};
|
336
|
+
sre.SemanticProcessor.prototype.pseudoTensor=function(a,b,c){var d=function(a){return!sre.SemanticPred.isAttribute("type","EMPTY")(a)},e=b.filter(d).length;d=c.filter(d).length;if(!e&&!d)return a;var f=e?d?"MSUBSUP":"MSUB":"MSUP";a=[a];e&&a.push(sre.SemanticProcessor.getInstance().scriptNode_(b,sre.SemanticAttr.Role.RIGHTSUB,!0));d&&a.push(sre.SemanticProcessor.getInstance().scriptNode_(c,sre.SemanticAttr.Role.RIGHTSUPER,!0));return sre.SemanticProcessor.getInstance().limitNode(f,a)};
|
337
|
+
sre.SemanticProcessor.prototype.scriptNode_=function(a,b,c){switch(a.length){case 0:a=sre.SemanticProcessor.getInstance().factory_.makeEmptyNode();break;case 1:a=a[0];if(c)return a;break;default:a=sre.SemanticProcessor.getInstance().dummyNode_(a)}a.role=b;return a};sre.SemanticProcessor.getEmbellishedInner_=function(a){return a&&a.embellished&&0<a.childNodes.length?sre.SemanticProcessor.getEmbellishedInner_(a.childNodes[0]):a};
|
338
|
+
sre.SemanticProcessor.purgeFences_=function(a){var b=a.rel;a=a.comp;for(var c=[],d=[];0<b.length;){var e=b.shift(),f=a.shift();sre.SemanticPred.isElligibleEmbellishedFence(e)?(c.push(e),d.push(f)):(sre.SemanticProcessor.fenceToPunct_(e),f.push(e),f=f.concat(a.shift()),a.unshift(f))}d.push(a.shift());return{rel:c,comp:d}};
|
339
|
+
sre.SemanticProcessor.rewriteFencedNode_=function(a){var b=a.contentNodes[1],c=sre.SemanticProcessor.rewriteFence_(a,a.contentNodes[0]);a.contentNodes[0]=c.fence;c=sre.SemanticProcessor.rewriteFence_(c.node,b);a.contentNodes[1]=c.fence;a.contentNodes[0].parent=a;a.contentNodes[1].parent=a;c.node.parent=null;return c.node};
|
340
|
+
sre.SemanticProcessor.rewriteFence_=function(a,b){if(!b.embellished)return{node:a,fence:b};var c=b.childNodes[0],d=sre.SemanticProcessor.rewriteFence_(a,c);if(sre.SemanticPred.isAttribute("type","SUPERSCRIPT")(b)||sre.SemanticPred.isAttribute("type","SUBSCRIPT")(b)||sre.SemanticPred.isAttribute("type","TENSOR")(b))return sre.SemanticPred.isAttribute("role","SUBSUP")(b)||(b.role=a.role),c!==d.node&&(b.replaceChild(c,d.node),c.parent=a),sre.SemanticProcessor.propagateFencePointer_(b,c),{node:b,fence:d.fence};
|
341
|
+
b.replaceChild(c,d.fence);b.mathmlTree&&-1===b.mathml.indexOf(b.mathmlTree)&&b.mathml.push(b.mathmlTree);return{node:d.node,fence:b}};sre.SemanticProcessor.propagateFencePointer_=function(a,b){a.fencePointer=b.fencePointer||b.id.toString();a.embellished=null};
|
342
|
+
sre.SemanticProcessor.classifyMultiline=function(a){for(var b=0,c=a.childNodes.length,d;b<c&&(!(d=a.childNodes[b])||!d.childNodes.length);)b++;if(!(b>=c)){var e=d.childNodes[0].role;e!==sre.SemanticAttr.Role.UNKNOWN&&a.childNodes.every(function(a){a=a.childNodes[0];return!a||a.role===e&&(sre.SemanticPred.isAttribute("type","RELATION")(a)||sre.SemanticPred.isAttribute("type","RELSEQ")(a))})&&(a.role=e)}};
|
343
|
+
sre.SemanticProcessor.classifyTable=function(a){var b=sre.SemanticProcessor.computeColumns_(a);sre.SemanticProcessor.classifyByColumns_(a,b,"EQUALITY")||sre.SemanticProcessor.classifyByColumns_(a,b,"INEQUALITY",["EQUALITY"])||sre.SemanticProcessor.classifyByColumns_(a,b,"ARROW")};
|
344
|
+
sre.SemanticProcessor.classifyByColumns_=function(a,b,c,d){d=function(a){return sre.SemanticProcessor.isPureRelation_(a,c)};var e=function(a){return sre.SemanticProcessor.isEndRelation_(a,c)||sre.SemanticProcessor.isPureRelation_(a,c)},f=function(a){return sre.SemanticProcessor.isEndRelation_(a,c,!0)||sre.SemanticProcessor.isPureRelation_(a,c)};return 3===b.length&&sre.SemanticProcessor.testColumns_(b,1,d)||2===b.length&&(sre.SemanticProcessor.testColumns_(b,1,e)||sre.SemanticProcessor.testColumns_(b,
|
345
|
+
0,f))?(a.role=sre.SemanticAttr.Role[c],!0):!1};sre.SemanticProcessor.isEndRelation_=function(a,b,c){c=c?a.childNodes.length-1:0;return sre.SemanticPred.isAttribute("type","RELSEQ")(a)&&sre.SemanticPred.isAttribute("role",b)(a)&&sre.SemanticPred.isAttribute("type","EMPTY")(a.childNodes[c])};sre.SemanticProcessor.isPureRelation_=function(a,b){return sre.SemanticPred.isAttribute("type","RELATION")(a)&&sre.SemanticPred.isAttribute("role",b)(a)};
|
346
|
+
sre.SemanticProcessor.computeColumns_=function(a){for(var b=[],c=0,d;d=a.childNodes[c];c++)for(var e=0,f;f=d.childNodes[e];e++)b[e]?b[e].push(f):b[e]=[f];return b};sre.SemanticProcessor.testColumns_=function(a,b,c){return(a=a[b])?a.some(function(a){return a.childNodes.length&&c(a.childNodes[0])})&&a.every(function(a){return!a.childNodes.length||c(a.childNodes[0])}):!1};
|
347
|
+
sre.SemanticProcessor.MATHJAX_FONTS={"-tex-caligraphic":sre.SemanticAttr.Font.CALIGRAPHIC,"-tex-caligraphic-bold":sre.SemanticAttr.Font.CALIGRAPHICBOLD,"-tex-calligraphic":sre.SemanticAttr.Font.CALIGRAPHIC,"-tex-calligraphic-bold":sre.SemanticAttr.Font.CALIGRAPHICBOLD,"-tex-oldstyle":sre.SemanticAttr.Font.OLDSTYLE,"-tex-oldstyle-bold":sre.SemanticAttr.Font.OLDSTYLEBOLD,"-tex-mathit":sre.SemanticAttr.Font.ITALIC};
|
348
|
+
sre.SemanticProcessor.prototype.font=function(a){var b=sre.SemanticProcessor.MATHJAX_FONTS[a];return b?b:a};sre.SemanticProcessor.prototype.propagateSimpleFunction=function(a){"clearspeak"!==sre.Engine.getInstance().domain||a.type!==sre.SemanticAttr.Type.INFIXOP&&a.type!==sre.SemanticAttr.Type.FRACTION||!a.childNodes.every(sre.SemanticPred.isSimpleFunction)||(a.role=sre.SemanticAttr.Role.COMPFUNC)};
|
349
|
+
sre.SemanticProcessor.prototype.propagateComposedFunction=function(a){"clearspeak"===sre.Engine.getInstance().domain&&a.type===sre.SemanticAttr.Type.FENCED&&a.childNodes[0].role===sre.SemanticAttr.Role.COMPFUNC&&(a.role=sre.SemanticAttr.Role.COMPFUNC)};sre.SemanticProcessor.proof=function(a,b,c){b=sre.SemanticProcessor.separateSemantics(b);return sre.SemanticProcessor.getInstance().proof(a,b,c)};
|
350
|
+
sre.SemanticProcessor.prototype.proof=function(a,b,c){b.inference||b.axiom||console.log("Noise");if(b.axiom)return b=this.cleanInference(a.childNodes),b=b.length?this.factory_.makeBranchNode(sre.SemanticAttr.Type.INFERENCE,c(b),[]):this.factory_.makeEmptyNode(),b.role=sre.SemanticAttr.Role.AXIOM,b.mathmlTree=a,b;a=this.inference(a,b,c);b.proof&&(a.role=sre.SemanticAttr.Role.PROOF,a.childNodes[0].role=sre.SemanticAttr.Role.FINAL);return a};
|
351
|
+
sre.SemanticProcessor.prototype.inference=function(a,b,c){if(b.inferenceRule)return c=this.getFormulas(a,[],c),c=this.factory_.makeBranchNode(sre.SemanticAttr.Type.INFERENCE,[c.conclusion,c.premises],[]);var d=b.labelledRule,e=sre.DomUtil.toArray(a.childNodes);b=[];"left"!==d&&"both"!==d||b.push(this.getLabel(a,e,c,sre.SemanticAttr.Role.LEFT));"right"!==d&&"both"!==d||b.push(this.getLabel(a,e,c,sre.SemanticAttr.Role.RIGHT));c=this.getFormulas(a,e,c);c=this.factory_.makeBranchNode(sre.SemanticAttr.Type.INFERENCE,
|
352
|
+
[c.conclusion,c.premises],b);c.mathmlTree=a;return c};sre.SemanticProcessor.prototype.getLabel=function(a,b,c,d){a=this.findNestedRow(b,"prooflabel",d);c=this.factory_.makeBranchNode(sre.SemanticAttr.Type.RULELABEL,c(sre.DomUtil.toArray(a.childNodes)),[]);c.role=d;c.mathmlTree=a;return c};
|
353
|
+
sre.SemanticProcessor.prototype.getFormulas=function(a,b,c){b=b.length?this.findNestedRow(b,"inferenceRule"):a;var d="up"===sre.SemanticProcessor.getSemantics(b).inferenceRule;a=d?b.childNodes[0]:b.childNodes[1];b=(d?b.childNodes[1]:b.childNodes[0]).childNodes[0].childNodes[0];var e=sre.DomUtil.toArray(b.childNodes[0].childNodes);d=[];var f=1;e=$jscomp.makeIterator(e);for(var g=e.next();!g.done;g=e.next())g=g.value,f%2&&d.push(g.childNodes[0]),f++;d=c(d);c=c(sre.DomUtil.toArray(a.childNodes[0].childNodes))[0];
|
354
|
+
d=this.factory_.makeBranchNode(sre.SemanticAttr.Type.PREMISES,d,[]);d.mathmlTree=b;c=this.factory_.makeBranchNode(sre.SemanticAttr.Type.CONCLUSION,[c],[]);c.mathmlTree=a.childNodes[0].childNodes[0];return{conclusion:c,premises:d}};sre.SemanticProcessor.prototype.findNestedRow=function(a,b,c){return this.findNestedRow_(a,b,0,c)};
|
355
|
+
sre.SemanticProcessor.prototype.findNestedRow_=function(a,b,c,d){if(3<c)return null;for(var e=0,f;f=a[e];e++){var g=sre.DomUtil.tagName(f);if("MSPACE"!==g){if("MROW"===g)return this.findNestedRow_(sre.DomUtil.toArray(f.childNodes),b,c+1,d);if(sre.SemanticProcessor.findSemantics(f,b,d))return f}}return null};sre.SemanticProcessor.prototype.cleanInference=function(a){return sre.DomUtil.toArray(a).filter(function(a){return"MSPACE"!==sre.DomUtil.tagName(a)})};
|
356
|
+
sre.SemanticProcessor.findSemantics=function(a,b,c){c=null==c?null:c;return(a=sre.SemanticProcessor.getSemantics(a))&&a[b]?null==c?!0:a[b]===c:!1};sre.SemanticProcessor.getSemantics=function(a){return(a=a.getAttribute("semantics"))?sre.SemanticProcessor.separateSemantics(a):null};sre.SemanticProcessor.removePrefix=function(a){a=$jscomp.makeIterator(a.split("_"));a.next();return $jscomp.arrayFromIterator(a).join("_")};
|
357
|
+
sre.SemanticProcessor.separateSemantics=function(a){var b={};a.split(";").forEach(function(a){var c=$jscomp.makeIterator(a.split(":"));a=c.next().value;c=c.next().value;b[sre.SemanticProcessor.removePrefix(a)]=c});return b};sre.SemanticMathml=function(){sre.SemanticAbstractParser.call(this,"MathML");this.parseMap_={SEMANTICS:goog.bind(this.semantics_,this),MATH:goog.bind(this.rows_,this),MROW:goog.bind(this.rows_,this),MPADDED:goog.bind(this.rows_,this),MSTYLE:goog.bind(this.rows_,this),MFRAC:goog.bind(this.fraction_,this),MSUB:goog.bind(this.limits_,this),MSUP:goog.bind(this.limits_,this),MSUBSUP:goog.bind(this.limits_,this),MOVER:goog.bind(this.limits_,this),MUNDER:goog.bind(this.limits_,this),MUNDEROVER:goog.bind(this.limits_,
|
358
|
+
this),MROOT:goog.bind(this.root_,this),MSQRT:goog.bind(this.sqrt_,this),MTABLE:goog.bind(this.table_,this),MLABELEDTR:goog.bind(this.tableLabeledRow_,this),MTR:goog.bind(this.tableRow_,this),MTD:goog.bind(this.tableCell_,this),MS:goog.bind(this.text_,this),MTEXT:goog.bind(this.text_,this),"ANNOTATION-XML":goog.bind(this.text_,this),MI:goog.bind(this.identifier_,this),MN:goog.bind(this.number_,this),MO:goog.bind(this.operator_,this),MFENCED:goog.bind(this.fenced_,this),MENCLOSE:goog.bind(this.enclosed_,
|
359
|
+
this),MMULTISCRIPTS:goog.bind(this.multiscripts_,this),ANNOTATION:goog.bind(this.empty_,this),NONE:goog.bind(this.empty_,this),MACTION:goog.bind(this.action_,this)}};goog.inherits(sre.SemanticMathml,sre.SemanticAbstractParser);
|
360
|
+
sre.SemanticMathml.prototype.parse=function(a){sre.SemanticProcessor.getInstance().setNodeFactory(this.getFactory());var b=sre.DomUtil.toArray(a.childNodes),c=sre.DomUtil.tagName(a),d=this.parseMap_[c];b=(d?d:goog.bind(this.dummy_,this))(a,b);this.addAttributes(b,a);if(-1!==["MATH","MROW","MPADDED","MSTYLE","SEMANTICS"].indexOf(c))return b;b.mathml.unshift(a);b.mathmlTree=a;return b};
|
361
|
+
sre.SemanticMathml.prototype.addAttributes=function(a,b){if(b.hasAttributes()){b=b.attributes;for(var c=b.length-1;0<=c;c--){var d=b[c].name;d.match(/^ext/)&&(a.attributes[d]=b[c].value)}}};sre.SemanticMathml.prototype.semantics_=function(a,b){return b.length?this.parse(b[0]):this.getFactory().makeEmptyNode()};
|
362
|
+
sre.SemanticMathml.prototype.rows_=function(a,b){var c=a.getAttribute("semantics");if(c&&c.match("bspr_"))return sre.SemanticProcessor.proof(a,c,goog.bind(this.parseList,this));b=sre.SemanticUtil.purgeNodes(b);b=1===b.length?this.parse(b[0]):sre.SemanticProcessor.getInstance().row(this.parseList(b));b.mathml.unshift(a);return b};sre.SemanticMathml.prototype.fraction_=function(a,b){return sre.SemanticProcessor.getInstance().fractionLikeNode(a.getAttribute("linethickness"),this.parse(b[0]),this.parse(b[1]))};
|
363
|
+
sre.SemanticMathml.prototype.limits_=function(a,b){return sre.SemanticProcessor.getInstance().limitNode(sre.DomUtil.tagName(a),this.parseList(b))};sre.SemanticMathml.prototype.root_=function(a,b){return this.getFactory().makeBranchNode(sre.SemanticAttr.Type.ROOT,[this.parse(b[1]),this.parse(b[0])],[])};
|
364
|
+
sre.SemanticMathml.prototype.sqrt_=function(a,b){a=this.parseList(sre.SemanticUtil.purgeNodes(b));return this.getFactory().makeBranchNode(sre.SemanticAttr.Type.SQRT,[sre.SemanticProcessor.getInstance().row(a)],[])};
|
365
|
+
sre.SemanticMathml.prototype.table_=function(a,b){var c=a.getAttribute("semantics");if(c&&c.match("bspr_"))return sre.SemanticProcessor.proof(a,c,goog.bind(this.parseList,this));a=this.getFactory().makeBranchNode(sre.SemanticAttr.Type.TABLE,this.parseList(b),[]);sre.SemanticProcessor.tableToMultiline(a);return a};sre.SemanticMathml.prototype.tableRow_=function(a,b){a=this.getFactory().makeBranchNode(sre.SemanticAttr.Type.ROW,this.parseList(b),[]);a.role=sre.SemanticAttr.Role.TABLE;return a};
|
366
|
+
sre.SemanticMathml.prototype.tableLabeledRow_=function(a,b){if(!b.length)return this.tableRow_(a,b);a=this.parse(b[0]);a.role=sre.SemanticAttr.Role.LABEL;b=this.getFactory().makeBranchNode(sre.SemanticAttr.Type.ROW,this.parseList(b.slice(1)),[a]);b.role=sre.SemanticAttr.Role.TABLE;return b};
|
367
|
+
sre.SemanticMathml.prototype.tableCell_=function(a,b){a=this.parseList(sre.SemanticUtil.purgeNodes(b));a=a.length?1===a.length&&sre.SemanticPred.isAttribute("type","EMPTY")(a[0])?a:[sre.SemanticProcessor.getInstance().row(a)]:[];a=this.getFactory().makeBranchNode(sre.SemanticAttr.Type.CELL,a,[]);a.role=sre.SemanticAttr.Role.TABLE;return a};
|
368
|
+
sre.SemanticMathml.prototype.text_=function(a,b){return sre.SemanticProcessor.getInstance().text(a.textContent,sre.SemanticProcessor.getInstance().font(a.getAttribute("mathvariant")),sre.DomUtil.tagName(a))};
|
369
|
+
sre.SemanticMathml.prototype.identifier_=function(a,b){a=sre.SemanticProcessor.getInstance().identifierNode(a.textContent,sre.SemanticProcessor.getInstance().font(a.getAttribute("mathvariant")),a.getAttribute("class"));if("clearspeak"!==sre.Engine.getInstance().domain)return a;-1!=="fghFGH".split("").indexOf(a.textContent)&&(a.role=sre.SemanticAttr.Role.SIMPLEFUNC);return a};sre.SemanticMathml.prototype.number_=function(a,b){a=this.leaf_(a);sre.SemanticProcessor.number(a);return a};
|
370
|
+
sre.SemanticMathml.prototype.operator_=function(a,b){a=this.leaf_(a);a.type===sre.SemanticAttr.Type.UNKNOWN&&(a.type=sre.SemanticAttr.Type.OPERATOR);return a};sre.SemanticMathml.prototype.fenced_=function(a,b){b=this.parseList(sre.SemanticUtil.purgeNodes(b));var c=sre.SemanticMathml.getAttribute_(a,"separators",","),d=sre.SemanticMathml.getAttribute_(a,"open","(");a=sre.SemanticMathml.getAttribute_(a,"close",")");a=sre.SemanticProcessor.getInstance().mfenced(d,a,c,b);return sre.SemanticProcessor.getInstance().tablesInRow([a])[0]};
|
371
|
+
sre.SemanticMathml.prototype.enclosed_=function(a,b){b=this.parseList(sre.SemanticUtil.purgeNodes(b));b=this.getFactory().makeBranchNode(sre.SemanticAttr.Type.ENCLOSE,[sre.SemanticProcessor.getInstance().row(b)],[]);b.role=a.getAttribute("notation")||sre.SemanticAttr.Role.UNKNOWN;return b};
|
372
|
+
sre.SemanticMathml.prototype.multiscripts_=function(a,b){if(!b.length)return this.getFactory().makeEmptyNode();a=this.parse(b.shift());if(!b.length)return a;for(var c=[],d=[],e=[],f=[],g=!1,h=0,k=0,l;l=b[k];k++)"MPRESCRIPTS"===sre.DomUtil.tagName(l)?(g=!0,h=0):(g?h&1?c.push(l):d.push(l):h&1?e.push(l):f.push(l),h++);return sre.SemanticUtil.purgeNodes(c).length||sre.SemanticUtil.purgeNodes(d).length?sre.SemanticProcessor.getInstance().tensor(a,this.parseList(d),this.parseList(c),this.parseList(f),this.parseList(e)):
|
373
|
+
sre.SemanticProcessor.getInstance().pseudoTensor(a,this.parseList(f),this.parseList(e))};sre.SemanticMathml.prototype.empty_=function(a,b){return this.getFactory().makeEmptyNode()};sre.SemanticMathml.prototype.action_=function(a,b){return 1<b.length?this.parse(b[1]):this.getFactory().makeUnprocessed(a)};sre.SemanticMathml.prototype.dummy_=function(a,b){return this.getFactory().makeUnprocessed(a)};sre.SemanticMathml.prototype.leaf_=function(a){return this.getFactory().makeLeafNode(a.textContent,sre.SemanticProcessor.getInstance().font(a.getAttribute("mathvariant")))};
|
374
|
+
sre.SemanticMathml.getAttribute_=function(a,b,c){if(!a.hasAttribute(b))return c;a=a.getAttribute(b);return a.match(/^\s*$/)?null:a};sre.SemanticTree=function(a){this.mathml=a;this.parser=new sre.SemanticMathml;this.root=this.parser.parse(a);this.collator=this.parser.getFactory().leafMap.collateMeaning();var b=this.collator.newDefault();b&&(this.parser=new sre.SemanticMathml,this.parser.getFactory().defaultMap=b,this.root=this.parser.parse(a));sre.SemanticAnnotations.getInstance().annotate(this.root)};sre.SemanticTree.empty=function(){var a=sre.DomUtil.parseInput("<math/>"),b=new sre.SemanticTree(a);b.mathml=a;return b};
|
375
|
+
sre.SemanticTree.fromNode=function(a,b){var c=sre.SemanticTree.empty();c.root=a;b&&(c.mathml=b);return c};sre.SemanticTree.fromRoot=function(a,b){for(;a.parent;)a=a.parent;a=sre.SemanticTree.fromNode(a);b&&(a.mathml=b);return a};sre.SemanticTree.prototype.xml=function(a){var b=sre.DomUtil.parseInput("<stree></stree>");a=this.root.xml(b.ownerDocument,a);b.appendChild(a);return b};sre.SemanticTree.prototype.toString=function(a){return(new sre.SystemExternal.xmldom.XMLSerializer).serializeToString(this.xml(a))};
|
376
|
+
sre.SemanticTree.prototype.formatXml=function(a){a=this.toString(a);return sre.DomUtil.formatXml(a)};sre.SemanticTree.prototype.displayTree=function(){this.root.displayTree()};sre.SemanticTree.prototype.replaceNode=function(a,b){var c=a.parent;c?c.replaceChild(a,b):this.root=b};sre.SemanticTree.prototype.toJson=function(){var a={};a.stree=this.root.toJson();return a};sre.Semantic={};sre.Semantic.Font=sre.SemanticAttr.Font;sre.Semantic.Role=sre.SemanticAttr.Role;sre.Semantic.Type=sre.SemanticAttr.Type;sre.Semantic.xmlTree=function(a){return sre.Semantic.getTree(a).xml()};sre.Semantic.getTree=function(a){return new sre.SemanticTree(a)};sre.Semantic.getTreeFromString=function(a){a=sre.DomUtil.parseInput(a);return sre.Semantic.getTree(a)};sre.MathspeakUtil={};sre.MathspeakUtil.spaceoutText=function(a){return a.textContent.split("").join(" ")};sre.MathspeakUtil.spaceoutNodes=function(a,b){var c=a.textContent.split(""),d=[],e=sre.SemanticProcessor.getInstance();a=a.ownerDocument;for(var f=0,g;g=c[f];f++)g=e.identifierNode(g,sre.Semantic.Font.UNKNOWN,""),b(g),d.push(g.xml(a));return d};sre.MathspeakUtil.spaceoutNumber=function(a){return sre.MathspeakUtil.spaceoutNodes(a,function(a){a.textContent.match(/\W/)||(a.type=sre.Semantic.Type.NUMBER)})};
|
377
|
+
sre.MathspeakUtil.spaceoutIdentifier=function(a){return sre.MathspeakUtil.spaceoutNodes(a,function(a){a.font=sre.Semantic.Font.UNKNOWN;a.type=sre.Semantic.Type.IDENTIFIER})};
|
378
|
+
sre.MathspeakUtil.nestingBarriers=[sre.Semantic.Type.CASES,sre.Semantic.Type.CELL,sre.Semantic.Type.INTEGRAL,sre.Semantic.Type.LINE,sre.Semantic.Type.MATRIX,sre.Semantic.Type.MULTILINE,sre.Semantic.Type.OVERSCORE,sre.Semantic.Type.ROOT,sre.Semantic.Type.ROW,sre.Semantic.Type.SQRT,sre.Semantic.Type.SUBSCRIPT,sre.Semantic.Type.SUPERSCRIPT,sre.Semantic.Type.TABLE,sre.Semantic.Type.UNDERSCORE,sre.Semantic.Type.VECTOR];sre.MathspeakUtil.nestingDepth={};
|
379
|
+
sre.MathspeakUtil.resetNestingDepth=function(a){sre.MathspeakUtil.nestingDepth={};return[a]};
|
380
|
+
sre.MathspeakUtil.getNestingDepth=function(a,b,c,d,e,f){d=d||sre.MathspeakUtil.nestingBarriers;e=e||{};f=f||function(a){return!1};var g=(new sre.SystemExternal.xmldom.XMLSerializer).serializeToString(b);sre.MathspeakUtil.nestingDepth[a]||(sre.MathspeakUtil.nestingDepth[a]={});if(sre.MathspeakUtil.nestingDepth[a][g])return sre.MathspeakUtil.nestingDepth[a][g];if(f(b)||0>c.indexOf(b.tagName))return 0;b=sre.MathspeakUtil.computeNestingDepth_(b,c,sre.BaseUtil.setdifference(d,c),e,f,0);return sre.MathspeakUtil.nestingDepth[a][g]=
|
381
|
+
b};sre.MathspeakUtil.containsAttr=function(a,b){if(!a.attributes)return!1;a=sre.DomUtil.toArray(a.attributes);for(var c=0,d;d=a[c];c++)if(b[d.nodeName]===d.nodeValue)return!0;return!1};
|
382
|
+
sre.MathspeakUtil.computeNestingDepth_=function(a,b,c,d,e,f){if(e(a)||-1<c.indexOf(a.tagName)||sre.MathspeakUtil.containsAttr(a,d))return f;-1<b.indexOf(a.tagName)&&f++;if(!a.childNodes||0===a.childNodes.length)return f;a=sre.DomUtil.toArray(a.childNodes);return Math.max.apply(null,a.map(function(a){return sre.MathspeakUtil.computeNestingDepth_(a,b,c,d,e,f)}))};
|
383
|
+
sre.MathspeakUtil.fractionNestingDepth=function(a){return sre.MathspeakUtil.getNestingDepth("fraction",a,["fraction"],sre.MathspeakUtil.nestingBarriers,{},sre.Messages.MS_FUNC.FRAC_NEST_DEPTH)};sre.MathspeakUtil.nestedFraction=function(a,b,c){a=sre.MathspeakUtil.fractionNestingDepth(a);a=Array.apply(null,Array(a)).map(function(a){return b});c&&a.push(c);return a.join(sre.Messages.REGEXP.JOINER_FRAC)};
|
384
|
+
sre.MathspeakUtil.openingFractionVerbose=function(a){return sre.MathspeakUtil.nestedFraction(a,sre.Messages.MS.START,sre.Messages.MS.FRAC_V)};sre.MathspeakUtil.closingFractionVerbose=function(a){return sre.MathspeakUtil.nestedFraction(a,sre.Messages.MS.END,sre.Messages.MS.FRAC_V)};sre.MathspeakUtil.overFractionVerbose=function(a){return sre.MathspeakUtil.nestedFraction(a,sre.Messages.MS.FRAC_OVER)};
|
385
|
+
sre.MathspeakUtil.openingFractionBrief=function(a){return sre.MathspeakUtil.nestedFraction(a,sre.Messages.MS.START,sre.Messages.MS.FRAC_B)};sre.MathspeakUtil.closingFractionBrief=function(a){return sre.MathspeakUtil.nestedFraction(a,sre.Messages.MS.END,sre.Messages.MS.FRAC_B)};
|
386
|
+
sre.MathspeakUtil.openingFractionSbrief=function(a){a=sre.MathspeakUtil.fractionNestingDepth(a);return 1===a?sre.Messages.MS.FRAC_S:sre.Messages.MS_FUNC.COMBINE_NESTED_FRACTION(sre.Messages.MS.NEST_FRAC,sre.Messages.MS_FUNC.RADICAL_NEST_DEPTH(a-1),sre.Messages.MS.FRAC_S)};
|
387
|
+
sre.MathspeakUtil.closingFractionSbrief=function(a){a=sre.MathspeakUtil.fractionNestingDepth(a);return 1===a?sre.Messages.MS.ENDFRAC:sre.Messages.MS_FUNC.COMBINE_NESTED_FRACTION(sre.Messages.MS.NEST_FRAC,sre.Messages.MS_FUNC.RADICAL_NEST_DEPTH(a-1),sre.Messages.MS.ENDFRAC)};
|
388
|
+
sre.MathspeakUtil.overFractionSbrief=function(a){a=sre.MathspeakUtil.fractionNestingDepth(a);return 1===a?sre.Messages.MS.FRAC_OVER:sre.Messages.MS_FUNC.COMBINE_NESTED_FRACTION(sre.Messages.MS.NEST_FRAC,sre.Messages.MS_FUNC.RADICAL_NEST_DEPTH(a-1),sre.Messages.MS.FRAC_OVER)};sre.MathspeakUtil.isSmallVulgarFraction=function(a){return sre.NumbersUtil.vulgarFractionSmall(a,10,100)?[a]:[]};
|
389
|
+
sre.MathspeakUtil.nestedSubSuper=function(a,b,c){for(;a.parentNode;){var d=a.parentNode,e=d.parentNode,f=a.getAttribute&&a.getAttribute("role");if(e.tagName===sre.Semantic.Type.SUBSCRIPT&&a===d.childNodes[1]||e.tagName===sre.Semantic.Type.TENSOR&&f&&(f===sre.Semantic.Role.LEFTSUB||f===sre.Semantic.Role.RIGHTSUB))b=c.sub+sre.Messages.REGEXP.JOINER_SUBSUPER+b;if(e.tagName===sre.Semantic.Type.SUPERSCRIPT&&a===d.childNodes[1]||e.tagName===sre.Semantic.Type.TENSOR&&f&&(f===sre.Semantic.Role.LEFTSUPER||
|
390
|
+
f===sre.Semantic.Role.RIGHTSUPER))b=c.sup+sre.Messages.REGEXP.JOINER_SUBSUPER+b;a=e}return b.trim()};sre.MathspeakUtil.subscriptVerbose=function(a){return sre.MathspeakUtil.nestedSubSuper(a,sre.Messages.MS.SUBSCRIPT,{sup:sre.Messages.MS.SUPER,sub:sre.Messages.MS.SUB})};sre.MathspeakUtil.subscriptBrief=function(a){return sre.MathspeakUtil.nestedSubSuper(a,sre.Messages.MS.SUB,{sup:sre.Messages.MS.SUP,sub:sre.Messages.MS.SUB})};
|
391
|
+
sre.MathspeakUtil.superscriptVerbose=function(a){return sre.MathspeakUtil.nestedSubSuper(a,sre.Messages.MS.SUPERSCRIPT,{sup:sre.Messages.MS.SUPER,sub:sre.Messages.MS.SUB})};sre.MathspeakUtil.superscriptBrief=function(a){return sre.MathspeakUtil.nestedSubSuper(a,sre.Messages.MS.SUP,{sup:sre.Messages.MS.SUP,sub:sre.Messages.MS.SUB})};
|
392
|
+
sre.MathspeakUtil.baselineVerbose=function(a){return(a=sre.MathspeakUtil.nestedSubSuper(a,"",{sup:sre.Messages.MS.SUPER,sub:sre.Messages.MS.SUB}))?a.replace(new RegExp(sre.Messages.MS.SUB+"$"),sre.Messages.MS.SUBSCRIPT).replace(new RegExp(sre.Messages.MS.SUPER+"$"),sre.Messages.MS.SUPERSCRIPT):sre.Messages.MS.BASELINE};sre.MathspeakUtil.baselineBrief=function(a){return sre.MathspeakUtil.nestedSubSuper(a,"",{sup:sre.Messages.MS.SUP,sub:sre.Messages.MS.SUB})||sre.Messages.MS.BASE};
|
393
|
+
sre.MathspeakUtil.radicalNestingDepth=function(a){return sre.MathspeakUtil.getNestingDepth("radical",a,["sqrt","root"],sre.MathspeakUtil.nestingBarriers,{})};sre.MathspeakUtil.nestedRadical=function(a,b,c){var d=sre.MathspeakUtil.radicalNestingDepth(a);c=(a=sre.MathspeakUtil.getRootIndex(a))?sre.Messages.MS_FUNC.COMBINE_ROOT_INDEX(c,a):c;return 1===d?c:sre.Messages.MS_FUNC.COMBINE_NESTED_RADICAL(b,sre.Messages.MS_FUNC.RADICAL_NEST_DEPTH(d-1),c)};
|
394
|
+
sre.MathspeakUtil.getRootIndex=function(a){a="sqrt"===a.tagName?"2":sre.XpathUtil.evalXPath("children/*[1]",a)[0].textContent.trim();return sre.Messages.MS_ROOT_INDEX[a]||""};sre.MathspeakUtil.openingRadicalVerbose=function(a){return sre.MathspeakUtil.nestedRadical(a,sre.Messages.MS.NESTED,sre.Messages.MS.STARTROOT)};sre.MathspeakUtil.closingRadicalVerbose=function(a){return sre.MathspeakUtil.nestedRadical(a,sre.Messages.MS.NESTED,sre.Messages.MS.ENDROOT)};
|
395
|
+
sre.MathspeakUtil.indexRadicalVerbose=function(a){return sre.MathspeakUtil.nestedRadical(a,sre.Messages.MS.NESTED,sre.Messages.MS.ROOTINDEX)};sre.MathspeakUtil.openingRadicalBrief=function(a){return sre.MathspeakUtil.nestedRadical(a,sre.Messages.MS.NEST_ROOT,sre.Messages.MS.STARTROOT)};sre.MathspeakUtil.closingRadicalBrief=function(a){return sre.MathspeakUtil.nestedRadical(a,sre.Messages.MS.NEST_ROOT,sre.Messages.MS.ENDROOT)};
|
396
|
+
sre.MathspeakUtil.indexRadicalBrief=function(a){return sre.MathspeakUtil.nestedRadical(a,sre.Messages.MS.NEST_ROOT,sre.Messages.MS.ROOTINDEX)};sre.MathspeakUtil.openingRadicalSbrief=function(a){return sre.MathspeakUtil.nestedRadical(a,sre.Messages.MS.NEST_ROOT,sre.Messages.MS.ROOT)};sre.MathspeakUtil.indexRadicalSbrief=function(a){return sre.MathspeakUtil.nestedRadical(a,sre.Messages.MS.NEST_ROOT,sre.Messages.MS.INDEX)};
|
397
|
+
sre.MathspeakUtil.underscoreNestingDepth=function(a){return sre.MathspeakUtil.getNestingDepth("underscore",a,["underscore"],sre.MathspeakUtil.nestingBarriers,{},function(a){return a.tagName&&a.tagName===sre.Semantic.Type.UNDERSCORE&&a.childNodes[0].childNodes[1].getAttribute("role")===sre.Semantic.Role.UNDERACCENT})};sre.MathspeakUtil.nestedUnderscore=function(a){a=sre.MathspeakUtil.underscoreNestingDepth(a);return Array(a).join(sre.Messages.MS.UNDER)+sre.Messages.MS.UNDERSCRIPT};
|
398
|
+
sre.MathspeakUtil.overscoreNestingDepth=function(a){return sre.MathspeakUtil.getNestingDepth("overscore",a,["overscore"],sre.MathspeakUtil.nestingBarriers,{},function(a){return a.tagName&&a.tagName===sre.Semantic.Type.OVERSCORE&&a.childNodes[0].childNodes[1].getAttribute("role")===sre.Semantic.Role.OVERACCENT})};sre.MathspeakUtil.nestedOverscore=function(a){a=sre.MathspeakUtil.overscoreNestingDepth(a);return Array(a).join(sre.Messages.MS.OVER)+sre.Messages.MS.OVERSCRIPT};
|
399
|
+
sre.MathspeakUtil.determinantIsSimple=function(a){if(a.tagName!==sre.Semantic.Type.MATRIX||a.getAttribute("role")!==sre.Semantic.Role.DETERMINANT)return[];for(var b=sre.XpathUtil.evalXPath("children/row/children/cell/children/*",a),c=0,d;d=b[c];c++)if(d.tagName!==sre.Semantic.Type.NUMBER){if(d.tagName===sre.Semantic.Type.IDENTIFIER&&(d=d.getAttribute("role"),d===sre.Semantic.Role.LATINLETTER||d===sre.Semantic.Role.GREEKLETTER||d===sre.Semantic.Role.OTHERLETTER))continue;return[]}return[a]};
|
400
|
+
sre.MathspeakUtil.generateBaselineConstraint=function(){var a=function(a){return a.map(function(a){return"ancestor::"+a})},b="not("+a(["subscript","superscript","tensor"]).join(" or ")+")",c=a(["relseq","multrel"]);a=a(["fraction","punctuation","fenced","sqrt","root"]);for(var d=[],e=0,f;f=a[e];e++)d=d.concat(c.map(function(a){return f+"/"+a}));c="not("+d.join(" | ")+")";return["ancestor::*/following-sibling::*",b,c].join(" and ")};
|
401
|
+
sre.MathspeakUtil.removeParens=function(a){if(!a.childNodes.length||!a.childNodes[0].childNodes.length||!a.childNodes[0].childNodes[0].childNodes.length)return"";a=a.childNodes[0].childNodes[0].childNodes[0].textContent;return a.match(/^\(.+\)$/)?a.slice(1,-1):a};sre.MathspeakUtil.componentString_={3:"CSFleftsuperscript",4:"CSFleftsubscript",2:"CSFbaseline",1:"CSFrightsubscript",0:"CSFrightsuperscript"};sre.MathspeakUtil.childNumber_={4:2,3:3,2:1,1:4,0:5};
|
402
|
+
sre.MathspeakUtil.generateTensorRuleStrings_=function(a){var b=[],c="",d="";a=parseInt(a,2);for(var e=0;5>e;e++){var f="children/*["+sre.MathspeakUtil.childNumber_[e]+"]";if(a&1){var g=sre.MathspeakUtil.componentString_[e%5];c="[t] "+g+"Verbose; [n] "+f+";"+c;d="[t] "+g+"Brief; [n] "+f+";"+d}else b.unshift("name("+f+')="empty"');a>>=1}b.push(c);b.push(d);return b};
|
403
|
+
sre.MathspeakUtil.generateTensorRules=function(a){var b=goog.bind(a.defineRule,a),c=goog.bind(a.defineRulesAlias,a);a=goog.bind(a.defineSpecialisedRule,a);for(var d="11111 11110 11101 11100 10111 10110 10101 10100 01111 01110 01101 01100".split(" "),e=0,f;f=d[e];e++){var g="tensor"+f;f=sre.MathspeakUtil.generateTensorRuleStrings_(f);var h=f.pop(),k=f.pop(),l=[g,"mathspeak.default",k,"self::tensor"].concat(f),m=[g,"mathspeak.brief",h,"self::tensor"].concat(f);b.apply(null,l);b.apply(null,m);a(g,"mathspeak.brief",
|
404
|
+
"mathspeak.sbrief");l=sre.MathspeakUtil.componentString_[2];k+="; [t]"+l+"Verbose";h+="; [t]"+l+"Brief";g+="-baseline";l=[g,"mathspeak.default",k,"self::tensor","following-sibling::*"].concat(f);m=[g,"mathspeak.brief",h,"self::tensor","following-sibling::*"].concat(f);b.apply(null,l);b.apply(null,m);a(g,"mathspeak.brief","mathspeak.sbrief");g=[g,"self::tensor","not(following-sibling::*)","ancestor::fraction|ancestor::punctuated|ancestor::fenced|ancestor::root|ancestor::sqrt|ancestor::relseq|ancestor::multirel|@embellished"].concat(f);
|
405
|
+
c.apply(null,g)}};sre.Locale={};sre.Locale.nestingToString=function(a){switch(a){case 1:return sre.Messages.MS.ONCE||"";case 2:return sre.Messages.MS.TWICE;default:return a.toString()}};sre.Locale.vulgarNestingDepth=function(a){return!!sre.MathspeakUtil.isSmallVulgarFraction(a).length};sre.Locale.combinePostfixIndex=function(a,b){return a===sre.Messages.MS.ROOTINDEX||a===sre.Messages.MS.INDEX?a:a+" "+b};sre.Locale.localFont=function(a){var b=sre.Messages.FONT[a];void 0===b&&(b=a||"");return"string"===typeof b?b:b[0]};
|
406
|
+
sre.Grammar.getInstance().setCorrection("localFont",sre.Locale.localFont);sre.Locale.localRole=function(a){return sre.Messages.ROLE[a]||a};sre.Grammar.getInstance().setCorrection("localRole",sre.Locale.localRole);sre.Locale.localEnclose=function(a){return sre.Messages.ENCLOSE[a]||a};sre.Grammar.getInstance().setCorrection("localEnclose",sre.Locale.localEnclose);sre.Locale.makePlural=function(a){var b=sre.Messages.PLURAL_UNIT[a];return b?b:sre.Messages.PLURAL(a)};
|
407
|
+
sre.Grammar.getInstance().setCorrection("plural",sre.Locale.makePlural);sre.Locale.prefixCombiner=function(a,b,c){a=c?c+" "+a:a;return b?b+" "+a:a};sre.Locale.postfixCombiner=function(a,b,c){a=c?c+" "+a:a;return b?a+" "+b:a};sre.Numbers={};sre.Numbers.en={};sre.Numbers.en.onesNumbers_=" one two three four five six seven eight nine ten eleven twelve thirteen fourteen fifteen sixteen seventeen eighteen nineteen".split(" ");sre.Numbers.en.tensNumbers_=" twenty thirty forty fifty sixty seventy eighty ninety".split(" ");sre.Numbers.en.largeNumbers_=" thousand million billion trillion quadrillion quintillion sextillion septillion octillion nonillion decillion".split(" ");
|
408
|
+
sre.Numbers.en.hundredsToWords_=function(a){a%=1E3;var b=sre.Numbers.en.onesNumbers_[Math.floor(a/100)]?sre.Numbers.en.onesNumbers_[Math.floor(a/100)]+sre.Numbers.en.NUMBERS.numSep+"hundred":"";if(a%=100)b+=b?sre.Numbers.en.NUMBERS.numSep:"",b+=sre.Numbers.en.onesNumbers_[a]||sre.Numbers.en.tensNumbers_[Math.floor(a/10)]+(a%10?sre.Numbers.en.NUMBERS.numSep+sre.Numbers.en.onesNumbers_[a%10]:"");return b};
|
409
|
+
sre.Numbers.en.numberToWords=function(a){if(a>=Math.pow(10,36))return a.toString();for(var b=0,c="";0<a;)a%1E3&&(c=sre.Numbers.en.hundredsToWords_(a%1E3)+(b?"-"+sre.Numbers.en.largeNumbers_[b]+"-":"")+c),a=Math.floor(a/1E3),b++;return c.replace(/-$/,"")};sre.Numbers.en.numberToOrdinal=function(a,b){if(1===a)return b?"oneths":"oneth";if(2===a)return b?"halves":"half";a=sre.Numbers.en.wordOrdinal(a);return b?a+"s":a};
|
410
|
+
sre.Numbers.en.wordOrdinal=function(a){a=sre.Numbers.en.numberToWords(a);return a=a.match(/one$/)?a.slice(0,-3)+"first":a.match(/two$/)?a.slice(0,-3)+"second":a.match(/three$/)?a.slice(0,-5)+"third":a.match(/five$/)?a.slice(0,-4)+"fifth":a.match(/eight$/)?a.slice(0,-5)+"eighth":a.match(/nine$/)?a.slice(0,-4)+"ninth":a.match(/twelve$/)?a.slice(0,-6)+"twelfth":a.match(/ty$/)?a.slice(0,-2)+"tieth":a+"th"};
|
411
|
+
sre.Numbers.en.simpleOrdinal=function(a){var b=a%100,c=a.toString();if(10<b&&20>b)return c+"th";switch(a%10){case 1:return c+"st";case 2:return c+"nd";case 3:return c+"rd";default:return c+"th"}};sre.Numbers.en.NUMBERS={wordOrdinal:sre.Numbers.en.wordOrdinal,simpleOrdinal:sre.Numbers.en.simpleOrdinal,numberToWords:sre.Numbers.en.numberToWords,numberToOrdinal:sre.Numbers.en.numberToOrdinal,vulgarSep:" ",numSep:" "};sre.Locale.en={MS:{START:"Start",FRAC_V:"Fraction",FRAC_B:"Frac",FRAC_S:"Frac",END:"End",FRAC_OVER:"Over",TWICE:"Twice",NEST_FRAC:"Nest",ENDFRAC:"EndFrac",SUPER:"Super",SUB:"Sub",SUP:"Sup",SUPERSCRIPT:"Superscript",SUBSCRIPT:"Subscript",BASELINE:"Baseline",BASE:"Base",NESTED:"Nested",NEST_ROOT:"Nest",STARTROOT:"StartRoot",ENDROOT:"EndRoot",ROOTINDEX:"RootIndex",ROOT:"Root",INDEX:"Index",UNDER:"Under",UNDERSCRIPT:"Underscript",OVER:"Over",OVERSCRIPT:"Overscript"},MS_FUNC:{FRAC_NEST_DEPTH:sre.Locale.vulgarNestingDepth,
|
412
|
+
RADICAL_NEST_DEPTH:sre.Locale.nestingToString,COMBINE_ROOT_INDEX:function(a,b){return a},COMBINE_NESTED_FRACTION:function(a,b,c){return a+b+c},COMBINE_NESTED_RADICAL:function(a,b,c){return a+b+c},FONT_REGEXP:function(a){return new RegExp("^"+a.split(/ |-/).join("( |-)")+"( |-)")}},MS_ROOT_INDEX:{},FONT:{bold:"bold","bold-fraktur":"bold fraktur","bold-italic":"bold italic","bold-script":"bold script",caligraphic:"calligraphic","caligraphic-bold":"calligraphic bold","double-struck":"double struck",
|
413
|
+
"double-struck-italic":"double struck italic",fraktur:"fraktur",fullwidth:"fullwidth",italic:"italic",monospace:"monospace",normal:"normal",oldstyle:"oldstyle","oldstyle-bold":"oldstyle bold",script:"script","sans-serif":"sans serif","sans-serif-italic":"sans serif italic","sans-serif-bold":"sans serif bold","sans-serif-bold-italic":"sans serif bold italic",unknown:"unknown"},EMBELLISH:{"super":"super",sub:"sub",circled:"circled",parenthesized:"parenthesized",period:["period",sre.Locale.postfixCombiner],
|
414
|
+
"negative-circled":"black circled","double-circled":"double circled","circled-sans-serif":"circled sans serif","negative-circled-sans-serif":"black circled sans serif",comma:["comma",sre.Locale.postfixCombiner],squared:"squared","negative-squared":"black squared"},ROLE:{addition:"addition",multiplication:"multiplication",subtraction:"subtraction",division:"division",equality:"equality",inequality:"inequality",element:"element",arrow:"arrow",determinant:"determinant",rowvector:"row vector",binomial:"binomial",
|
415
|
+
squarematrix:"square matrix",multiline:"multiple lines",matrix:"matrix",vector:"vector",cases:"case statement",table:"table",unknown:"unknown"},ENCLOSE:{longdiv:"long division",actuarial:"actuarial symbol",radical:"square root",box:"box",roundedbox:"rounded box",circle:"circle",left:"left vertical-line",right:"right vertical-line",top:"overbar",bottom:"underbar",updiagonalstrike:"crossout",downdiagonalstrike:"crossout",verticalstrike:"vertical strikeout",horizontalstrike:"crossout",madruwb:"Arabic factorial symbol",
|
416
|
+
updiagonalarrow:"diagonal arrow",phasorangle:"phasor angle",unknown:"long division"},NAVIGATE:{COLLAPSIBLE:"collapsible",EXPANDABLE:"expandable",LEVEL:"Level"},REGEXP:{TEXT:"a-zA-Z",NUMBER:"((\\d{1,3})(?=(,| ))((,| )\\d{3})*(\\.\\d+)?)|^\\d*\\.\\d+|^\\d+",DECIMAL_MARK:"\\.",DIGIT_GROUP:",",JOINER_SUBSUPER:" ",JOINER_FRAC:""},PLURAL_UNIT:{foot:"feet",inch:"inches"},NUMBERS:sre.Numbers.en.NUMBERS,ALPHABETS:{latinSmall:"abcdefghijklmnopqrstuvwxyz".split(""),latinCap:"ABCDEFGHIJKLMNOPQRSTUVWXYZ".split(""),
|
417
|
+
greekSmall:"nabla;alpha;beta;gamma;delta;epsilon;zeta;eta;theta;iota;kappa;lamda;mu;nu;xi;omicron;pi;rho;final sigma;sigma;tau;upsilon;phi;chi;psi;omega;partial differential;epsilon;theta;kappa;phi;rho;pi".split(";"),greekCap:"Alpha Beta Gamma Delta Epsilon Zeta Eta Theta Iota Kappa Lamda Mu Nu Xi Omicron Pi Rho Theta Sigma Tau Upsilon Phi Chi Psi Omega".split(" ")},ALPHABET_TRANSFORMERS:{digit:{default:function(a){return 0===a?"zero":sre.Numbers.en.numberToWords(a)},mathspeak:function(a){return a.toString()},
|
418
|
+
clearspeak:function(a){return a.toString()}},letter:{default:function(a){return a}}},ALPHABET_PREFIXES:{capPrefix:{default:"cap",mathspeak:"upper"},smallPrefix:{default:""},digitPrefix:{default:""}},ALPHABET_COMBINER:sre.Locale.prefixCombiner};sre.Numbers.es={};sre.Numbers.es.onesNumbers_=" uno dos tres cuatro cinco seis siete ocho nueve diez once doce trece catorce quince diecis\u00e9is diecisiete dieciocho diecinueve veinte veintiuno veintid\u00f3s veintitr\u00e9s veinticuatro veinticinco veintis\u00e9is veintisiete veintiocho veintinueve".split(" ");sre.Numbers.es.tensNumbers_=" treinta cuarenta cincuenta sesenta setenta ochenta noventa".split(" ");sre.Numbers.es.hundredsNumbers_=" cien doscientos trescientos cuatrocientos quinientos seiscientos setecientos ochocientos novecientos".split(" ");
|
419
|
+
sre.Numbers.es.largeNumbers_=";mil;mill\u00f3n;mil mill\u00f3nes;bill\u00f3n;mil bill\u00f3nes;trill\u00f3n;mil trill\u00f3nes;cuatrill\u00f3;mil cuatrill\u00f3es;quintill\u00f3n;mil quintill\u00f3nes;sextill\u00f3n;mil sextill\u00f3nes;septill\u00f3n;mil septill\u00f3nes;octill\u00f3n;mil octill\u00f3nes;nonill\u00f3n;mil nonill\u00f3nes;decill\u00f3n;mil decill\u00f3nes".split(";");
|
420
|
+
sre.Numbers.es.tensToWords_=function(a){var b=a%100;if(30>b)return sre.Numbers.es.onesNumbers_[b];a=sre.Numbers.es.tensNumbers_[Math.floor(b/10)];b=sre.Numbers.es.onesNumbers_[b%10];return a&&b?a+" y "+b:a||b};sre.Numbers.es.hundredsToWords_=function(a){var b=a%1E3;a=Math.floor(b/100);var c=sre.Numbers.es.hundredsNumbers_[a];b=sre.Numbers.es.tensToWords_(b%100);return 1===a?b?c+"to "+b:c:c&&b?c+" "+b:c||b};
|
421
|
+
sre.Numbers.es.numberToWords=function(a){if(a>=Math.pow(10,36))return a.toString();for(var b=0,c="";0<a;){var d=a%1E3;if(d){var e=sre.Numbers.es.largeNumbers_[b],f=sre.Numbers.es.hundredsToWords_(d);b?1===d?(e=e.match("/^mil( |$)/")?e:"un "+e,c=e+(c?" "+c:"")):(e=e.replace(/\u00f3n$/,"ones"),c=sre.Numbers.es.hundredsToWords_(d)+" "+e+(c?" "+c:"")):c=f}a=Math.floor(a/1E3);b++}return c};sre.Numbers.es.onesOrdinals_="primera segunda tercera cuarta quinta sexta s\u00e9ptima octava novena d\u00e9cima und\u00e9cima duod\u00e9cima".split(" ");
|
422
|
+
sre.Numbers.es.tensOrdinals_="d\u00e9cima vig\u00e9sima trig\u00e9sima cuadrag\u00e9sima quincuag\u00e9sima sexag\u00e9sima septuag\u00e9sima octog\u00e9sima nonag\u00e9sima".split(" ");sre.Numbers.es.hundredsOrdinals_="cent\u00e9sima ducent\u00e9sima tricent\u00e9sima cuadringent\u00e9sima quingent\u00e9sima sexcent\u00e9sima septingent\u00e9sima octingent\u00e9sima noningent\u00e9sima".split(" ");
|
423
|
+
sre.Numbers.es.numberToOrdinal=function(a,b){if(1999<a)return a.toString()+"a";if(12>=a)return sre.Numbers.es.onesOrdinals_[a-1];b=[];1E3<=a&&(a-=1E3,b.push("mil\u00e9sima"));if(!a)return b.join(" ");var c=Math.floor(a/100);0<c&&(b.push(sre.Numbers.es.hundredsOrdinals_[c-1]),a%=100);12>=a?b.push(sre.Numbers.es.onesOrdinals_[a-1]):(c=Math.floor(a/10),0<c&&(b.push(sre.Numbers.es.tensOrdinals_[c-1]),a%=10),0<a&&b.push(sre.Numbers.es.onesOrdinals_[a-1]));return b.join(" ")};
|
424
|
+
sre.Numbers.es.simpleOrdinal=function(a){var b=sre.Grammar.getInstance().getParameter("gender");return a.toString()+("female"===b?"a":"o")};sre.Numbers.es.NUMBERS={simpleOrdinal:sre.Numbers.es.simpleOrdinal,numberToWords:sre.Numbers.es.numberToWords,numberToOrdinal:sre.Numbers.es.numberToOrdinal,vulgarSep:"-"};var sansserifCombiner=function(a,b,c){a="sans serif "+(c?c+" "+a:a);return b?a+" "+b:a};
|
425
|
+
sre.Locale.es={MS:{START:"empezar",FRAC_V:"fracci\u00f3n",FRAC_B:"frac",FRAC_S:"frac",END:"finalizar",FRAC_OVER:"entre",TWICE:"",NEST_FRAC:"",ENDFRAC:"",SUPER:"super",SUB:"sub",SUP:"sup",SUPERSCRIPT:"super\u00edndice",SUBSCRIPT:"sub\u00edndice",BASELINE:"l\u00ednea base",BASE:"",NESTED:"",NEST_ROOT:"",STARTROOT:"empezar ra\u00edz",ENDROOT:"finalizar ra\u00edz",ROOTINDEX:"\u00edndice de ra\u00edz",ROOT:"ra\u00edz",INDEX:"",UNDER:"bajo",UNDERSCRIPT:"bajo\u00edndice",OVER:"sobre",OVERSCRIPT:"sobre\u00edndice"},
|
426
|
+
MS_FUNC:{FRAC_NEST_DEPTH:function(a){return!1},RADICAL_NEST_DEPTH:function(a){return""},COMBINE_ROOT_INDEX:sre.Locale.combinePostfixIndex,COMBINE_NESTED_FRACTION:function(a,b,c){return a+b+c},COMBINE_NESTED_RADICAL:function(a,b,c){return a+c},FONT_REGEXP:function(a){return RegExp("^"+a+" ")}},MS_ROOT_INDEX:{2:"cuadrada",3:"c\u00fabica",4:"a la cuarta",5:"a la quinta",6:"a la sexta",7:"a la s\u00e9ptima",8:"a la octava",9:"a la novena",10:"a la d\u00e9cima"},FONT:{bold:"negrita","bold-fraktur":"negrita Fraktur",
|
427
|
+
"bold-italic":"negrita cursiva","bold-script":"negrita script",caligraphic:"caligr\u00e1fica","caligraphic-bold":"caligr\u00e1fica negrita","double-struck":"negrita de pizarra","double-struck-italic":"negrita de pizarra cursiva",fraktur:"Fraktur",fullwidth:"ancho completo",italic:"cursiva",monospace:"monoespacio",normal:"normal",oldstyle:"estilo antiguo","oldstyle-bold":"estilo antiguo negrita",script:"script","sans-serif":"sans serif","sans-serif-italic":"sans serif cursiva","sans-serif-bold":"sans serif negrita",
|
428
|
+
"sans-serif-bold-italic":"sans serif negrita cursiva",unknown:"desconocida"},ROLE:{addition:"adici\u00f3n",multiplication:"multiplicaci\u00f3n",subtraction:"resta",division:"divisi\u00f3n",equality:"igualdad",inequality:"desigualdad",element:"elemento",arrow:"flecha",determinant:"determinante",rowvector:"fila vector",binomial:"binomial",squarematrix:"matriz cuadrada",multiline:"l\u00edneas m\u00faltiples",matrix:"matriz",vector:"vector",cases:"declaraci\u00f3n de caso",table:"mesa",unknown:"desconocida"},
|
429
|
+
ENCLOSE:{longdiv:"divisi\u00f3n larga",actuarial:"s\u00edmbolo actuarial",radical:"ra\u00edz cuadrada",box:"caja",roundedbox:"caja redondeada",circle:"c\u00edrculo",left:"barra vertical izquierda",right:"barra vertical derecha",top:"barra",bottom:"subbarra",updiagonalstrike:"tachadura",downdiagonalstrike:"tachadura",verticalstrike:"ponchado vertical",horizontalstrike:"cruce",madruwb:"s\u00edmbolo factorial \u00e1rabe",updiagonalarrow:"flecha diagonal",phasorangle:"\u00e1ngulo de fasores",unknown:"divisi\u00f3n larga"},
|
430
|
+
EMBELLISH:{"super":"super\u00edndice",sub:"sub\u00edndice",circled:["en circulo",sre.Locale.postfixCombiner],parenthesized:["entre par\u00e9ntesis",sre.Locale.postfixCombiner],period:["punto",sre.Locale.postfixCombiner],"negative-circled":["en circulo negro",sre.Locale.postfixCombiner],"double-circled":["en doble circulo",sre.Locale.postfixCombiner],"circled-sans-serif":["en circulo",sansserifCombiner],"negative-circled-sans-serif":["en circulo negro",sansserifCombiner],comma:["coma",sre.Locale.postfixCombiner],
|
431
|
+
squared:["en cuadrado",sre.Locale.postfixCombiner],"negative-squared":["en cuadrado negro",sre.Locale.postfixCombiner]},NAVIGATE:{COLLAPSIBLE:"plegable",EXPANDABLE:"ampliable",LEVEL:"nivel"},REGEXP:{TEXT:"a-zA-Z\u00e1\u00e9\u00ed\u00f3\u00fa\u00f1\u00c1\u00c9\u00cd\u00d3\u00da\u00d1",NUMBER:"((\\d{1,3})(?=( ))(( )\\d{3})*(,\\d+)?)|^\\d*,\\d+|^\\d+",DECIMAL_MARK:",",DIGIT_GROUP:"",JOINER_SUBSUPER:" ",JOINER_FRAC:" "},NUMBERS:sre.Numbers.es.NUMBERS,ALPHABETS:{latinSmall:"abcdefghijklmnopqrstuvwxyz".split(""),
|
432
|
+
latinCap:"ABCDEFGHIJKLMNOPQRSTUVWXYZ".split(""),greekSmall:"nabla;alfa;beta;gamma;delta;\u00e9psilon;zeta;eta;theta;iota;kappa;lambda;mi;ni;xi;\u00f3micron;pi;rho;sigma final;sigma;tau;\u00edpsilon;phi;ji;psi;omega;diferencial parcial;\u00e9psilon;theta;kappa;phi;rho;pi".split(";"),greekCap:"Alfa Beta Gamma Delta \u00c9psilon Zeta Eta Theta Iota Kappa Lambda Mi Ni Xi \u00d3micron Pi Rho Theta Sigma Tau \u00cdpsilon Phi Ji Psi Omega".split(" ")},ALPHABET_TRANSFORMERS:{digit:{default:function(a){return 0===
|
433
|
+
a?"cero":sre.Numbers.es.numberToWords(a)},mathspeak:function(a){return a.toString()},clearspeak:function(a){return a.toString()}},letter:{default:function(a){return a}}},ALPHABET_PREFIXES:{capPrefix:{default:"may\u00fascula"},smallPrefix:{default:""},digitPrefix:{default:""}},ALPHABET_COMBINER:sre.Locale.prefixCombiner};sre.Numbers.fr={};sre.Numbers.fr.SUB_ISO="fr";sre.Numbers.fr.onesNumbers_=" un deux trois quatre cinq six sept huit neuf dix onze douze treize quatorze quinze seize dix-sept dix-huit dix-neuf".split(" ");sre.Numbers.fr.tensNumbers_={fr:" vingt trente quarante cinquante soixante soixante-dix quatre-vingts quatre-vingt-dix".split(" "),be:" vingt trente quarante cinquante soixante septante quatre-vingts nonante".split(" "),sw:" vingt trente quarante cinquante soixante septante huitante nonante".split(" ")};
|
434
|
+
sre.Numbers.fr.largeNumbers_=";mille;millions;milliards;billions;mille billions;trillions;mille trillions;quadrillions;mille quadrillions;quintillions;mille quintillions".split(";");
|
435
|
+
sre.Numbers.fr.hundredsToWords_=function(a){var b=a%1E3;a=sre.Numbers.fr.onesNumbers_[Math.floor(b/100)]?sre.Numbers.fr.onesNumbers_[Math.floor(b/100)]+"-cent":"";if(b%=100){a+=a?"-":"";var c=sre.Numbers.fr.onesNumbers_[b];if(c)a+=c;else{var d=sre.Numbers.fr.tensNumbers_[sre.Numbers.fr.SUB_ISO][Math.floor(b/10)];d.match(/\-dix$/)?(c=sre.Numbers.fr.onesNumbers_[b%10+10],a+=d.replace(/\-dix$/,"")+"-"+c):a+=d+(b%10?"-"+sre.Numbers.fr.onesNumbers_[b%10]:"")}}return(b=a.match(/s\-\w+$/))?a.replace(/s\-\w+$/,
|
436
|
+
b[0].slice(1)):a.replace(/\-un$/,"-et-un")};
|
437
|
+
sre.Numbers.fr.numberToWords=function(a){if(a>=Math.pow(10,36))return a.toString();for(var b=0,c="";0<a;){var d=a%1E3;if(d){var e=sre.Numbers.fr.largeNumbers_[b],f=sre.Numbers.fr.hundredsToWords_(d);e&&e.match(/^mille /)?(d=e.replace(/^mille /,""),c=c.match(RegExp(d))?f+(b?"-mille-":"")+c:c.match(RegExp(d.replace(/s$/,"")))?f+(b?"-mille-":"")+c.replace(d.replace(/s$/,""),d):f+(b?"-"+e+"-":"")+c):(e=1===d&&e?e.replace(/s$/,""):e,c=f+(b?"-"+e+"-":"")+c)}a=Math.floor(a/1E3);b++}return c.replace(/-$/,
|
438
|
+
"")};sre.Numbers.fr.SMALL_ORDINAL={1:"uni\u00e8me",2:"demi",3:"tiers",4:"quart"};sre.Numbers.fr.numberToOrdinal=function(a,b){var c=sre.Numbers.fr.SMALL_ORDINAL[a]||sre.Numbers.fr.wordOrdinal(a);return 3===a?c:b?c+"s":c};sre.Numbers.fr.wordOrdinal=function(a){if(1===a)return"premi\u00e8re";a=sre.Numbers.fr.numberToWords(a);a.match(/^neuf$/)?a=a.slice(0,-1)+"v":a.match(/cinq$/)?a+="u":a.match(/trois$/)||!a.match(/e$/)&&!a.match(/s$/)||(a=a.slice(0,-1));return a+"i\u00e8me"};
|
439
|
+
sre.Numbers.fr.simpleOrdinal=function(a){var b=sre.Grammar.getInstance().getParameter("gender");return 1===a?a.toString()+("male"===b?"er":"re"):a.toString()+"e"};sre.Numbers.fr.NUMBERS={wordOrdinal:sre.Numbers.fr.wordOrdinal,simpleOrdinal:sre.Numbers.fr.simpleOrdinal,numberToWords:sre.Numbers.fr.numberToWords,numberToOrdinal:sre.Numbers.fr.numberToOrdinal,vulgarSep:"-"};sre.Locale.fr={MS:{START:"d\u00e9but",FRAC_V:"fraction",FRAC_B:"frac",FRAC_S:"frac",END:"fin",FRAC_OVER:"sur",ONCE:"1",TWICE:"2",NEST_FRAC:"imbriqu\u00e9e",ENDFRAC:"fin frac",SUPER:"sup",SUB:"sub",SUP:"sup",SUPERSCRIPT:"exposant",SUBSCRIPT:"indice",BASELINE:"position de base",BASE:"position de base",NESTED:"imbriqu\u00e9e",NEST_ROOT:"imbriqu\u00e9e",STARTROOT:"d\u00e9but racine",ENDROOT:"fin racine",ROOTINDEX:"indice du radical",ROOT:"racine",INDEX:"indice",UNDER:"sous",UNDERSCRIPT:"souscript",OVER:"sus",
|
440
|
+
OVERSCRIPT:"suscript"},MS_FUNC:{FRAC_NEST_DEPTH:function(a){return!1},RADICAL_NEST_DEPTH:sre.Locale.nestingToString,COMBINE_ROOT_INDEX:sre.Locale.combinePostfixIndex,COMBINE_NESTED_FRACTION:function(a,b,c){return c.replace(/ $/g,"")+b+a},COMBINE_NESTED_RADICAL:function(a,b,c){return c+" "+a},FONT_REGEXP:function(a){return RegExp(" (en |)"+a+"$")}},MS_ROOT_INDEX:{2:"carr\u00e9e",3:"cubique"},FONT:{bold:"en gras","bold-fraktur":"en gothique gras","bold-italic":"en italique gras","bold-script":"de ronde en gras",
|
441
|
+
caligraphic:"en calligraphique","caligraphic-bold":"en calligraphique gras","double-struck":"ajour\u00e9","double-struck-italic":"ajour\u00e9 en italique",fraktur:"en gothique",fullwidth:"en pleine largeur",italic:"en italique",monospace:"en chasse fixe",normal:"en normal",oldstyle:"en ancien","oldstyle-bold":"en ancien gras",script:"de ronde","sans-serif":"sans empattement","sans-serif-italic":"en italique sans empattement","sans-serif-bold":"en gras sans empattement","sans-serif-bold-italic":"en italique gras sans empattement",
|
442
|
+
unknown:"inconnu"},EMBELLISH:{"super":["exposant",sre.Locale.prefixCombiner],sub:["indice",sre.Locale.prefixCombiner],circled:"encercl\u00e9",parenthesized:"entre parenth\u00e8ses",period:"un point","negative-circled":"encercl\u00e9 noir","double-circled":"encercl\u00e9 double","circled-sans-serif":"sans empattement encercl\u00e9","negative-circled-sans-serif":"sans empattement encercl\u00e9 noir",comma:"virgule",squared:"encadr\u00e9","negative-squared":"encadr\u00e9 inverse"},ROLE:{addition:"addition",
|
443
|
+
multiplication:"multiplication",subtraction:"soustraction",division:"division",equality:"\u00e9galit\u00e9",inequality:"in\u00e9galit\u00e9",element:"\u00e9l\u00e9ment",arrow:"fl\u00e8che",determinant:"d\u00e9terminant",rowvector:"vecteur-rang\u00e9e",binomial:"binomial",squarematrix:"matrice carr\u00e9e","set empty":"ensemble vide","set extended":"extension","set singleton":"singleton","set collection":"collection",label:"\u00e9tiquette",multiline:"multi-ligne",matrix:"matrice",vector:"vecteur",
|
444
|
+
cases:"d\u00e9claration de cas",table:"tableau",unknown:"inconnu"},ENCLOSE:{longdiv:"longue division",actuarial:"notation actuarielle",radical:"radical",box:"bo\u00eete",roundedbox:"bo\u00eete arrondie",circle:"cercle",left:"barre verticale gauche",right:"barre verticale droite",top:"trait suscrit",bottom:"trait souscrit",updiagonalstrike:"texte biff\u00e9 diagonal montant",downdiagonalstrike:"texte biff\u00e9 diagonal descendant",verticalstrike:"texte biff\u00e9 vertical",horizontalstrike:"texte biff\u00e9 horizontal",
|
445
|
+
madruwb:"symbole factorielle arabe",updiagonalarrow:"fl\u00e8che diagonale montante",phasorangle:"angle de phase",unknown:"division longue"},NAVIGATE:{COLLAPSIBLE:"compressible",EXPANDABLE:"d\u00e9compressible",LEVEL:"niveau"},REGEXP:{TEXT:"a-zA-Z\u00e0\u00e2\u00e6\u00e7\u00e9\u00e8\u00ea\u00eb\u00ee\u00ef\u00f4\u0153\u00f9\u00fb\u00fc\u00ff\u00c0\u00c2\u00c6\u00c7\u00c9\u00c8\u00ca\u00cb\u00ce\u00cf\u00d4\u0152\u00d9\u00db\u00dc\u0178",NUMBER:"((\\d{1,3})(?=( ))(( )\\d{3})*(,\\d+)?)|^\\d*,\\d+|^\\d+",
|
446
|
+
DECIMAL_MARK:",",DIGIT_GROUP:"",JOINER_SUBSUPER:"-",JOINER_FRAC:" "},PLURAL_UNIT:{foot:"feet",inch:"inches"},NUMBERS:sre.Numbers.fr.NUMBERS,ALPHABETS:{latinSmall:"abcdefghijklmnopqrstuvwxyz".split(""),latinCap:"ABCDEFGHIJKLMNOPQRSTUVWXYZ".split(""),greekSmall:"nabla;alpha;b\u00eata;gamma;delta;epsilon;z\u00eata;\u00eata;th\u00eata;iota;kappa;lambda;m\u00fb;n\u00fb;xi;omicron;pi;rh\u00f4;sigma final;sigma;tau;upsilon;phi;chi;psi;om\u00e9ga;d\u00e9riv\u00e9e partielle;epsilon;th\u00eata;kappa;phi;rh\u00f4;pi".split(";"),
|
447
|
+
greekCap:"Alpha B\u00eata Gamma Delta Epsilon Z\u00eata \u00cata Th\u00eata Iota Kappa Lambda M\u00fb N\u00fb Xi Omicron Pi Rh\u00f4 Th\u00eata Sigma Tau Upsilon Phi Chi Psi Om\u00e9ga".split(" ")},ALPHABET_TRANSFORMERS:{digit:{default:function(a){return 0===a?"zero":sre.Numbers.fr.numberToWords(a)},mathspeak:function(a){return a.toString()},clearspeak:function(a){return a.toString()}},letter:{default:function(a){return a}}},ALPHABET_PREFIXES:{capPrefix:{default:"majuscule"},smallPrefix:{default:""},
|
448
|
+
digitPrefix:{default:""}},ALPHABET_COMBINER:function(a,b,c){a=c?a+" "+c:a;return b?a+" "+b:a}};sre.Numbers.nemeth={};sre.Numbers.nemeth.oneNumbers_="\u2834\u2802\u2806\u2812\u2832\u2822\u2816\u2836\u2826\u2814".split("");sre.Numbers.nemeth.numberToWords=function(a){return a.toString().split("").map(function(a){return sre.Numbers.nemeth.oneNumbers_[parseInt(a,10)]}).join("")};sre.Numbers.nemeth.NUMBERS={numberToWords:sre.Numbers.nemeth.numberToWords,simpleOrdinal:function(a){return a}};var postfixCombiner=function(a,b,c){return b?a+b:a},embellishCombiner=function(a,b,c){return b+(c?c:"\u2830")+a+"\u283b"},doubleEmbellishCombiner=function(a,b,c){return b+(c?c:"\u2830")+a+"\u283b\u283b"},parensCombiner=function(a,b,c){return b+(c?c:"\u2830")+a+"\u283e"};
|
449
|
+
sre.Locale.nemeth={MS:{FRACTION_REPEAT:"\u2820",FRACTION_START:"\u2839",FRAC_V:"\u2839",FRAC_B:"Frac",FRAC_S:"Frac",END:"\u2820",FRACTION_OVER:"\u280c",TWICE:"Twice",NEST_FRAC:"Nest",ENDFRAC:"\u283c",FRACTION_END:"\u283c",SUPER:"\u2818",SUB:"\u2830",SUP:"\u2818",SUPERSCRIPT:"\u2818",SUBSCRIPT:"\u2830",BASELINE:"\u2810",BASE:"\u2810",NESTED:"\u2828",NEST_ROOT:"Nest",STARTROOT:"\u281c",ENDROOT:"\u283b",ROOTINDEX:"\u2823",ROOT:"\u2828",INDEX:"\u2823",UNDER:"\u2829",UNDERSCRIPT:"\u2829",OVER:"\u2823",
|
450
|
+
OVERSCRIPT:"\u2823"},MS_FUNC:{FRAC_NEST_DEPTH:function(a){return!1},RADICAL_NEST_DEPTH:function(a){return""},COMBINE_ROOT_INDEX:function(a,b){return a},FONT_REGEXP:function(a){return RegExp("^"+a)}},MS_ROOT_INDEX:{},FONT:{bold:"\u2838","bold-fraktur":"\u2838\u2800\u2838","bold-italic":"\u2838\u2828","bold-script":"\u2838\u2808",caligraphic:"\u2808","caligraphic-bold":"\u2808\u2838","double-struck":"\u2838","double-struck-italic":"\u2838\u2828",fraktur:"\u2838",italic:"\u2828",monospace:"",normal:"",
|
451
|
+
oldstyle:"","oldstyle-bold":"\u2838",script:"\u2808","sans-serif":"\u2820\u2828","sans-serif-italic":"\u2820\u2828\u2828","sans-serif-bold":"\u2820\u2828\u2838","sans-serif-bold-italic":"\u2820\u2828\u2838\u2828",unknown:""},EMBELLISH:{"super":"\u2818",sub:"\u2830",circled:["\u282b\u2809\u2838\u282b",embellishCombiner],parenthesized:["\u2837",parensCombiner],period:["\u2838\u2832",postfixCombiner],"negative-circled":["\u282b\u2838\u2809\u2838\u282b",embellishCombiner],"double-circled":["\u282b\u2809\u2838\u282b\u282b\u2809\u2838\u282b",
|
452
|
+
doubleEmbellishCombiner],"circled-sans-serif":["\u282b\u2809\u2838\u282b\u2820\u2828",embellishCombiner],"negative-circled-sans-serif":["\u282b\u2838\u2809\u2838\u282b\u2820\u2828",embellishCombiner],comma:["\u2820",postfixCombiner],squared:["\u282b\u2832\u2838\u282b",embellishCombiner],"negative-squared":["\u282b\u2838\u2832\u2838\u282b",embellishCombiner]},ROLE:{addition:"addition",multiplication:"multiplication",subtraction:"subtraction",division:"division",equality:"equality",inequality:"inequality",
|
453
|
+
element:"element",arrow:"arrow",determinant:"determinant",rowvector:"row vector",binomial:"binomial",squarematrix:"square matrix",multiline:"multiple lines",matrix:"matrix",vector:"vector",cases:"case statement",table:"table",unknown:"unknown"},ENCLOSE:{longdiv:"long division",actuarial:"actuarial symbol",radical:"square root",box:"box",roundedbox:"rounded box",circle:"circle",left:"left vertical-line",right:"right vertical-line",top:"overbar",bottom:"underbar",updiagonalstrike:"crossout",downdiagonalstrike:"crossout",
|
454
|
+
verticalstrike:"vertical strikeout",horizontalstrike:"crossout",madruwb:"Arabic factorial symbol",updiagonalarrow:"diagonal arrow",phasorangle:"phasor angle",unknown:"long division"},REGEXP:{TEXT:"a-zA-Z",NUMBER:"((\\d{1,3})(?=(,| ))((,| )\\d{3})*(\\.\\d+)?)|^\\d*\\.\\d+|^\\d+",DECIMAL_MARK:".",DIGIT_GROUP:",",JOINER_SUBSUPER:"",JOINER_FRAC:""},NAVIGATE:{COLLAPSIBLE:"collapsible",EXPANDABLE:"expandable",LEVEL:"Level"},NUMBERS:sre.Numbers.nemeth.NUMBERS,ALPHABETS:{latinSmall:"\u2801\u2803\u2809\u2819\u2811\u280b\u281b\u2813\u280a\u281a\u2805\u2807\u280d\u281d\u2815\u280f\u281f\u2817\u280e\u281e\u2825\u2827\u283a\u282d\u283d\u2835".split(""),
|
455
|
+
latinCap:"\u2820\u2801 \u2820\u2803 \u2820\u2809 \u2820\u2819 \u2820\u2811 \u2820\u280b \u2820\u281b \u2820\u2813 \u2820\u280a \u2820\u281a \u2820\u2805 \u2820\u2807 \u2820\u280d \u2820\u281d \u2820\u2815 \u2820\u280f \u2820\u281f \u2820\u2817 \u2820\u280e \u2820\u281e \u2820\u2825 \u2820\u2827 \u2820\u283a \u2820\u282d \u2820\u283d \u2820\u2835".split(" "),greekSmall:"\u2828\u282b \u2828\u2801 \u2828\u2803 \u2828\u281b \u2828\u2819 \u2828\u2811 \u2828\u2831 \u2828\u2826 \u2828\u2839 \u2828\u280a \u2828\u2805 \u2828\u2807 \u2828\u280d \u2828\u281d \u2828\u282d \u2828\u2815 \u2828\u280f \u2828\u2817 \u2828\u2812 \u2828\u280e \u2828\u281e \u2828\u2825 \u2828\u280b \u2828\u282f \u2828\u2813 \u2828\u2815 \u2808\u2819 \u2828\u2811 \u2828\u2839 \u2828\u2805 \u2828\u280b \u2828\u2817 \u2828\u280f".split(" "),
|
456
|
+
greekCap:"\u2828\u2820\u2801 \u2828\u2820\u2803 \u2828\u2820\u281b \u2828\u2820\u2819 \u2828\u2820\u2811 \u2828\u2820\u2831 \u2828\u2820\u2823 \u2828\u2820\u2839 \u2828\u2820\u280a \u2828\u2820\u2805 \u2828\u2820\u2807 \u2828\u2820\u280d \u2828\u2820\u281d \u2828\u2820\u282d \u2828\u2820\u2815 \u2828\u2820\u280f \u2828\u2820\u2817 \u2828\u2820\u2839 \u2828\u2820\u280e \u2828\u2820\u2825 \u2828\u2820\u2825 \u2828\u2820\u280b \u2828\u2820\u282f \u2828\u2820\u282b \u2828\u2820\u283a".split(" ")},ALPHABET_TRANSFORMERS:{digit:{default:sre.Numbers.nemeth.numberToWords},
|
457
|
+
letter:{default:function(a){return a}}},ALPHABET_PREFIXES:{capPrefix:{default:""},smallPrefix:{default:""},digitPrefix:{default:"\u283c"}},ALPHABET_COMBINER:function(a,b,c){return b?b+a:a}};sre.L10n={};sre.L10n.setLocale=function(){var a=sre.L10n.getLocale();if(a)for(var b in a)sre.Messages[b]=a[b]};sre.L10n.getLocale=function(){return sre.Locale[sre.Engine.getInstance().locale]||sre.Locale.en};sre.EnrichCase=function(){};sre.EnrichCase.prototype.getMathml=function(){};sre.AbstractEnrichCase=function(a){this.semantic=a};sre.AbstractEnrichCase.prototype.getMathml=goog.abstractMethod;sre.EnrichCaseFactory=function(){};sre.EnrichCaseFactory.cases=[];sre.EnrichCaseFactory.getCase=function(a){for(var b=0,c;c=sre.EnrichCaseFactory.cases[b];b++)if(c.test(a))return new c.constr(a);return null};sre.SemanticSkeleton=function(a){this.array=a=0===a?a:a||[];this.levelsMap=this.parents=null};sre.SemanticSkeleton.prototype.populate=function(){this.parents&&this.levelsMap||(this.parents={},this.levelsMap={},this.populate_(this.array,this.array,[]))};
|
458
|
+
sre.SemanticSkeleton.prototype.populate_=function(a,b,c){if(sre.SemanticSkeleton.simpleCollapseStructure(a))this.levelsMap[a]=b,this.parents[a]=a===c[0]?c.slice(1):c;else{b=sre.SemanticSkeleton.contentCollapseStructure(a)?a.slice(1):a;c=[b[0]].concat(c);for(var d=0,e=b.length;d<e;d++)this.populate_(b[d],a,c)}};sre.SemanticSkeleton.prototype.toString=function(){return sre.SemanticSkeleton.makeSexp_(this.array)};
|
459
|
+
sre.SemanticSkeleton.makeSexp_=function(a){return sre.SemanticSkeleton.simpleCollapseStructure(a)?a.toString():sre.SemanticSkeleton.contentCollapseStructure(a)?"(c "+a.slice(1).map(sre.SemanticSkeleton.makeSexp_).join(" ")+")":"("+a.map(sre.SemanticSkeleton.makeSexp_).join(" ")+")"};sre.SemanticSkeleton.fromTree=function(a){return sre.SemanticSkeleton.fromNode(a.root)};sre.SemanticSkeleton.fromNode=function(a){return new sre.SemanticSkeleton(sre.SemanticSkeleton.fromNode_(a))};
|
460
|
+
sre.SemanticSkeleton.fromString=function(a){return new sre.SemanticSkeleton(sre.SemanticSkeleton.fromString_(a))};sre.SemanticSkeleton.fromString_=function(a){a=a.replace(/\(/g,"[");a=a.replace(/\)/g,"]");a=a.replace(/ /g,",");a=a.replace(/c/g,'"c"');return JSON.parse(a)};
|
461
|
+
sre.SemanticSkeleton.fromNode_=function(a){if(!a)return[];var b=a.contentNodes;if(b.length){var c=b.map(sre.SemanticSkeleton.fromNode_);c.unshift("c")}var d=a.childNodes;if(!d.length)return b.length?[a.id,c]:a.id;d=d.map(sre.SemanticSkeleton.fromNode_);b.length&&d.unshift(c);d.unshift(a.id);return d};sre.SemanticSkeleton.simpleCollapseStructure=function(a){return"number"===typeof a};
|
462
|
+
sre.SemanticSkeleton.contentCollapseStructure=function(a){return!!a&&!sre.SemanticSkeleton.simpleCollapseStructure(a)&&"c"===a[0]};sre.SemanticSkeleton.interleaveIds=function(a,b){return sre.BaseUtil.interleaveLists(sre.SemanticSkeleton.collapsedLeafs(a),sre.SemanticSkeleton.collapsedLeafs(b))};
|
463
|
+
sre.SemanticSkeleton.collapsedLeafs=function(a){var b=function(a){return sre.SemanticSkeleton.simpleCollapseStructure(a)?[a]:sre.SemanticSkeleton.contentCollapseStructure(a[1])?a.slice(2):a.slice(1)};return Array.prototype.slice.call(arguments,0).reduce(function(a,d){return a.concat(b(d))},[])};sre.SemanticSkeleton.fromStructure=function(a,b){return new sre.SemanticSkeleton(sre.SemanticSkeleton.tree_(a,b.root))};
|
464
|
+
sre.SemanticSkeleton.tree_=function(a,b){if(!b)return[];if(!b.childNodes.length)return b.id;var c=b.id,d=[c];c=sre.XpathUtil.evalXPath(".//*[@"+sre.EnrichMathml.Attribute.ID+"="+c+"]",a)[0];b=sre.SemanticSkeleton.combineContentChildren(b,b.contentNodes.map(function(a){return a}),b.childNodes.map(function(a){return a}));c&&c.setAttribute(sre.EnrichMathml.Attribute.OWNS,b.map(function(a){return a.id}).join(" "));c=0;for(var e;e=b[c];c++)d.push(sre.SemanticSkeleton.tree_(a,e));return d};
|
465
|
+
sre.SemanticSkeleton.combineContentChildren=function(a,b,c){switch(a.type){case sre.Semantic.Type.RELSEQ:case sre.Semantic.Type.INFIXOP:case sre.Semantic.Type.MULTIREL:return sre.BaseUtil.interleaveLists(c,b);case sre.Semantic.Type.PREFIXOP:return b.concat(c);case sre.Semantic.Type.POSTFIXOP:return c.concat(b);case sre.Semantic.Type.FENCED:return c.unshift(b[0]),c.push(b[1]),c;case sre.Semantic.Type.APPL:return[c[0],b[0],c[1]];case sre.Semantic.Type.ROOT:return[c[1],c[0]];case sre.Semantic.Type.ROW:case sre.Semantic.Type.LINE:return b.length&&
|
466
|
+
c.unshift(b[0]),c;default:return c}};sre.EnrichMathml={};sre.EnrichMathml.Error=function(a){Error.call(this);this.message=a||"";this.name="MathML Enrichment Error"};goog.inherits(sre.EnrichMathml.Error,Error);sre.EnrichMathml.SETTINGS={collapsed:!0,implicit:!0};sre.EnrichMathml.ATTRIBUTE_PREFIX_="data-semantic-";
|
467
|
+
sre.EnrichMathml.Attribute={ADDED:sre.EnrichMathml.ATTRIBUTE_PREFIX_+"added",ALTERNATIVE:sre.EnrichMathml.ATTRIBUTE_PREFIX_+"alternative",CHILDREN:sre.EnrichMathml.ATTRIBUTE_PREFIX_+"children",COLLAPSED:sre.EnrichMathml.ATTRIBUTE_PREFIX_+"collapsed",CONTENT:sre.EnrichMathml.ATTRIBUTE_PREFIX_+"content",EMBELLISHED:sre.EnrichMathml.ATTRIBUTE_PREFIX_+"embellished",FENCEPOINTER:sre.EnrichMathml.ATTRIBUTE_PREFIX_+"fencepointer",FONT:sre.EnrichMathml.ATTRIBUTE_PREFIX_+"font",ID:sre.EnrichMathml.ATTRIBUTE_PREFIX_+
|
468
|
+
"id",ANNOTATION:sre.EnrichMathml.ATTRIBUTE_PREFIX_+"annotation",OPERATOR:sre.EnrichMathml.ATTRIBUTE_PREFIX_+"operator",OWNS:sre.EnrichMathml.ATTRIBUTE_PREFIX_+"owns",PARENT:sre.EnrichMathml.ATTRIBUTE_PREFIX_+"parent",PREFIX:sre.EnrichMathml.ATTRIBUTE_PREFIX_+"prefix",ROLE:sre.EnrichMathml.ATTRIBUTE_PREFIX_+"role",SPEECH:sre.EnrichMathml.ATTRIBUTE_PREFIX_+"speech",STRUCTURE:sre.EnrichMathml.ATTRIBUTE_PREFIX_+"structure",TYPE:sre.EnrichMathml.ATTRIBUTE_PREFIX_+"type"};
|
469
|
+
sre.EnrichMathml.enrich=function(a,b){var c=a.cloneNode(!0);sre.EnrichMathml.walkTree(b.root);sre.Engine.getInstance().structure&&a.setAttribute(sre.EnrichMathml.Attribute.STRUCTURE,sre.SemanticSkeleton.fromStructure(a,b).toString());sre.Debugger.getInstance().generateOutput(function(){sre.EnrichMathml.formattedOutput(c,a,b,!0);return[]});return a};
|
470
|
+
sre.EnrichMathml.walkTree=function(a){var b=sre.EnrichCaseFactory.getCase(a);if(b)return b=b.getMathml(),sre.EnrichMathml.ascendNewNode(b);if(1===a.mathml.length)return sre.Debugger.getInstance().output("Walktree Case 0"),b=a.mathml[0],sre.EnrichMathml.setAttributes(b,a),sre.EnrichMathml.ascendNewNode(b);b=a.contentNodes.map(sre.EnrichMathml.cloneContentNode);sre.EnrichMathml.setOperatorAttribute_(a,b);var c=a.childNodes.map(sre.EnrichMathml.walkTree);c=sre.SemanticSkeleton.combineContentChildren(a,
|
471
|
+
b,c);b=a.mathmlTree;if(null===b)sre.Debugger.getInstance().output("Walktree Case 1"),b=sre.EnrichMathml.introduceNewLayer(c);else{var d=sre.EnrichMathml.attachedElement_(c);sre.Debugger.getInstance().output("Walktree Case 2");d?(sre.Debugger.getInstance().output("Walktree Case 2.1"),b=d.parentNode):(sre.Debugger.getInstance().output("Walktree Case 2.2"),b=sre.EnrichMathml.getInnerNode(b))}b=sre.EnrichMathml.rewriteMfenced(b);sre.EnrichMathml.mergeChildren_(b,c);sre.EnrichMathml.setAttributes(b,a);
|
472
|
+
return sre.EnrichMathml.ascendNewNode(b)};
|
473
|
+
sre.EnrichMathml.introduceNewLayer=function(a){var b=sre.EnrichMathml.mathmlLca_(a),c=b.node,d=b.type;d===sre.EnrichMathml.lcaType.VALID&&sre.SemanticUtil.hasEmptyTag(c)||(sre.Debugger.getInstance().output("Walktree Case 1.1"),c=sre.DomUtil.createElement("mrow"),d===sre.EnrichMathml.lcaType.PRUNED?(sre.Debugger.getInstance().output("Walktree Case 1.1.0"),c=sre.EnrichMathml.introduceLayerAboveLca(c,b.node,a)):a[0]&&(sre.Debugger.getInstance().output("Walktree Case 1.1.1"),b=sre.EnrichMathml.attachedElement_(a),
|
474
|
+
a=sre.EnrichMathml.childrenSubset_(b.parentNode,a),sre.DomUtil.replaceNode(b,c),a.forEach(function(a){c.appendChild(a)})));return c};
|
475
|
+
sre.EnrichMathml.introduceLayerAboveLca=function(a,b,c){var d=sre.EnrichMathml.descendNode_(b);if(sre.SemanticUtil.hasMathTag(d)){sre.Debugger.getInstance().output("Walktree Case 1.1.0.0");sre.EnrichMathml.moveSemanticAttributes_(d,a);sre.DomUtil.toArray(d.childNodes).forEach(function(b){a.appendChild(b)});var e=a;a=d;d=e}b=c.indexOf(b);c[b]=d;sre.DomUtil.replaceNode(d,a);a.appendChild(d);c.forEach(function(b){a.appendChild(b)});return a};
|
476
|
+
sre.EnrichMathml.moveSemanticAttributes_=function(a,b){for(var c in sre.EnrichMathml.Attribute){var d=sre.EnrichMathml.Attribute[c];a.hasAttribute(d)&&(b.setAttribute(d,a.getAttribute(d)),a.removeAttribute(d))}};sre.EnrichMathml.childrenSubset_=function(a,b){var c=sre.DomUtil.toArray(a.childNodes),d=Infinity,e=-Infinity;b.forEach(function(a){a=c.indexOf(a);-1!==a&&(d=Math.min(d,a),e=Math.max(e,a))});return c.slice(d,e+1)};
|
477
|
+
sre.EnrichMathml.mergeChildren_=function(a,b){var c=a.childNodes;if(c.length)for(var d=0;b.length;)c[d]===b[0]||sre.EnrichMathml.functionApplication_(c[d],b[0])?(b.shift(),d++):c[d]&&-1===b.indexOf(c[d])?d++:(sre.EnrichMathml.isDescendant_(b[0],a)||a.insertBefore(b[0],c[d]||null),b.shift());else b.forEach(function(b){a.appendChild(b)})};sre.EnrichMathml.isDescendant_=function(a,b){if(!a)return!1;do if(a=a.parentNode,a===b)return!0;while(a);return!1};
|
478
|
+
sre.EnrichMathml.functionApplication_=function(a,b){var c=sre.SemanticAttr.functionApplication();return a&&b&&a.textContent&&b.textContent&&a.textContent===c&&b.textContent===c&&"true"===b.getAttribute(sre.EnrichMathml.Attribute.ADDED)?(sre.DomUtil.replaceNode(a,b),!0):!1};sre.EnrichMathml.lcaType={VALID:"valid",INVALID:"invalid",PRUNED:"pruned"};
|
479
|
+
sre.EnrichMathml.mathmlLca_=function(a){var b=sre.EnrichMathml.attachedElement_(a);if(!b)return{type:sre.EnrichMathml.lcaType.INVALID,node:null};var c=sre.EnrichMathml.attachedElement_(a.slice().reverse());if(b===c)return{type:sre.EnrichMathml.lcaType.VALID,node:b};b=sre.EnrichMathml.pathToRoot_(b);var d=sre.EnrichMathml.prunePath_(b,a);a=sre.EnrichMathml.pathToRoot_(c,function(a){return-1!==d.indexOf(a)});c=a[0];var e=d.indexOf(c);return-1===e?{type:sre.EnrichMathml.lcaType.INVALID,node:null}:{type:d.length!==
|
480
|
+
b.length?sre.EnrichMathml.lcaType.PRUNED:sre.EnrichMathml.validLca_(d[e+1],a[1])?sre.EnrichMathml.lcaType.VALID:sre.EnrichMathml.lcaType.INVALID,node:c}};sre.EnrichMathml.prunePath_=function(a,b){for(var c=0;a[c]&&-1===b.indexOf(a[c]);)c++;return a.slice(0,c+1)};sre.EnrichMathml.attachedElement_=function(a){for(var b=0,c=null;!c&&b<a.length;)a[b].parentNode&&(c=a[b]),b++;return c};
|
481
|
+
sre.EnrichMathml.pathToRoot_=function(a,b){b=b||function(a){return!1};for(var c=[a];!b(a)&&!sre.SemanticUtil.hasMathTag(a)&&a.parentNode;)a=sre.EnrichMathml.parentNode_(a),c.unshift(a);return c};sre.EnrichMathml.validLca_=function(a,b){return!(!a||!b||a.previousSibling||b.nextSibling)};sre.EnrichMathml.ascendNewNode=function(a){for(;!sre.SemanticUtil.hasMathTag(a)&&sre.EnrichMathml.unitChild_(a);)a=sre.EnrichMathml.parentNode_(a);return a};
|
482
|
+
sre.EnrichMathml.descendNode_=function(a){var b=sre.DomUtil.toArray(a.childNodes);if(!b)return a;b=b.filter(function(a){return a.nodeType===sre.DomUtil.NodeType.ELEMENT_NODE&&!sre.SemanticUtil.hasIgnoreTag(a)});return 1===b.length&&sre.SemanticUtil.hasEmptyTag(b[0])&&!b[0].hasAttribute(sre.EnrichMathml.Attribute.TYPE)?sre.EnrichMathml.descendNode_(b[0]):a};
|
483
|
+
sre.EnrichMathml.unitChild_=function(a){var b=sre.EnrichMathml.parentNode_(a);return b&&sre.SemanticUtil.hasEmptyTag(b)?sre.DomUtil.toArray(b.childNodes).every(function(b){return b===a||sre.EnrichMathml.isIgnorable_(b)}):!1};sre.EnrichMathml.isIgnorable_=function(a){if(!a||sre.SemanticUtil.hasIgnoreTag(a))return!0;var b=sre.DomUtil.toArray(a.childNodes);return!sre.SemanticUtil.hasEmptyTag(a)&&b.length?!1:sre.DomUtil.toArray(a.childNodes).every(sre.EnrichMathml.isIgnorable_)};
|
484
|
+
sre.EnrichMathml.parentNode_=function(a){return a.parentNode};sre.EnrichMathml.addCollapsedAttribute=function(a,b){b=new sre.SemanticSkeleton(b);a.setAttribute(sre.EnrichMathml.Attribute.COLLAPSED,b.toString())};sre.EnrichMathml.cloneContentNode=function(a){if(a.mathml.length)return sre.EnrichMathml.walkTree(a);var b=sre.EnrichMathml.SETTINGS.implicit?sre.EnrichMathml.createInvisibleOperator_(a):sre.DomUtil.createElement("mrow");a.mathml=[b];return b};sre.EnrichMathml.makeIdList=function(a){return a.map(function(a){return a.id}).join(",")};
|
485
|
+
sre.EnrichMathml.setAttributes=function(a,b){a.setAttribute(sre.EnrichMathml.Attribute.TYPE,b.type);for(var c=b.allAttributes(),d=0,e;e=c[d];d++)a.setAttribute(sre.EnrichMathml.Attribute[e[0].toUpperCase()],e[1]);b.childNodes.length&&a.setAttribute(sre.EnrichMathml.Attribute.CHILDREN,sre.EnrichMathml.makeIdList(b.childNodes));b.contentNodes.length&&a.setAttribute(sre.EnrichMathml.Attribute.CONTENT,sre.EnrichMathml.makeIdList(b.contentNodes));b.parent&&a.setAttribute(sre.EnrichMathml.Attribute.PARENT,
|
486
|
+
b.parent.id)};sre.EnrichMathml.rewriteMfenced=function(a){if("MFENCED"!==sre.DomUtil.tagName(a))return a;for(var b=sre.DomUtil.createElement("mrow"),c=0,d;d=a.attributes[c];c++)-1===["open","close","separators"].indexOf(d.name)&&b.setAttribute(d.name,d.value);sre.DomUtil.toArray(a.childNodes).forEach(function(a){b.appendChild(a)});sre.DomUtil.replaceNode(a,b);return b};
|
487
|
+
sre.EnrichMathml.createInvisibleOperator_=function(a){var b=sre.DomUtil.createElement("mo"),c=sre.DomUtil.createTextNode(a.textContent);b.appendChild(c);sre.EnrichMathml.setAttributes(b,a);b.setAttribute(sre.EnrichMathml.Attribute.ADDED,"true");return b};sre.EnrichMathml.setOperatorAttribute_=function(a,b){var c=a.type+(a.textContent?","+a.textContent:"");b.forEach(function(a){sre.EnrichMathml.getInnerNode(a).setAttribute(sre.EnrichMathml.Attribute.OPERATOR,c)})};
|
488
|
+
sre.EnrichMathml.getInnerNode=function(a){var b=sre.DomUtil.toArray(a.childNodes);if(!b)return a;b=b.filter(function(a){return a.nodeType===sre.DomUtil.NodeType.ELEMENT_NODE&&!sre.EnrichMathml.isIgnorable_(a)});for(var c=[],d=0,e;e=b[d];d++)if(sre.SemanticUtil.hasEmptyTag(e)){var f=sre.EnrichMathml.getInnerNode(e);f&&f!==e&&c.push(f)}else c.push(e);return 1===c.length?c[0]:a};
|
489
|
+
sre.EnrichMathml.formattedOutput=function(a,b,c,d){d=d||!1;sre.EnrichMathml.formattedOutput_(a,"Original MathML",d);sre.EnrichMathml.formattedOutput_(c,"Semantic Tree",d);sre.EnrichMathml.formattedOutput_(b,"Semantically enriched MathML",d)};sre.EnrichMathml.formattedOutput_=function(a,b,c){a=sre.DomUtil.formatXml(a.toString());c?console.info(b+":\n```html\n"+sre.EnrichMathml.removeAttributePrefix(a)+"\n```\n"):console.info(a)};
|
490
|
+
sre.EnrichMathml.removeAttributePrefix=function(a){return a.toString().replace(new RegExp(sre.EnrichMathml.ATTRIBUTE_PREFIX_,"g"),"")};sre.EnrichMathml.addPrefix=function(a){var b=a.toUpperCase();return sre.EnrichMathml.Attribute[b]||sre.EnrichMathml.ATTRIBUTE_PREFIX_+a};
|
491
|
+
sre.EnrichMathml.collapsePunctuated=function(a,b){var c=!!b;b=b||[];var d=a.parent,e=a.contentNodes.map(function(a){return a.id});e.unshift("c");e=[a.id,e];for(var f=0,g;g=a.childNodes[f];f++){var h=sre.EnrichMathml.walkTree(g);b.push(h);h=sre.EnrichMathml.getInnerNode(h);d&&!c&&h.setAttribute(sre.EnrichMathml.Attribute.PARENT,d.id);e.push(g.id)}return e};sre.EnrichMathml.printNodeList__=function(a,b){console.info(a);sre.DomUtil.toArray(b).forEach(function(a){console.info(a.toString())});console.info("<<<<<<<<<<<<<<<<<")};sre.CaseBinomial=function(a){sre.AbstractEnrichCase.call(this,a);this.mml=a.mathmlTree};goog.inherits(sre.CaseBinomial,sre.AbstractEnrichCase);sre.CaseBinomial.test=function(a){return!a.mathmlTree&&a.type===sre.SemanticAttr.Type.LINE&&a.role===sre.SemanticAttr.Role.BINOMIAL};
|
492
|
+
sre.CaseBinomial.prototype.getMathml=function(){if(!this.semantic.childNodes.length)return this.mml;this.mml=sre.EnrichMathml.walkTree(this.semantic.childNodes[0]);if(this.mml.hasAttribute(sre.EnrichMathml.Attribute.TYPE)){var a=sre.DomUtil.createElement("mrow");a.setAttribute(sre.EnrichMathml.Attribute.ADDED,"true");sre.DomUtil.replaceNode(this.mml,a);a.appendChild(this.mml);this.mml=a}sre.EnrichMathml.setAttributes(this.mml,this.semantic);return this.mml};sre.CaseDoubleScript=function(a){sre.AbstractEnrichCase.call(this,a);this.mml=a.mathmlTree};goog.inherits(sre.CaseDoubleScript,sre.AbstractEnrichCase);sre.CaseDoubleScript.test=function(a){if(!a.mathmlTree||!a.childNodes.length)return!1;var b=sre.DomUtil.tagName(a.mathmlTree);a=a.childNodes[0].role;return"MSUBSUP"===b&&a===sre.SemanticAttr.Role.SUBSUP||"MUNDEROVER"===b&&a===sre.SemanticAttr.Role.UNDEROVER};
|
493
|
+
sre.CaseDoubleScript.prototype.getMathml=function(){var a=this.semantic.childNodes[0],b=a.childNodes[0],c=this.semantic.childNodes[1],d=a.childNodes[1],e=sre.EnrichMathml.walkTree(c),f=sre.EnrichMathml.walkTree(b),g=sre.EnrichMathml.walkTree(d);sre.EnrichMathml.setAttributes(this.mml,this.semantic);this.mml.setAttribute(sre.EnrichMathml.Attribute.CHILDREN,sre.EnrichMathml.makeIdList([b,d,c]));[f,g,e].forEach(goog.bind(function(a){sre.EnrichMathml.getInnerNode(a).setAttribute(sre.EnrichMathml.Attribute.PARENT,
|
494
|
+
this.mml.getAttribute(sre.EnrichMathml.Attribute.ID))},this));this.mml.setAttribute(sre.EnrichMathml.Attribute.TYPE,a.role);sre.EnrichMathml.addCollapsedAttribute(this.mml,[this.semantic.id,[a.id,b.id,d.id],c.id]);return this.mml};sre.CaseMultiindex=function(a){sre.AbstractEnrichCase.call(this,a);this.mml=a.mathmlTree};goog.inherits(sre.CaseMultiindex,sre.AbstractEnrichCase);
|
495
|
+
sre.CaseMultiindex.prototype.completeMultiscript=function(a,b){var c=sre.DomUtil.toArray(this.mml.childNodes).slice(1),d=0,e=goog.bind(function(a){for(var b=0,e;e=a[b];b++){var f=c[d];if(f&&e==sre.EnrichMathml.getInnerNode(f).getAttribute(sre.EnrichMathml.Attribute.ID))sre.EnrichMathml.getInnerNode(f).setAttribute(sre.EnrichMathml.Attribute.PARENT,this.semantic.id),d++;else{var l=this.semantic.querySelectorAll(function(a){return a.id===e});this.mml.insertBefore(sre.CaseMultiindex.createNone_(l[0]),
|
496
|
+
f||null)}}},this);e(a);c[d]&&"MPRESCRIPTS"!==sre.DomUtil.tagName(c[d])?this.mml.insertBefore(c[d],sre.DomUtil.createElement("mprescripts")):d++;e(b)};sre.CaseMultiindex.createNone_=function(a){var b=sre.DomUtil.createElement("none");a&&sre.EnrichMathml.setAttributes(b,a);b.setAttribute(sre.EnrichMathml.Attribute.ADDED,"true");return b};
|
497
|
+
sre.CaseMultiindex.multiscriptIndex=function(a){if(a.type===sre.SemanticAttr.Type.PUNCTUATED&&a.contentNodes[0].role===sre.SemanticAttr.Role.DUMMY)return sre.EnrichMathml.collapsePunctuated(a);sre.EnrichMathml.walkTree(a);return a.id};sre.CaseMultiscripts=function(a){sre.CaseMultiindex.call(this,a)};goog.inherits(sre.CaseMultiscripts,sre.CaseMultiindex);sre.CaseMultiscripts.test=function(a){return a.mathmlTree?"MMULTISCRIPTS"===sre.DomUtil.tagName(a.mathmlTree)&&(a.type===sre.SemanticAttr.Type.SUPERSCRIPT||a.type===sre.SemanticAttr.Type.SUBSCRIPT):!1};
|
498
|
+
sre.CaseMultiscripts.prototype.getMathml=function(){sre.EnrichMathml.setAttributes(this.mml,this.semantic);if(this.semantic.childNodes[0]&&this.semantic.childNodes[0].role===sre.SemanticAttr.Role.SUBSUP){var a=this.semantic.childNodes[0],b=a.childNodes[0],c=sre.CaseMultiindex.multiscriptIndex(this.semantic.childNodes[1]),d=sre.CaseMultiindex.multiscriptIndex(a.childNodes[1]),e=[this.semantic.id,[a.id,b.id,d],c];sre.EnrichMathml.addCollapsedAttribute(this.mml,e);this.mml.setAttribute(sre.EnrichMathml.Attribute.TYPE,
|
499
|
+
a.role);this.completeMultiscript(sre.SemanticSkeleton.interleaveIds(d,c),[])}else b=this.semantic.childNodes[0],c=sre.CaseMultiindex.multiscriptIndex(this.semantic.childNodes[1]),e=[this.semantic.id,b.id,c],sre.EnrichMathml.addCollapsedAttribute(this.mml,e);a=sre.SemanticSkeleton.collapsedLeafs(d||[],c);c=sre.EnrichMathml.walkTree(b);sre.EnrichMathml.getInnerNode(c).setAttribute(sre.EnrichMathml.Attribute.PARENT,this.semantic.id);a.unshift(b.id);this.mml.setAttribute(sre.EnrichMathml.Attribute.CHILDREN,
|
500
|
+
a.join(","));return this.mml};sre.CaseEmbellished=function(a){sre.AbstractEnrichCase.call(this,a);this.ofenceMml=this.ofence=this.fencedMml=this.fenced=null;this.ofenceMap={};this.cfenceMml=this.cfence=null;this.cfenceMap={};this.parentCleanup=[]};goog.inherits(sre.CaseEmbellished,sre.AbstractEnrichCase);sre.CaseEmbellished.test=function(a){return!(!a.mathmlTree||!a.fencePointer)};sre.CaseEmbellished.prototype.getMathml=function(){this.getFenced_();this.fencedMml=sre.EnrichMathml.walkTree(this.fenced);this.getFencesMml_();return this.rewrite_()};
|
501
|
+
sre.CaseEmbellished.prototype.getFenced_=function(){for(var a=this.semantic;a.type!==sre.SemanticAttr.Type.FENCED;)a=a.childNodes[0];this.fenced=a.childNodes[0];this.ofence=a.contentNodes[0];this.cfence=a.contentNodes[1];sre.CaseEmbellished.fencedMap_(this.ofence,this.ofenceMap);sre.CaseEmbellished.fencedMap_(this.cfence,this.cfenceMap)};sre.CaseEmbellished.fencedMap_=function(a,b){b[a.id]=a.mathmlTree;a.embellished&&sre.CaseEmbellished.fencedMap_(a.childNodes[0],b)};
|
502
|
+
sre.CaseEmbellished.prototype.getFencesMml_=function(){for(var a=this.semantic,b=Object.keys(this.ofenceMap),c=Object.keys(this.cfenceMap);!(this.ofenceMml&&this.cfenceMml||a===this.fenced);)-1===b.indexOf(a.fencePointer)||this.ofenceMml||(this.ofenceMml=a.mathmlTree),-1===c.indexOf(a.fencePointer)||this.cfenceMml||(this.cfenceMml=a.mathmlTree),a=a.childNodes[0];this.ofenceMml||(this.ofenceMml=this.ofence.mathmlTree);this.cfenceMml||(this.cfenceMml=this.cfence.mathmlTree);this.ofenceMml&&(this.ofenceMml=
|
503
|
+
sre.EnrichMathml.ascendNewNode(this.ofenceMml));this.cfenceMml&&(this.cfenceMml=sre.EnrichMathml.ascendNewNode(this.cfenceMml))};
|
504
|
+
sre.CaseEmbellished.prototype.rewrite_=function(){var a=this.semantic,b=null,c=this.introduceNewLayer_();for(sre.EnrichMathml.setAttributes(c,this.fenced.parent);a.type!==sre.SemanticAttr.Type.FENCED;){var d=a.mathmlTree,e=this.specialCase_(a,d);if(e)a=e;else{sre.EnrichMathml.setAttributes(d,a);e=[];for(var f=1,g;g=a.childNodes[f];f++)e.push(sre.EnrichMathml.walkTree(g));a=a.childNodes[0]}e=sre.DomUtil.createElement("dummy");f=c.parentNode;g=d.childNodes[0];sre.DomUtil.replaceNode(d,e);sre.DomUtil.replaceNode(c,
|
505
|
+
d);sre.DomUtil.replaceNode(d.childNodes[0],c);sre.DomUtil.replaceNode(e,g);d.parentNode=f;c=d.childNodes[0];b||(b=d)}sre.EnrichMathml.walkTree(this.ofence);sre.EnrichMathml.walkTree(this.cfence);this.cleanupParents_();return b||c};
|
506
|
+
sre.CaseEmbellished.prototype.specialCase_=function(a,b){var c=sre.DomUtil.tagName(b),d=null;if("MSUBSUP"===c){d=a.childNodes[0];var e=sre.CaseDoubleScript}else"MMULTISCRIPTS"===c&&(a.type===sre.SemanticAttr.Type.SUPERSCRIPT||a.type===sre.SemanticAttr.Type.SUBSCRIPT?e=sre.CaseMultiscripts:a.type===sre.SemanticAttr.Type.TENSOR&&(e=sre.CaseTensor),d=e&&a.childNodes[0]&&a.childNodes[0].role===sre.SemanticAttr.Role.SUBSUP?a.childNodes[0]:a);if(!d)return null;c=d.childNodes[0];b=sre.CaseEmbellished.makeEmptyNode_(c.id);
|
507
|
+
d.childNodes[0]=b;b=(new e(a)).getMathml();d.childNodes[0]=c;this.parentCleanup.push(b);return d.childNodes[0]};sre.CaseEmbellished.makeEmptyNode_=function(a){var b=sre.DomUtil.createElement("mrow");a=new sre.SemanticNode(a);a.type=sre.SemanticAttr.Type.EMPTY;a.mathmlTree=b;return a};
|
508
|
+
sre.CaseEmbellished.prototype.introduceNewLayer_=function(){var a=this.fullFence(this.ofenceMml),b=this.fullFence(this.cfenceMml),c=sre.DomUtil.createElement("mrow");sre.DomUtil.replaceNode(this.fencedMml,c);c.appendChild(this.fencedMml);c.insertBefore(a,this.fencedMml);c.appendChild(b);if(!c.parentNode){for(a=sre.DomUtil.createElement("mrow");0<c.childNodes.length;)a.appendChild(c.childNodes[0]);c.appendChild(a);c=a}return c};
|
509
|
+
sre.CaseEmbellished.prototype.fullFence=function(a){for(var b=this.fencedMml.parentNode;a.parentNode&&a.parentNode!==b;)a=a.parentNode;return a};sre.CaseEmbellished.prototype.cleanupParents_=function(){this.parentCleanup.forEach(function(a){var b=a.childNodes[1].getAttribute(sre.EnrichMathml.Attribute.PARENT);a.childNodes[0].setAttribute(sre.EnrichMathml.Attribute.PARENT,b)})};sre.CaseLine=function(a){sre.AbstractEnrichCase.call(this,a);this.mml=a.mathmlTree};goog.inherits(sre.CaseLine,sre.AbstractEnrichCase);sre.CaseLine.test=function(a){return!!a.mathmlTree&&a.type===sre.SemanticAttr.Type.LINE};
|
510
|
+
sre.CaseLine.prototype.getMathml=function(){this.semantic.contentNodes.length&&sre.EnrichMathml.walkTree(this.semantic.contentNodes[0]);this.semantic.childNodes.length&&sre.EnrichMathml.walkTree(this.semantic.childNodes[0]);sre.EnrichMathml.setAttributes(this.mml,this.semantic);return this.mml};sre.CaseProof=function(a){sre.AbstractEnrichCase.call(this,a);this.mml=a.mathmlTree};goog.inherits(sre.CaseProof,sre.AbstractEnrichCase);sre.CaseProof.test=function(a){return!!a.mathmlTree&&(a.type===sre.SemanticAttr.Type.INFERENCE||a.type===sre.SemanticAttr.Type.PREMISES)};
|
511
|
+
sre.CaseProof.prototype.getMathml=function(){if(!this.semantic.childNodes.length)return this.mml;this.semantic.contentNodes.forEach(function(a){sre.EnrichMathml.walkTree(a);sre.EnrichMathml.setAttributes(a.mathmlTree,a)});this.semantic.childNodes.forEach(function(a){sre.EnrichMathml.walkTree(a)});sre.EnrichMathml.setAttributes(this.mml,this.semantic);this.mml.getAttribute("data-semantic-id")===this.mml.getAttribute("data-semantic-parent")&&this.mml.removeAttribute("data-semantic-parent");return this.mml};sre.CaseTable=function(a){sre.AbstractEnrichCase.call(this,a);this.mml=a.mathmlTree;this.inner=[]};goog.inherits(sre.CaseTable,sre.AbstractEnrichCase);sre.CaseTable.test=function(a){return!!a.mathmlTree&&(a.type===sre.SemanticAttr.Type.MATRIX||a.type===sre.SemanticAttr.Type.VECTOR||a.type===sre.SemanticAttr.Type.CASES)};
|
512
|
+
sre.CaseTable.prototype.getMathml=function(){var a=sre.EnrichMathml.cloneContentNode(this.semantic.contentNodes[0]),b=this.semantic.contentNodes[1]?sre.EnrichMathml.cloneContentNode(this.semantic.contentNodes[1]):null;this.inner=this.semantic.childNodes.map(sre.EnrichMathml.walkTree);"MFENCED"===sre.DomUtil.tagName(this.mml)?(this.mml.insertBefore(a,this.mml.childNodes[0]||null),b&&this.mml.appendChild(b),this.mml=sre.EnrichMathml.rewriteMfenced(this.mml)):(a=[a,this.mml],b&&a.push(b),this.mml=sre.EnrichMathml.introduceNewLayer(a));
|
513
|
+
sre.EnrichMathml.setAttributes(this.mml,this.semantic);return this.mml};sre.CaseTensor=function(a){sre.CaseMultiindex.call(this,a)};goog.inherits(sre.CaseTensor,sre.CaseMultiindex);sre.CaseTensor.test=function(a){return!!a.mathmlTree&&a.type===sre.SemanticAttr.Type.TENSOR};
|
514
|
+
sre.CaseTensor.prototype.getMathml=function(){sre.EnrichMathml.walkTree(this.semantic.childNodes[0]);var a=sre.CaseMultiindex.multiscriptIndex(this.semantic.childNodes[1]),b=sre.CaseMultiindex.multiscriptIndex(this.semantic.childNodes[2]),c=sre.CaseMultiindex.multiscriptIndex(this.semantic.childNodes[3]),d=sre.CaseMultiindex.multiscriptIndex(this.semantic.childNodes[4]);sre.EnrichMathml.setAttributes(this.mml,this.semantic);sre.EnrichMathml.addCollapsedAttribute(this.mml,[this.semantic.id,this.semantic.childNodes[0].id,
|
515
|
+
a,b,c,d]);var e=sre.SemanticSkeleton.collapsedLeafs(a,b,c,d);e.unshift(this.semantic.childNodes[0].id);this.mml.setAttribute(sre.EnrichMathml.Attribute.CHILDREN,e.join(","));this.completeMultiscript(sre.SemanticSkeleton.interleaveIds(c,d),sre.SemanticSkeleton.interleaveIds(a,b));return this.mml};sre.CaseText=function(a){sre.AbstractEnrichCase.call(this,a);this.mml=a.mathmlTree};goog.inherits(sre.CaseText,sre.AbstractEnrichCase);sre.CaseText.test=function(a){return a.type===sre.SemanticAttr.Type.PUNCTUATED&&a.role===sre.SemanticAttr.Role.TEXT};
|
516
|
+
sre.CaseText.prototype.getMathml=function(){var a=[],b=sre.EnrichMathml.collapsePunctuated(this.semantic,a);this.mml=sre.EnrichMathml.introduceNewLayer(a);sre.EnrichMathml.setAttributes(this.mml,this.semantic);this.mml.removeAttribute(sre.EnrichMathml.Attribute.CONTENT);sre.EnrichMathml.addCollapsedAttribute(this.mml,b);return this.mml};sre.EnrichCases=function(){};
|
517
|
+
sre.EnrichCaseFactory.cases.push({test:sre.CaseEmbellished.test,constr:sre.CaseEmbellished},{test:sre.CaseDoubleScript.test,constr:sre.CaseDoubleScript},{test:sre.CaseTensor.test,constr:sre.CaseTensor},{test:sre.CaseMultiscripts.test,constr:sre.CaseMultiscripts},{test:sre.CaseLine.test,constr:sre.CaseLine},{test:sre.CaseBinomial.test,constr:sre.CaseBinomial},{test:sre.CaseProof.test,constr:sre.CaseProof},{test:sre.CaseTable.test,constr:sre.CaseTable},{test:sre.CaseText.test,constr:sre.CaseText});sre.Enrich={};sre.Enrich.semanticMathmlNode=function(a){a=a.cloneNode(!0);var b=sre.Semantic.getTree(a);return sre.EnrichMathml.enrich(a,b)};sre.Enrich.semanticMathmlSync=function(a){a=sre.DomUtil.parseInput(a);return sre.Enrich.semanticMathmlNode(a)};sre.Enrich.semanticMathml=function(a,b){if(sre.Engine.isReady()){var c=sre.DomUtil.parseInput(a);b(sre.Enrich.semanticMathmlNode(c))}else setTimeout(function(){sre.Enrich.semanticMathml(a,b)},500)};
|
518
|
+
sre.Enrich.testTranslation__=function(a){new sre.EnrichCases;sre.Debugger.getInstance().init();a=sre.Enrich.semanticMathmlSync(sre.Enrich.prepareMmlString(a)).toString();sre.EnrichMathml.removeAttributePrefix(a);sre.Debugger.getInstance().exit();return a};sre.Enrich.prepareMmlString=function(a){a.match(/^<math/)||(a="<math>"+a);a.match(/\/math>$/)||(a+="</math>");return a};sre.ColorPicker=function(a,b){this.foreground=sre.ColorPicker.getChannelColor_(b,sre.ColorPicker.DEFAULT_FOREGROUND_);this.background=sre.ColorPicker.getChannelColor_(a,sre.ColorPicker.DEFAULT_BACKGROUND_)};sre.ColorPicker.DEFAULT_BACKGROUND_="blue";sre.ColorPicker.DEFAULT_FOREGROUND_="black";
|
519
|
+
sre.ColorPicker.namedColors_={red:{red:255,green:0,blue:0},green:{red:0,green:255,blue:0},blue:{red:0,green:0,blue:255},yellow:{red:255,green:255,blue:0},cyan:{red:0,green:255,blue:255},magenta:{red:255,green:0,blue:255},white:{red:255,green:255,blue:255},black:{red:0,green:0,blue:0}};sre.ColorPicker.getChannelColor_=function(a,b){a=a||{color:b};var c=a.color?sre.ColorPicker.namedColors_[a.color]:a;c||(c=sre.ColorPicker.namedColors_[b]);c.alpha=a.hasOwnProperty("alpha")?a.alpha:1;return sre.ColorPicker.normalizeColor_(c)};
|
520
|
+
sre.ColorPicker.normalizeColor_=function(a){var b=function(a){a=Math.max(a,0);a=Math.min(255,a);return Math.round(a)};a.red=b(a.red);a.green=b(a.green);a.blue=b(a.blue);a.alpha=Math.max(a.alpha,0);a.alpha=Math.min(1,a.alpha);return a};sre.ColorPicker.prototype.rgba=function(){var a=function(a){return"rgba("+a.red+","+a.green+","+a.blue+","+a.alpha+")"};return{background:a(this.background),foreground:a(this.foreground)}};
|
521
|
+
sre.ColorPicker.prototype.rgb=function(){var a=function(a){return"rgb("+a.red+","+a.green+","+a.blue+")"};return{background:a(this.background),alphaback:this.background.alpha.toString(),foreground:a(this.foreground),alphafore:this.foreground.alpha.toString()}};
|
522
|
+
sre.ColorPicker.prototype.hex=function(){var a=function(a){return"#"+sre.ColorPicker.toHex_(a.red)+sre.ColorPicker.toHex_(a.green)+sre.ColorPicker.toHex_(a.blue)};return{background:a(this.background),alphaback:this.background.alpha.toString(),foreground:a(this.foreground),alphafore:this.foreground.alpha.toString()}};sre.ColorPicker.toHex_=function(a){a=a.toString(16);return 1===a.length?"0"+a:a};sre.ContrastPicker=function(){this.hue=10;this.sat=100;this.incr=this.light=50};
|
523
|
+
sre.ContrastPicker.prototype.generate=function(){return sre.ColorPicker.RGB2hex_(sre.ColorPicker.rgb2RGB_(sre.ColorPicker.hsl2rgb_(this.hue,this.sat,this.light)))};sre.ContrastPicker.prototype.increment=function(){this.hue=(this.hue+this.incr)%360};
|
524
|
+
sre.ColorPicker.hsl2rgb_=function(a,b,c){c=1<c?c/100:c;var d=(1-Math.abs(2*c-1))*(1<b?b/100:b),e=d*(1-Math.abs(a/60%2-1)),f=c-d/2,g=$jscomp.makeIterator([0,0,0]);c=g.next().value;b=g.next().value;g=g.next().value;0<=a&&60>a?(a=$jscomp.makeIterator([d,e,0]),c=a.next().value,b=a.next().value,g=a.next().value):60<=a&&120>a?(a=$jscomp.makeIterator([e,d,0]),c=a.next().value,b=a.next().value,g=a.next().value):120<=a&&180>a?(a=$jscomp.makeIterator([0,d,e]),c=a.next().value,b=a.next().value,g=a.next().value):
|
525
|
+
180<=a&&240>a?(a=$jscomp.makeIterator([0,e,d]),c=a.next().value,b=a.next().value,g=a.next().value):240<=a&&300>a?(a=$jscomp.makeIterator([e,0,d]),c=a.next().value,b=a.next().value,g=a.next().value):300<=a&&360>a&&(a=$jscomp.makeIterator([d,0,e]),c=a.next().value,b=a.next().value,g=a.next().value);return[c,b,g].map(function(a){return a+f})};
|
526
|
+
sre.ColorPicker.rgb2RGB_=function(a){var b=$jscomp.makeIterator(a);a=b.next().value;var c=b.next().value;b=b.next().value;return{red:Math.round(255*a),green:Math.round(255*c),blue:Math.round(255*b)}};sre.ColorPicker.RGB2hex_=function(a){return"rgb("+a.red+","+a.green+","+a.blue+")"};sre.Highlighter=function(){};sre.Highlighter.prototype.highlight=function(a){};sre.Highlighter.prototype.unhighlight=function(){};sre.Highlighter.prototype.highlightAll=function(a){};sre.Highlighter.prototype.unhighlightAll=function(){};sre.Highlighter.prototype.setColor=function(a){};sre.Highlighter.prototype.addEvents=function(a,b){};sre.AbstractHighlighter=function(){this.currentHighlights_=[];this.color=null;this.mactionName=""};sre.AbstractHighlighter.ATTR="sre-highlight";sre.AbstractHighlighter.prototype.highlight=function(a){this.currentHighlights_.push(a.map(goog.bind(function(a){var b=this.highlightNode(a);this.setHighlighted(a);return b},this)))};sre.AbstractHighlighter.prototype.highlightNode=goog.abstractMethod;sre.AbstractHighlighter.prototype.highlightAll=function(a){a=this.getMactionNodes(a);for(var b=0,c;c=a[b];b++)this.highlight([c])};
|
527
|
+
sre.AbstractHighlighter.prototype.unhighlight=function(){var a=this.currentHighlights_.pop();a&&a.forEach(goog.bind(function(a){this.isHighlighted(a.node)&&(this.unhighlightNode(a),this.unsetHighlighted(a.node))},this))};sre.AbstractHighlighter.prototype.unhighlightNode=goog.abstractMethod;sre.AbstractHighlighter.prototype.unhighlightAll=function(){for(;0<this.currentHighlights_.length;)this.unhighlight()};sre.AbstractHighlighter.prototype.setColor=function(a){this.color=a};
|
528
|
+
sre.AbstractHighlighter.prototype.colorString=function(){return this.color.rgba()};sre.AbstractHighlighter.prototype.addEvents=function(a,b){a=this.getMactionNodes(a);for(var c=0,d;d=a[c];c++)for(var e in b)d.addEventListener(e,b[e])};sre.AbstractHighlighter.prototype.getMactionNodes=function(a){return a.getElementsByClassName(this.mactionName)};sre.AbstractHighlighter.prototype.isMactionNode=function(a){return(a=a.className||a.getAttribute("class"))?a.match(new RegExp(this.mactionName)):!1};
|
529
|
+
sre.AbstractHighlighter.prototype.isHighlighted=function(a){return a.hasAttribute(sre.AbstractHighlighter.ATTR)};sre.AbstractHighlighter.prototype.setHighlighted=function(a){a.setAttribute(sre.AbstractHighlighter.ATTR,!0)};sre.AbstractHighlighter.prototype.unsetHighlighted=function(a){a.removeAttribute(sre.AbstractHighlighter.ATTR)};
|
530
|
+
sre.AbstractHighlighter.prototype.colorizeAll=function(a){sre.XpathUtil.evalXPath(".//*[@"+sre.EnrichMathml.Attribute.ID+"]",a).forEach(goog.bind(function(a){this.colorize(a)},this))};sre.AbstractHighlighter.prototype.uncolorizeAll=function(a){sre.XpathUtil.evalXPath(".//*[@"+sre.EnrichMathml.Attribute.ID+"]",a).forEach(goog.bind(function(a){this.uncolorize(a)},this))};
|
531
|
+
sre.AbstractHighlighter.prototype.colorize=function(a){var b=sre.EnrichMathml.addPrefix("foreground");a.hasAttribute(b)&&(a.setAttribute(b+"-old",a.style.color),a.style.color=a.getAttribute(b))};sre.AbstractHighlighter.prototype.uncolorize=function(a){var b=sre.EnrichMathml.addPrefix("foreground")+"-old";a.hasAttribute(b)&&(a.style.color=a.getAttribute(b))};sre.CssHighlighter=function(){sre.AbstractHighlighter.call(this);this.mactionName="mjx-maction"};goog.inherits(sre.CssHighlighter,sre.AbstractHighlighter);sre.CssHighlighter.prototype.highlightNode=function(a){var b={node:a,background:a.style.backgroundColor,foreground:a.style.color},c=this.colorString();a.style.backgroundColor=c.background;a.style.color=c.foreground;return b};sre.CssHighlighter.prototype.unhighlightNode=function(a){a.node.style.backgroundColor=a.background;a.node.style.color=a.foreground};sre.ChtmlHighlighter=function(){sre.CssHighlighter.call(this)};goog.inherits(sre.ChtmlHighlighter,sre.CssHighlighter);sre.ChtmlHighlighter.prototype.isMactionNode=function(a){return a.tagName.toUpperCase()===this.mactionName.toUpperCase()};sre.ChtmlHighlighter.prototype.getMactionNodes=function(a){return a.getElementsByTagName(this.mactionName)};sre.HtmlHighlighter=function(){sre.AbstractHighlighter.call(this);this.mactionName="maction"};goog.inherits(sre.HtmlHighlighter,sre.AbstractHighlighter);sre.HtmlHighlighter.prototype.setMode=function(a){this.mode=a};
|
532
|
+
sre.HtmlHighlighter.prototype.highlightNode=function(a){var b={node:a,foreground:a.style.color,position:a.style.position},c=this.color.rgb();a.style.color=c.foreground;a.style.position="relative";var d=a.bbox;if(d&&d.w){var e=sre.DomUtil.createElement("span"),f=parseFloat(a.style.paddingLeft||"0");e.style.backgroundColor=c.background;e.style.opacity=c.alphaback.toString();e.style.display="inline-block";e.style.height=d.h+d.d+.1+"em";e.style.verticalAlign=-d.d+"em";e.style.marginTop=e.style.marginBottom=
|
533
|
+
"-0.05em";e.style.width=d.w+0+"em";e.style.marginLeft=f-0+"em";e.style.marginRight=-d.w-f+"em";a.parentNode.insertBefore(e,a);b.box=e}return b};sre.HtmlHighlighter.prototype.unhighlightNode=function(a){var b=a.node;b.style.color=a.foreground;b.style.position=a.position;a.box&&a.box.parentNode.removeChild(a.box)};sre.MmlCssHighlighter=function(){sre.CssHighlighter.call(this);this.mactionName="maction"};goog.inherits(sre.MmlCssHighlighter,sre.CssHighlighter);sre.MmlCssHighlighter.prototype.getMactionNodes=function(a){return a.getElementsByTagName(this.mactionName)};sre.MmlCssHighlighter.prototype.isMactionNode=function(a){return a.tagName===this.mactionName};sre.MmlHighlighter=function(){sre.AbstractHighlighter.call(this);this.mactionName="maction"};goog.inherits(sre.MmlHighlighter,sre.AbstractHighlighter);sre.MmlHighlighter.prototype.highlightNode=function(a){var b=a.getAttribute("style");b+=";background-color: "+this.colorString().background;b+=";color: "+this.colorString().foreground;a.setAttribute("style",b);return{node:a}};
|
534
|
+
sre.MmlHighlighter.prototype.unhighlightNode=function(a){var b=a.node.getAttribute("style");b=b.replace(";background-color: "+this.colorString().background,"");b=b.replace(";color: "+this.colorString().foreground,"");a.node.setAttribute("style",b)};sre.MmlHighlighter.prototype.colorString=function(){return this.color.rgba()};sre.MmlHighlighter.prototype.getMactionNodes=function(a){return a.getElementsByTagName(this.mactionName)};
|
535
|
+
sre.MmlHighlighter.prototype.isMactionNode=function(a){return a.tagName===this.mactionName};sre.SvgHighlighter=function(){sre.AbstractHighlighter.call(this);this.mactionName="mjx-svg-maction"};goog.inherits(sre.SvgHighlighter,sre.AbstractHighlighter);
|
536
|
+
sre.SvgHighlighter.prototype.highlightNode=function(a){if(this.isHighlighted(a))return{node:a.previousSibling||a,background:a.style.backgroundColor,foreground:a.style.color};if("svg"===a.tagName){var b={node:a,background:a.style.backgroundColor,foreground:a.style.color};a.style.backgroundColor=this.colorString().background;a.style.color=this.colorString().foreground;return b}b=sre.DomUtil.createElementNS("http://www.w3.org/2000/svg","rect");if("use"===a.nodeName){var c=sre.DomUtil.createElementNS("http://www.w3.org/2000/svg",
|
537
|
+
"g");a.parentNode.insertBefore(c,a);c.appendChild(a);var d=c.getBBox();c.parentNode.replaceChild(a,c)}else d=a.getBBox();b.setAttribute("x",d.x-40);b.setAttribute("y",d.y-40);b.setAttribute("width",d.width+80);b.setAttribute("height",d.height+80);(d=a.getAttribute("transform"))&&b.setAttribute("transform",d);b.setAttribute("fill",this.colorString().background);a.parentNode.insertBefore(b,a);b={node:b,foreground:a.getAttribute("fill")};a.setAttribute("fill",this.colorString().foreground);return b};
|
538
|
+
sre.SvgHighlighter.prototype.unhighlightNode=function(a){"background"in a?(a.node.style.backgroundColor=a.background,a.node.style.color=a.foreground):(a.foreground?a.node.nextSibling.setAttribute("fill",a.foreground):a.node.nextSibling.removeAttribute("fill"),a.node.parentNode.removeChild(a.node))};sre.SvgHighlighter.prototype.isMactionNode=function(a){a=a.className||a.getAttribute("class");return(a=void 0!==a.baseVal?a.baseVal:a)?a.match(new RegExp(this.mactionName)):!1};sre.SvgV3Highlighter=function(){sre.SvgHighlighter.call(this);this.mactionName="maction"};goog.inherits(sre.SvgV3Highlighter,sre.SvgHighlighter);
|
539
|
+
sre.SvgV3Highlighter.prototype.highlightNode=function(a){if(this.isHighlighted(a))return{node:a,background:this.colorString().background,foreground:this.colorString().foreground};if("svg"===a.tagName||"MJX-CONTAINER"===a.tagName){var b={node:a,background:a.style.backgroundColor,foreground:a.style.color};a.style.backgroundColor=this.colorString().background;a.style.color=this.colorString().foreground;return b}b=sre.DomUtil.createElementNS("http://www.w3.org/2000/svg","rect");b.setAttribute("sre-highlighter-added",
|
540
|
+
!0);var c=a.getBBox();b.setAttribute("x",c.x-40);b.setAttribute("y",c.y-40);b.setAttribute("width",c.width+80);b.setAttribute("height",c.height+80);(c=a.getAttribute("transform"))&&b.setAttribute("transform",c);b.setAttribute("fill",this.colorString().background);a.parentNode.insertBefore(b,a);b={node:a,foreground:a.getAttribute("fill")};"rect"===a.nodeName?(c=new sre.ColorPicker({alpha:0,color:"black"}),a.setAttribute("fill",c.rgba().foreground)):a.setAttribute("fill",this.colorString().foreground);
|
541
|
+
return b};sre.SvgV3Highlighter.prototype.unhighlightNode=function(a){var b=a.node.previousSibling;b&&b.hasAttribute("sre-highlighter-added")?(a.foreground?a.node.setAttribute("fill",a.foreground):a.node.removeAttribute("fill"),a.node.parentNode.removeChild(b)):(a.node.style.backgroundColor=a.background,a.node.style.color=a.foreground)};sre.SvgV3Highlighter.prototype.isMactionNode=function(a){return a.getAttribute("data-mml-node")===this.mactionName};
|
542
|
+
sre.SvgV3Highlighter.prototype.getMactionNodes=function(a){return sre.XpathUtil.evalXPath('.//*[@data-mml-node="'+this.mactionName+'"]',a)};sre.HighlighterFactory={};sre.HighlighterFactory.highlighter=function(a,b,c){a=new sre.ColorPicker(a,b);c=new (sre.HighlighterFactory.highlighterMapping_["NativeMML"===c.renderer&&"Safari"===c.browser?"MML-CSS":"SVG"===c.renderer&&"v3"===c.browser?"SVG-V3":c.renderer]||sre.HighlighterFactory.highlighterMapping_.NativeMML);c.setColor(a);return c};sre.HighlighterFactory.addEvents=function(a,b,c){(c=sre.HighlighterFactory.highlighterMapping_[c.renderer])&&(new c).addEvents(a,b)};
|
543
|
+
sre.HighlighterFactory.highlighterMapping_={SVG:sre.SvgHighlighter,"SVG-V3":sre.SvgV3Highlighter,NativeMML:sre.MmlHighlighter,"HTML-CSS":sre.HtmlHighlighter,"MML-CSS":sre.MmlCssHighlighter,CommonHTML:sre.CssHighlighter,CHTML:sre.ChtmlHighlighter};sre.Span=function(a,b){this.string=a;this.attributes=b};sre.AudioUtil={};sre.AudioUtil.mergePause=function(a,b,c){return a?{pause:sre.AudioUtil.mergePause_(a.pause,b.pause,c)}:b};sre.AudioUtil.mergePause_=function(a,b,c){return(c||function(c,e){return"number"===typeof c||"number"===typeof e?c+e:"number"===typeof c?e:"number"===typeof e?c:[a,b].sort()[0]}).call(null,a,b)};sre.AudioUtil.mergeMarkup=function(a,b){delete a.open;b.close.forEach(function(b){delete a[b]});b.open.forEach(function(c){a[c]=b[c]});var c=Object.keys(a);a.open=c};
|
544
|
+
sre.AudioUtil.sortClose=function(a,b){if(1>=a.length)return a;for(var c=[],d=0,e;e=b[d],a.length;d++)e.close&&e.close.length&&e.close.forEach(function(b){var d=a.indexOf(b);-1!==d&&(c.unshift(b),a.splice(d,1))});return c};sre.AudioUtil.PersonalityRanges_={};sre.AudioUtil.LastOpen_=[];
|
545
|
+
sre.AudioUtil.personalityMarkup=function(a){sre.AudioUtil.PersonalityRanges_={};sre.AudioUtil.LastOpen_=[];for(var b=[],c={},d=0,e;e=a[d];d++){var f=null,g=e.descriptionSpan(),h=e.personality;e=h[sre.Engine.personalityProps.JOIN];delete h[sre.Engine.personalityProps.JOIN];"undefined"!==typeof h[sre.Engine.personalityProps.PAUSE]&&(f={},f[sre.Engine.personalityProps.PAUSE]=h[sre.Engine.personalityProps.PAUSE],delete h[sre.Engine.personalityProps.PAUSE]);h=sre.AudioUtil.personalityDiff_(h,c);sre.AudioUtil.appendMarkup_(b,
|
546
|
+
g,h,e,f,!0)}b=b.concat(sre.AudioUtil.finaliseMarkup_());return b=sre.AudioUtil.simplifyMarkup_(b)};
|
547
|
+
sre.AudioUtil.appendElement_=function(a,b){var c=a[a.length-1];if(c)if(sre.AudioUtil.isSpanElement(b)&&sre.AudioUtil.isSpanElement(c))if("undefined"===typeof c.join)c.span=c.span.concat(b.span);else{a=c.span.pop();var d=b.span.shift();c.span.push(a+c.join+d);c.span=c.span.concat(b.span);c.join=b.join}else sre.AudioUtil.isPauseElement(b)&&sre.AudioUtil.isPauseElement(c)?c.pause=sre.AudioUtil.mergePause_(c.pause,b.pause):a.push(b);else a.push(b)};
|
548
|
+
sre.AudioUtil.simplifyMarkup_=function(a){for(var b={},c=[],d=0,e;e=a[d];d++)if(sre.AudioUtil.isMarkupElement(e))if(!e.close||1!==e.close.length||e.open.length)sre.AudioUtil.copyValues_(e,b),c.push(e);else{var f=a[d+1];if(!f||sre.AudioUtil.isSpanElement(f))sre.AudioUtil.copyValues_(e,b),c.push(e);else{var g=sre.AudioUtil.isPauseElement(f)?f:null;g&&(f=a[d+2]);f&&sre.AudioUtil.isMarkupElement(f)&&f.open[0]===e.close[0]&&!f.close.length&&f[f.open[0]]===b[f.open[0]]?g?(sre.AudioUtil.appendElement_(c,
|
549
|
+
g),d+=2):d+=1:(sre.AudioUtil.copyValues_(e,b),c.push(e))}}else sre.AudioUtil.appendElement_(c,e);return c};sre.AudioUtil.copyValues_=function(a,b){a.rate&&(b.rate=a.rate);a.pitch&&(b.pitch=a.pitch);a.volume&&(b.volume=a.volume)};sre.AudioUtil.finaliseMarkup_=function(){for(var a=[],b=sre.AudioUtil.LastOpen_.length-1;0<=b;b--){var c=sre.AudioUtil.LastOpen_[b];if(c.length){for(var d={open:[],close:[]},e=0;e<c.length;e++){var f=c[e];d.close.push(f);d[f]=0}a.push(d)}}return a};
|
550
|
+
sre.AudioUtil.isMarkupElement=function(a){return"object"===typeof a&&a.open};sre.AudioUtil.isPauseElement=function(a){return"object"===typeof a&&1===Object.keys(a).length&&Object.keys(a)[0]===sre.Engine.personalityProps.PAUSE};sre.AudioUtil.isSpanElement=function(a){var b=Object.keys(a);return"object"===typeof a&&(1===b.length&&"span"===b[0]||2===b.length&&("span"===b[0]&&"join"===b[1]||"span"===b[1]&&"join"===b[0]))};
|
551
|
+
sre.AudioUtil.appendMarkup_=function(a,b,c,d,e,f){if(f){if(f=a[a.length-1])var g=f[sre.Engine.personalityProps.JOIN];if(f&&!b.string&&e&&sre.AudioUtil.isPauseElement(f)){var h=sre.Engine.personalityProps.PAUSE;f[h]=sre.AudioUtil.mergePause_(f[h],e[h]);e=null}f&&b.string&&0===Object.keys(c).length&&sre.AudioUtil.isSpanElement(f)&&("undefined"!==typeof g&&(h=f.span.pop(),b=new sre.Span(h.string+g+b.string,h.attributes)),f.span.push(b),b=new sre.Span("",{}),f[sre.Engine.personalityProps.JOIN]=d)}0!==
|
552
|
+
Object.keys(c).length&&a.push(c);b.string&&a.push({span:[b],join:d});e&&a.push(e)};
|
553
|
+
sre.AudioUtil.personalityDiff_=function(a,b){if(!b)return a;var c={};for(h in sre.Engine.personalityProps){var d=sre.Engine.personalityProps[h],e=a[d],f=b[d];if(!(!e&&!f||e&&f&&e===f)){var g=e||0;sre.AudioUtil.isMarkupElement(c)||(c.open=[],c.close=[]);e||c.close.push(d);f||c.open.push(d);f&&e&&(c.close.push(d),c.open.push(d));b[d]=g;c[d]=g;sre.AudioUtil.PersonalityRanges_[d]?sre.AudioUtil.PersonalityRanges_[d].push(g):sre.AudioUtil.PersonalityRanges_[d]=[g]}}if(sre.AudioUtil.isMarkupElement(c)){for(a=
|
554
|
+
c.close.slice();0<a.length;){var h=sre.AudioUtil.LastOpen_.pop();d=sre.BaseUtil.setdifference(h,a);a=sre.BaseUtil.setdifference(a,h);h=d;if(0===a.length)0!==h.length&&sre.AudioUtil.LastOpen_.push(h);else if(0!==h.length)for(c.close=c.close.concat(h),c.open=c.open.concat(h),d=0;e=h[d];d++)c[e]=b[e]}sre.AudioUtil.LastOpen_.push(c.open)}return c};sre.AudioRenderer=function(){};sre.AudioRenderer.prototype.setSeparator=function(a){};sre.AudioRenderer.prototype.getSeparator=function(){};sre.AudioRenderer.prototype.markup=function(a){};sre.AudioRenderer.prototype.error=function(a){};sre.AudioRenderer.prototype.merge=function(a){};sre.AudioRenderer.prototype.finalize=function(a){};sre.AbstractAudioRenderer=function(){this.separator_=" "};sre.AbstractAudioRenderer.prototype.setSeparator=function(a){this.separator_=a};sre.AbstractAudioRenderer.prototype.getSeparator=function(){return this.separator_};sre.AbstractAudioRenderer.prototype.markup=goog.abstractMethod;sre.AbstractAudioRenderer.prototype.error=function(a){return null};sre.AbstractAudioRenderer.prototype.merge=function(a){return a.map(function(a){return a.string}).join(this.getSeparator())};
|
555
|
+
sre.AbstractAudioRenderer.prototype.finalize=function(a){return a};sre.AbstractAudioRenderer.prototype.pauseValue=function(a){switch(a){case "long":a=750;break;case "medium":a=500;break;case "short":a=250}return Math.floor(a*parseInt(sre.Engine.getInstance().getRate(),10)/100)};sre.MarkupRenderer=function(){sre.AbstractAudioRenderer.call(this);this.scaleFunction_=null};goog.inherits(sre.MarkupRenderer,sre.AbstractAudioRenderer);sre.MarkupRenderer.prototype.setScaleFunction=function(a,b,c,d,e){var f=e||0;this.scaleFunction_=function(e){e=(e-a)/(b-a);return+(Math.round(c*(1-e)+d*e+"e+"+f)+"e-"+f)}};sre.MarkupRenderer.prototype.applyScaleFunction=function(a){return this.scaleFunction_?this.scaleFunction_(a):a};sre.MarkupRenderer.prototype.pause=goog.abstractMethod;
|
556
|
+
sre.MarkupRenderer.prototype.prosodyElement=goog.abstractMethod;sre.AcssRenderer=function(){sre.MarkupRenderer.call(this)};goog.inherits(sre.AcssRenderer,sre.MarkupRenderer);
|
557
|
+
sre.AcssRenderer.prototype.markup=function(a){this.setScaleFunction(-2,2,0,10,0);a=sre.AudioUtil.personalityMarkup(a);for(var b=[],c={open:[]},d=null,e=!1,f=0,g;g=a[f];f++)if(sre.AudioUtil.isMarkupElement(g))sre.AudioUtil.mergeMarkup(c,g);else if(sre.AudioUtil.isPauseElement(g))e&&(d=sre.AudioUtil.mergePause(d,g,Math.max));else{g='"'+this.merge(g.span)+'"';e=!0;d&&(b.push(this.pause(d)),d=null);var h=this.prosody_(c);b.push(h?"(text ("+h+") "+g+")":g)}return"(exp "+b.join(" ")+")"};
|
558
|
+
sre.AcssRenderer.prototype.error=function(a){return'(error "'+a+'")'};sre.AcssRenderer.prototype.prosody_=function(a){for(var b=a.open,c=[],d=0,e;e=b[d];d++)c.push(this.prosodyElement(e,a[e]));return c.join(" ")};
|
559
|
+
sre.AcssRenderer.prototype.prosodyElement=function(a,b){b=this.applyScaleFunction(b);switch(a){case sre.Engine.personalityProps.RATE:return"(richness . "+b+")";case sre.Engine.personalityProps.PITCH:return"(average-pitch . "+b+")";case sre.Engine.personalityProps.VOLUME:return"(stress . "+b+")"}return"(value . "+b+")"};sre.AcssRenderer.prototype.pause=function(a){return"(pause . "+this.pauseValue(a[sre.Engine.personalityProps.PAUSE])+")"};sre.PunctuationRenderer=function(){sre.AbstractAudioRenderer.call(this)};goog.inherits(sre.PunctuationRenderer,sre.AbstractAudioRenderer);
|
560
|
+
sre.PunctuationRenderer.prototype.markup=function(a){a=sre.AudioUtil.personalityMarkup(a);for(var b="",c=null,d=!1,e=0,f;f=a[e];e++)sre.AudioUtil.isMarkupElement(f)||(sre.AudioUtil.isPauseElement(f)?d&&(c=sre.AudioUtil.mergePause(c,f,Math.max)):(c&&(b+=this.pause(c[sre.Engine.personalityProps.PAUSE]),c=null),b+=(d?this.getSeparator():"")+this.merge(f.span),d=!0));return b};sre.PunctuationRenderer.PAUSE_PUNCTUATION_={"short":",",medium:";","long":"."};
|
561
|
+
sre.PunctuationRenderer.prototype.pause=function(a){return sre.PunctuationRenderer.PAUSE_PUNCTUATION_["number"===typeof a?250>=a?"short":500>=a?"medium":"long":a]||""};sre.XmlRenderer=function(){sre.MarkupRenderer.call(this)};goog.inherits(sre.XmlRenderer,sre.MarkupRenderer);
|
562
|
+
sre.XmlRenderer.prototype.markup=function(a){this.setScaleFunction(-2,2,-100,100,2);a=sre.AudioUtil.personalityMarkup(a);for(var b=[],c=[],d=0,e;e=a[d];d++)if(e.span)b.push(this.merge(e.span));else if(sre.AudioUtil.isPauseElement(e))b.push(this.pause(e));else{if(e.close.length)for(var f=0;f<e.close.length;f++){var g=c.pop();if(-1===e.close.indexOf(g))throw new sre.Engine.Error("Unknown closing markup element: "+g);b.push(this.closeTag(g))}e.open.length&&sre.AudioUtil.sortClose(e.open.slice(),a.slice(d+
|
563
|
+
1)).forEach(goog.bind(function(a){b.push(this.prosodyElement(a,e[a]));c.push(a)},this))}return b.join(" ")};sre.XmlRenderer.prototype.closeTag=goog.abstractMethod;sre.SableRenderer=function(){sre.XmlRenderer.call(this)};goog.inherits(sre.SableRenderer,sre.XmlRenderer);sre.SableRenderer.prototype.finalize=function(a){return'<?xml version="1.0"?><!DOCTYPE SABLE PUBLIC "-//SABLE//DTD SABLE speech mark up//EN" "Sable.v0_2.dtd" []><SABLE>'+this.getSeparator()+a+this.getSeparator()+"</SABLE>"};sre.SableRenderer.prototype.pause=function(a){return'<BREAK MSEC="'+this.pauseValue(a[sre.Engine.personalityProps.PAUSE])+'"/>'};
|
564
|
+
sre.SableRenderer.prototype.prosodyElement=function(a,b){b=this.applyScaleFunction(b);switch(a){case sre.Engine.personalityProps.PITCH:return'<PITCH RANGE="'+b+'%">';case sre.Engine.personalityProps.RATE:return'<RATE SPEED="'+b+'%">';case sre.Engine.personalityProps.VOLUME:return'<VOLUME LEVEL="'+b+'%">';default:return"<"+a.toUpperCase()+' VALUE="'+b+'">'}};sre.SableRenderer.prototype.closeTag=function(a){return"</"+a.toUpperCase()+">"};sre.SsmlRenderer=function(){sre.XmlRenderer.call(this)};goog.inherits(sre.SsmlRenderer,sre.XmlRenderer);sre.SsmlRenderer.prototype.finalize=function(a){return'<?xml version="1.0"?><speak version="1.1" xmlns="http://www.w3.org/2001/10/synthesis"><prosody rate="'+sre.Engine.getInstance().getRate()+'%">'+this.getSeparator()+a+this.getSeparator()+"</prosody></speak>"};sre.SsmlRenderer.prototype.pause=function(a){return'<break time="'+this.pauseValue(a[sre.Engine.personalityProps.PAUSE])+'ms"/>'};
|
565
|
+
sre.SsmlRenderer.prototype.prosodyElement=function(a,b){b=Math.floor(this.applyScaleFunction(b));b=0>b?b.toString():"+"+b.toString();return"<prosody "+a.toLowerCase()+'="'+b+(a===sre.Engine.personalityProps.VOLUME?">":'%">')};sre.SsmlRenderer.prototype.closeTag=function(a){return"</prosody>"};sre.SsmlStepRenderer=function(){sre.SsmlRenderer.call(this)};goog.inherits(sre.SsmlStepRenderer,sre.SsmlRenderer);sre.SsmlStepRenderer.prototype.markup=function(a){sre.SsmlStepRenderer.MARKS={};return sre.SsmlStepRenderer.superClass_.markup.call(this,a)};sre.SsmlStepRenderer.CHARACTER_ATTR_="character";sre.SsmlStepRenderer.MARKS={};
|
566
|
+
sre.SsmlStepRenderer.prototype.merge=function(a){for(var b=[],c=0;c<a.length;c++){var d=a[c],e=d.attributes.extid;e&&!sre.SsmlStepRenderer.MARKS[e]&&(b.push('<mark name="'+e+'"/>'),sre.SsmlStepRenderer.MARKS[e]=!0);1===d.string.length&&d.string.match(/[a-zA-Z]/)?b.push('<say-as interpret-as="'+sre.SsmlStepRenderer.CHARACTER_ATTR_+'">'+d.string+"</say-as>"):b.push(d.string)}return b.join(this.getSeparator())};sre.StringRenderer=function(){sre.AbstractAudioRenderer.call(this)};goog.inherits(sre.StringRenderer,sre.AbstractAudioRenderer);sre.StringRenderer.prototype.markup=function(a){var b="";a=a.filter(function(a){return a.descriptionString()});if(!a.length)return b;for(var c=0;c<a.length-1;c++){var d=a[c],e=d.personality[sre.Engine.personalityProps.JOIN],f="nemeth"===sre.Engine.getInstance().locale?"":this.getSeparator();e="undefined"===typeof e?f:e;b+=d.descriptionString()+e}return b+=a[c].descriptionString()};sre.AuralRendering=function(){};goog.addSingletonGetter(sre.AuralRendering);sre.AuralRendering.prototype.setSeparator=function(a){var b=sre.AuralRendering.rendererMapping_[sre.Engine.getInstance().markup];b&&b.setSeparator(a)};sre.AuralRendering.prototype.getSeparator=function(){var a=sre.AuralRendering.rendererMapping_[sre.Engine.getInstance().markup];return a?a.getSeparator():""};
|
567
|
+
sre.AuralRendering.prototype.markup=function(a){var b=sre.AuralRendering.rendererMapping_[sre.Engine.getInstance().markup];return b?b.markup(a):""};sre.AuralRendering.prototype.merge=function(a){var b=a.map(function(a){return{string:a,attributes:{}}}),c=sre.AuralRendering.rendererMapping_[sre.Engine.getInstance().markup];return c?c.merge(b):a.join()};
|
568
|
+
sre.AuralRendering.prototype.finalize=function(a){var b=sre.AuralRendering.rendererMapping_[sre.Engine.getInstance().markup];return b?b.finalize(a):a};sre.AuralRendering.prototype.error=function(a){var b=sre.AuralRendering.rendererMapping_[sre.Engine.getInstance().markup];return b?b.error(a):""};sre.AuralRendering.registerRenderer=function(a,b){sre.AuralRendering.rendererMapping_[a]=b};
|
569
|
+
sre.AuralRendering.ofType=function(a){return sre.AuralRendering.rendererMapping_[sre.Engine.getInstance().markup]instanceof a};sre.AuralRendering.rendererMapping_={};sre.AuralRendering.registerRenderer(sre.Engine.Markup.NONE,new sre.StringRenderer);sre.AuralRendering.registerRenderer(sre.Engine.Markup.PUNCTUATION,new sre.PunctuationRenderer);sre.AuralRendering.registerRenderer(sre.Engine.Markup.ACSS,new sre.AcssRenderer);sre.AuralRendering.registerRenderer(sre.Engine.Markup.SABLE,new sre.SableRenderer);
|
570
|
+
sre.AuralRendering.xmlInstance=new sre.SsmlRenderer;sre.AuralRendering.registerRenderer(sre.Engine.Markup.VOICEXML,sre.AuralRendering.xmlInstance);sre.AuralRendering.registerRenderer(sre.Engine.Markup.SSML,sre.AuralRendering.xmlInstance);sre.AuralRendering.registerRenderer(sre.Engine.Markup.SSML_STEP,new sre.SsmlStepRenderer);sre.WalkerUtil={};sre.WalkerUtil.splitAttribute=function(a){return a?a.split(/,/):[]};sre.WalkerUtil.getAttribute=function(a,b){return sre.DomUtil.getDataAttribute(a,b)};sre.WalkerUtil.getSemanticRoot=function(a){if(a.hasAttribute(sre.EnrichMathml.Attribute.TYPE)&&!a.hasAttribute(sre.EnrichMathml.Attribute.PARENT))return a;for(var b=sre.DomUtil.querySelectorAllByAttr(a,sre.EnrichMathml.Attribute.TYPE),c=0,d;d=b[c];c++)if(!d.hasAttribute(sre.EnrichMathml.Attribute.PARENT))return d;return a};
|
571
|
+
sre.WalkerUtil.getBySemanticId=function(a,b){return a.getAttribute(sre.EnrichMathml.Attribute.ID)===b?a:sre.DomUtil.querySelectorAllByAttrValue(a,sre.EnrichMathml.Attribute.ID,b)[0]};sre.RebuildStree=function(a){this.factory=new sre.SemanticNodeFactory;this.nodeDict={};this.mathml=a;this.mmlRoot=sre.WalkerUtil.getSemanticRoot(a);this.streeRoot=this.assembleTree(this.mmlRoot);this.stree=sre.SemanticTree.fromNode(this.streeRoot,this.mathml);this.xml=this.stree.xml();sre.SemanticProcessor.getInstance().setNodeFactory(this.factory)};sre.RebuildStree.prototype.getTree=function(){return this.stree};
|
572
|
+
sre.RebuildStree.prototype.assembleTree=function(a){var b=this.makeNode(a),c=sre.WalkerUtil.splitAttribute(sre.WalkerUtil.getAttribute(a,sre.EnrichMathml.Attribute.CHILDREN)),d=sre.WalkerUtil.splitAttribute(sre.WalkerUtil.getAttribute(a,sre.EnrichMathml.Attribute.CONTENT));if(0===d.length&&0===c.length)return b.textContent=a.textContent,b;if(0<d.length){var e=sre.WalkerUtil.getBySemanticId(a,d[0]);e&&(e=sre.WalkerUtil.splitAttribute(sre.WalkerUtil.getAttribute(e,sre.EnrichMathml.Attribute.OPERATOR)),
|
573
|
+
1<e.length&&(b.textContent=e[1]))}e=function(c){c=sre.WalkerUtil.getBySemanticId(a,c);c=this.assembleTree(c);c.parent=b;return c};b.contentNodes=d.map(goog.bind(e,this));b.childNodes=c.map(goog.bind(e,this));return(c=sre.WalkerUtil.getAttribute(a,sre.EnrichMathml.Attribute.COLLAPSED))?this.postProcess(b,c):b};
|
574
|
+
sre.RebuildStree.prototype.makeNode=function(a){var b=sre.WalkerUtil.getAttribute(a,sre.EnrichMathml.Attribute.TYPE),c=sre.WalkerUtil.getAttribute(a,sre.EnrichMathml.Attribute.ROLE),d=sre.WalkerUtil.getAttribute(a,sre.EnrichMathml.Attribute.FONT),e=sre.WalkerUtil.getAttribute(a,sre.EnrichMathml.Attribute.ANNOTATION)||"",f=sre.WalkerUtil.getAttribute(a,sre.EnrichMathml.Attribute.ID),g=sre.WalkerUtil.getAttribute(a,sre.EnrichMathml.Attribute.EMBELLISHED);a=sre.WalkerUtil.getAttribute(a,sre.EnrichMathml.Attribute.FENCEPOINTER);
|
575
|
+
f=this.createNode(parseInt(f,10));f.type=b;f.role=c;f.font=d?d:sre.SemanticAttr.Font.UNKNOWN;f.parseAnnotation(e);a&&(f.fencePointer=a);g&&(f.embellished=g);return f};sre.RebuildStree.isPunctuated=function(a){return!sre.SemanticSkeleton.simpleCollapseStructure(a)&&a[1]&&sre.SemanticSkeleton.contentCollapseStructure(a[1])};sre.RebuildStree.prototype.makePunctuation=function(a){a=this.createNode(a);a.updateContent(sre.SemanticAttr.invisibleComma());a.role=sre.SemanticAttr.Role.DUMMY;return a};
|
576
|
+
sre.RebuildStree.prototype.makePunctuated=function(a,b,c){var d=this.createNode(b[0]);d.type=sre.SemanticAttr.Type.PUNCTUATED;d.embellished=a.embellished;d.fencePointer=a.fencePointer;d.role=c;a=b.splice(1,1)[0].slice(1);d.contentNodes=a.map(goog.bind(this.makePunctuation,this));this.collapsedChildren_(b)};sre.RebuildStree.prototype.makeEmpty=function(a,b,c){b=this.createNode(b);b.type=sre.SemanticAttr.Type.EMPTY;b.embellished=a.embellished;b.fencePointer=a.fencePointer;b.role=c};
|
577
|
+
sre.RebuildStree.prototype.makeIndex=function(a,b,c){sre.RebuildStree.isPunctuated(b)?this.makePunctuated(a,b,c):sre.SemanticSkeleton.simpleCollapseStructure(b)&&!this.nodeDict[b.toString()]&&this.makeEmpty(a,b,c)};
|
578
|
+
sre.RebuildStree.prototype.postProcess=function(a,b){b=sre.SemanticSkeleton.fromString(b).array;if(a.type===sre.SemanticAttr.Role.SUBSUP){var c=this.createNode(b[1][0]);c.type=sre.SemanticAttr.Type.SUBSCRIPT;c.role=sre.SemanticAttr.Role.SUBSUP;a.type=sre.SemanticAttr.Type.SUPERSCRIPT;c.embellished=a.embellished;c.fencePointer=a.fencePointer;this.makeIndex(a,b[1][2],sre.SemanticAttr.Role.RIGHTSUB);this.makeIndex(a,b[2],sre.SemanticAttr.Role.RIGHTSUPER);this.collapsedChildren_(b);return a}if(a.type===
|
579
|
+
sre.SemanticAttr.Type.SUBSCRIPT)return this.makeIndex(a,b[2],sre.SemanticAttr.Role.RIGHTSUB),this.collapsedChildren_(b),a;if(a.type===sre.SemanticAttr.Type.SUPERSCRIPT)return this.makeIndex(a,b[2],sre.SemanticAttr.Role.RIGHTSUPER),this.collapsedChildren_(b),a;if(a.type===sre.SemanticAttr.Type.TENSOR)return this.makeIndex(a,b[2],sre.SemanticAttr.Role.LEFTSUB),this.makeIndex(a,b[3],sre.SemanticAttr.Role.LEFTSUPER),this.makeIndex(a,b[4],sre.SemanticAttr.Role.RIGHTSUB),this.makeIndex(a,b[5],sre.SemanticAttr.Role.RIGHTSUPER),
|
580
|
+
this.collapsedChildren_(b),a;if(a.type===sre.SemanticAttr.Type.PUNCTUATED)return sre.RebuildStree.isPunctuated(b)&&(b=b.splice(1,1)[0].slice(1),a.contentNodes=b.map(goog.bind(this.makePunctuation,this))),a;a.type===sre.SemanticAttr.Role.UNDEROVER&&(c=this.createNode(b[1][0]),a.childNodes[1].role===sre.SemanticAttr.Role.OVERACCENT?(c.type=sre.SemanticAttr.Type.OVERSCORE,a.type=sre.SemanticAttr.Type.UNDERSCORE):(c.type=sre.SemanticAttr.Type.UNDERSCORE,a.type=sre.SemanticAttr.Type.OVERSCORE),c.role=
|
581
|
+
sre.SemanticAttr.Role.UNDEROVER,c.embellished=a.embellished,c.fencePointer=a.fencePointer,this.collapsedChildren_(b));return a};sre.RebuildStree.prototype.createNode=function(a){var b=this.factory.makeNode(a);return this.nodeDict[a.toString()]=b};
|
582
|
+
sre.RebuildStree.prototype.collapsedChildren_=function(a){var b=goog.bind(function(a){var c=this.nodeDict[a[0]];c.childNodes=[];for(var e=1,f=a.length;e<f;e++){var g=a[e];c.childNodes.push(sre.SemanticSkeleton.simpleCollapseStructure(g)?this.nodeDict[g]:b(g))}return c},this);b(a)};sre.SpeechGenerator=function(){};sre.SpeechGenerator.prototype.getSpeech=function(a,b){};sre.SpeechGenerator.prototype.getRebuilt=function(){};sre.SpeechGenerator.prototype.setRebuilt=function(a){};sre.SpeechGenerator.prototype.setOptions=function(a){};sre.SpeechGenerator.prototype.getOptions=function(){};sre.SpeechGenerator.prototype.start=function(){};sre.SpeechGenerator.prototype.end=function(){};sre.AuditoryDescription=function(a){this.context=a.context||"";this.text=a.text||"";this.userValue=a.userValue||"";this.annotation=a.annotation||"";this.attributes=a.attributes||{};this.personality=a.personality||{}};sre.AuditoryDescription.create=function(a,b){a.text=sre.Grammar.getInstance().apply(a.text,b||{});return new sre.AuditoryDescription(a)};sre.AuditoryDescription.prototype.isEmpty=function(){return 0==this.context.length&&0==this.text.length&&0==this.userValue.length&&0==this.annotation.length};
|
583
|
+
sre.AuditoryDescription.prototype.clone=function(){if(this.personality){var a={};for(var b in this.personality)a=this.personality[b]}if(this.attributes){var c={};for(b in this.attributes)c=this.attributes[b]}return new sre.AuditoryDescription({context:this.context,text:this.text,userValue:this.userValue,annotation:this.annotation,personality:a,attributes:c})};
|
584
|
+
sre.AuditoryDescription.prototype.toString=function(){return'AuditoryDescription(context="'+this.context+'" text="'+this.text+'" userValue="'+this.userValue+'" annotation="'+this.annotation+'")'};sre.AuditoryDescription.prototype.descriptionString=function(){return this.context&&this.text?this.context+" "+this.text:this.context||this.text};sre.AuditoryDescription.prototype.descriptionSpan=function(){return new sre.Span(this.descriptionString(),this.attributes)};
|
585
|
+
sre.AuditoryDescription.prototype.equals=function(a){return this.context==a.context&&this.text==a.text&&this.userValue==a.userValue&&this.annotation==a.annotation};sre.SpeechRule=function(a,b,c,d){this.name=a;this.dynamicCstr=b;this.precondition=c;this.action=d;this.context=null};sre.SpeechRule.prototype.toString=function(){return this.name+" | "+this.dynamicCstr.toString()+" | "+this.precondition.toString()+" ==> "+this.action.toString()};sre.SpeechRule.Type={NODE:"NODE",MULTI:"MULTI",TEXT:"TEXT",PERSONALITY:"PERSONALITY"};
|
586
|
+
sre.SpeechRule.Type.fromString=function(a){switch(a){case "[n]":return sre.SpeechRule.Type.NODE;case "[m]":return sre.SpeechRule.Type.MULTI;case "[t]":return sre.SpeechRule.Type.TEXT;case "[p]":return sre.SpeechRule.Type.PERSONALITY;default:throw"Parse error: "+a;}};
|
587
|
+
sre.SpeechRule.Type.toString=function(a){switch(a){case sre.SpeechRule.Type.NODE:return"[n]";case sre.SpeechRule.Type.MULTI:return"[m]";case sre.SpeechRule.Type.TEXT:return"[t]";case sre.SpeechRule.Type.PERSONALITY:return"[p]";default:throw"Unknown type error: "+a;}};sre.SpeechRule.Component=function(a){this.type=a.type;this.content=a.content;this.attributes=a.attributes;this.grammar=a.grammar};
|
588
|
+
sre.SpeechRule.Component.fromString=function(a){var b={};b.type=sre.SpeechRule.Type.fromString(a.substring(0,3));a=a.slice(3).trim();if(!a)throw new sre.SpeechRule.OutputError("Missing content.");switch(b.type){case sre.SpeechRule.Type.TEXT:if('"'==a[0]){var c=sre.SpeechRule.splitString_(a,"\\(")[0].trim();if('"'!=c.slice(-1))throw new sre.SpeechRule.OutputError("Invalid string syntax.");b.content=c;a=a.slice(c.length).trim();-1==a.indexOf("(")&&(a="");break}case sre.SpeechRule.Type.NODE:case sre.SpeechRule.Type.MULTI:c=
|
589
|
+
a.indexOf(" ("),-1==c?(b.content=a.trim(),a=""):(b.content=a.substring(0,c).trim(),a=a.slice(c).trim())}a&&(a=sre.SpeechRule.Component.attributesFromString(a),a.grammar&&(b.grammar=a.grammar,delete a.grammar),Object.keys(a).length&&(b.attributes=a));return b=new sre.SpeechRule.Component(b)};sre.SpeechRule.Component.prototype.toString=function(){var a=""+sre.SpeechRule.Type.toString(this.type);a+=this.content?" "+this.content:"";var b=this.attributesToString();return a+(b?" "+b:"")};
|
590
|
+
sre.SpeechRule.Component.grammarFromString=function(a){return sre.Grammar.parseInput(a)};sre.SpeechRule.Component.prototype.grammarToString=function(){return this.getGrammar().join(":")};sre.SpeechRule.Component.prototype.getGrammar=function(){var a=[],b;for(b in this.grammar)!0===this.grammar[b]?a.push(b):!1===this.grammar[b]?a.push("!"+b):a.push(b+"="+this.grammar[b]);return a};
|
591
|
+
sre.SpeechRule.Component.attributesFromString=function(a){if("("!=a[0]||")"!=a.slice(-1))throw new sre.SpeechRule.OutputError("Invalid attribute expression: "+a);var b={};a=sre.SpeechRule.splitString_(a.slice(1,-1),",");for(var c=0,d=a.length;c<d;c++){var e=a[c],f=e.indexOf(":");if(-1==f)b[e.trim()]="true";else{var g=e.substring(0,f).trim();e=e.slice(f+1).trim();b[g]="grammar"===g?sre.SpeechRule.Component.grammarFromString(e):b[g]=e}}return b};
|
592
|
+
sre.SpeechRule.Component.prototype.attributesToString=function(){var a=this.getAttributes(),b=this.grammarToString();b&&a.push("grammar:"+b);return 0<a.length?"("+a.join(", ")+")":""};sre.SpeechRule.Component.prototype.getAttributes=function(){var a=[],b;for(b in this.attributes){var c=this.attributes[b];"true"===c?a.push(b):a.push(b+":"+c)}return a};sre.SpeechRule.Action=function(a){this.components=a};
|
593
|
+
sre.SpeechRule.Action.fromString=function(a){a=sre.SpeechRule.splitString_(a,";").filter(function(a){return a.match(/\S/)}).map(function(a){return a.trim()});for(var b=[],c=0,d=a.length;c<d;c++){var e=sre.SpeechRule.Component.fromString(a[c]);e&&b.push(e)}return new sre.SpeechRule.Action(b)};sre.SpeechRule.Action.prototype.toString=function(){return this.components.map(function(a){return a.toString()}).join("; ")};sre.SpeechRule.Precondition=function(a,b){this.query=a;this.constraints=b||[]};
|
594
|
+
sre.SpeechRule.Precondition.prototype.toString=function(){var a=this.constraints.join(", ");return this.query+", "+a};
|
595
|
+
sre.SpeechRule.splitString_=function(a,b){for(var c=[],d="";""!=a;){var e=a.search(b);if(-1==e){if(0!=(a.match(/"/g)||[]).length%2)throw new sre.SpeechRule.OutputError("Invalid string in expression: "+a);c.push(d+a);a=d=""}else if(0==(a.substring(0,e).match(/"/g)||[]).length%2)c.push(d+a.substring(0,e)),d="",a=a.substring(e+1);else{var f=a.substring(e).search('"');if(-1==f)throw new sre.SpeechRule.OutputError("Invalid string in expression: "+a);d+=a.substring(0,e+f+1);a=a.substring(e+f+1)}}d&&c.push(d);
|
596
|
+
return c};sre.SpeechRule.OutputError=function(a){sre.Engine.Error.call(this,a);this.name="RuleError"};goog.inherits(sre.SpeechRule.OutputError,sre.Engine.Error);sre.SpeechRuleFunctions=function(){};sre.SpeechRuleFunctions.Store_=function(a,b){this.prefix_=a;this.store_=b};sre.SpeechRuleFunctions.Store_.prototype.add=function(a,b){this.checkCustomFunctionSyntax_(a)&&(this.store_[a]=b)};sre.SpeechRuleFunctions.Store_.prototype.addStore=function(a){for(var b=Object.keys(a.store_),c=0,d;d=b[c];c++)this.add(d,a.store_[d])};sre.SpeechRuleFunctions.Store_.prototype.lookup=function(a){return this.store_[a]};
|
597
|
+
sre.SpeechRuleFunctions.CustomQueries=function(){sre.SpeechRuleFunctions.Store_.call(this,"CQF",{})};goog.inherits(sre.SpeechRuleFunctions.CustomQueries,sre.SpeechRuleFunctions.Store_);sre.SpeechRuleFunctions.CustomStrings=function(){sre.SpeechRuleFunctions.Store_.call(this,"CSF",{})};goog.inherits(sre.SpeechRuleFunctions.CustomStrings,sre.SpeechRuleFunctions.Store_);sre.SpeechRuleFunctions.ContextFunctions=function(){sre.SpeechRuleFunctions.Store_.call(this,"CTXF",{})};
|
598
|
+
goog.inherits(sre.SpeechRuleFunctions.ContextFunctions,sre.SpeechRuleFunctions.Store_);sre.SpeechRuleFunctions.Store_.prototype.checkCustomFunctionSyntax_=function(a){return a.match(new RegExp("^"+this.prefix_))?!0:(console.error("FunctionError: Invalid function name. Expected prefix "+this.prefix_),!1)};sre.SpeechRuleContext=function(){this.customQueries=new sre.SpeechRuleFunctions.CustomQueries;this.customStrings=new sre.SpeechRuleFunctions.CustomStrings;this.contextFunctions=new sre.SpeechRuleFunctions.ContextFunctions};sre.SpeechRuleContext.prototype.applyCustomQuery=function(a,b){return(b=this.customQueries.lookup(b))?b(a):null};sre.SpeechRuleContext.prototype.applySelector=function(a,b){return this.applyCustomQuery(a,b)||sre.XpathUtil.evalXPath(b,a)};
|
599
|
+
sre.SpeechRuleContext.prototype.applyQuery=function(a,b){a=this.applySelector(a,b);return 0<a.length?a[0]:null};sre.SpeechRuleContext.prototype.applyConstraint=function(a,b){return!!this.applyQuery(a,b)||sre.XpathUtil.evaluateBoolean(b,a)};sre.SpeechRuleContext.prototype.constructString=function(a,b){if(!b)return"";if('"'==b.charAt(0))return b.slice(1,-1);var c=this.customStrings.lookup(b);return c?c(a):sre.XpathUtil.evaluateString(b,a)};sre.SpeechRuleEvaluator=function(){};sre.SpeechRuleEvaluator.prototype.evaluateDefault=goog.abstractMethod;sre.SpeechRuleStore=function(){};sre.SpeechRuleStore.prototype.addRule=goog.abstractMethod;sre.SpeechRuleStore.prototype.deleteRule=goog.abstractMethod;sre.SpeechRuleStore.prototype.findRule=goog.abstractMethod;sre.SpeechRuleStore.prototype.findAllRules=goog.abstractMethod;sre.SpeechRuleStore.prototype.lookupRule=goog.abstractMethod;sre.SpeechRuleStore.prototype.defineRule=goog.abstractMethod;sre.TrieNode=function(){};sre.TrieNode.prototype.getConstraint=function(){};sre.TrieNode.prototype.getKind=function(){};sre.TrieNode.prototype.applyTest=function(a){};sre.TrieNode.prototype.addChild=function(a){};sre.TrieNode.prototype.getChild=function(a){};sre.TrieNode.prototype.getChildren=function(){};sre.TrieNode.prototype.findChildren=function(a){};sre.TrieNode.Kind={ROOT:"root",DYNAMIC:"dynamic",QUERY:"query",BOOLEAN:"boolean",STATIC:"static"};sre.AbstractTrieNode=function(a,b){this.constraint=a;this.test=b;this.children_={};this.kind=sre.TrieNode.Kind.ROOT};sre.AbstractTrieNode.prototype.getConstraint=function(){return this.constraint};sre.AbstractTrieNode.prototype.getKind=function(){return this.kind};sre.AbstractTrieNode.prototype.applyTest=function(a){return this.test(a)};sre.AbstractTrieNode.prototype.addChild=function(a){var b=a.getConstraint(),c=this.children_[b];this.children_[b]=a;return c};
|
600
|
+
sre.AbstractTrieNode.prototype.getChild=function(a){return this.children_[a]};sre.AbstractTrieNode.prototype.getChildren=function(){var a=[],b;for(b in this.children_)a.push(this.children_[b]);return a};sre.AbstractTrieNode.prototype.findChildren=function(a){var b=[],c;for(c in this.children_){var d=this.children_[c];d.applyTest(a)&&b.push(d)}return b};sre.AbstractTrieNode.prototype.toString=function(){return this.constraint};
|
601
|
+
sre.StaticTrieNode=function(a,b){sre.AbstractTrieNode.call(this,a,b);this.kind=sre.TrieNode.Kind.STATIC;this.rule_=null};goog.inherits(sre.StaticTrieNode,sre.AbstractTrieNode);sre.StaticTrieNode.prototype.getRule=function(){return this.rule_};sre.StaticTrieNode.prototype.setRule=function(a){this.rule_&&sre.Debugger.getInstance().output("Replacing rule "+this.rule_+" with "+a);this.rule_=a};
|
602
|
+
sre.StaticTrieNode.prototype.toString=function(){return this.getRule()?this.constraint+"\n==> "+this.getRule().action:this.constraint};sre.TrieNodeFactory={};sre.TrieNodeFactory.getNode=function(a,b,c){switch(a){case sre.TrieNode.Kind.ROOT:return new sre.RootTrieNode;case sre.TrieNode.Kind.DYNAMIC:return new sre.DynamicTrieNode(b);case sre.TrieNode.Kind.QUERY:return new sre.QueryTrieNode(b,c);case sre.TrieNode.Kind.BOOLEAN:return new sre.BooleanTrieNode(b,c);default:return null}};sre.RootTrieNode=function(){sre.AbstractTrieNode.call(this,"",function(){return!0});this.kind=sre.TrieNode.Kind.ROOT};goog.inherits(sre.RootTrieNode,sre.AbstractTrieNode);
|
603
|
+
sre.DynamicTrieNode=function(a){sre.AbstractTrieNode.call(this,a,function(b){return b===a});this.kind=sre.TrieNode.Kind.DYNAMIC};goog.inherits(sre.DynamicTrieNode,sre.AbstractTrieNode);
|
604
|
+
sre.TrieNodeFactory.constraintTest_=function(a){if(a.match(/^self::\*$/))return function(a){return!0};if(a.match(/^self::\w+$/)){var b=a.slice(6).toUpperCase();return function(a){return a.tagName&&sre.DomUtil.tagName(a)===b}}if(a.match(/^self::\w+:\w+$/)){a=a.split(":");var c=sre.XpathUtil.resolveNameSpace(a[2]);if(!c)return null;b=a[3].toUpperCase();return function(a){return a.localName&&a.localName.toUpperCase()===b&&a.namespaceURI===c}}if(a.match(/^@\w+$/)){var d=a.slice(1);return function(a){return a.hasAttribute&&
|
605
|
+
a.hasAttribute(d)}}if(a.match(/^@\w+="[\w\d ]+"$/)){a=a.split("=");d=a[0].slice(1);var e=a[1].slice(1,-1);return function(a){return a.hasAttribute&&a.hasAttribute(d)&&a.getAttribute(d)===e}}return a.match(/^@\w+!="[\w\d ]+"$/)?(a=a.split("!="),d=a[0].slice(1),e=a[1].slice(1,-1),function(a){return!a.hasAttribute||!a.hasAttribute(d)||a.getAttribute(d)!==e}):a.match(/^contains\(\s*@grammar\s*,\s*"[\w\d ]+"\s*\)$/)?(a=a.split('"'),e=a[1],function(a){return sre.Grammar.getInstance().getParameter(e)}):
|
606
|
+
a.match(/^not\(\s*contains\(\s*@grammar\s*,\s*"[\w\d ]+"\s*\)\s*\)$/)?(a=a.split('"'),e=a[1],function(a){return!sre.Grammar.getInstance().getParameter(e)}):null};sre.QueryTrieNode=function(a,b){this.context_=b;sre.StaticTrieNode.call(this,a,sre.TrieNodeFactory.constraintTest_(a));this.kind=sre.TrieNode.Kind.QUERY};goog.inherits(sre.QueryTrieNode,sre.StaticTrieNode);sre.QueryTrieNode.prototype.applyTest=function(a){return this.test?this.test(a):this.context_.applyQuery(a,this.constraint)===a};
|
607
|
+
sre.BooleanTrieNode=function(a,b){this.context_=b;sre.StaticTrieNode.call(this,a,sre.TrieNodeFactory.constraintTest_(a));this.kind=sre.TrieNode.Kind.BOOLEAN};goog.inherits(sre.BooleanTrieNode,sre.StaticTrieNode);sre.BooleanTrieNode.prototype.applyTest=function(a){return this.test?this.test(a):this.context_.applyConstraint(a,this.constraint)};sre.Trie=function(a){this.store=a;this.root=sre.TrieNodeFactory.getNode(sre.TrieNode.Kind.ROOT,"",this.store.context)};sre.Trie.prototype.addRule=function(a){for(var b=this.root,c=a.context,d=a.dynamicCstr.getValues(),e=0,f=d.length;e<f;e++)b=this.addNode_(b,d[e],sre.TrieNode.Kind.DYNAMIC,c);b=this.addNode_(b,a.precondition.query,sre.TrieNode.Kind.QUERY,c);d=a.precondition.constraints;e=0;for(f=d.length;e<f;e++)b=this.addNode_(b,d[e],sre.TrieNode.Kind.BOOLEAN,c);b.setRule(a)};
|
608
|
+
sre.Trie.prototype.addNode_=function(a,b,c,d){var e=a.getChild(b);e||(e=sre.TrieNodeFactory.getNode(c,b,d),a.addChild(e));return e};
|
609
|
+
sre.Trie.prototype.lookupRules=function(a,b){for(var c=[this.root],d=[];b.length;){for(var e=b.shift(),f=[];c.length;){var g=c.shift();g=g.getChildren();g.forEach(function(a){a.getKind()===sre.TrieNode.Kind.DYNAMIC&&-1===e.indexOf(a.getConstraint())||f.push(a)})}c=f.slice()}for(;c.length;)g=c.shift(),g.getRule&&(b=g.getRule())&&d.push(b),g=g.findChildren(a),c=c.concat(g);return d};
|
610
|
+
sre.Trie.prototype.hasSubtrie=function(a){for(var b=this.root,c=0,d=a.length;c<d;c++)if(b=b.getChild(a[c]),!b)return!1;return!0};sre.Trie.prototype.toString=function(){return sre.Trie.printWithDepth_(this.root,0,"")};sre.Trie.prototype.collectRules=function(){return sre.Trie.collectRules_(this.root)};sre.Trie.prototype.order=function(){return sre.Trie.order_(this.root)};
|
611
|
+
sre.Trie.printWithDepth_=function(a,b,c){var d=Array(b+2).join(b)+": ";c+=d+a.toString()+"\n";a=a.getChildren();d=0;for(var e;e=a[d];d++)c=sre.Trie.printWithDepth_(e,b+1,c);return c};sre.Trie.order_=function(a){a=a.getChildren();if(!a.length)return 0;var b=Math.max.apply(null,a.map(sre.Trie.order_));return Math.max(a.length,b)};
|
612
|
+
sre.Trie.collectRules_=function(a){var b=[];for(a=[a];a.length;){var c=a.shift();if(c.getKind()===sre.TrieNode.Kind.QUERY||c.getKind()===sre.TrieNode.Kind.BOOLEAN){var d=c.getRule();d&&b.unshift(d)}a=a.concat(c.getChildren())}return b};sre.Trie.prototype.enumerate=function(a){return this.enumerate_(this.root,a)};
|
613
|
+
sre.Trie.prototype.enumerate_=function(a,b){b=b||{};a=a.getChildren();for(var c=0,d;d=a[c];c++)d.kind===sre.TrieNode.Kind.DYNAMIC&&(b[d.getConstraint()]=this.enumerate_(d,b[d.getConstraint()]));return b};sre.BaseRuleStore=function(){this.context=new sre.SpeechRuleContext;this.customQueries=this.context.customQueries;this.customStrings=this.context.customStrings;this.contextFunctions=this.context.contextFunctions;this.speechRules_=[];this.trie=new sre.Trie(this);this.parseOrder=sre.DynamicCstr.DEFAULT_ORDER;this.parser=new sre.DynamicCstr.Parser(this.parseOrder);this.locale=sre.DynamicCstr.DEFAULT_VALUES[sre.DynamicCstr.Axis.LOCALE];this.modality=sre.DynamicCstr.DEFAULT_VALUES[sre.DynamicCstr.Axis.MODALITY];
|
614
|
+
this.initialized=!1};sre.BaseRuleStore.prototype.lookupRule=function(a,b){if(!a||a.nodeType!=sre.DomUtil.NodeType.ELEMENT_NODE&&a.nodeType!=sre.DomUtil.NodeType.TEXT_NODE)return null;a=this.trie.lookupRules(a,b.allProperties());return 0<a.length?this.pickMostConstraint_(b,a):null};
|
615
|
+
sre.BaseRuleStore.prototype.defineRule=function(a,b,c,d,e){try{var f=sre.SpeechRule.Action.fromString(c),g=Array.prototype.slice.call(arguments,4),h=new sre.SpeechRule.Precondition(d,g),k=this.parseCstr(b);var l=new sre.SpeechRule(a,k,h,f)}catch(m){if("RuleError"==m.name)return console.error("Rule Error ",d,"("+b+"):",m.message),null;throw m;}this.addRule(l);return l};sre.BaseRuleStore.prototype.addRule=function(a){a.context=this.context;this.trie.addRule(a);this.speechRules_.unshift(a)};
|
616
|
+
sre.BaseRuleStore.prototype.deleteRule=function(a){a=this.speechRules_.indexOf(a);-1!=a&&this.speechRules_.splice(a,1)};sre.BaseRuleStore.prototype.findRule=function(a){for(var b=0,c;c=this.speechRules_[b];b++)if(a(c))return c;return null};sre.BaseRuleStore.prototype.findAllRules=function(a){return this.speechRules_.filter(a)};sre.BaseRuleStore.prototype.evaluateDefault=function(a){return[sre.AuditoryDescription.create({text:a.textContent})]};
|
617
|
+
sre.BaseRuleStore.prototype.debugSpeechRule=function(a,b){var c=a.precondition,d=a.context.applyQuery(b,c.query);sre.Debugger.getInstance().output(c.query,d?d.toString():d);c.constraints.forEach(goog.bind(function(c){sre.Debugger.getInstance().output(c,a.context.applyConstraint(b,c))},this))};sre.BaseRuleStore.prototype.initialize=goog.abstractMethod;
|
618
|
+
sre.BaseRuleStore.prototype.removeDuplicates=function(a){for(var b=this.speechRules_.length-1,c;c=this.speechRules_[b];b--)c!=a&&a.dynamicCstr.equal(c.dynamicCstr)&&sre.BaseRuleStore.comparePreconditions_(c,a)&&this.speechRules_.splice(b,1)};
|
619
|
+
sre.BaseRuleStore.prototype.pickMostConstraint_=function(a,b){var c=sre.Engine.getInstance().comparator;b.sort(function(a,b){return c.compare(a.dynamicCstr,b.dynamicCstr)||b.precondition.constraints.length-a.precondition.constraints.length});sre.Debugger.getInstance().generateOutput(goog.bind(function(){return b.map(function(a){return a.name+"("+a.dynamicCstr.toString()+")"})},this));return b[0]};
|
620
|
+
sre.BaseRuleStore.compareStaticConstraints_=function(a,b){if(a.length!=b.length)return!1;for(var c=0,d;d=a[c];c++)if(-1==b.indexOf(d))return!1;return!0};sre.BaseRuleStore.comparePreconditions_=function(a,b){a=a.precondition;b=b.precondition;return a.query!=b.query?!1:sre.BaseRuleStore.compareStaticConstraints_(a.constraints,b.constraints)};sre.BaseRuleStore.prototype.getSpeechRules=function(){return this.speechRules_};sre.BaseRuleStore.prototype.setSpeechRules=function(a){this.speechRules_=a};
|
621
|
+
sre.BaseRuleStore.prototype.parseCstr=function(a){return this.parser.parse(this.locale+"."+this.modality+"."+a)};sre.ClearspeakPreferences=function(a,b){sre.DynamicCstr.call(this,a);this.preference=b};goog.inherits(sre.ClearspeakPreferences,sre.DynamicCstr);sre.ClearspeakPreferences.prototype.equal=function(a){if(!sre.ClearspeakPreferences.superClass_.equal.call(this,a))return!1;var b=Object.keys(this.preference);a=a.preference;if(b.length!==Object.keys(a).length)return!1;for(var c=0,d;d=b[c];c++)if(this.preference[d]!==a[d])return!1;return!0};sre.ClearspeakPreferences.AUTO="Auto";
|
622
|
+
sre.ClearspeakPreferences.PREFERENCES=new sre.DynamicProperties({AbsoluteValue:["Auto","AbsEnd","Cardinality","Determinant"],Bar:["Auto","Conjugate"],Caps:["Auto","SayCaps"],CombinationPermutation:["Auto","ChoosePermute"],Ellipses:["Auto","AndSoOn"],Exponent:["Auto","AfterPower","Ordinal","OrdinalPower"],Fraction:"Auto EndFrac FracOver General GeneralEndFrac Ordinal Over OverEndFrac Per".split(" "),Functions:["Auto","None","Reciprocal"],ImpliedTimes:["Auto","MoreImpliedTimes","None"],Log:["Auto",
|
623
|
+
"LnAsNaturalLog"],Matrix:"Auto Combinatoric EndMatrix EndVector SilentColNum SpeakColNum Vector".split(" "),MultiLineLabel:"Auto Case Constraint Equation Line None Row Step".split(" "),MultiLineOverview:["Auto","None"],MultiLinePausesBetweenColumns:["Auto","Long","Short"],MultsymbolDot:["Auto","Dot"],MultsymbolX:["Auto","By","Cross"],Paren:"Auto CoordPoint Interval Silent Speak SpeakNestingLevel".split(" "),Prime:["Auto","Angle","Length"],Roots:["Auto","PosNegSqRoot","PosNegSqRootEnd","RootEnd"],
|
624
|
+
SetMemberSymbol:["Auto","Belongs","Element","Member"],Sets:["Auto","SilentBracket","woall","woAll"],TriangleSymbol:["Auto","Delta"],Trig:["Auto","ArcTrig","TrigInverse","Reciprocal"],VerticalLine:["Auto","Divides","Given","SuchThat"]});
|
625
|
+
sre.ClearspeakPreferences.comparator=function(){return new sre.ClearspeakPreferences.Comparator(sre.Engine.getInstance().dynamicCstr,sre.DynamicProperties.create([sre.DynamicCstr.DEFAULT_VALUES[sre.DynamicCstr.Axis.LOCALE]],[sre.DynamicCstr.DEFAULT_VALUES[sre.DynamicCstr.Axis.MODALITY]],[sre.DynamicCstr.DEFAULT_VALUES[sre.DynamicCstr.Axis.DOMAIN]],[sre.DynamicCstr.DEFAULT_VALUES[sre.DynamicCstr.Axis.STYLE]]))};
|
626
|
+
sre.ClearspeakPreferences.Comparator=function(a,b){sre.DynamicCstr.DefaultComparator.call(this,a,b);this.preference=a.preference||{}};goog.inherits(sre.ClearspeakPreferences.Comparator,sre.DynamicCstr.DefaultComparator);sre.ClearspeakPreferences.Comparator.prototype.match=function(a){if(!sre.ClearspeakPreferences.Comparator.superClass_.match.call(this,a))return!1;if(!a.preference)return!0;for(var b=Object.keys(a.preference),c=0,d;d=b[c];c++)if(this.preference[d]!==a.preference[d])return!1;return!0};
|
627
|
+
sre.ClearspeakPreferences.Comparator.prototype.compare=function(a,b){var c=sre.ClearspeakPreferences.Comparator.superClass_.compare.call(this,a,b);if(0!==c)return c;if(!a.preference&&b.preference)return 1;if(a.preference&&!b.preference)return-1;if(!a.preference&&!b.preference)return 0;a=Object.keys(a.preference).length;b=Object.keys(b.preference).length;return a>b?-1:a<b?1:0};
|
628
|
+
sre.ClearspeakPreferences.Parser=function(){sre.DynamicCstr.Parser.call(this,[sre.DynamicCstr.Axis.LOCALE,sre.DynamicCstr.Axis.MODALITY,sre.DynamicCstr.Axis.DOMAIN,sre.DynamicCstr.Axis.STYLE])};goog.inherits(sre.ClearspeakPreferences.Parser,sre.DynamicCstr.Parser);
|
629
|
+
sre.ClearspeakPreferences.Parser.prototype.parse=function(a){var b=sre.ClearspeakPreferences.Parser.superClass_.parse.call(this,a);a=b.getValue(sre.DynamicCstr.Axis.STYLE);b=b.getValue(sre.DynamicCstr.Axis.LOCALE);if(a===sre.DynamicCstr.DEFAULT_VALUE)return new sre.ClearspeakPreferences({locale:b,modality:sre.DynamicCstr.DEFAULT_VALUES[sre.DynamicCstr.Axis.MODALITY],domain:"clearspeak",style:sre.DynamicCstr.DEFAULT_VALUE},{});a=this.fromPreference(a);return new sre.ClearspeakPreferences({locale:b,
|
630
|
+
modality:sre.DynamicCstr.DEFAULT_VALUES[sre.DynamicCstr.Axis.MODALITY],domain:"clearspeak",style:this.toPreference(a)},a)};sre.ClearspeakPreferences.Parser.prototype.fromPreference=function(a){return sre.ClearspeakPreferences.fromPreference(a)};
|
631
|
+
sre.ClearspeakPreferences.fromPreference=function(a){a=a.split(":");for(var b={},c=sre.ClearspeakPreferences.PREFERENCES.getProperties(),d=Object.keys(c),e=0,f;f=a[e];e++)if(f=f.split("_"),-1!==d.indexOf(f[0])){var g=f[1];g&&g!==sre.ClearspeakPreferences.AUTO&&-1!==c[f[0]].indexOf(g)&&(b[f[0]]=f[1])}return b};sre.ClearspeakPreferences.Parser.prototype.toPreference=function(a){return sre.ClearspeakPreferences.toPreference(a)};
|
632
|
+
sre.ClearspeakPreferences.toPreference=function(a){for(var b=Object.keys(a),c=[],d=0;d<b.length;d++)c.push(b[d]+"_"+a[b[d]]);return c.length?c.join(":"):sre.DynamicCstr.DEFAULT_VALUE};sre.ClearspeakPreferences.LOCALE_PREFERENCES=null;
|
633
|
+
sre.ClearspeakPreferences.getLocalePreferences=function(a){sre.ClearspeakPreferences.LOCALE_PREFERENCES||(a=a||sre.MathCompoundStore.getInstance().enumerate(sre.SpeechRuleEngine.getInstance().enumerate()),sre.ClearspeakPreferences.LOCALE_PREFERENCES=sre.ClearspeakPreferences.getLocalePreferences_(a));return sre.ClearspeakPreferences.LOCALE_PREFERENCES};
|
634
|
+
sre.ClearspeakPreferences.getLocalePreferences_=function(a){var b={},c;for(c in a)if(a[c].speech&&a[c].speech.clearspeak){var d=Object.keys(a[c].speech.clearspeak),e=b[c]={},f;for(f in sre.ClearspeakPreferences.PREFERENCES.getProperties()){var g=sre.ClearspeakPreferences.PREFERENCES.getProperties()[f],h=[f+"_Auto"];if(g){g=$jscomp.makeIterator(g);for(var k=g.next();!k.done;k=g.next())k=k.value,-1!==d.indexOf(f+"_"+k)&&h.push(f+"_"+k)}e[f]=h}}return b};
|
635
|
+
sre.ClearspeakPreferences.getSpeechExplorer=function(a){return(a=a.attached)&&a.length?a.find(function(a){return a.speechGenerator&&"speech"===a.speechGenerator.getOptions().modality}):null};
|
636
|
+
sre.ClearspeakPreferences.smartPreferences=function(a,b){b=sre.ClearspeakPreferences.getLocalePreferences()[b];if(!b)return[];a=sre.ClearspeakPreferences.getSpeechExplorer(a);if(!a)return[{type:"radio",content:"Standard",id:"clearspeak-default",variable:"speechRules"}];a=sre.ClearspeakPreferences.relevantPreferences(a.walker.getFocus().getSemanticPrimary());var c=sre.Engine.DOMAIN_TO_STYLES.clearspeak;return[{type:"radio",content:"No Preferences",id:"clearspeak-default",variable:"speechRules"},{type:"radio",
|
637
|
+
content:"Current Preferences",id:"clearspeak-"+c,variable:"speechRules"},{type:"rule"},{type:"label",content:"Preferences for "+a},{type:"rule"}].concat(b[a].map(function(a){a=a.split("_");return{type:"radio",content:a[1],id:"clearspeak-"+sre.ClearspeakPreferences.addPreference(c,a[0],a[1]),variable:"speechRules"}}))};sre.ClearspeakPreferences.relevantPreferences=function(a){var b=sre.ClearspeakPreferences.SEMANTIC_MAPPING_[a.type];return b?b[a.role]||b[""]||"ImpliedTimes":"ImpliedTimes"};
|
638
|
+
sre.ClearspeakPreferences.REVERSE_MAPPING_=[["AbsoluteValue",sre.SemanticAttr.Type.FENCED,sre.SemanticAttr.Role.NEUTRAL],["Bar",sre.SemanticAttr.Type.OVERSCORE,sre.SemanticAttr.Role.OVERACCENT],["Caps",sre.SemanticAttr.Type.IDENTIFIER,sre.SemanticAttr.Role.LATINLETTER],["CombinationPermutation",sre.SemanticAttr.Type.APPL,sre.SemanticAttr.Role.UNKNOWN],["Ellipses",sre.SemanticAttr.Type.PUNCTUATION,sre.SemanticAttr.Role.ELLIPSIS],["Exponent",sre.SemanticAttr.Type.SUPERSCRIPT,""],["Fraction",sre.SemanticAttr.Type.FRACTION,
|
639
|
+
""],["Functions",sre.SemanticAttr.Type.APPL,sre.SemanticAttr.Role.SIMPLEFUNC],["ImpliedTimes",sre.SemanticAttr.Type.OPERATOR,sre.SemanticAttr.Role.IMPLICIT],["Log",sre.SemanticAttr.Type.APPL,sre.SemanticAttr.Role.PREFIXFUNC],["Matrix",sre.SemanticAttr.Type.MATRIX,""],["Matrix",sre.SemanticAttr.Type.VECTOR,""],["MultiLineLabel",sre.SemanticAttr.Type.MULTILINE,sre.SemanticAttr.Role.LABEL],["MultiLineOverview",sre.SemanticAttr.Type.MULTILINE,sre.SemanticAttr.Role.TABLE],["MultiLinePausesBetweenColumns",
|
640
|
+
sre.SemanticAttr.Type.MULTILINE,sre.SemanticAttr.Role.TABLE],["MultiLineLabel",sre.SemanticAttr.Type.TABLE,sre.SemanticAttr.Role.LABEL],["MultiLineOverview",sre.SemanticAttr.Type.TABLE,sre.SemanticAttr.Role.TABLE],["MultiLinePausesBetweenColumns",sre.SemanticAttr.Type.TABLE,sre.SemanticAttr.Role.TABLE],["MultiLineLabel",sre.SemanticAttr.Type.CASES,sre.SemanticAttr.Role.LABEL],["MultiLineOverview",sre.SemanticAttr.Type.CASES,sre.SemanticAttr.Role.TABLE],["MultiLinePausesBetweenColumns",sre.SemanticAttr.Type.CASES,
|
641
|
+
sre.SemanticAttr.Role.TABLE],["MultsymbolDot",sre.SemanticAttr.Type.OPERATOR,sre.SemanticAttr.Role.MULTIPLICATION],["MultsymbolX",sre.SemanticAttr.Type.OPERATOR,sre.SemanticAttr.Role.MULTIPLICATION],["Paren",sre.SemanticAttr.Type.FENCED,sre.SemanticAttr.Role.LEFTRIGHT],["Prime",sre.SemanticAttr.Type.SUPERSCRIPT,sre.SemanticAttr.Role.PRIME],["Roots",sre.SemanticAttr.Type.ROOT,""],["Roots",sre.SemanticAttr.Type.SQRT,""],["SetMemberSymbol",sre.SemanticAttr.Type.RELATION,sre.SemanticAttr.Role.ELEMENT],
|
642
|
+
["Sets",sre.SemanticAttr.Type.FENCED,sre.SemanticAttr.Role.SETEXT],["TriangleSymbol",sre.SemanticAttr.Type.IDENTIFIER,sre.SemanticAttr.Role.GREEKLETTER],["Trig",sre.SemanticAttr.Type.APPL,sre.SemanticAttr.Role.PREFIXFUNC],["VerticalLine",sre.SemanticAttr.Type.PUNCTUATED,sre.SemanticAttr.Role.VBAR]];sre.ClearspeakPreferences.SEMANTIC_MAPPING_=function(){for(var a={},b=0,c;c=sre.ClearspeakPreferences.REVERSE_MAPPING_[b];b++){var d=c[0],e=a[c[1]];e||(e={},a[c[1]]=e);e[c[2]]=d}return a}();
|
643
|
+
sre.ClearspeakPreferences.currentPreference=function(a){var b=sre.Engine.DOMAIN_TO_STYLES.clearspeak;return"default"===b?sre.ClearspeakPreferences.AUTO:sre.ClearspeakPreferences.fromPreference(b)[a]||sre.ClearspeakPreferences.AUTO};sre.ClearspeakPreferences.findPreference=function(a,b){console.log("Preferences: "+a);if("default"===a)return sre.ClearspeakPreferences.AUTO;a=sre.ClearspeakPreferences.fromPreference(a);console.log(a);return a[b]||sre.ClearspeakPreferences.AUTO};
|
644
|
+
sre.ClearspeakPreferences.addPreference=function(a,b,c){if("default"===a)return b+"_"+c;a=sre.ClearspeakPreferences.fromPreference(a);a[b]=c;return sre.ClearspeakPreferences.toPreference(a)};sre.Engine.getInstance().comparators.clearspeak=sre.ClearspeakPreferences.comparator;sre.Engine.getInstance().parsers.clearspeak=new sre.ClearspeakPreferences.Parser;sre.MathStore=function(){sre.BaseRuleStore.call(this);this.initializer=[]};goog.inherits(sre.MathStore,sre.BaseRuleStore);sre.MathStore.prototype.initialize=function(){if(!this.initialized){for(var a=0,b;b=this.initializer[a];a++)b();this.setSpeechRules(this.trie.collectRules());this.initialized=!0}};
|
645
|
+
sre.MathStore.prototype.defineUniqueRuleAlias=function(a,b,c,d){var e=this.parseCstr(b),f=this.findRule(goog.bind(function(b){return b.name==a&&e.equal(b.dynamicCstr)},this));if(!f)throw new sre.SpeechRule.OutputError("Rule named "+a+" with style "+b+" does not exist.");this.addAlias_(f,c,Array.prototype.slice.call(arguments,3))};
|
646
|
+
sre.MathStore.prototype.defineRuleAlias=function(a,b,c){var d=this.findRule(function(b){return b.name==a});if(!d)throw new sre.SpeechRule.OutputError("Rule with named "+a+" does not exist.");this.addAlias_(d,b,Array.prototype.slice.call(arguments,2))};
|
647
|
+
sre.MathStore.prototype.defineRulesAlias=function(a,b,c){var d=this.findAllRules(function(b){return b.name==a});if(0==d.length)throw new sre.SpeechRule.OutputError("Rule with name "+a+" does not exist.");var e=Array.prototype.slice.call(arguments,2),f=[];d.forEach(goog.bind(function(a){a:{var c=a.dynamicCstr.toString();for(var d=a.action.toString(),g=0,m;m=f[g];g++)if(m.action===d&&m.cstr===c){c=!1;break a}f.push({cstr:c,action:d});c=!0}c&&this.addAlias_(a,b,e)},this))};
|
648
|
+
sre.MathStore.prototype.addAlias_=function(a,b,c){b=new sre.SpeechRule.Precondition(b,c);b=new sre.SpeechRule(a.name,a.dynamicCstr,b,a.action);b.name=a.name;this.addRule(b)};
|
649
|
+
sre.MathStore.prototype.defineSpecialisedRule=function(a,b,c,d){var e=this.parseCstr(b),f=this.findRule(goog.bind(function(b){return b.name==a&&e.equal(b.dynamicCstr)},this));if(!f)throw new sre.SpeechRule.OutputError("Rule named "+a+" with style "+b+" does not exist.");b=this.parseCstr(c);d=d?sre.SpeechRule.Action.fromString(d):f.action;f=new sre.SpeechRule(f.name,b,f.precondition,d);this.addRule(f)};sre.MathStore.prototype.evaluateDefault=function(a){return this.evaluateString_(a.textContent)};
|
650
|
+
sre.MathStore.prototype.evaluateString_=function(a){var b=[];if(a.match(/^\s+$/))return b;var c=this.matchNumber_(a);if(c&&c.length===a.length)return b.push(this.evaluate_(c.number)),b;a=sre.BaseUtil.removeEmpty(a.replace(/\s/g," ").split(" "));for(var d=0;c=a[d];d++)if(1==c.length)b.push(this.evaluate_(c));else if(c.match(new RegExp("^["+sre.Messages.REGEXP.TEXT+"]+$")))b.push(this.evaluate_(c));else for(var e=c;e;){c=this.matchNumber_(e);var f=e.match(new RegExp("^["+sre.Messages.REGEXP.TEXT+"]+"));
|
651
|
+
c?(b.push(this.evaluate_(c.number)),e=e.substring(c.length)):f?(b.push(this.evaluate_(f[0])),e=e.substring(f[0].length)):(c=e[0].charCodeAt(0),55296<=c&&56319>=c&&1<e.length&&!isNaN(e.charCodeAt(1))?(b.push(this.evaluate_(e.slice(0,2))),e=e.substring(2)):(b.push(this.evaluate_(e[0])),e=e.substring(1)))}return b};
|
652
|
+
sre.MathStore.prototype.matchNumber_=function(a){var b=a.match(new RegExp("^"+sre.Messages.REGEXP.NUMBER)),c=a.match(new RegExp("^"+sre.Locale.en.REGEXP.NUMBER));if(!b&&!c)return null;var d=c&&c[0]===a;return b&&b[0]===a||!d?{number:b[0],length:b[0].length}:{number:c[0].replace(new RegExp(sre.Locale.en.REGEXP.DIGIT_GROUP,"g"),"X").replace(new RegExp(sre.Locale.en.REGEXP.DECIMAL_MARK,"g"),sre.Messages.REGEXP.DECIMAL_MARK).replace(/X/g,sre.Messages.REGEXP.DIGIT_GROUP),length:c[0].length}};
|
653
|
+
sre.MathStore.prototype.evaluate_=function(a){return sre.AuditoryDescription.create({text:a},{adjust:!0,translate:!0})};sre.MathSimpleStore=function(){sre.MathStore.call(this);this.category=""};goog.inherits(sre.MathSimpleStore,sre.MathStore);sre.MathSimpleStore.prototype.defineRulesFromMappings=function(a,b,c){for(var d in c)for(var e in c[d])this.defineRuleFromStrings(a,d,e,b,c[d][e])};sre.MathSimpleStore.prototype.defineRuleFromStrings=function(a,b,c,d,e){this.defineRule(a,b+"."+c,'[t] "'+e+'"',"self::text()",'"'===d?"self::text() = '"+d+"'":'self::text() = "'+d+'"')};
|
654
|
+
sre.MathSimpleStore.prototype.lookupRule=function(a,b){a=this.getSpeechRules().filter(function(a){return sre.MathSimpleStore.testDynamicConstraints_(b,a)});return a.length?a.sort(function(a,b){return sre.Engine.getInstance().comparator.compare(a.dynamicCstr,b.dynamicCstr)})[0]:null};sre.MathSimpleStore.testDynamicConstraints_=function(a,b){return sre.Engine.getInstance().strict?b.dynamicCstr.equal(a):sre.Engine.getInstance().comparator.match(b.dynamicCstr)};
|
655
|
+
sre.MathCompoundStore=function(){this.subStores_={};this.locale=sre.DynamicCstr.DEFAULT_VALUES[sre.DynamicCstr.Axis.LOCALE];this.modality=sre.DynamicCstr.DEFAULT_VALUES[sre.DynamicCstr.Axis.MODALITY]};goog.addSingletonGetter(sre.MathCompoundStore);sre.MathCompoundStore.prototype.getSubStore_=function(a){var b=this.subStores_[a];if(b)return sre.Debugger.getInstance().output("Store exists! "+a),b;b=new sre.MathSimpleStore;return this.subStores_[a]=b};
|
656
|
+
sre.MathCompoundStore.prototype.setupStore_=function(a,b){a.locale=this.locale;a.modality=this.modality;b&&(a.category=b)};sre.MathCompoundStore.prototype.defineRules=function(a,b,c,d){var e=this.getSubStore_(b);this.setupStore_(e,c);e.defineRulesFromMappings(a,b,d)};sre.MathCompoundStore.prototype.defineRule=function(a,b,c,d,e,f){var g=this.getSubStore_(e);this.setupStore_(g,d);g.defineRuleFromStrings(a,b,c,e,f)};
|
657
|
+
sre.MathCompoundStore.prototype.changeLocale_=function(a){if(!a.locale&&!a.modality)return!1;this.locale=a.locale||this.locale;this.modality=a.modality||this.modality;return!0};sre.MathCompoundStore.prototype.addSymbolRules=function(a){if(!this.changeLocale_(a)){var b=sre.MathSimpleStore.parseUnicode_(a.key);this.defineRules(a.key,b,a.category,a.mappings)}};
|
658
|
+
sre.MathCompoundStore.prototype.addFunctionRules=function(a){if(!this.changeLocale_(a)){var b=a.names,c=a.mappings;a=a.category;for(var d=0,e;e=b[d];d++)this.defineRules(e,e,a,c)}};sre.MathCompoundStore.prototype.addUnitRules=function(a){if(!this.changeLocale_(a)){var b=a.names;b&&(a.names=b.map(function(a){return a+":unit"}));this.addFunctionRules(a)}};sre.MathCompoundStore.prototype.lookupRule=function(a,b){return(a=this.subStores_[a])?a.lookupRule(null,b):null};
|
659
|
+
sre.MathCompoundStore.prototype.lookupCategory=function(a){return(a=this.subStores_[a])?a.category:""};sre.MathCompoundStore.prototype.lookupString=function(a,b){return(a=this.lookupRule(a,b))?a.action.components.map(function(a){return a.content.slice(1,-1)}).join(" "):""};sre.MathCompoundStore.prototype.enumerate=function(a){a=a||{};for(var b in this.subStores_)a=this.subStores_[b].trie.enumerate(a);return a};
|
660
|
+
sre.MathSimpleStore.parseUnicode_=function(a){a=parseInt(a,16);if(65536>a)return String.fromCharCode(a);a-=65536;return String.fromCharCode((a>>10)+55296,(a&1023)+56320)};sre.AlphabetGenerator={};sre.AlphabetGenerator.Font={BOLD:"bold",BOLDFRAKTUR:"bold-fraktur",BOLDITALIC:"bold-italic",BOLDSCRIPT:"bold-script",DOUBLESTRUCK:"double-struck",FULLWIDTH:"fullwidth",FRAKTUR:"fraktur",ITALIC:"italic",MONOSPACE:"monospace",NORMAL:"normal",SCRIPT:"script",SANSSERIF:"sans-serif",SANSSERIFITALIC:"sans-serif-italic",SANSSERIFBOLD:"sans-serif-bold",SANSSERIFBOLDITALIC:"sans-serif-bold-italic"};
|
661
|
+
sre.AlphabetGenerator.Embellish={SUPER:"super",SUB:"sub",CIRCLED:"circled",PARENTHESIZED:"parenthesized",PERIOD:"period",NEGATIVECIRCLED:"negative-circled",DOUBLECIRCLED:"double-circled",CIRCLEDSANSSERIF:"circled-sans-serif",NEGATIVECIRCLEDSANSSERIF:"negative-circled-sans-serif",COMMA:"comma",SQUARED:"squared",NEGATIVESQUARED:"negative-squared"};sre.AlphabetGenerator.Base={LATINCAP:"latinCap",LATINSMALL:"latinSmall",GREEKCAP:"greekCap",GREEKSMALL:"greekSmall",DIGIT:"digit"};
|
662
|
+
sre.AlphabetGenerator.Domains_={small:["default"],capital:["default"],digit:["default"]};
|
663
|
+
sre.AlphabetGenerator.makeDomains_=function(){var a=sre.Messages.ALPHABET_PREFIXES,b=sre.Messages.ALPHABET_TRANSFORMERS,c=function(a,b){var c={};Object.keys(a).forEach(function(a){c[a]=!0});Object.keys(b).forEach(function(a){c[a]=!0});return Object.keys(c)};sre.AlphabetGenerator.Domains_.small=c(a.smallPrefix,b.letter);sre.AlphabetGenerator.Domains_.capital=c(a.capPrefix,b.letter);sre.AlphabetGenerator.Domains_.digit=c(a.digitPrefix,b.digit)};
|
664
|
+
sre.AlphabetGenerator.generate=function(a,b){var c=sre.Engine.getInstance().locale;sre.Engine.getInstance().locale=a;sre.L10n.setLocale();b.addSymbolRules({locale:a});sre.AlphabetGenerator.makeDomains_();a=sre.AlphabetGenerator.INTERVALS;for(var d=0,e;e=a[d];d++){var f=sre.AlphabetGenerator.makeInterval(e.interval,e.subst),g=f.map(function(a){return sre.SemanticUtil.numberToUnicode(parseInt(a,16))});"offset"in e?sre.AlphabetGenerator.numberRules(b,f,g,e.font,e.category,e.offset||0):sre.AlphabetGenerator.alphabetRules(b,
|
665
|
+
f,g,sre.Messages.ALPHABETS[e.base],e.font,e.category,!!e.capital)}sre.Engine.getInstance().locale=c;sre.L10n.setLocale()};sre.AlphabetGenerator.makeInterval=function(a,b){var c=parseInt(a[0],16);a=parseInt(a[1],16);for(var d=[];c<=a;c++){var e=c.toString(16).toUpperCase();e=3<e.length?e:("000"+e).slice(-4);!1!==b[e]&&(e=b[e]||e,d.push(e))}return d};
|
666
|
+
sre.AlphabetGenerator.getFont=function(a){a="normal"===a||"fullwidth"===a?"":sre.Messages.FONT[a]||sre.Messages.EMBELLISH[a]||"";return"string"===typeof a?{font:a,combiner:sre.Messages.ALPHABET_COMBINER}:{font:a[0],combiner:a[1]}};
|
667
|
+
sre.AlphabetGenerator.alphabetRules=function(a,b,c,d,e,f,g){e=sre.AlphabetGenerator.getFont(e);for(var h=0,k,l,m;k=b[h],l=c[h],m=d[h];h++)sre.AlphabetGenerator.makeLetter(a,e.combiner,k,l,m,e.font,g?sre.Messages.ALPHABET_PREFIXES.capPrefix:sre.Messages.ALPHABET_PREFIXES.smallPrefix,f,sre.Messages.ALPHABET_TRANSFORMERS.letter,g?sre.AlphabetGenerator.Domains_.capital:sre.AlphabetGenerator.Domains_.small)};
|
668
|
+
sre.AlphabetGenerator.numberRules=function(a,b,c,d,e,f){d=sre.AlphabetGenerator.getFont(d);for(var g=0,h,k;h=b[g],k=c[g];g++)sre.AlphabetGenerator.makeLetter(a,d.combiner,h,k,g+f,d.font,sre.Messages.ALPHABET_PREFIXES.digitPrefix,e,sre.Messages.ALPHABET_TRANSFORMERS.digit,sre.AlphabetGenerator.Domains_.digit)};
|
669
|
+
sre.AlphabetGenerator.makeLetter=function(a,b,c,d,e,f,g,h,k,l){for(var m=0,n;n=l[m];m++){var p=n in g?g[n]:g["default"];a.defineRule(c.toString(),n,"default",h,d,b((n in k?k[n]:k["default"])(e),f,p))}};
|
670
|
+
sre.AlphabetGenerator.INTERVALS=[{interval:["1D400","1D419"],base:sre.AlphabetGenerator.Base.LATINCAP,subst:{},capital:!0,category:"Lu",font:sre.AlphabetGenerator.Font.BOLD},{interval:["1D41A","1D433"],base:sre.AlphabetGenerator.Base.LATINSMALL,subst:{},capital:!1,category:"Ll",font:sre.AlphabetGenerator.Font.BOLD},{interval:["1D56C","1D585"],base:sre.AlphabetGenerator.Base.LATINCAP,subst:{},capital:!0,category:"Lu",font:sre.AlphabetGenerator.Font.BOLDFRAKTUR},{interval:["1D586","1D59F"],base:sre.AlphabetGenerator.Base.LATINSMALL,
|
671
|
+
subst:{},capital:!1,category:"Ll",font:sre.AlphabetGenerator.Font.BOLDFRAKTUR},{interval:["1D468","1D481"],base:sre.AlphabetGenerator.Base.LATINCAP,subst:{},capital:!0,category:"Lu",font:sre.AlphabetGenerator.Font.BOLDITALIC},{interval:["1D482","1D49B"],base:sre.AlphabetGenerator.Base.LATINSMALL,subst:{},capital:!1,category:"Ll",font:sre.AlphabetGenerator.Font.BOLDITALIC},{interval:["1D4D0","1D4E9"],base:sre.AlphabetGenerator.Base.LATINCAP,subst:{},capital:!0,category:"Lu",font:sre.AlphabetGenerator.Font.BOLDSCRIPT},
|
672
|
+
{interval:["1D4EA","1D503"],base:sre.AlphabetGenerator.Base.LATINSMALL,subst:{},capital:!1,category:"Ll",font:sre.AlphabetGenerator.Font.BOLDSCRIPT},{interval:["1D538","1D551"],base:sre.AlphabetGenerator.Base.LATINCAP,subst:{"1D53A":"2102","1D53F":"210D","1D545":"2115","1D547":"2119","1D548":"211A","1D549":"211D","1D551":"2124"},capital:!0,category:"Lu",font:sre.AlphabetGenerator.Font.DOUBLESTRUCK},{interval:["1D552","1D56B"],base:sre.AlphabetGenerator.Base.LATINSMALL,subst:{},capital:!1,category:"Ll",
|
673
|
+
font:sre.AlphabetGenerator.Font.DOUBLESTRUCK},{interval:["1D504","1D51D"],base:sre.AlphabetGenerator.Base.LATINCAP,subst:{"1D506":"212D","1D50B":"210C","1D50C":"2111","1D515":"211C","1D51D":"2128"},capital:!0,category:"Lu",font:sre.AlphabetGenerator.Font.FRAKTUR},{interval:["1D51E","1D537"],base:sre.AlphabetGenerator.Base.LATINSMALL,subst:{},capital:!1,category:"Ll",font:sre.AlphabetGenerator.Font.FRAKTUR},{interval:["FF21","FF3A"],base:sre.AlphabetGenerator.Base.LATINCAP,subst:{},capital:!0,category:"Lu",
|
674
|
+
font:sre.AlphabetGenerator.Font.FULLWIDTH},{interval:["FF41","FF5A"],base:sre.AlphabetGenerator.Base.LATINSMALL,subst:{},capital:!1,category:"Ll",font:sre.AlphabetGenerator.Font.FULLWIDTH},{interval:["1D434","1D44D"],base:sre.AlphabetGenerator.Base.LATINCAP,subst:{},capital:!0,category:"Lu",font:sre.AlphabetGenerator.Font.ITALIC},{interval:["1D44E","1D467"],base:sre.AlphabetGenerator.Base.LATINSMALL,subst:{"1D455":"210E"},capital:!1,category:"Ll",font:sre.AlphabetGenerator.Font.ITALIC},{interval:["1D670",
|
675
|
+
"1D689"],base:sre.AlphabetGenerator.Base.LATINCAP,subst:{},capital:!0,category:"Lu",font:sre.AlphabetGenerator.Font.MONOSPACE},{interval:["1D68A","1D6A3"],base:sre.AlphabetGenerator.Base.LATINSMALL,subst:{},capital:!1,category:"Ll",font:sre.AlphabetGenerator.Font.MONOSPACE},{interval:["0041","005A"],base:sre.AlphabetGenerator.Base.LATINCAP,subst:{},capital:!0,category:"Lu",font:sre.AlphabetGenerator.Font.NORMAL},{interval:["0061","007A"],base:sre.AlphabetGenerator.Base.LATINSMALL,subst:{},capital:!1,
|
676
|
+
category:"Ll",font:sre.AlphabetGenerator.Font.NORMAL},{interval:["1D49C","1D4B5"],base:sre.AlphabetGenerator.Base.LATINCAP,subst:{"1D49D":"212C","1D4A0":"2130","1D4A1":"2131","1D4A3":"210B","1D4A4":"2110","1D4A7":"2112","1D4A8":"2133","1D4AD":"211B"},capital:!0,category:"Lu",font:sre.AlphabetGenerator.Font.SCRIPT},{interval:["1D4B6","1D4CF"],base:sre.AlphabetGenerator.Base.LATINSMALL,subst:{"1D4BA":"212F","1D4BC":"210A","1D4C4":"2134"},capital:!1,category:"Ll",font:sre.AlphabetGenerator.Font.SCRIPT},
|
677
|
+
{interval:["1D5A0","1D5B9"],base:sre.AlphabetGenerator.Base.LATINCAP,subst:{},capital:!0,category:"Lu",font:sre.AlphabetGenerator.Font.SANSSERIF},{interval:["1D5BA","1D5D3"],base:sre.AlphabetGenerator.Base.LATINSMALL,subst:{},capital:!1,category:"Ll",font:sre.AlphabetGenerator.Font.SANSSERIF},{interval:["1D608","1D621"],base:sre.AlphabetGenerator.Base.LATINCAP,subst:{},capital:!0,category:"Lu",font:sre.AlphabetGenerator.Font.SANSSERIFITALIC},{interval:["1D622","1D63B"],base:sre.AlphabetGenerator.Base.LATINSMALL,
|
678
|
+
subst:{},capital:!1,category:"Ll",font:sre.AlphabetGenerator.Font.SANSSERIFITALIC},{interval:["1D5D4","1D5ED"],base:sre.AlphabetGenerator.Base.LATINCAP,subst:{},capital:!0,category:"Lu",font:sre.AlphabetGenerator.Font.SANSSERIFBOLD},{interval:["1D5EE","1D607"],base:sre.AlphabetGenerator.Base.LATINSMALL,subst:{},capital:!1,category:"Ll",font:sre.AlphabetGenerator.Font.SANSSERIFBOLD},{interval:["1D63C","1D655"],base:sre.AlphabetGenerator.Base.LATINCAP,subst:{},capital:!0,category:"Lu",font:sre.AlphabetGenerator.Font.SANSSERIFBOLDITALIC},
|
679
|
+
{interval:["1D656","1D66F"],base:sre.AlphabetGenerator.Base.LATINSMALL,subst:{},capital:!1,category:"Ll",font:sre.AlphabetGenerator.Font.SANSSERIFBOLDITALIC},{interval:["0391","03A9"],base:sre.AlphabetGenerator.Base.GREEKCAP,subst:{"03A2":"03F4"},capital:!0,category:"Lu",font:sre.AlphabetGenerator.Font.NORMAL},{interval:["03B0","03D0"],base:sre.AlphabetGenerator.Base.GREEKSMALL,subst:{"03B0":"2207","03CA":"2202","03CB":"03F5","03CC":"03D1","03CD":"03F0","03CE":"03D5","03CF":"03F1","03D0":"03D6"},
|
680
|
+
capital:!1,category:"Ll",font:sre.AlphabetGenerator.Font.NORMAL},{interval:["1D6A8","1D6C0"],base:sre.AlphabetGenerator.Base.GREEKCAP,subst:{},capital:!0,category:"Lu",font:sre.AlphabetGenerator.Font.BOLD},{interval:["1D6C1","1D6E1"],base:sre.AlphabetGenerator.Base.GREEKSMALL,subst:{},capital:!1,category:"Ll",font:sre.AlphabetGenerator.Font.BOLD},{interval:["1D6E2","1D6FA"],base:sre.AlphabetGenerator.Base.GREEKCAP,subst:{},capital:!0,category:"Lu",font:sre.AlphabetGenerator.Font.ITALIC},{interval:["1D6FB",
|
681
|
+
"1D71B"],base:sre.AlphabetGenerator.Base.GREEKSMALL,subst:{},capital:!1,category:"Ll",font:sre.AlphabetGenerator.Font.ITALIC},{interval:["1D71C","1D734"],base:sre.AlphabetGenerator.Base.GREEKCAP,subst:{},capital:!0,category:"Lu",font:sre.AlphabetGenerator.Font.BOLDITALIC},{interval:["1D735","1D755"],base:sre.AlphabetGenerator.Base.GREEKSMALL,subst:{},capital:!1,category:"Ll",font:sre.AlphabetGenerator.Font.BOLDITALIC},{interval:["1D756","1D76E"],base:sre.AlphabetGenerator.Base.GREEKCAP,subst:{},capital:!0,
|
682
|
+
category:"Lu",font:sre.AlphabetGenerator.Font.SANSSERIFBOLD},{interval:["1D76F","1D78F"],base:sre.AlphabetGenerator.Base.GREEKSMALL,subst:{},capital:!1,category:"Ll",font:sre.AlphabetGenerator.Font.SANSSERIFBOLD},{interval:["1D790","1D7A8"],base:sre.AlphabetGenerator.Base.GREEKCAP,subst:{},capital:!0,category:"Lu",font:sre.AlphabetGenerator.Font.SANSSERIFBOLDITALIC},{interval:["1D7A9","1D7C9"],base:sre.AlphabetGenerator.Base.GREEKSMALL,subst:{},capital:!1,category:"Ll",font:sre.AlphabetGenerator.Font.SANSSERIFBOLDITALIC},
|
683
|
+
{interval:["0030","0039"],base:sre.AlphabetGenerator.Base.DIGIT,subst:{},offset:0,category:"Nd",font:sre.AlphabetGenerator.Font.NORMAL},{interval:["2070","2079"],base:sre.AlphabetGenerator.Base.DIGIT,subst:{2071:"00B9",2072:"00B2",2073:"00B3"},offset:0,category:"No",font:sre.AlphabetGenerator.Embellish.SUPER},{interval:["2080","2089"],base:sre.AlphabetGenerator.Base.DIGIT,subst:{},offset:0,category:"No",font:sre.AlphabetGenerator.Embellish.SUB},{interval:["245F","2473"],base:sre.AlphabetGenerator.Base.DIGIT,
|
684
|
+
subst:{"245F":"24EA"},offset:0,category:"No",font:sre.AlphabetGenerator.Embellish.CIRCLED},{interval:["3251","325F"],base:sre.AlphabetGenerator.Base.DIGIT,subst:{},offset:21,category:"No",font:sre.AlphabetGenerator.Embellish.CIRCLED},{interval:["32B1","32BF"],base:sre.AlphabetGenerator.Base.DIGIT,subst:{},offset:36,category:"No",font:sre.AlphabetGenerator.Embellish.CIRCLED},{interval:["2474","2487"],base:sre.AlphabetGenerator.Base.DIGIT,subst:{},offset:1,category:"No",font:sre.AlphabetGenerator.Embellish.PARENTHESIZED},
|
685
|
+
{interval:["2487","249B"],base:sre.AlphabetGenerator.Base.DIGIT,subst:{2487:"1F100"},offset:0,category:"No",font:sre.AlphabetGenerator.Embellish.PERIOD},{interval:["2775","277F"],base:sre.AlphabetGenerator.Base.DIGIT,subst:{2775:"24FF"},offset:0,category:"No",font:sre.AlphabetGenerator.Embellish.NEGATIVECIRCLED},{interval:["24EB","24F4"],base:sre.AlphabetGenerator.Base.DIGIT,subst:{},offset:11,category:"No",font:sre.AlphabetGenerator.Embellish.NEGATIVECIRCLED},{interval:["24F5","24FE"],base:sre.AlphabetGenerator.Base.DIGIT,
|
686
|
+
subst:{},offset:1,category:"No",font:sre.AlphabetGenerator.Embellish.DOUBLECIRCLED},{interval:["277F","2789"],base:sre.AlphabetGenerator.Base.DIGIT,subst:{"277F":"1F10B"},offset:0,category:"No",font:sre.AlphabetGenerator.Embellish.CIRCLEDSANSSERIF},{interval:["2789","2793"],base:sre.AlphabetGenerator.Base.DIGIT,subst:{2789:"1F10C"},offset:0,category:"No",font:sre.AlphabetGenerator.Embellish.NEGATIVECIRCLEDSANSSERIF},{interval:["FF10","FF19"],base:sre.AlphabetGenerator.Base.DIGIT,subst:{},offset:0,
|
687
|
+
category:"Nd",font:sre.AlphabetGenerator.Font.FULLWIDTH},{interval:["1D7CE","1D7D7"],base:sre.AlphabetGenerator.Base.DIGIT,subst:{},offset:0,category:"Nd",font:sre.AlphabetGenerator.Font.BOLD},{interval:["1D7D8","1D7E1"],base:sre.AlphabetGenerator.Base.DIGIT,subst:{},offset:0,category:"Nd",font:sre.AlphabetGenerator.Font.DOUBLESTRUCK},{interval:["1D7E2","1D7EB"],base:sre.AlphabetGenerator.Base.DIGIT,subst:{},offset:0,category:"Nd",font:sre.AlphabetGenerator.Font.SANSSERIF},{interval:["1D7EC","1D7F5"],
|
688
|
+
base:sre.AlphabetGenerator.Base.DIGIT,subst:{},offset:0,category:"Nd",font:sre.AlphabetGenerator.Font.SANSSERIFBOLD},{interval:["1D7F6","1D7FF"],base:sre.AlphabetGenerator.Base.DIGIT,subst:{},offset:0,category:"Nd",font:sre.AlphabetGenerator.Font.MONOSPACE},{interval:["1F101","1F10A"],base:sre.AlphabetGenerator.Base.DIGIT,subst:{},offset:0,category:"No",font:sre.AlphabetGenerator.Embellish.COMMA},{interval:["24B6","24CF"],base:sre.AlphabetGenerator.Base.LATINCAP,subst:{},capital:!0,category:"So",
|
689
|
+
font:sre.AlphabetGenerator.Embellish.CIRCLED},{interval:["24D0","24E9"],base:sre.AlphabetGenerator.Base.LATINSMALL,subst:{},capital:!1,category:"So",font:sre.AlphabetGenerator.Embellish.CIRCLED},{interval:["1F110","1F129"],base:sre.AlphabetGenerator.Base.LATINCAP,subst:{},capital:!0,category:"So",font:sre.AlphabetGenerator.Embellish.PARENTHESIZED},{interval:["249C","24B5"],base:sre.AlphabetGenerator.Base.LATINSMALL,subst:{},capital:!1,category:"So",font:sre.AlphabetGenerator.Embellish.PARENTHESIZED},
|
690
|
+
{interval:["1F130","1F149"],base:sre.AlphabetGenerator.Base.LATINCAP,subst:{},capital:!0,category:"So",font:sre.AlphabetGenerator.Embellish.SQUARED},{interval:["1F170","1F189"],base:sre.AlphabetGenerator.Base.LATINCAP,subst:{},capital:!0,category:"So",font:sre.AlphabetGenerator.Embellish.NEGATIVESQUARED},{interval:["1F150","1F169"],base:sre.AlphabetGenerator.Base.LATINCAP,subst:{},capital:!0,category:"So",font:sre.AlphabetGenerator.Embellish.NEGATIVECIRCLED}];sre.MathMap=function(){this.store=sre.MathCompoundStore.getInstance();this.loaded_=[];this.addRules={functions:goog.bind(this.store.addFunctionRules,this.store),symbols:goog.bind(this.store.addSymbolRules,this.store),units:goog.bind(this.store.addUnitRules,this.store)}};goog.addSingletonGetter(sre.MathMap);sre.MathMap.oldInst_=sre.MathMap.getInstance;sre.MathMap.getInstance=function(){var a=sre.MathMap.oldInst_();a.loadLocale();return a};
|
691
|
+
sre.MathMap.prototype.loadLocale=function(){var a=sre.Engine.getInstance().locale;if(-1===this.loaded_.indexOf(a)){var b=sre.Engine.getInstance().mode===sre.Engine.Mode.ASYNC;b&&(sre.Engine.getInstance().mode=sre.Engine.Mode.SYNC);this.loaded_.push(a);this.retrieveMaps(a);b&&(sre.Engine.getInstance().mode=sre.Engine.Mode.ASYNC)}};sre.MathMap.toFetch_=0;sre.Engine.registerTest(function(){return sre.MathMap.getInstance()&&!sre.MathMap.toFetch_});
|
692
|
+
sre.MathMap.prototype.retrieveFiles=function(a){a=sre.BaseUtil.makePath(sre.SystemExternal.jsonPath)+a+".js";switch(sre.Engine.getInstance().mode){case sre.Engine.Mode.ASYNC:sre.MathMap.toFetch_++;var b=goog.bind(this.parseMaps,this);sre.MathMap.fromFile_(a,function(a,d){sre.MathMap.toFetch_--;a||b(d)});break;case sre.Engine.Mode.HTTP:sre.MathMap.toFetch_++;this.getJsonAjax_(a);break;default:a=sre.MathMap.loadFile(a),this.parseMaps(a)}};
|
693
|
+
sre.MathMap.prototype.parseMaps=function(a){a=JSON.parse(a);this.addMaps(a)};sre.MathMap.prototype.addMaps=function(a,b){for(var c=0,d;d=Object.keys(a)[c];c++){var e=d.split("/");b&&b!==e[0]||a[d].forEach(this.addRules[e[1]])}};sre.MathMap.prototype.retrieveMaps=function(a){sre.AlphabetGenerator.generate(a,this.store);sre.Engine.getInstance().isIE&&sre.Engine.getInstance().mode===sre.Engine.Mode.HTTP?this.getJsonIE_(a):this.retrieveFiles(a)};
|
694
|
+
sre.MathMap.prototype.getJsonIE_=function(a,b){var c=b||1;sre.BrowserUtil.mapsForIE?this.addMaps(sre.BrowserUtil.mapsForIE,a):5>=c&&setTimeout(goog.bind(function(){this.getJsonIE_(a,c++)},this),300)};sre.MathMap.fromFile_=function(a,b){return sre.SystemExternal.fs.readFile(a,"utf8",b)};sre.MathMap.loadFile=function(a){try{return sre.MathMap.readJSON_(a)}catch(b){console.error("Unable to load file: "+a+"\n"+b)}return"{}"};sre.MathMap.readJSON_=function(a){return sre.SystemExternal.fs.readFileSync(a)};
|
695
|
+
sre.MathMap.prototype.getJsonAjax_=function(a){var b=new XMLHttpRequest,c=goog.bind(this.parseMaps,this);b.onreadystatechange=function(){4===b.readyState&&(sre.MathMap.toFetch_--,200===b.status&&c(b.responseText))};b.open("GET",a,!0);b.send()};sre.StoreUtil={};sre.StoreUtil.nodeCounter=function(a,b){var c=a.length,d=0,e=b;b||(e="");return function(){d<c&&(d+=1);return e+" "+d}};sre.StoreUtil.pauseSeparator=function(a,b){a=parseFloat(b);var c=isNaN(a)?b:a;return function(){return[sre.AuditoryDescription.create({text:"",personality:{pause:c}})]}};sre.ClearspeakUtil={};sre.ClearspeakUtil.numbersToAlpha=function(a){return a.match(/\d+/)?sre.Messages.NUMBERS.numberToWords(parseInt(a,10)):a};sre.ClearspeakUtil.nodeCounter=function(a,b){b=b.split("-");var c=sre.StoreUtil.nodeCounter(a,b[0]||""),d=b[1]||"",e=b[2]||"",f=!0;return function(){var a=c();return f?(f=!1,e+a+d):a+d}};
|
696
|
+
sre.ClearspeakUtil.isSimpleExpression=function(a){return sre.ClearspeakUtil.isSimpleNumber_(a)||sre.ClearspeakUtil.isSimpleLetters_(a)||sre.ClearspeakUtil.isSimpleDegree_(a)||sre.ClearspeakUtil.isSimpleNegative_(a)||sre.ClearspeakUtil.isSimpleFunction_(a)};
|
697
|
+
sre.ClearspeakUtil.isSimpleFunction_=function(a){return a.type===sre.SemanticAttr.Type.APPL&&(a.childNodes[0].role===sre.SemanticAttr.Role.PREFIXFUNC||a.childNodes[0].role===sre.SemanticAttr.Role.SIMPLEFUNC)&&(sre.ClearspeakUtil.isSimple_(a.childNodes[1])||a.childNodes[1].type===sre.SemanticAttr.Type.FENCED&&sre.ClearspeakUtil.isSimple_(a.childNodes[1].childNodes[0]))};
|
698
|
+
sre.ClearspeakUtil.isSimpleNegative_=function(a){return a.type===sre.SemanticAttr.Type.PREFIXOP&&a.role===sre.SemanticAttr.Role.NEGATIVE&&sre.ClearspeakUtil.isSimple_(a.childNodes[0])&&a.childNodes[0].type!==sre.SemanticAttr.Type.PREFIXOP&&a.childNodes[0].type!==sre.SemanticAttr.Type.APPL&&a.childNodes[0].type!==sre.SemanticAttr.Type.PUNCTUATED};
|
699
|
+
sre.ClearspeakUtil.isSimpleDegree_=function(a){return a.type===sre.SemanticAttr.Type.PUNCTUATED&&a.role===sre.SemanticAttr.Role.ENDPUNCT&&2===a.childNodes.length&&a.childNodes[1].role===sre.SemanticAttr.Role.DEGREE&&(sre.ClearspeakUtil.isLetter_(a.childNodes[0])||sre.ClearspeakUtil.isNumber_(a.childNodes[0])||a.childNodes[0].type===sre.SemanticAttr.Type.PREFIXOP&&a.childNodes[0].role===sre.SemanticAttr.Role.NEGATIVE&&(sre.ClearspeakUtil.isLetter_(a.childNodes[0].childNodes[0])||sre.ClearspeakUtil.isNumber_(a.childNodes[0].childNodes[0])))};
|
700
|
+
sre.ClearspeakUtil.isSimpleLetters_=function(a){return sre.ClearspeakUtil.isLetter_(a)||a.type===sre.SemanticAttr.Type.INFIXOP&&a.role===sre.SemanticAttr.Role.IMPLICIT&&(2===a.childNodes.length&&(sre.ClearspeakUtil.isLetter_(a.childNodes[0])||sre.ClearspeakUtil.isSimpleNumber_(a.childNodes[0]))&&sre.ClearspeakUtil.isLetter_(a.childNodes[1])||3===a.childNodes.length&&sre.ClearspeakUtil.isSimpleNumber_(a.childNodes[0])&&sre.ClearspeakUtil.isLetter_(a.childNodes[1])&&sre.ClearspeakUtil.isLetter_(a.childNodes[2]))};
|
701
|
+
sre.ClearspeakUtil.isSimple_=function(a){return a.hasAnnotation("clearspeak","simple")};sre.ClearspeakUtil.isLetter_=function(a){return a.type===sre.SemanticAttr.Type.IDENTIFIER&&(a.role===sre.SemanticAttr.Role.LATINLETTER||a.role===sre.SemanticAttr.Role.GREEKLETTER||a.role===sre.SemanticAttr.Role.OTHERLETTER||a.role===sre.SemanticAttr.Role.SIMPLEFUNC)};sre.ClearspeakUtil.isNumber_=function(a){return a.type===sre.SemanticAttr.Type.NUMBER&&(a.role===sre.SemanticAttr.Role.INTEGER||a.role===sre.SemanticAttr.Role.FLOAT)};
|
702
|
+
sre.ClearspeakUtil.isSimpleNumber_=function(a){return sre.ClearspeakUtil.isNumber_(a)||sre.ClearspeakUtil.isSimpleFraction_(a)};
|
703
|
+
sre.ClearspeakUtil.isSimpleFraction_=function(a){if(sre.ClearspeakUtil.hasPreference("Fraction_Over")||sre.ClearspeakUtil.hasPreference("Fraction_FracOver")||a.type!==sre.SemanticAttr.Type.FRACTION||a.role!==sre.SemanticAttr.Role.VULGAR)return!1;if(sre.ClearspeakUtil.hasPreference("Fraction_Ordinal"))return!0;var b=parseInt(a.childNodes[0].textContent,10);a=parseInt(a.childNodes[1].textContent,10);return 0<b&&20>b&&0<a&&11>a};
|
704
|
+
sre.ClearspeakUtil.hasPreference=function(a){return sre.Engine.getInstance().style===a};sre.ClearspeakUtil.simpleExpression=function(){return new sre.SemanticAnnotator("clearspeak",function(a){return sre.ClearspeakUtil.isSimpleExpression(a)?"simple":""})};sre.ClearspeakUtil.simpleNode=function(a){if(!a.hasAttribute("annotation"))return!1;a=a.getAttribute("annotation");return!!/clearspeak:simple$|clearspeak:simple;/.exec(a)};
|
705
|
+
sre.ClearspeakUtil.simpleCell_=function(a){if(sre.ClearspeakUtil.simpleNode(a))return!0;if(a.tagName!==sre.SemanticAttr.Type.SUBSCRIPT)return!1;a=a.childNodes[0].childNodes;var b=a[1];return a[0].tagName===sre.SemanticAttr.Type.IDENTIFIER&&(sre.ClearspeakUtil.isInteger_(b)||b.tagName===sre.SemanticAttr.Type.INFIXOP&&b.hasAttribute("role")&&b.getAttribute("role")===sre.SemanticAttr.Role.IMPLICIT&&sre.ClearspeakUtil.allIndices_(b))};
|
706
|
+
sre.ClearspeakUtil.isInteger_=function(a){return a.tagName===sre.SemanticAttr.Type.NUMBER&&a.hasAttribute("role")&&a.getAttribute("role")===sre.SemanticAttr.Role.INTEGER};sre.ClearspeakUtil.allIndices_=function(a){return sre.XpathUtil.evalXPath("children/*",a).every(function(a){return sre.ClearspeakUtil.isInteger_(a)||a.tagName===sre.SemanticAttr.Type.IDENTIFIER})};
|
707
|
+
sre.ClearspeakUtil.allCellsSimple=function(a){return sre.XpathUtil.evalXPath(a.tagName===sre.SemanticAttr.Type.MATRIX?"children/row/children/cell/children/*":"children/line/children/*",a).every(sre.ClearspeakUtil.simpleCell_)?[a]:[]};sre.ClearspeakUtil.isSmallVulgarFraction=function(a){return sre.NumbersUtil.vulgarFractionSmall(a,20,11)?[a]:[]};
|
708
|
+
sre.ClearspeakUtil.isUnitExpression=function(a){return a.type===sre.SemanticAttr.Type.TEXT||a.type===sre.SemanticAttr.Type.PUNCTUATED&&a.role===sre.SemanticAttr.Role.TEXT&&sre.ClearspeakUtil.isNumber_(a.childNodes[0])&&sre.ClearspeakUtil.allTextLastContent_(a.childNodes.slice(1))||a.type===sre.SemanticAttr.Type.IDENTIFIER&&a.role===sre.SemanticAttr.Role.UNIT||a.type===sre.SemanticAttr.Type.INFIXOP&&(a.role===sre.SemanticAttr.Role.IMPLICIT||a.role===sre.SemanticAttr.Role.UNIT)};
|
709
|
+
sre.ClearspeakUtil.allTextLastContent_=function(a){for(var b=0;b<a.length-1;b++)if(a[b].type!==sre.SemanticAttr.Type.TEXT||""!==a[b].textContent)return!1;return a[a.length-1].type===sre.SemanticAttr.Type.TEXT};sre.ClearspeakUtil.unitExpression=function(){return new sre.SemanticAnnotator("clearspeak",function(a){return sre.ClearspeakUtil.isUnitExpression(a)?"unit":""})};
|
710
|
+
sre.ClearspeakUtil.ordinalExponent=function(a){var b=parseInt(a.textContent,10);return isNaN(b)?a.textContent:10<b?sre.Messages.NUMBERS.simpleOrdinal(b):sre.Messages.NUMBERS.wordOrdinal(b)};sre.ClearspeakUtil.isCapitalLetter=function(a){return"Lu"===sre.MathCompoundStore.getInstance().lookupCategory(a.textContent)?[a]:[]};sre.ClearspeakUtil.NESTING_DEPTH=null;
|
711
|
+
sre.ClearspeakUtil.nestingDepth=function(a){var b=0,c=a.textContent,d="open"===a.getAttribute("role")?0:1;for(a=a.parentNode;a;)a.tagName===sre.SemanticAttr.Type.FENCED&&a.childNodes[0].childNodes[d].textContent===c&&b++,a=a.parentNode;sre.ClearspeakUtil.NESTING_DEPTH=1<b?sre.Messages.NUMBERS.wordOrdinal(b):"";return sre.ClearspeakUtil.NESTING_DEPTH};
|
712
|
+
sre.ClearspeakUtil.matchingFences=function(a){var b=a.previousSibling;if(b)var c=a;else b=a,c=a.nextSibling;return c?sre.SemanticAttr.isMatchingFence(b.textContent,c.textContent)?[a]:[]:[]};sre.ClearspeakUtil.insertNesting=function(a,b){if(!b||!a)return a;var c=a.match(/^(open|close) /);return c?c[0]+b+" "+a.substring(c[0].length):b+" "+a};sre.Grammar.getInstance().setCorrection("insertNesting",sre.ClearspeakUtil.insertNesting);
|
713
|
+
sre.ClearspeakUtil.fencedArguments=function(a){var b=sre.DomUtil.toArray(a.parentNode.childNodes),c=sre.XpathUtil.evalXPath("../../children/*",a);b=b.indexOf(a);return sre.ClearspeakUtil.fencedFactor_(c[b])||sre.ClearspeakUtil.fencedFactor_(c[b+1])?[a]:[]};
|
714
|
+
sre.ClearspeakUtil.simpleArguments=function(a){var b=sre.DomUtil.toArray(a.parentNode.childNodes),c=sre.XpathUtil.evalXPath("../../children/*",a);b=b.indexOf(a);return sre.ClearspeakUtil.simpleFactor_(c[b])&&c[b+1]&&(sre.ClearspeakUtil.simpleFactor_(c[b+1])||c[b+1].tagName===sre.SemanticAttr.Type.ROOT||c[b+1].tagName===sre.SemanticAttr.Type.SQRT||c[b+1].tagName===sre.SemanticAttr.Type.SUPERSCRIPT&&c[b+1].childNodes[0].childNodes[0]&&(c[b+1].childNodes[0].childNodes[0].tagName===sre.SemanticAttr.Type.NUMBER||
|
715
|
+
c[b+1].childNodes[0].childNodes[0].tagName===sre.SemanticAttr.Type.IDENTIFIER)&&("2"===c[b+1].childNodes[0].childNodes[1].textContent||"3"===c[b+1].childNodes[0].childNodes[1].textContent))?[a]:[]};sre.ClearspeakUtil.simpleFactor_=function(a){return!!a&&(a.tagName===sre.SemanticAttr.Type.NUMBER||a.tagName===sre.SemanticAttr.Type.IDENTIFIER||a.tagName===sre.SemanticAttr.Type.FUNCTION||a.tagName===sre.SemanticAttr.Type.APPL||a.tagName===sre.SemanticAttr.Type.FRACTION)};
|
716
|
+
sre.ClearspeakUtil.fencedFactor_=function(a){return a&&(a.tagName===sre.SemanticAttr.Type.FENCED||a.hasAttribute("role")&&a.getAttribute("role")===sre.SemanticAttr.Role.LEFTRIGHT||sre.ClearspeakUtil.layoutFactor_(a))};sre.ClearspeakUtil.layoutFactor_=function(a){return!!a&&(a.tagName===sre.SemanticAttr.Type.MATRIX||a.tagName===sre.SemanticAttr.Type.VECTOR)};
|
717
|
+
sre.ClearspeakUtil.isHyperbolic=function(a){if(a.tagName===sre.SemanticAttr.Type.APPL){var b=sre.XpathUtil.evalXPath("children/*[1]",a)[0];if(b&&b.tagName===sre.SemanticAttr.Type.FUNCTION&&"Hyperbolic"===sre.MathCompoundStore.getInstance().lookupCategory(b.textContent))return[a]}return[]};
|
718
|
+
sre.ClearspeakUtil.isLogarithmWithBase=function(a){if(a.tagName===sre.SemanticAttr.Type.SUBSCRIPT){var b=sre.XpathUtil.evalXPath("children/*[1]",a)[0];if(b&&b.tagName===sre.SemanticAttr.Type.FUNCTION&&"Logarithm"===sre.MathCompoundStore.getInstance().lookupCategory(b.textContent))return[a]}return[]};sre.ClearspeakUtil.wordOrdinal=function(a){return sre.Messages.NUMBERS.wordOrdinal(parseInt(a.textContent,10))};sre.ClearspeakFrench=function(){sre.MathStore.call(this);this.locale="fr"};goog.inherits(sre.ClearspeakFrench,sre.MathStore);goog.addSingletonGetter(sre.ClearspeakFrench);sre.ClearspeakFrench.mathStore=sre.ClearspeakFrench.getInstance();sre.ClearspeakFrench.defineRule_=goog.bind(sre.ClearspeakFrench.mathStore.defineRule,sre.ClearspeakFrench.mathStore);sre.ClearspeakFrench.defineRuleAlias_=goog.bind(sre.ClearspeakFrench.mathStore.defineRulesAlias,sre.ClearspeakFrench.mathStore);
|
719
|
+
sre.ClearspeakFrench.defineSpecialisedRule_=goog.bind(sre.ClearspeakFrench.mathStore.defineSpecialisedRule,sre.ClearspeakFrench.mathStore);sre.ClearspeakFrench.addContextFunction_=goog.bind(sre.ClearspeakFrench.mathStore.contextFunctions.add,sre.ClearspeakFrench.mathStore.contextFunctions);sre.ClearspeakFrench.addCustomQuery_=goog.bind(sre.ClearspeakFrench.mathStore.customQueries.add,sre.ClearspeakFrench.mathStore.customQueries);
|
720
|
+
sre.ClearspeakFrench.addCustomString_=goog.bind(sre.ClearspeakFrench.mathStore.customStrings.add,sre.ClearspeakFrench.mathStore.customStrings);
|
721
|
+
sre.ClearspeakFrench.initCustomFunctions_=function(){(0,sre.ClearspeakFrench.addContextFunction_)("CTXFpauseSeparator",sre.StoreUtil.pauseSeparator);(0,sre.ClearspeakFrench.addContextFunction_)("CTXFnodeCounter",sre.ClearspeakUtil.nodeCounter);(0,sre.ClearspeakFrench.addContextFunction_)("CTXFcontentIterator",sre.MathmlStoreUtil.contentIterator);(0,sre.ClearspeakFrench.addCustomString_)("CSFvulgarFraction",sre.NumbersUtil.vulgarFraction);(0,sre.ClearspeakFrench.addCustomQuery_)("CQFvulgarFractionSmall",
|
722
|
+
sre.ClearspeakUtil.isSmallVulgarFraction);(0,sre.ClearspeakFrench.addCustomQuery_)("CQFcellsSimple",sre.ClearspeakUtil.allCellsSimple);(0,sre.ClearspeakFrench.addCustomString_)("CSFordinalExponent",sre.ClearspeakUtil.ordinalExponent);(0,sre.ClearspeakFrench.addCustomString_)("CSFwordOrdinal",sre.Messages.NUMBERS.wordOrdinal);(0,sre.ClearspeakFrench.addCustomQuery_)("CQFisCapital",sre.ClearspeakUtil.isCapitalLetter);(0,sre.ClearspeakFrench.addCustomQuery_)("CQFmatchingFences",sre.ClearspeakUtil.matchingFences);
|
723
|
+
(0,sre.ClearspeakFrench.addCustomString_)("CSFnestingDepth",sre.ClearspeakUtil.nestingDepth);(0,sre.ClearspeakFrench.addCustomQuery_)("CQFfencedArguments",sre.ClearspeakUtil.fencedArguments);(0,sre.ClearspeakFrench.addCustomQuery_)("CQFsimpleArguments",sre.ClearspeakUtil.simpleArguments);(0,sre.ClearspeakFrench.addCustomQuery_)("CQFisHyperbolic",sre.ClearspeakUtil.isHyperbolic);(0,sre.ClearspeakFrench.addCustomQuery_)("CQFisLogarithm",sre.ClearspeakUtil.isLogarithmWithBase);(0,sre.ClearspeakFrench.addCustomQuery_)("CQFspaceoutNumber",
|
724
|
+
sre.MathspeakUtil.spaceoutNumber)};
|
725
|
+
sre.ClearspeakFrench.initClearspeakFrench_=function(){(0,sre.ClearspeakFrench.defineRule_)("collapsed","clearspeak.default",'[t] "compress\u00e9e"; [n] . (engine:modality=summary,grammar:collapsed)',"self::*","@alternative",'not(contains(@grammar, "collapsed"))',"self::*","self::*","self::*","self::*","self::*");(0,sre.ClearspeakFrench.defineRule_)("stree","clearspeak.default","[n] ./*[1]","self::stree");(0,sre.ClearspeakFrench.defineRule_)("unknown","clearspeak.default","[n] text()","self::unknown");
|
726
|
+
(0,sre.ClearspeakFrench.defineRule_)("protected","clearspeak.default","[t] text()","self::number",'contains(@grammar, "protected")');(0,sre.ClearspeakFrench.defineRule_)("omit-empty","clearspeak.default",'[p] (pause:"short")',"self::empty");(0,sre.ClearspeakFrench.defineRule_)("font","clearspeak.default",'[n] . (grammar:ignoreFont=@font); [t] @font (grammar:localFont,pause:"short")',"self::*","@font",'not(contains(@grammar, "ignoreFont"))','@font!="normal"');(0,sre.ClearspeakFrench.defineRule_)("font-identifier",
|
727
|
+
"clearspeak.default",'[n] . (grammar:ignoreFont=@font); [t] @font (grammar:localFont,pause:"short")',"self::identifier","string-length(text())=1","@font",'@font="normal"','not(contains(@grammar, "ignoreFont"))','@role!="unit"');(0,sre.ClearspeakFrench.defineRule_)("omit-font","clearspeak.default","[n] self::* (grammar:ignoreFont=@font)","self::identifier","string-length(text())=1","@font",'not(contains(@grammar, "ignoreFont"))','@font="italic"');(0,sre.ClearspeakFrench.defineRule_)("text","clearspeak.default",
|
728
|
+
"[n] text()","self::text");(0,sre.ClearspeakFrench.defineRule_)("capital","clearspeak.default",'[n] text() (pitch:0.6,grammar:ignoreCaps="majuscule")',"self::identifier",'@role="latinletter" or @role="greekletter" or @role="simple function"',"CQFisCapital");(0,sre.ClearspeakFrench.defineRule_)("capital","clearspeak.Caps_SayCaps","[n] text()","self::identifier",'@role="latinletter" or @role="greekletter"',"CQFisCapital");(0,sre.ClearspeakFrench.defineRule_)("capital","clearspeak.Caps_SayCaps",'[p] (pause:"short"); [n] text()',
|
729
|
+
"self::identifier",'@role="latinletter" or @role="greekletter"',"CQFisCapital","preceding-sibling::*[1]",'not(name(preceding-sibling::*[1])="function")','not(contains(@grammar, "angle"))');(0,sre.ClearspeakFrench.defineRule_)("capital","clearspeak.Caps_SayCaps",'[n] text() (pause:"short")',"self::identifier",'@role="latinletter" or @role="greekletter"',"CQFisCapital","following-sibling::*[1]");(0,sre.ClearspeakFrench.defineRule_)("capital","clearspeak.Caps_SayCaps",'[p] (pause:"short"); [n] text() (pause:"short")',
|
730
|
+
"self::identifier",'@role="latinletter" or @role="greekletter"',"CQFisCapital","preceding-sibling::*[1]","following-sibling::*[1]",'not(name(preceding-sibling::*[1])="function")','not(contains(@grammar, "angle"))');(0,sre.ClearspeakFrench.defineRule_)("punctuation-lr","clearspeak.default",'[p] (pause:"short"); [n] text() (pause:"short")',"self::punctuation",'@role="comma"');(0,sre.ClearspeakFrench.defineRule_)("punctuation","clearspeak.default","[n] text()","self::punctuation",'@role="comma"',"not(preceding-sibling::*[1]/children)",
|
731
|
+
"not(following-sibling::*[1]/children)");(0,sre.ClearspeakFrench.defineRule_)("punctuation-l","clearspeak.default",'[p] (pause:"short"); [n] text()',"self::punctuation",'@role="comma"',"not(following-sibling::*[1]/children)");(0,sre.ClearspeakFrench.defineRule_)("punctuation-r","clearspeak.default",'[n] text() (pause:"short")',"self::punctuation",'@role="comma"',"not(preceding-sibling::*[1]/children)");(0,sre.ClearspeakFrench.defineRule_)("ellipsis","clearspeak.Ellipses_AndSoOn",'[t] "et ainsi de suite"',
|
732
|
+
"self::punctuation",'@role="ellipsis"',"not(following-sibling::*[1])",'not(preceding-sibling::*[last()][@role="ellipsis"])');(0,sre.ClearspeakFrench.defineRule_)("ellipsis","clearspeak.Ellipses_AndSoOn",'[t] "et ainsi de suite jusqu\'\u00e0"',"self::punctuation",'@role="ellipsis"',"preceding-sibling::*[1]","following-sibling::*[1]");(0,sre.ClearspeakFrench.defineRule_)("vbar-evaluated","clearspeak.default",'[n] children/*[1]; [p] (pause:"short"); [t] "\u00e9valu\u00e9 \u00e0"; [n] content/*[1]/children/*[2]; [p] (pause:"short")',
|
733
|
+
"self::punctuated",'@role="endpunct"','content/*[1][@role="vbar"]',"content/*[1][@embellished]",'name(content/*[1])="subscript"');(0,sre.ClearspeakFrench.defineRule_)("vbar-evaluated","clearspeak.default",'[n] children/*[1]; [p] (pause:"short"); [t] "\u00e9valu\u00e9 \u00e0"; [n] content/*[1]/children/*[2]; [p] (pause:"short"); [t] "moins la m\u00eame expression \u00e9valu\u00e9e \u00e0"; [n] content/*[1]/children/*[1]/children/*[2]; [p] (pause:"short")',"self::punctuated",'@role="endpunct"','content/*[1][@role="vbar"]',
|
734
|
+
"content/*[1][@embellished]",'name(content/*[1])="superscript"','name(content/*[1]/children/*[1])="subscript"');(0,sre.ClearspeakFrench.defineRule_)("vbar-such-that","clearspeak.VerticalLine_SuchThat",'[t] "tel que"',"self::punctuation",'@role="vbar"','not(parent::*/parent::*[@embellished="punctuation"])');(0,sre.ClearspeakFrench.defineRule_)("vbar-such-that","clearspeak.VerticalLine_Divides",'[t] "diviseur de"',"self::punctuation",'@role="vbar"','not(parent::*/parent::*[@embellished="punctuation"])');
|
735
|
+
(0,sre.ClearspeakFrench.defineRule_)("vbar-such-that","clearspeak.VerticalLine_Given",'[t] "sachant"',"self::punctuation",'@role="vbar"','not(parent::*/parent::*[@embellished="punctuation"])');(0,sre.ClearspeakFrench.defineRule_)("set-member","clearspeak.default",'[t] "est un"',"self::operator",'@role="set extended"','text()="\u2208" or text()="\u220a"');(0,sre.ClearspeakFrench.defineSpecialisedRule_)("set-member","clearspeak.default","clearspeak.SetMemberSymbol_Member",'[t] "appartient \u00e0"');
|
736
|
+
(0,sre.ClearspeakFrench.defineSpecialisedRule_)("set-member","clearspeak.default","clearspeak.SetMemberSymbol_Element",'[t] "est un \u00e9l\u00e9ment de"');(0,sre.ClearspeakFrench.defineSpecialisedRule_)("set-member","clearspeak.default","clearspeak.SetMemberSymbol_Belongs",'[t] "est dans"');(0,sre.ClearspeakFrench.defineRule_)("set-not-member","clearspeak.default",'[t] "n\'est pas un"',"self::operator",'@role="set extended"','text()="\u2209"');(0,sre.ClearspeakFrench.defineSpecialisedRule_)("set-not-member",
|
737
|
+
"clearspeak.default","clearspeak.SetMemberSymbol_Member",'[t] "n\'appartient pas \u00e0"');(0,sre.ClearspeakFrench.defineSpecialisedRule_)("set-not-member","clearspeak.default","clearspeak.SetMemberSymbol_Element",'[t] "n\'est pas un \u00e9l\u00e9ment de"');(0,sre.ClearspeakFrench.defineSpecialisedRule_)("set-not-member","clearspeak.default","clearspeak.SetMemberSymbol_Belongs",'[t] "n\'est pas dans"');(0,sre.ClearspeakFrench.defineRule_)("prime","clearspeak.default","[n] children/*[1]; [n] children/*[2]",
|
738
|
+
"self::superscript","children/*[2]",'children/*[2][@role="prime"]',"self::*");(0,sre.ClearspeakFrench.defineRule_)("feet","clearspeak.default",'[n] children/*[1]; [t] "feet"',"self::superscript",'children/*[2][@role="prime"]','name(children/*[1])="number"','children/*[2][text()="\u2032"]','not(preceding-sibling::*[@role="degree"])');(0,sre.ClearspeakFrench.defineRule_)("foot","clearspeak.default",'[n] children/*[1]; [t] "foot"',"self::superscript",'children/*[2][@role="prime"]','name(children/*[1])="number"',
|
739
|
+
'children/*[2][text()="\u2032"]','children/*[1][text()="1"]','not(preceding-sibling::*[@role="degree"])');(0,sre.ClearspeakFrench.defineRule_)("inches","clearspeak.default",'[n] children/*[1]; [t] "inches"',"self::superscript",'children/*[2][@role="prime"]','name(children/*[1])="number"','children/*[2][text()="\u2033"]','not(preceding-sibling::*[@role="degree"])');(0,sre.ClearspeakFrench.defineRule_)("inch","clearspeak.default",'[n] children/*[1]; [t] "inch"',"self::superscript",'children/*[2][@role="prime"]',
|
740
|
+
'name(children/*[1])="number"','children/*[2][text()="\u2033"]','children/*[1][text()="1"]','not(preceding-sibling::*[@role="degree"])');(0,sre.ClearspeakFrench.defineRule_)("minutes","clearspeak.default",'[p] (pause:short); [n] children/*[1]; [t] "minutes"',"self::superscript",'children/*[2][@role="prime"]','preceding-sibling::*[@role="degree"]','children/*[2][text()="\u2032"]');(0,sre.ClearspeakFrench.defineRule_)("minute","clearspeak.default",'[p] (pause:short); [n] children/*[1]; [t] "minute"',
|
741
|
+
"self::superscript",'children/*[2][@role="prime"]','preceding-sibling::*[@role="degree"]','children/*[2][text()="\u2032"]','children/*[1][text()="1"]');(0,sre.ClearspeakFrench.defineRule_)("seconds","clearspeak.default",'[p] (pause:short); [n] children/*[1]; [t] "seconds"',"self::superscript",'children/*[2][@role="prime"]','preceding-sibling::*[@role="degree"]','children/*[2][text()="\u2033"]');(0,sre.ClearspeakFrench.defineRule_)("second","clearspeak.default",'[p] (pause:short); [n] children/*[1]; [t] "second"',
|
742
|
+
"self::superscript",'children/*[2][@role="prime"]','preceding-sibling::*[@role="degree"]','children/*[2][text()="\u2033"]','children/*[1][text()="1"]');(0,sre.ClearspeakFrench.defineRule_)("degrees-angle","clearspeak.Prime_Angle",'[n] children/*[1]; [t] "degrees"; [p] (pause:short)',"self::punctuation",'@role="degree"');(0,sre.ClearspeakFrench.defineRule_)("degree-angle","clearspeak.Prime_Angle",'[n] children/*[1]; [t] "degree"; [p] (pause:short)',"self::punctuation",'@role="degree"','children/*[1][text()="1"]');
|
743
|
+
(0,sre.ClearspeakFrench.defineRule_)("minutes-angle","clearspeak.Prime_Angle",'[n] children/*[1]; [t] "minutes"; [p] (pause:short)',"self::superscript",'children/*[2][@role="prime"]','name(children/*[1])="number" or (children/*[1][@role="latinletter"] and ""=translate(children/*[1]/text(),"abcdefghijklmnopqrstuvwxyz", ""))','children/*[2][text()="\u2032"]');(0,sre.ClearspeakFrench.defineRule_)("minute-angle","clearspeak.Prime_Angle",'[n] children/*[1]; [t] "minute"; [p] (pause:short)',"self::superscript",
|
744
|
+
'children/*[2][@role="prime"]','children/*[2][text()="\u2032"]','children/*[1][text()="1"]');(0,sre.ClearspeakFrench.defineRule_)("seconds-angle","clearspeak.Prime_Angle",'[n] children/*[1]; [t] "seconds"; [p] (pause:short)',"self::superscript",'children/*[2][@role="prime"]','name(children/*[1])="number" or (children/*[1][@role="latinletter"] and ""=translate(children/*[1]/text(),"abcdefghijklmnopqrstuvwxyz", ""))','children/*[2][text()="\u2033"]');(0,sre.ClearspeakFrench.defineRule_)("second-angle",
|
745
|
+
"clearspeak.Prime_Angle",'[n] children/*[1]; [t] "second"; [p] (pause:short)',"self::superscript",'children/*[2][@role="prime"]','children/*[2][text()="\u2033"]','children/*[1][text()="1"]');(0,sre.ClearspeakFrench.defineRule_)("feet-length","clearspeak.Prime_Length",'[n] children/*[1]; [t] "feet"; [p] (pause:short)',"self::superscript",'children/*[2][@role="prime"]','name(children/*[1])="number" or (children/*[1][@role="latinletter"] and ""=translate(children/*[1]/text(),"abcdefghijklmnopqrstuvwxyz", ""))',
|
746
|
+
'children/*[2][text()="\u2032"]');(0,sre.ClearspeakFrench.defineRule_)("foot-length","clearspeak.Prime_Length",'[n] children/*[1]; [t] "foot"; [p] (pause:short)',"self::superscript",'children/*[2][@role="prime"]','children/*[2][text()="\u2032"]','children/*[1][text()="1"]');(0,sre.ClearspeakFrench.defineRule_)("inches-length","clearspeak.Prime_Length",'[n] children/*[1]; [t] "inches"; [p] (pause:short)',"self::superscript",'children/*[2][@role="prime"]','name(children/*[1])="number" or (children/*[1][@role="latinletter"] and ""=translate(children/*[1]/text(),"abcdefghijklmnopqrstuvwxyz", ""))',
|
747
|
+
'children/*[2][text()="\u2033"]');(0,sre.ClearspeakFrench.defineRule_)("inch-length","clearspeak.Prime_Length",'[n] children/*[1]; [t] "inch"; [p] (pause:short)',"self::superscript",'children/*[2][@role="prime"]','children/*[2][text()="\u2033"]','children/*[1][text()="1"]');(0,sre.ClearspeakFrench.defineRule_)("punctuated","clearspeak.default","[m] children/*","self::punctuated");(0,sre.ClearspeakFrench.defineRule_)("function","clearspeak.default","[n] text()","self::function");(0,sre.ClearspeakFrench.defineRule_)("appl",
|
748
|
+
"clearspeak.default",'[n] children/*[1]; [t] "de"; [n] children/*[2]; [p] (pause:"short")',"self::appl");(0,sre.ClearspeakFrench.defineRule_)("appl-simple","clearspeak.default",'[n] children/*[1]; [t] "de"; [p] (pause:"short"); [n] children/*[2]; [p] (pause:"short")',"self::appl",'@role="simple function"','name(children/*[2])="appl"');(0,sre.ClearspeakFrench.defineRule_)("appl-simple","clearspeak.default",'[n] children/*[1]; [t] "de"; [p] (pause:"short"); [n] children/*[2]; [p] (pause:"short")',"self::appl",
|
749
|
+
'@role="simple function"','name(children/*[2])="fenced"','name(children/*[2]/children/*[1])="appl"');(0,sre.ClearspeakFrench.defineRule_)("appl","clearspeak.Functions_None",'[p] (pause:"short"); [n] children/*[1]; [t] "fois"; [n] children/*[2]; [p] (pause:"short")',"self::appl");(0,sre.ClearspeakFrench.defineRule_)("function-prefix","clearspeak.default","[n] children/*[1]; [n] children/*[2]","self::appl",'@role="prefix function"');(0,sre.ClearspeakFrench.defineRule_)("binary-operation","clearspeak.ImpliedTimes_MoreImpliedTimes",
|
750
|
+
'[n] . (grammar:impliedTimes); [p] (pause:"short")',"self::appl",'@role="prefix function"','parent::*/parent::infixop[@role="implicit"]',"following-sibling::*",'not(contains(@grammar, "impliedTimes"))');(0,sre.ClearspeakFrench.defineRule_)("function-prefix-simple-arg","clearspeak.default","[n] children/*[1]; [n] children/*[2]","self::appl",'@role="prefix function"','name(children/*[2])="fenced"','contains(children/*[2]/children/*[1]/@annotation, "clearspeak:simple")','name(children/*[2]/children/*[1])!="number"',
|
751
|
+
'name(children/*[2]/children/*[1])!="identifier"','name(children/*[2]/children/*[1])!="appl"');(0,sre.ClearspeakFrench.defineRule_)("function-prefix-embell","clearspeak.default",'[p] (pause:"short"); [n] children/*[1]; [n] children/*[2]; [p] (pause:"short"); ',"self::appl",'@role="prefix function"','name(children/*[1])!="function"');(0,sre.ClearspeakFrench.defineRule_)("function-prefix-fenced-or-frac-arg","clearspeak.default",'[p] (pause:"short"); [n] children/*[1]; [t] "de"; [n] children/*[2]; [p] (pause:"short")',
|
752
|
+
"self::appl",'@role="prefix function"','(name(children/*[2])="fenced" and not(contains(children/*[2]/children/*[1]/@annotation, "clearspeak:simple"))) or name(children/*[2])="fraction" or (name(children/*[2])!="fenced" and not(contains(children/*[2]/@annotation, "clearspeak:simple")))',"self::*");(0,sre.ClearspeakFrench.defineRule_)("function-prefix-subscript","clearspeak.default",'[p] (pause:"short"); [n] children/*[1]; [t] "de"; [p] (pause:"short"); [n] children/*[2]; [p] (pause:"short")',"self::appl",
|
753
|
+
'@role="prefix function"','name(children/*[1])="subscript"',"self::*");(0,sre.ClearspeakFrench.defineRule_)("function-ln","clearspeak.default","[n] children/*[1]; [n] children/*[2]","self::appl",'@role="prefix function"','content/*[2][text()="ln"]',"not(following-sibling::*)",'not(contains(@grammar, "NatLog"))');(0,sre.ClearspeakFrench.defineRule_)("function-ln","clearspeak.default",'[n] children/*[1]; [n] children/*[2]; [p] (pause:"short")',"self::appl",'@role="prefix function"','content/*[2][text()="ln"]',
|
754
|
+
'not(contains(@grammar, "NatLog"))');(0,sre.ClearspeakFrench.defineRule_)("function-ln","clearspeak.default",'[n] children/*[1]; [t] "de"; [n] children/*[2]; [p] (pause:"short")',"self::appl",'@role="prefix function"','content/*[2][text()="ln"]','name(children/*[2])="fenced"','not(contains(@grammar, "NatLog"))');(0,sre.ClearspeakFrench.defineRule_)("function-ln","clearspeak.Log_LnAsNaturalLog","[n] . (grammar:NatLog)","self::appl",'@role="prefix function"','content/*[2][text()="ln"]',"not(following-sibling::*)",
|
755
|
+
'not(contains(@grammar, "NatLog"))');(0,sre.ClearspeakFrench.defineRule_)("function-ln","clearspeak.Log_LnAsNaturalLog",'[n] . (grammar:NatLog); [p] (pause:"short")',"self::appl",'@role="prefix function"','content/*[2][text()="ln"]','not(contains(@grammar, "NatLog"))');(0,sre.ClearspeakFrench.defineRule_)("function-prefix-as-exp","clearspeak.default",'[n] children/*[1]; [t] "de"; [p] (pause:"short"); [n] children/*[2]; [p] (pause:"short")',"self::appl",'@role="prefix function"','name(parent::*/parent::*)="superscript"',
|
756
|
+
"not(following-sibling::*)",'(name(children/*[2])="fenced" and not(contains(children/*[2]/children/*[1]/@annotation, "clearspeak:simple"))) or name(children/*[2])="fraction" or (name(children/*[2])!="fenced" and not(contains(children/*[2]/@annotation, "clearspeak:simple")))');(0,sre.ClearspeakFrench.defineRule_)("function-prefix-subscript-as-exp","clearspeak.default",'[n] children/*[1]; [t] "de"; [p] (pause:"short"); [n] children/*[2]; [p] (pause:"short")',"self::appl",'@role="prefix function"','name(parent::*/parent::*)="superscript"',
|
757
|
+
"not(following-sibling::*)",'name(children/*[1])="subscript"');(0,sre.ClearspeakFrench.defineRule_)("function-prefix-hyper","clearspeak.default",'[p] (pause:"short"); [n] children/*[1]; [t] "de"; [n] children/*[2]; [p] (pause:"short")',"self::appl",'@role="prefix function"',"CQFisHyperbolic");(0,sre.ClearspeakFrench.defineRule_)("function-prefix-inverse","clearspeak.default",'[p] (pause:"short"); [n] children/*[1]/children/*[1]; [t] "inverse de"; [n] children/*[2]; [p] (pause:"short")',"self::appl",
|
758
|
+
'@role="prefix function"','name(children/*[1])="superscript"','name(children/*[1]/children/*[2])="prefixop"','children/*[1]/children/*[2][@role="negative"]','children/*[1]/children/*[2]/children/*[1][text()="1"]','not(contains(@grammar, "functions_none"))');(0,sre.ClearspeakFrench.defineRule_)("function-prefix-inverse","clearspeak.Trig_Reciprocal",'[p] (pause:"short"); [t] "la reciproque de"; [n] children/*[1]/children/*[1]; [p] (pause:"short"); [n] children/*[2]; [p] (pause:"short")',"self::appl",
|
759
|
+
'@role="prefix function"','name(children/*[1])="superscript"','name(children/*[1]/children/*[2])="prefixop"','children/*[1]/children/*[2][@role="negative"]','children/*[1]/children/*[2]/children/*[1][text()="1"]','not(contains(@grammar, "functions_none"))');(0,sre.ClearspeakFrench.defineRule_)("function-prefix-inverse","clearspeak.Trig_Reciprocal",'[p] (pause:"short"); [t] "la reciproque de"; [n] children/*[1]/children/*[1];[n] children/*[2]; [p] (pause:"short")',"self::appl",'@role="prefix function"',
|
760
|
+
'name(children/*[1])="superscript"','name(children/*[1]/children/*[2])="prefixop"','contains(children/*[2]/@annotation, "clearspeak:simple")','children/*[1]/children/*[2][@role="negative"]','children/*[1]/children/*[2]/children/*[1][text()="1"]','not(contains(@grammar, "functions_none"))');(0,sre.ClearspeakFrench.defineRule_)("appl-triginverse","clearspeak.Trig_TrigInverse",'[p] (pause:"short"); [n] children/*[1]; [t] "de"; [n] children/*[2]; [p] (pause:"short")',"self::appl",'@role="prefix function"',
|
761
|
+
'name(children/*[1])="superscript"','name(children/*[1]/children/*[2])="prefixop"','children/*[1]/children/*[2][@role="negative"]','children/*[1]/children/*[2]/children/*[1][text()="1"]');(0,sre.ClearspeakFrench.defineRule_)("function-prefix-arc-simple","clearspeak.Trig_ArcTrig",'[p] (pause:"short"); [t] "arc"; [n] children/*[1]/children/*[1]; [n] children/*[2]; [p] (pause:"short")',"self::appl",'@role="prefix function"','name(children/*[1])="superscript"','name(children/*[1]/children/*[2])="prefixop"',
|
762
|
+
'children/*[1]/children/*[2][@role="negative"]','children/*[1]/children/*[2]/children/*[1][text()="1"]','not(contains(@grammar, "functions_none"))');(0,sre.ClearspeakFrench.defineRule_)("function-prefix-arc-simple","clearspeak.Trig_ArcTrig",'[p] (pause:"short"); [t] "arc"; [n] children/*[1]/children/*[1]; [p] (pause:"short"); [n] children/*[2]; [p] (pause:"short")',"self::appl",'@role="prefix function"','name(children/*[1])="superscript"','name(children/*[1]/children/*[2])="prefixop"','children/*[1]/children/*[2][@role="negative"]',
|
763
|
+
'children/*[1]/children/*[2]/children/*[1][text()="1"]','name(children/*[2])="fenced"','children/*[2]/children/*[1][@role="prefix function"]','contains(children/*[2]/children/*[1]/@annotation, "clearspeak:simple")','not(contains(@grammar, "functions_none"))');(0,sre.ClearspeakFrench.defineRule_)("function-prefix-arc","clearspeak.Trig_ArcTrig",'[p] (pause:"short"); [t] "arc"; [n] children/*[1]/children/*[1]; [t] "de"; [n] children/*[2]; [p] (pause:"short")',"self::appl",'@role="prefix function"','name(children/*[1])="superscript"',
|
764
|
+
'name(children/*[1]/children/*[2])="prefixop"','children/*[1]/children/*[2][@role="negative"]','children/*[1]/children/*[2]/children/*[1][text()="1"]','not(contains(@grammar, "functions_none"))','(name(children/*[2])="fenced" and not(contains(children/*[2]/children/*[1]/@annotation, "clearspeak:simple"))) or (name(children/*[2])="fraction" and children/*[2][@role!="vulgar"])');(0,sre.ClearspeakFrench.defineRule_)("function-inverse","clearspeak.default",'[n] children/*[1]; [t] "inverse"',"self::superscript",
|
765
|
+
'@role="prefix function" or @role="simple function"','name(children/*[2])="prefixop"','children/*[2][@role="negative"]','children/*[2]/children/*[1][text()="1"]','not(contains(@grammar, "functions_none"))');(0,sre.ClearspeakFrench.defineRule_)("function-inverse","clearspeak.Functions_Reciprocal",'[t] "la reciproque de"; [n] children/*[1]',"self::superscript",'@role="prefix function" or @role="simple function"','name(children/*[2])="prefixop"','children/*[2][@role="negative"]','children/*[2]/children/*[1][text()="1"]',
|
766
|
+
'not(contains(@grammar, "functions_none"))');(0,sre.ClearspeakFrench.defineRule_)("function-inverse","clearspeak.Functions_None","[n] . (grammar:functions_none)","self::superscript",'@role="prefix function" or @role="simple function"','name(children/*[2])="prefixop"','children/*[2][@role="negative"]','children/*[2]/children/*[1][text()="1"]','not(contains(@grammar, "functions_none"))');(0,sre.ClearspeakFrench.defineRule_)("superscript","clearspeak.default",'[n] children/*[1]; [t] "\u00e0 l\'exposant" (pause:"short"); [n] children/*[2]; [p] (pause:"short"); [t] "fin exposant" (pause:"short")',
|
767
|
+
"self::superscript");(0,sre.ClearspeakFrench.defineRule_)("superscript-simple-exponent","clearspeak.default",'[n] children/*[1]; [t] "\u00e0 la puissance"; [n] children/*[2]; [p] (pause:"medium")',"self::superscript","not(descendant::superscript)");(0,sre.ClearspeakFrench.defineRule_)("superscript-simple-exponent","clearspeak.default",'[n] children/*[1]; [t] "\u00e0 la puissance"; [n] children/*[2]; [p] (pause:"medium") ',"self::superscript","not(descendant::superscript)","not(following-sibling::*)");
|
768
|
+
(0,sre.ClearspeakFrench.defineRuleAlias_)("superscript-simple-exponent","self::superscript",'children/superscript/children/*[2][text()="2"] or children/superscript/children/*[2][text()="3"]','name(children/superscript/children/*[1])="number"','contains(children/superscript/children/*[1]/@annotation, "clearspeak:simple")');(0,sre.ClearspeakFrench.defineRuleAlias_)("superscript-simple-exponent","self::superscript",'children/superscript/children/*[2][text()="2"] or children/superscript/children/*[2][text()="3"]',
|
769
|
+
'name(children/superscript/children/*[1])="fraction"','contains(children/superscript/children/*[1]/@annotation, "clearspeak:simple")');(0,sre.ClearspeakFrench.defineRuleAlias_)("superscript-simple-exponent","self::superscript",'children/superscript/children/*[2][text()="2"] or children/superscript/children/*[2][text()="3"]','name(children/superscript/children/*[1])="identifier"');(0,sre.ClearspeakFrench.defineRuleAlias_)("superscript-simple-exponent","self::superscript",'children/*[2][@role="implicit"]',
|
770
|
+
"count(children/*[2]/children/*)=2",'contains(children/*[2]/children/*[1]/@annotation, "simple")','name(children/*[2]/children/*[2])="superscript"','(name(children/*[2]/children/*[2]/children/*[1])="number" and contains(children/*[2]/children/*[2]/children/*[1]/@annotation, "clearspeak:simple")) or name(children/*[2]/children/*[2]/children/*[1])="identifier"','children/*[2]/children/*[2]/children/*[2][text()="2"] or children/*[2]/children/*[2]/children/*[2][text()="3"]');(0,sre.ClearspeakFrench.defineRule_)("superscript-simple-function",
|
771
|
+
"clearspeak.Functions_None","[n] . (grammar:functions_none)","self::superscript",'name(children/*[1])="identifier"','children/*[1][@role="simple function"]','not(contains(@grammar, "functions_none"))');(0,sre.ClearspeakFrench.defineRule_)("superscript-ordinal","clearspeak.Exponent_Ordinal",'[n] children/*[1]; [t] "\u00e0 la"; [n] children/*[2] (grammar:ordinal); [t] "puissance" (pause:"medium")',"self::superscript",'name(children/*[2])="identifier"','children/*[2][@role="latinletter"]');(0,sre.ClearspeakFrench.defineRule_)("superscript-ordinal",
|
772
|
+
"clearspeak.Exponent_Ordinal",'[n] children/*[1]; [t] "\u00e0 la puissance"; [n] children/*[2]; [p] (pause:"medium")',"self::superscript",'name(children/*[2])="identifier"','children/*[2][@role="latinletter"]',"CQFisCaptial");(0,sre.ClearspeakFrench.defineRule_)("exponent","clearspeak.default",'[n] text() (join:"-"); [t] "i\u00e8me"',"self::identifier",'contains(@grammar, "ordinal")');(0,sre.ClearspeakFrench.defineRule_)("exponent","clearspeak.default","[t] CSFordinalExponent","self::number",'@role="integer"',
|
773
|
+
'contains(@grammar, "ordinal")','text()!="0"');(0,sre.ClearspeakFrench.defineRule_)("exponent","clearspeak.Exponent_Ordinal","[t] CSFwordOrdinal","self::number",'@role="integer"','contains(@grammar, "ordinal")','text()!="0"');(0,sre.ClearspeakFrench.defineRule_)("exponent","clearspeak.Exponent_Ordinal",'[t] "zero"',"self::number",'@role="integer"','contains(@grammar, "ordinal")','text()="0"');(0,sre.ClearspeakFrench.defineRule_)("exponent","clearspeak.Exponent_OrdinalPower","[t] CSFwordOrdinal","self::number",
|
774
|
+
'@role="integer"','contains(@grammar, "ordinal")','text()!="0"');(0,sre.ClearspeakFrench.defineRule_)("exponent","clearspeak.Exponent_OrdinalPower",'[t] "zero"',"self::number",'@role="integer"','contains(@grammar, "ordinal")','text()="0"');(0,sre.ClearspeakFrench.defineRule_)("square","clearspeak.default",'[n] children/*[1]; [t] "au carr\u00e9"',"self::superscript",'children/*[2][text()="2"]','name(children/*[1])!="text" or not(name(children/*[1])="text" and (name(../../../punctuated[@role="text"]/..)="stree" or name(..)="stree"))',
|
775
|
+
"self::*","self::*");(0,sre.ClearspeakFrench.defineRule_)("cube","clearspeak.default",'[n] children/*[1]; [t] "au cube"',"self::superscript",'children/*[2][text()="3"]','name(children/*[1])!="text" or not(name(children/*[1])="text" and (name(../../../punctuated[@role="text"]/..)="stree" or name(..)="stree"))',"self::*","self::*");(0,sre.ClearspeakFrench.defineRule_)("paren-simple","clearspeak.default","[n] children/*[1]","self::fenced",'@role="leftright"','contains(children/*[1]/@annotation, "clearspeak:simple")',
|
776
|
+
'name(../..)!="superscript" and name(../..)!="subscript"');(0,sre.ClearspeakFrench.defineRule_)("paren-simple-exp","clearspeak.default","[n] children/*[1]","self::fenced",'@role="leftright"','name(../..)="superscript"','children/*[1][@role="integer"] or children/*[1][@role="float"] or (children/*[1][@role="vulgar"] and contains(children/*[1]/@annotation, "clearspeak:simple")) or children/*[1][@role="latinletter"] or children/*[1][@role="greekletter"] or children/*[1][@role="otherletter"]');(0,sre.ClearspeakFrench.defineRule_)("paren-simple-nested-func",
|
777
|
+
"clearspeak.default","[n] children/*[1]","self::fenced",'@role="leftright"','name(../*[1])="identifier" or name(../*[1])="function"','parent::*/parent::*[@role="simple function" or @role="prefix function"]','children/*[1][@role="simple function" or @role="prefix function"]','contains(children/*[1]/children/*[2]/children/*[1]/@annotation, "clearspeak:simple") or name(children/*[1]/children/*[2]/children/*[1])="subscript" or name(children/*[1]/children/*[2]/children/*[1])="superscript" or children/*[1]/children/*[2]/children/*[1][@role="vulgar"] ');
|
778
|
+
(0,sre.ClearspeakFrench.defineRule_)("paren-simple-nested-func-no-bracket","clearspeak.Functions_None","[n] children/*[1];","self::fenced",'@role="leftright"','name(../*[1])="identifier" or name(../*[1])="function"','parent::*/parent::*[@role="simple function" or @role="prefix function"]','children/*[1][@role="simple function" or @role="prefix function"]','name(children/*[1]/children/*[1])="identifier" or name(children/*[1]/children/*[1])="function"','contains(children/*[1]/children/*[2]/children/*[1]/@annotation, "clearspeak:simple")',
|
779
|
+
'name(children/*[1]/children/*[2]/children/*[1])="identifier" or name(children/*[1]/children/*[2]/children/*[1])="number"');(0,sre.ClearspeakFrench.defineRule_)("fences-open-close","clearspeak.default",'[p] (pause:"short"); [n] content/*[1] (grammar:spokenFence); [p] (pause:"short"); [n] children/*[1]; [p] (pause:"short"); [n] content/*[2] (grammar:spokenFence); [p] (pause:"short")',"self::fenced",'@role="leftright"');(0,sre.ClearspeakFrench.defineRule_)("paren-simple-nested-func","clearspeak.default",
|
780
|
+
'[p] (pause:"short"); [n] content/*[1]; [p] (pause:"short"); [n] children/*[1]; [p] (pause:"short"); [n] content/*[2]; [p] (pause:"short")',"self::fenced",'@role="leftright"','name(../*[1])="identifier" or name(../*[1])="function"','parent::*/parent::*[@role="simple function" or @role="prefix function"]','not(contains(children/*[1]/@annotation, "clearspeak:simple"))');(0,sre.ClearspeakFrench.defineRule_)("paren-simple-nested-func","clearspeak.Functions_None",'[p] (pause:"short"); [n] content/*[1] (grammar:spokenFence); [p] (pause:"short"); [n] children/*[1]; [p] (pause:"short"); [n] content/*[2] (grammar:spokenFence); [p] (pause:"short")',
|
781
|
+
"self::fenced",'@role="leftright"','name(../*[1])="identifier" or name(../*[1])="function"','parent::*/parent::*[@role="simple function" or @role="prefix function"]','children/*[1][@role="simple function" or @role="prefix function"]','contains(children/*[1]/children/*[2]/children/*[1]/@annotation, "clearspeak:simple") or name(children/*[1]/children/*[2]/children/*[1])="subscript" or name(children/*[1]/children/*[2]/children/*[1])="superscript" or children/*[1]/children/*[2]/children/*[1][@role="vulgar"] ');
|
782
|
+
(0,sre.ClearspeakFrench.defineSpecialisedRule_)("fences-open-close","clearspeak.default","clearspeak.Paren_Speak");(0,sre.ClearspeakFrench.defineRuleAlias_)("fences-open-close","self::fenced",'@role="composed function"');(0,sre.ClearspeakFrench.defineRule_)("fence-silent","clearspeak.Paren_Silent",'[p] (pause:"short"); [n] children/*[1]; [p] (pause:"short")',"self::fenced");(0,sre.ClearspeakFrench.defineRule_)("fences-open-close","clearspeak.ImpliedTimes_None",'[p] (pause:"short"); [n] content/*[1] (grammar:spokenFence); [p] (pause:"short"); [n] children/*[1]; [p] (pause:"short"); [n] content/*[2] (grammar:spokenFence); [p] (pause:"short")',
|
783
|
+
"self::fenced",'@role="leftright"','parent::*/parent::*[@role!="simple function"]','parent::*/parent::*[@role!="prefix function"]');(0,sre.ClearspeakFrench.defineRule_)("fence-nesting","clearspeak.Paren_SpeakNestingLevel","[n] text() (grammar:insertNesting=CSFnestingDepth)","self::fence",'contains(@grammar, "spokenFence")',"CQFmatchingFences");(0,sre.ClearspeakFrench.defineRule_)("fence-no-nesting","clearspeak.Paren_SpeakNestingLevel","[n] text()","self::fence");(0,sre.ClearspeakFrench.defineRule_)("fences-points",
|
784
|
+
"clearspeak.Paren_CoordPoint",'[t] "le point avec coordon\u00e9es"; [n] children/*[1]',"self::fenced",'name(children/*[1])="punctuated"','children/*[1][@role="sequence"]');(0,sre.ClearspeakFrench.defineRule_)("fences-interval","clearspeak.Paren_Interval",'[t] "un intervalle de"; [n] children/*[1]/children/*[1]; [t] "\u00e0"; [n] children/*[1]/children/*[3]; [p] (pause:"short"); [n] . (grammar:interval)',"self::fenced",'not(contains(@grammar, "interval"))','name(children/*[1])="punctuated"','children/*[1][@role="sequence"]',
|
785
|
+
"count(./children/*[1]/content/*)=1",'children/*[1]/content/*[1][@role="comma"]');(0,sre.ClearspeakFrench.defineRule_)("interval-open","clearspeak.Paren_Interval",'[t] "sans inclure"; [n] children/*[1]/children/*[1]; [t] "ni"; [n] children/*[1]/children/*[3]',"self::fenced",'contains(@grammar, "interval")','content/*[1]/text()="("','content/*[2]/text()=")"');(0,sre.ClearspeakFrench.defineRule_)("interval-closed-open","clearspeak.Paren_Interval",'[t] "avec"; [n] children/*[1]/children/*[1]; [t] "inclus"; [p] (pause:"short"); [t] "mais sans inclure"; [n] children/*[1]/children/*[3]',
|
786
|
+
"self::fenced",'contains(@grammar, "interval")','content/*[1]/text()="["','content/*[2]/text()=")"');(0,sre.ClearspeakFrench.defineRule_)("interval-open-closed","clearspeak.Paren_Interval",'[t] "sans inclure"; [n] children/*[1]/children/*[1]; [p] (pause:"short"); [t] "mais avec"; [n] children/*[1]/children/*[3]; [t] "inclus"',"self::fenced",'contains(@grammar, "interval")','content/*[1]/text()="("','content/*[2]/text()="]"');(0,sre.ClearspeakFrench.defineRule_)("interval-closed","clearspeak.Paren_Interval",
|
787
|
+
'[t] "avec"; [n] children/*[1]/children/*[1]; [t] "et"; [n] children/*[1]/children/*[3]; [t] "inclus"',"self::fenced",'contains(@grammar, "interval")','content/*[1]/text()="["','content/*[2]/text()="]"');(0,sre.ClearspeakFrench.defineRule_)("interval-open-inf-r","clearspeak.Paren_Interval",'[t] "sans inclure"; [n] children/*[1]/children/*[1]',"self::fenced",'contains(@grammar, "interval")','content/*[1]/text()="("','content/*[2]/text()=")"','children/*[1]/children/*[3]/text()="\u221e" or (name(children/*[1]/children/*[3])="prefixop" and children/*[1]/children/*[3]/children/*[1]/text()="\u221e")');
|
788
|
+
(0,sre.ClearspeakFrench.defineRule_)("interval-open-inf-l","clearspeak.Paren_Interval",'[t] "sans inclure"; [n] children/*[1]/children/*[3]',"self::fenced",'contains(@grammar, "interval")','content/*[1]/text()="("','content/*[2]/text()=")"','children/*[1]/children/*[1]/text()="\u221e" or (name(children/*[1]/children/*[1])="prefixop" and children/*[1]/children/*[1]/children/*[1]/text()="\u221e")');(0,sre.ClearspeakFrench.defineRule_)("interval-open-inf-lr","clearspeak.Paren_Interval","","self::fenced",
|
789
|
+
'contains(@grammar, "interval")','content/*[1]/text()="("','content/*[2]/text()=")"','children/*[1]/children/*[3]/text()="\u221e" or (name(children/*[1]/children/*[3])="prefixop" and children/*[1]/children/*[3]/children/*[1]/text()="\u221e")','children/*[1]/children/*[1]/text()="\u221e" or (name(children/*[1]/children/*[1])="prefixop" and children/*[1]/children/*[1]/children/*[1]/text()="\u221e")');(0,sre.ClearspeakFrench.defineRule_)("interval-closed-open-inf","clearspeak.Paren_Interval",'[t] "avec"; [n] children/*[1]/children/*[1]; [t] "inclus"',
|
790
|
+
"self::fenced",'contains(@grammar, "interval")','content/*[1]/text()="["','content/*[2]/text()=")"','children/*[1]/children/*[3]/text()="\u221e" or (name(children/*[1]/children/*[3])="prefixop" and children/*[1]/children/*[3]/children/*[1]/text()="\u221e")');(0,sre.ClearspeakFrench.defineRule_)("interval-open-closed-inf","clearspeak.Paren_Interval",'[t] "avec"; [n] children/*[1]/children/*[3]; [t] "inclus"',"self::fenced",'contains(@grammar, "interval")','content/*[1]/text()="("','content/*[2]/text()="]"',
|
791
|
+
'children/*[1]/children/*[1]/text()="\u221e" or (name(children/*[1]/children/*[1])="prefixop" and children/*[1]/children/*[1]/children/*[1]/text()="\u221e")');(0,sre.ClearspeakFrench.defineRule_)("paren-nested-embellished-funcs","clearspeak.Functions_None",'[p] (pause:"short"); [n] content/*[1]; [p] (pause:"short"); [n] children/*[1]; [p] (pause:"short"); [n] content/*[2]; [p] (pause:"short")',"self::fenced",'@role="leftright"','name(../..)="appl"','name(children/*[1]) = "appl"','preceding-sibling::*/descendant-or-self::*[@role="subsup"] or children/*[1]/descendant-or-self::*[@role="subsup"]');
|
792
|
+
(0,sre.ClearspeakFrench.defineRule_)("set-empty","clearspeak.default",'[t] "ensemble vide"',"self::fenced",'@role="set empty"');(0,sre.ClearspeakFrench.defineRule_)("set-extended","clearspeak.default",'[t] "ensemble des"; [n] children/*[1]/children/*[1]; [t] "tel que"; [n] children/*[1]/children/*[3]',"self::fenced",'@role="set extended"');(0,sre.ClearspeakFrench.defineRule_)("set-collection","clearspeak.default",'[t] "ensemble"; [n] children/*[1]',"self::fenced",'@role="set collection"');(0,sre.ClearspeakFrench.defineRuleAlias_)("set-collection",
|
793
|
+
"self::fenced",'@role="set singleton"');(0,sre.ClearspeakFrench.defineRule_)("set-extended","clearspeak.Sets_woAll",'[t] "ensemble de"; [n] children/*[1]/children/*[1]; [t] "tel que"; [n] children/*[1]/children/*[3]',"self::fenced",'@role="set extended"');(0,sre.ClearspeakFrench.defineRule_)("set-collection","clearspeak.Sets_SilentBracket","[n] children/*[1]","self::fenced",'@role="set collection"');(0,sre.ClearspeakFrench.defineRule_)("subscript","clearspeak.default",'[p] (pause:short); [n] children/*[1]; [t] "sub"; [n] children/*[2]; [p] (pause:short)',
|
794
|
+
"self::subscript");(0,sre.ClearspeakFrench.defineRule_)("subscript-base","clearspeak.default",'[n] children/*[1]; [t] "base"; [n] children/*[2]',"self::subscript","CQFisLogarithm");(0,sre.ClearspeakFrench.defineRule_)("subscript-index","clearspeak.default",'[n] children/*[1]; [t] "sub"; [n] children/*[2]',"self::subscript",'contains(@grammar, "simpleDet")');(0,sre.ClearspeakFrench.defineRule_)("fraction","clearspeak.default",'[p] (pause:short); [t] "fraction avec num\u00e9rateur"; [n] children/*[1]; [p] (pause:short); [t] "et d\u00e9nominateur"; [n] children/*[2]; [p] (pause:short)',
|
795
|
+
"self::fraction");(0,sre.ClearspeakFrench.defineRule_)("fraction","clearspeak.Functions_None",'[p] (pause:short); [t] "fraction avec num\u00e9rateur"; [n] children/*[1]; [p] (pause:short); [t] "et d\u00e9nominateur"; [n] children/*[2]; [p] (pause:short)',"self::fraction",'name(children/*[1])="appl" or name(children/*[2])="appl"');(0,sre.ClearspeakFrench.defineRule_)("simple-fraction","clearspeak.default",'[p] (pause:short); [n] children/*[1]; [t] "sur"; [n] children/*[2]; [p] (pause:short)',"self::fraction",
|
796
|
+
'contains(children/*[1]/@annotation, "clearspeak:simple") or contains(children/*[1]/@annotation, "clearspeak:unit")','contains(children/*[2]/@annotation, "clearspeak:simple") or contains(children/*[2]/@annotation, "clearspeak:unit")');(0,sre.ClearspeakFrench.defineRule_)("simple-vulgar-fraction","clearspeak.default",'[p] (pause:short); [n] children/*[1]; [t] "sur"; [n] children/*[2]; [p] (pause:short)',"self::fraction",'@role="vulgar"');(0,sre.ClearspeakFrench.defineRule_)("simple-text-fraction",
|
797
|
+
"clearspeak.default",'[p] (pause:short); [n] children/*[1]; [t] "sur"; [n] children/*[2]; [p] (pause:short)',"self::fraction",'name(children/*[1])="text"','name(children/*[2])="text"');(0,sre.ClearspeakFrench.defineRule_)("simple-text-fraction","clearspeak.default",'[p] (pause:short); [n] children/*[1]; [t] "sur"; [n] children/*[2]; [p] (pause:short)',"self::fraction",'name(children/*[1])="infixop"','children/*[1][@role="unit"]','name(children/*[2])="text"');(0,sre.ClearspeakFrench.defineRule_)("vulgar-fraction",
|
798
|
+
"clearspeak.default","[t] CSFvulgarFraction","self::fraction",'@role="vulgar"',"CQFvulgarFractionSmall");(0,sre.ClearspeakFrench.defineRule_)("fraction","clearspeak.Fraction_Over",'[p] (pause:short); [n] children/*[1]; [t] "sur"; [n] children/*[2]; [p] (pause:short)',"self::fraction");(0,sre.ClearspeakFrench.defineRule_)("fraction","clearspeak.Fraction_OverEndFrac",'[p] (pause:short); [n] children/*[1]; [t] "sur"; [n] children/*[2]; [p] (pause:short); [t] "fin fraction"; [p] (pause:short)',"self::fraction");
|
799
|
+
(0,sre.ClearspeakFrench.defineRule_)("fraction","clearspeak.Fraction_FracOver",'[p] (pause:short); [t] "fraction"; [n] children/*[1]; [t] "sur"; [n] children/*[2]; [p] (pause:short)',"self::fraction");(0,sre.ClearspeakFrench.defineRule_)("fraction","clearspeak.Fraction_Per",'[p] (pause:short); [n] children/*[1]; [t] "par"; [n] children/*[2]; [p] (pause:short)',"self::fraction");(0,sre.ClearspeakFrench.defineRule_)("fraction","clearspeak.Fraction_GeneralEndFrac",'[p] (pause:short); [t] "fraction avec num\u00e9rateur"; [n] children/*[1]; [p] (pause:short); [t] "et d\u00e9nominateur"; [n] children/*[2]; [p] (pause:short); [t] "fin fraction"; [p] (pause:short)',
|
800
|
+
"self::fraction");(0,sre.ClearspeakFrench.defineRule_)("fraction","clearspeak.Fraction_General",'[p] (pause:short); [t] "fraction avec num\u00e9rateur"; [n] children/*[1]; [p] (pause:short); [t] "et d\u00e9nominateur"; [n] children/*[2]; [p] (pause:short)',"self::fraction");(0,sre.ClearspeakFrench.defineRule_)("simple-vulgar-fraction","clearspeak.Fraction_Ordinal","[t] CSFvulgarFraction","self::fraction",'@role="vulgar"');(0,sre.ClearspeakFrench.defineRule_)("fraction","clearspeak.Fraction_EndFrac",
|
801
|
+
'[p] (pause:short); [n] . (grammar:endfrac); [t] "fin fraction"; [p] (pause:short)',"self::fraction",'not(contains(@grammar, "endfrac"))','not(contains(children/*[1]/@annotation, "clearspeak:unit"))','not(contains(children/*[2]/@annotation, "clearspeak:unit"))');(0,sre.ClearspeakFrench.defineRule_)("vulgar-fraction","clearspeak.Fraction_EndFrac",'[p] (pause:short); [n] children/*[1]; [t] "sur"; [n] children/*[2]; [p] (pause:short)',"self::fraction",'name(children/*[1])="fraction"','name(children/*[2])="fraction"',
|
802
|
+
'contains(children/*[1]/@annotation, "clearspeak:simple")','contains(children/*[2]/@annotation, "clearspeak:simple")');(0,sre.ClearspeakFrench.defineRule_)("simple-vulgar-fraction","clearspeak.Fraction_EndFrac","[t] CSFvulgarFraction","self::fraction",'@role="vulgar"','contains(@annotation, "clearspeak:simple")',"self::*");(0,sre.ClearspeakFrench.defineRule_)("sqrt","clearspeak.default",'[t] "la racine carr\u00e9e de"; [n] children/*[1] (grammar:EndRoot=false); [p] (pause:short)',"self::sqrt");(0,sre.ClearspeakFrench.defineRule_)("sqrt-nested",
|
803
|
+
"clearspeak.default",'[p] (pause: "short"); [t] "la racine carr\u00e9e de"; [n] children/*[1] (grammar:EndRoot=false); [p] (pause:short)',"self::sqrt","not(preceding-sibling::*)","ancestor::sqrt|ancestor::root");(0,sre.ClearspeakFrench.defineRule_)("negative-sqrt","clearspeak.default",'[t] "la racine carr\u00e9e n\u00e9gative de"; [n] children/*[1]/children/*[1] (grammar:EndRoot=false); [p] (pause:short)',"self::prefixop",'@role="negative"','name(children/*[1])="sqrt"');(0,sre.ClearspeakFrench.defineRule_)("negative-sqrt",
|
804
|
+
"clearspeak.default",'[p] (pause: "short"); [t] "la racine carr\u00e9e n\u00e9gative de"; [n] children/*[1]/children/*[1] (grammar:EndRoot=false); [p] (pause:short)',"self::prefixop",'@role="negative"','name(children/*[1])="sqrt"',"not(preceding-sibling::*)","ancestor::sqrt|ancestor::root");(0,sre.ClearspeakFrench.defineRule_)("sqrt-plus-minus","clearspeak.Roots_PosNegSqRoot",'[t] "la racine carr\u00e9e positive de"; [n] children/*[1] (grammar:EndRoot=false); [p] (pause:short)',"self::sqrt",'parent::stree or not(parent::*/parent::infixop[@role="addition"]) or (parent::*/parent::*[1]/text()!="\u00b1" and parent::*/parent::*/text()!="\u2213")');
|
805
|
+
(0,sre.ClearspeakFrench.defineRule_)("sqrt-nested-plus-minus","clearspeak.Roots_PosNegSqRoot",'[p] (pause: "short"); [t] "la racine carr\u00e9e positive de"; [n] children/*[1] (grammar:EndRoot=false); [p] (pause:short)',"self::sqrt","not(preceding-sibling::*)","ancestor::sqrt|ancestor::root",'parent::stree or not(parent::*/parent::infixop[@role="addition"]) or (parent::*/parent::*[1]/text()!="\u00b1" and parent::*/parent::*/text()!="\u2213")');(0,sre.ClearspeakFrench.defineRule_)("sqrt-plus-minus",
|
806
|
+
"clearspeak.Roots_PosNegSqRootEnd",'[t] "la racine carr\u00e9e positive de"; [n] children/*[1] (grammar:EndRoot=false); [p] (pause:short)',"self::sqrt",'parent::stree or not(parent::*/parent::infixop[@role="addition"]) or (parent::*/parent::*[1]/text()!="\u00b1" and parent::*/parent::*/text()!="\u2213")');(0,sre.ClearspeakFrench.defineRule_)("sqrt-nested-plus-minus","clearspeak.Roots_PosNegSqRootEnd",'[p] (pause: "short"); [t] "la racine carr\u00e9e positive de"; [n] children/*[1] (grammar:EndRoot=false); [p] (pause:short)',
|
807
|
+
"self::sqrt","not(preceding-sibling::*)","ancestor::sqrt|ancestor::root",'parent::stree or not(parent::*/parent::infixop[@role="addition"]) or (parent::*/parent::*[1]/text()!="\u00b1" and parent::*/parent::*/text()!="\u2213")');(0,sre.ClearspeakFrench.defineRule_)("sqrt-endroot","clearspeak.Roots_RootEnd",'[n] . (grammar:EndRoot); [t] "fin racine"; [p] (pause:short)',"self::sqrt",'not(contains(@grammar, "EndRoot"))');(0,sre.ClearspeakFrench.defineRule_)("negative-sqrt-endroot","clearspeak.Roots_RootEnd",
|
808
|
+
'[n] . (grammar:EndRoot); [t] "fin racine"; [p] (pause:short)',"self::prefixop",'@role="negative"','name(children/*[1])="sqrt"','not(contains(@grammar, "EndRoot"))');(0,sre.ClearspeakFrench.defineRule_)("sqrt-endroot","clearspeak.Roots_PosNegSqRootEnd",'[n] . (grammar:EndRoot); [t] "fin racine"; [p] (pause:short)',"self::sqrt",'not(contains(@grammar, "EndRoot"))');(0,sre.ClearspeakFrench.defineRule_)("negative-sqrt-endroot","clearspeak.Roots_PosNegSqRootEnd",'[n] . (grammar:EndRoot); [t] "fin racine"; [p] (pause:short)',
|
809
|
+
"self::prefixop",'@role="negative"','name(children/*[1])="sqrt"','not(contains(@grammar, "EndRoot"))');(0,sre.ClearspeakFrench.defineRule_)("cube","clearspeak.default",'[t] "la racine cubique de"; [n] children/*[2] (grammar:EndRoot=false); [p] (pause:short)',"self::root",'children/*[1][text()="3"]');(0,sre.ClearspeakFrench.defineRule_)("cube-nested","clearspeak.default",'[p] (pause:short); [t] "la racine cubique de"; [n] children/*[2] (grammar:EndRoot=false); [p] (pause:short)',"self::root",'children/*[1][text()="3"]',
|
810
|
+
"not(preceding-sibling::*)","ancestor::sqrt|ancestor::root");(0,sre.ClearspeakFrench.defineRule_)("root","clearspeak.default",'[t] "la"; [n] children/*[1] (grammar:ordinal); [t] "racine de"; [n] children/*[2] (grammar:EndRoot=false); [p] (pause:short)',"self::root");(0,sre.ClearspeakFrench.defineRule_)("root-nested","clearspeak.default",'[p] (pause:short); [t] "la"; [n] children/*[1] (grammar:ordinal); [t] "racine de"; [n] children/*[2] (grammar:EndRoot=false); [p] (pause:short)',"self::root","not(preceding-sibling::*)",
|
811
|
+
"ancestor::sqrt|ancestor::root");(0,sre.ClearspeakFrench.defineRule_)("root-endroot","clearspeak.Roots_RootEnd",'[n] . (grammar:EndRoot); [t] "fin racine"; [p] (pause:short)',"self::root",'not(contains(@grammar, "EndRoot"))');(0,sre.ClearspeakFrench.defineRule_)("root-endroot","clearspeak.Roots_PosNegSqRootEnd",'[n] . (grammar:EndRoot); [t] "fin racine"; [p] (pause:short)',"self::root",'not(contains(@grammar, "EndRoot"))');(0,sre.ClearspeakFrench.defineRule_)("negative","clearspeak.default",'[t] "n\u00e9gatif"; [n] children/*[1]',
|
812
|
+
"self::prefixop",'@role="negative"');(0,sre.ClearspeakFrench.defineRule_)("positive","clearspeak.default",'[t] "positif"; [n] children/*[1]',"self::prefixop",'@role="positive"');(0,sre.ClearspeakFrench.defineRule_)("angle-measure","clearspeak.default",'[t] "la mesure de l\'" (join:""); [n] content/*[1]; [n] children/*[2] (grammar:angle)',"self::infixop",'content/*[1]/text()="\u2220"','children/*[1][text()="m"]');(0,sre.ClearspeakFrench.defineRule_)("prefix","clearspeak.default","[m] content/* (grammar:prefix); [n] children/*[1]",
|
813
|
+
"self::prefixop");(0,sre.ClearspeakFrench.defineRule_)("postfix","clearspeak.default","[n] children/*[1]; [m] content/* (grammar:postfix)","self::postfixop");(0,sre.ClearspeakFrench.defineRule_)("set-prefix-operators","clearspeak.default",'[t] "le"; [n] self::* (grammar:!prefix); [t] "de"',"self::*",'contains(@grammar,"prefix")','descendant-or-self::*/text()="\u2229" or descendant-or-self::*/text()="\u222a"',"self::*","self::*","self::*");(0,sre.ClearspeakFrench.defineRule_)("binary-operation","clearspeak.default",
|
814
|
+
"[m] children/* (sepFunc:CTXFcontentIterator);","self::infixop");(0,sre.ClearspeakFrench.defineRule_)("binary-operation","clearspeak.ImpliedTimes_MoreImpliedTimes","[m] children/* (sepFunc:CTXFcontentIterator);","self::infixop",'@role="implicit"');(0,sre.ClearspeakFrench.defineRule_)("binary-operation-pause","clearspeak.default","[p] (pause:short); [m] children/* (sepFunc:CTXFcontentIterator);","self::infixop",'@role="implicit"','name(children/*[1])="appl"');(0,sre.ClearspeakFrench.defineRule_)("binary-operation-pause",
|
815
|
+
"clearspeak.default","[m] children/* (sepFunc:CTXFcontentIterator); [p] (pause:short)","self::infixop",'@role="implicit"','name(children/*[last()])="appl"');(0,sre.ClearspeakFrench.defineRule_)("binary-operation-pause","clearspeak.default","[p] (pause:short); [m] children/* (sepFunc:CTXFcontentIterator); [p] (pause:short)","self::infixop",'@role="implicit"','name(children/*[1])="appl"','name(children/*[last()])="appl"');(0,sre.ClearspeakFrench.defineRule_)("implicit-times","clearspeak.default","[p] (pause:short)",
|
816
|
+
"self::operator",'@role="multiplication"','text()="\u2062"');(0,sre.ClearspeakFrench.defineRule_)("implicit-times","clearspeak.default","","self::operator",'@role="multiplication"','text()="\u2062"',"CQFsimpleArguments");(0,sre.ClearspeakFrench.defineRule_)("implicit-times","clearspeak.default","[n] text()","self::operator",'@role="multiplication"','text()="\u2062"',"CQFfencedArguments");(0,sre.ClearspeakFrench.defineRule_)("implicit-times","clearspeak.ImpliedTimes_MoreImpliedTimes","[n] text()",
|
817
|
+
"self::operator",'@role="multiplication"','text()="\u2062"');(0,sre.ClearspeakFrench.defineRule_)("implicit-times","clearspeak.ImpliedTimes_None","","self::operator",'@role="multiplication"','text()="\u2062"');(0,sre.ClearspeakFrench.defineRule_)("binary-operation-simple","clearspeak.default",'[m] children/* (rate:"0.5"); [p] (pause:short)',"self::infixop",'@role="implicit"','contains(@annotation, "clearspeak:simple")','not(contains(@grammar, "inFrac"))');(0,sre.ClearspeakFrench.defineRule_)("simple-in-fraction",
|
818
|
+
"clearspeak.default",'[n] . (rate:"0.5",grammar:inFrac)',"self::*",'contains(@annotation, "clearspeak:simple")','not(contains(@grammar, "inFrac"))','name(.)!="identifier"','name(.)!="function"','name(.)!="number"','name(parent::*/parent::*)="fraction"',"not(preceding-sibling::*)");(0,sre.ClearspeakFrench.defineRule_)("operators-after-power","clearspeak.Exponent_AfterPower",'[m] children/* (rate:"0.5")',"self::infixop",'@role="implicit"','contains(@grammar, "afterPower")');(0,sre.ClearspeakFrench.defineRule_)("relseq",
|
819
|
+
"clearspeak.default","[m] children/* (sepFunc:CTXFcontentIterator)","self::relseq");(0,sre.ClearspeakFrench.defineRule_)("multrel","clearspeak.default","[m] children/* (sepFunc:CTXFcontentIterator)","self::multirel");(0,sre.ClearspeakFrench.defineRule_)("natural-numbers","clearspeak.default",'[t] "les nombres entier naturel"',"self::identifier",'text()="\u2115" or (text()="N" and @font="double-struck")',"self::*","self::*","self::*");(0,sre.ClearspeakFrench.defineRule_)("integers","clearspeak.default",
|
820
|
+
'[t] "les nombres entiers"',"self::identifier",'text()="\u2124" or (text()="Z" and @font="double-struck")',"self::*","self::*","self::*");(0,sre.ClearspeakFrench.defineRule_)("rational-numbers","clearspeak.default",'[t] "les Nombres rationnels"',"self::identifier",'text()="\u211a" or (text()="Q" and @font="double-struck")',"self::*","self::*","self::*");(0,sre.ClearspeakFrench.defineRule_)("real-numbers","clearspeak.default",'[t] "les nombres r\u00e9els"',"self::identifier",'text()="\u211d" or (text()="R" and @font="double-struck")',
|
821
|
+
"self::*","self::*","self::*");(0,sre.ClearspeakFrench.defineRule_)("complex-numbers","clearspeak.default",'[t] "les nombres complexes"',"self::identifier",'text()="\u2102" or (text()="C" and @font="double-struck")',"self::*","self::*","self::*");(0,sre.ClearspeakFrench.defineRule_)("natural-numbers-super","clearspeak.default",'[t] "n" (join: "-"); [n] children/*[2] (grammar:numbers2alpha)',"self::superscript",'children/*[1]/text()="\u2115" or (children/*[1]/text()="N" and @font="double-struck")',
|
822
|
+
"self::*","self::*","self::*");(0,sre.ClearspeakFrench.defineRule_)("integers-super","clearspeak.default",'[t] "z" (join: "-"); [n] children/*[2] (grammar:numbers2alpha)',"self::superscript",'children/*[1]/text()="\u2124" or (children/*[1]/text()="Z" and @font="double-struck")',"self::*","self::*","self::*");(0,sre.ClearspeakFrench.defineRule_)("rational-numbers-super","clearspeak.default",'[t] "q" (join: "-"); [n] children/*[2] (grammar:numbers2alpha)',"self::superscript",'children/*[1]/text()="\u211a" or (children/*[1]/text()="Q" and @font="double-struck")',
|
823
|
+
"self::*","self::*","self::*");(0,sre.ClearspeakFrench.defineRule_)("real-numbers-super","clearspeak.default",'[t] "r" (join:"-"); [n] children/*[2] (grammar:numbers2alpha)',"self::superscript",'children/*[1]/text()="\u211d" or (children/*[1]/text()="R" and @font="double-struck")',"self::*","self::*","self::*");(0,sre.ClearspeakFrench.defineRule_)("complex-numbers-super","clearspeak.default",'[t] "c" (join:"-"); [n] children/*[2] (grammar:numbers2alpha)',"self::superscript",'children/*[1]/text()="\u2102" or (children/*[1]/text()="C" and @font="double-struck")',
|
824
|
+
"self::*","self::*","self::*");(0,sre.ClearspeakFrench.defineRule_)("natural-numbers-with-zero","clearspeak.default",'[t] "les nombres entiers naturel avec zero"',"self::subscript",'children/*[1]/text()="\u2115" or (children/*[1]/text()="N" and @font="double-struck")','children/*[2]/text()="0"');(0,sre.ClearspeakFrench.defineRule_)("positive-integers","clearspeak.default",'[t] "les nombres entiers positif"',"self::superscript",'children/*[1]/text()="\u2124" or (children/*[1]/text()="Z" and @font="double-struck")',
|
825
|
+
'children/*[2]/text()="+"',"self::*","self::*","self::*");(0,sre.ClearspeakFrench.defineRule_)("positive-integers","clearspeak.default",'[t] "les nombres entiers n\u00e9gatif"',"self::superscript",'children/*[1]/text()="\u2124" or (children/*[1]/text()="Z" and @font="double-struck")','children/*[2]/text()="-"',"self::*","self::*","self::*");(0,sre.ClearspeakFrench.defineRule_)("positive-rational-numbers","clearspeak.default",'[t] "les nombres rationnels positif"',"self::superscript",'children/*[1]/text()="\u211a" or (children/*[1]/text()="Q" and @font="double-struck")',
|
826
|
+
'children/*[2]/text()="+"',"self::*","self::*","self::*");(0,sre.ClearspeakFrench.defineRule_)("negative-rational-numbers","clearspeak.default",'[t] "les nombres rationnels n\u00e9gatif"',"self::superscript",'children/*[1]/text()="\u211a" or (children/*[1]/text()="Q" and @font="double-struck")','children/*[2]/text()="-"',"self::*","self::*","self::*");(0,sre.ClearspeakFrench.defineRule_)("fences-neutral","clearspeak.default",'[p] (pause:short); [t] "la valeur absolue de"; [n] children/*[1]; [p] (pause: short)',
|
827
|
+
"self::fenced",'@role="neutral"','content/*[1][text()]="|" or content/*[1][text()]="\u2758" or content/*[1][text()]="\uff5c"');(0,sre.ClearspeakFrench.defineRule_)("fences-neutral","clearspeak.AbsoluteValue_AbsEnd",'[p] (pause:short); [t] "la valeur absolue de"; [n] children/*[1]; [p] (pause: short); [t] "fin de valeur absolue"; [p] (pause: short)',"self::fenced",'@role="neutral"','content/*[1][text()]="|" or content/*[1][text()]="\u2758" or content/*[1][text()]="\uff5c"');(0,sre.ClearspeakFrench.defineRule_)("fences-neutral",
|
828
|
+
"clearspeak.AbsoluteValue_Cardinality",'[p] (pause:short); [t] "la cardinalit\u00e9 de"; [n] children/*[1]; [p] (pause: short)',"self::fenced",'@role="neutral"','content/*[1][text()]="|" or content/*[1][text()]="\u2758" or content/*[1][text()]="\uff5c"');(0,sre.ClearspeakFrench.defineRule_)("fences-neutral","clearspeak.AbsoluteValue_Determinant",'[p] (pause:short); [t] "le d\u00e9terminant de"; [n] children/*[1]; [p] (pause: short)',"self::fenced",'@role="neutral"','content/*[1][text()]="|" or content/*[1][text()]="\u2758" or content/*[1][text()]="\uff5c"');
|
829
|
+
(0,sre.ClearspeakFrench.defineRule_)("matrix","clearspeak.default",'[t] "la matrice de dimension"; [t] count(children/*); [t] "par";[t] count(children/*[1]/children/*); [p] (pause:long); [m] children/* (ctxtFunc:CTXFnodeCounter,context:"rang\u00e9e-:"); [p] (pause:long)',"self::matrix");(0,sre.ClearspeakFrench.defineRule_)("matrix-simple","clearspeak.default",'[t] "la matrice de dimension"; [t] count(children/*); [t] "par";[t] count(children/*[1]/children/*); [p] (pause:long); [m] children/* (ctxtFunc:CTXFnodeCounter,context:"rang\u00e9e-:",grammar:simpleDet); [p] (pause:long)',
|
830
|
+
"self::matrix","count(children/*)<4","count(children/*[1]/children/*)<4","CQFcellsSimple");(0,sre.ClearspeakFrench.defineRule_)("matrix-trivial","clearspeak.default",'[t] "la matrice de dimension 1 par 1 avec \u00e9l\u00e9ment"; [n] children/*[1]; [p] (pause:long)',"self::vector",'@role="squarematrix"');(0,sre.ClearspeakFrench.defineRule_)("determinant","clearspeak.default",'[t] "le d\u00e9terminant de la matrice de dimension"; [t] count(children/*); [t] "par";[t] count(children/*[1]/children/*); [p] (pause:long); [m] children/* (ctxtFunc:CTXFnodeCounter,context:"rang\u00e9e-:",grammar:simpleDet); [p] (pause:long)',
|
831
|
+
"self::matrix",'@role="determinant"',"count(children/*)<4","CQFcellsSimple");(0,sre.ClearspeakFrench.defineRule_)("determinant-simple","clearspeak.default",'[t] "le d\u00e9terminant de la matrice de dimension"; [t] count(children/*); [t] "par";[t] count(children/*[1]/children/*); [p] (pause:long); [m] children/* (ctxtFunc:CTXFnodeCounter,context:"rang\u00e9e-:"); [p] (pause:long)',"self::matrix",'@role="determinant"');(0,sre.ClearspeakFrench.defineRule_)("matrix-vector","clearspeak.default",'[t] "la matrice colonne de dimension"; [t] count(children/*); [t] "par";[t] count(children/*[1]/children/*); [p] (pause:long); [m] children/* (ctxtFunc:CTXFnodeCounter,context:"rang\u00e9e-:",grammar:simpleDet); [p] (pause:long)',
|
832
|
+
"self::vector");(0,sre.ClearspeakFrench.defineSpecialisedRule_)("matrix-vector","clearspeak.default","clearspeak.Matrix_SpeakColNum");(0,sre.ClearspeakFrench.defineRule_)("matrix-vector-simple","clearspeak.default",'[t] "la matrice colonne de dimension"; [t] count(children/*); [t] "par";[t] count(children/*[1]/children/*); [p] (pause:long); [m] children/* (sepFunc:CTXFpauseSeparator,separator:"short",grammar:simpleDet); [p] (pause:long)',"self::vector","count(children/*)<4","CQFcellsSimple",'@role!="squarematrix"');
|
833
|
+
(0,sre.ClearspeakFrench.defineRule_)("matrix-vector-simple","clearspeak.Matrix_SilentColNum",'[t] "la matrice colonne de dimension"; [t] count(children/*); [t] "par";[t] count(children/*[1]/children/*); [p] (pause:long); [m] children/* (sepFunc:CTXFpauseSeparator,separator:"short",grammar:simpleDet); [p] (pause:long)',"self::vector");(0,sre.ClearspeakFrench.defineRule_)("matrix-row-vector","clearspeak.default",'[t] "la matrice ligne de dimension"; [t] count(children/*); [t] "par";[t] count(children/*[1]/children/*); [p] (pause:long); [m] children/*[1]/children/* (ctxtFunc:CTXFnodeCounter,context:"colonne-:",grammar:simpleDet); [p] (pause:long)',
|
834
|
+
"self::matrix",'@role="rowvector"');(0,sre.ClearspeakFrench.defineSpecialisedRule_)("matrix-row-vector","clearspeak.default","clearspeak.Matrix_SpeakColNum");(0,sre.ClearspeakFrench.defineRule_)("matrix-row-vector-simple","clearspeak.default",'[t] "la matrice ligne de dimension"; [t] count(children/*); [t] "par";[t] count(children/*[1]/children/*); [p] (pause:long); [m] children/*[1]/children/* (sepFunc:CTXFpauseSeparator,separator:"short",grammar:simpleDet); [p] (pause:long)',"self::matrix",'@role="rowvector"',
|
835
|
+
"count(children/*[1]/children/*)<4","CQFcellsSimple");(0,sre.ClearspeakFrench.defineRule_)("matrix-row-vector-simple","clearspeak.Matrix_SilentColNum",'[t] "la matrice ligne de dimension"; [t] count(children/*); [t] "par";[t] count(children/*[1]/children/*); [p] (pause:long); [m] children/*[1]/children/* (sepFunc:CTXFpauseSeparator,separator:"short",grammar:simpleDet); [p] (pause:long)',"self::matrix",'@role="rowvector"');(0,sre.ClearspeakFrench.defineRule_)("matrix-row-simple","clearspeak.default",
|
836
|
+
'[m] children/* (sepFunc:CTXFpauseSeparator,separator:"short")',"self::row",'contains(@grammar, "simpleDet")');(0,sre.ClearspeakFrench.defineRule_)("matrix-row-simple","clearspeak.Matrix_SilentColNum",'[m] children/* (sepFunc:CTXFpauseSeparator,separator:"short")',"self::row");(0,sre.ClearspeakFrench.defineRule_)("line-simple","clearspeak.default","[n] children/*[1]","self::line",'contains(@grammar, "simpleDet")');(0,sre.ClearspeakFrench.defineRule_)("matrix-row","clearspeak.default",'[m] children/* (ctxtFunc:CTXFnodeCounter,context:"colonne-,- ",sepFunc:CTXFpauseSeparator,separator:"medium"); [p] (pause:long)',
|
837
|
+
"self::row");(0,sre.ClearspeakFrench.defineSpecialisedRule_)("matrix-row","clearspeak.default","clearspeak.Matrix_SpeakColNum");(0,sre.ClearspeakFrench.defineRule_)("matrix-cell","clearspeak.default","[n] children/*[1]","self::cell");(0,sre.ClearspeakFrench.defineRule_)("matrix-end-matrix","clearspeak.Matrix_EndMatrix",'[n] . (grammar:EndMatrix); [t] "fin matrice"',"self::matrix",'not(contains(@grammar, "EndMatrix"))');(0,sre.ClearspeakFrench.defineRule_)("matrix-end-vector","clearspeak.Matrix_EndMatrix",
|
838
|
+
'[n] . (grammar:EndMatrix); [t] "fin matrice"',"self::vector",'not(contains(@grammar, "EndMatrix"))');(0,sre.ClearspeakFrench.defineRule_)("matrix-end-determinant","clearspeak.Matrix_EndMatrix",'[n] . (grammar:EndMatrix); [t] "fin d\u00e9terminant"',"self::matrix",'@role="determinant"','not(contains(@grammar, "EndMatrix"))');(0,sre.ClearspeakFrench.defineRule_)("vector","clearspeak.Matrix_Vector",'[t] "le vecteur colonne de dimension"; [t] count(children/*); [t] "par";[t] count(children/*[1]/children/*); [p] (pause:long); [m] children/* (ctxtFunc:CTXFnodeCounter,context:"rang\u00e9e-:",grammar:simpleDet); [p] (pause:long)',
|
839
|
+
"self::vector");(0,sre.ClearspeakFrench.defineSpecialisedRule_)("vector","clearspeak.Matrix_Vector","clearspeak.Matrix_EndVector");(0,sre.ClearspeakFrench.defineRule_)("vector-simple","clearspeak.Matrix_Vector",'[t] "le vecteur colonne de dimension"; [t] count(children/*); [t] "par"; [t] count(children/*[1]/children/*); [p] (pause:long); [m] children/* (sepFunc:CTXFpauseSeparator,separator:"short",grammar:simpleDet); [p] (pause:long)',"self::vector","count(children/*)<4","CQFcellsSimple");(0,sre.ClearspeakFrench.defineSpecialisedRule_)("vector-simple",
|
840
|
+
"clearspeak.Matrix_Vector","clearspeak.Matrix_EndVector");(0,sre.ClearspeakFrench.defineRule_)("row-vector","clearspeak.Matrix_Vector",'[t] "le vecteur ligne de dimension"; [t] count(children/*); [t] "par";[t] count(children/*[1]/children/*); [p] (pause:long); [m] children/*[1]/children/* (ctxtFunc:CTXFnodeCounter,context:"colonne-:",grammar:simpleDet); [p] (pause:long)',"self::matrix",'@role="rowvector"');(0,sre.ClearspeakFrench.defineSpecialisedRule_)("row-vector","clearspeak.Matrix_Vector","clearspeak.Matrix_EndVector");
|
841
|
+
(0,sre.ClearspeakFrench.defineRule_)("row-vector-simple","clearspeak.Matrix_Vector",'[t] "le vecteur ligne de dimension"; [t] count(children/*); [t] "par";[t] count(children/*[1]/children/*); [p] (pause:long); [m] children/*[1]/children/* (sepFunc:CTXFpauseSeparator,separator:"short",grammar:simpleDet); [p] (pause:long)',"self::matrix",'@role="rowvector"',"count(children/*[1]/children/*)<4","CQFcellsSimple");(0,sre.ClearspeakFrench.defineSpecialisedRule_)("row-vector-simple","clearspeak.Matrix_Vector",
|
842
|
+
"clearspeak.Matrix_EndVector");(0,sre.ClearspeakFrench.defineRule_)("vector-end-matrix","clearspeak.Matrix_EndVector",'[n] . (grammar:EndMatrix); [t] "fin matrice"',"self::matrix",'not(contains(@grammar, "EndMatrix"))',"self::*");(0,sre.ClearspeakFrench.defineRule_)("vector-end-vector","clearspeak.Matrix_EndVector",'[n] . (grammar:EndMatrix); [t] "fin vecteur"',"self::vector",'not(contains(@grammar, "EndMatrix"))',"self::*");(0,sre.ClearspeakFrench.defineRule_)("vector-end-vector","clearspeak.Matrix_EndVector",
|
843
|
+
'[n] . (grammar:EndMatrix); [t] "fin vecteur"',"self::matrix",'@role="rowvector"','not(contains(@grammar, "EndMatrix"))',"self::*");(0,sre.ClearspeakFrench.defineRule_)("vector-end-determinant","clearspeak.Matrix_EndVector",'[n] . (grammar:EndMatrix); [t] "fin d\u00e9terminant"',"self::matrix",'@role="determinant"','not(contains(@grammar, "EndMatrix"))',"self::*");(0,sre.ClearspeakFrench.defineRule_)("binomial","clearspeak.Matrix_Combinatoric",'[n] children/*[2]/children/*[1]; [t] "parmi"; [n] children/*[1]/children/*[1]; ',
|
844
|
+
"self::vector",'@role="binomial"');(0,sre.ClearspeakFrench.defineRule_)("lines-summary","clearspeak.default",'[p] (pause:short); [t] count(children/*); [t] "lignes"; [n] . (grammar:layoutSummary)',"self::multiline",'not(contains(@grammar, "layoutSummary"))',"self::*");(0,sre.ClearspeakFrench.defineRule_)("lines-summary","clearspeak.MultiLineOverview_None","[n] . (grammar:layoutSummary)","self::multiline",'not(contains(@grammar, "layoutSummary"))',"self::*");(0,sre.ClearspeakFrench.defineRuleAlias_)("lines-summary",
|
845
|
+
"self::table",'not(contains(@grammar, "layoutSummary"))');(0,sre.ClearspeakFrench.defineRule_)("cases-summary","clearspeak.default",'[p] (pause:short); [t] count(children/*); [t] "cas"; [n] . (grammar:layoutSummary)',"self::cases",'not(contains(@grammar, "layoutSummary"))');(0,sre.ClearspeakFrench.defineRule_)("cases-summary","clearspeak.MultiLineOverview_None","[n] . (grammar:layoutSummary)","self::cases",'not(contains(@grammar, "layoutSummary"))',"self::*");(0,sre.ClearspeakFrench.defineRule_)("lines",
|
846
|
+
"clearspeak.default",'[p] (pause:short); [m] children/* (ctxtFunc:CTXFnodeCounter,context:"Ligne-:",sepFunc:CTXFpauseSeparator,separator:"long"); [p] (pause:long)',"self::table");(0,sre.ClearspeakFrench.defineRuleAlias_)("lines","self::multiline");(0,sre.ClearspeakFrench.defineRule_)("line","clearspeak.default","[n] children/*[1]","self::line");(0,sre.ClearspeakFrench.defineRule_)("row-medium","clearspeak.default",'[m] children/* (sepFunc:CTXFpauseSeparator,separator:"medium")',"self::row",'@role="table"');
|
847
|
+
(0,sre.ClearspeakFrench.defineRuleAlias_)("row-medium","self::row",'@role="cases"');(0,sre.ClearspeakFrench.defineRule_)("row-long","clearspeak.MultiLinePausesBetweenColumns_Long",'[m] children/* (sepFunc:CTXFpauseSeparator,separator:"long")',"self::row",'@role="table"');(0,sre.ClearspeakFrench.defineRuleAlias_)("row-long","self::row",'@role="cases"');(0,sre.ClearspeakFrench.defineRule_)("row-short","clearspeak.MultiLinePausesBetweenColumns_Short",'[m] children/* (sepFunc:CTXFpauseSeparator,separator:"short")',
|
848
|
+
"self::row",'@role="table"');(0,sre.ClearspeakFrench.defineRuleAlias_)("row-short","self::row",'@role="cases"');(0,sre.ClearspeakFrench.defineRule_)("blank-cell","clearspeak.default",'[t] "vide"',"self::cell","count(children/*)=0");(0,sre.ClearspeakFrench.defineRule_)("blank-empty","clearspeak.default",'[t] "vide"',"self::empty","count(../*)=1",'name(../..)="cell" or name(../..)="line"');(0,sre.ClearspeakFrench.defineRule_)("cases","clearspeak.default",'[p] (pause:short); [m] children/* (ctxtFunc:CTXFnodeCounter,context:"Cas-:",sepFunc:CTXFpauseSeparator,separator:"long"); [p] (pause:long)',
|
849
|
+
"self::cases");(0,sre.ClearspeakFrench.defineRule_)("lines-cases-summary","clearspeak.MultiLineLabel_Case",'[p] (pause:short); [t] count(children/*); [t] "cas"; [n] . (grammar:layoutSummary)',"self::multiline",'not(contains(@grammar, "layoutSummary"))');(0,sre.ClearspeakFrench.defineRuleAlias_)("lines-cases-summary","self::table",'not(contains(@grammar, "layoutSummary"))');(0,sre.ClearspeakFrench.defineRule_)("lines-cases","clearspeak.MultiLineLabel_Case",'[p] (pause:short); [m] children/* (ctxtFunc:CTXFnodeCounter,context:"Cas-:",sepFunc:CTXFpauseSeparator,separator:"long"); [p] (pause:long)',
|
850
|
+
"self::table");(0,sre.ClearspeakFrench.defineRuleAlias_)("lines-cases","self::multiline");(0,sre.ClearspeakFrench.defineRule_)("lines-equations-summary","clearspeak.MultiLineLabel_Equation",'[p] (pause:short); [t] count(children/*); [t] "\u00e9quations"; [n] . (grammar:layoutSummary)',"self::multiline",'not(contains(@grammar, "layoutSummary"))');(0,sre.ClearspeakFrench.defineRuleAlias_)("lines-equations-summary","self::table",'not(contains(@grammar, "layoutSummary"))');(0,sre.ClearspeakFrench.defineRule_)("lines-equations",
|
851
|
+
"clearspeak.MultiLineLabel_Equation",'[p] (pause:short); [m] children/* (ctxtFunc:CTXFnodeCounter,context:"\u00c9quation-:",sepFunc:CTXFpauseSeparator,separator:"long"); [p] (pause:long)',"self::table");(0,sre.ClearspeakFrench.defineRuleAlias_)("lines-equations","self::multiline");(0,sre.ClearspeakFrench.defineRule_)("lines-steps-summary","clearspeak.MultiLineLabel_Step",'[p] (pause:short); [t] count(children/*); [t] " \u00e9tapes"; [n] . (grammar:layoutSummary)',"self::multiline",'not(contains(@grammar, "layoutSummary"))');
|
852
|
+
(0,sre.ClearspeakFrench.defineRuleAlias_)("lines-steps-summary","self::table",'not(contains(@grammar, "layoutSummary"))');(0,sre.ClearspeakFrench.defineRule_)("lines-steps","clearspeak.MultiLineLabel_Step",'[p] (pause:short); [m] children/* (ctxtFunc:CTXFnodeCounter,context:" \u00c9tape-:",sepFunc:CTXFpauseSeparator,separator:"long"); [p] (pause:long)',"self::table");(0,sre.ClearspeakFrench.defineRuleAlias_)("lines-steps","self::multiline");(0,sre.ClearspeakFrench.defineRule_)("lines-rows-summary",
|
853
|
+
"clearspeak.MultiLineLabel_Row",'[p] (pause:short); [t] count(children/*); [t] "colonnes"; [n] . (grammar:layoutSummary)',"self::multiline",'not(contains(@grammar, "layoutSummary"))');(0,sre.ClearspeakFrench.defineRuleAlias_)("lines-rows-summary","self::table",'not(contains(@grammar, "layoutSummary"))');(0,sre.ClearspeakFrench.defineRule_)("lines-rows","clearspeak.MultiLineLabel_Row",'[p] (pause:short); [m] children/* (ctxtFunc:CTXFnodeCounter,context:"rang\u00e9e-:",sepFunc:CTXFpauseSeparator,separator:"long"); [p] (pause:long)',
|
854
|
+
"self::table");(0,sre.ClearspeakFrench.defineRuleAlias_)("lines-rows","self::multiline");(0,sre.ClearspeakFrench.defineRule_)("lines-constraints-summary","clearspeak.MultiLineLabel_Constraint",'[p] (pause:short); [t] count(children/*); [t] "contraintes"; [n] . (grammar:layoutSummary)',"self::multiline",'not(contains(@grammar, "layoutSummary"))');(0,sre.ClearspeakFrench.defineRuleAlias_)("lines-constraints-summary","self::table",'not(contains(@grammar, "layoutSummary"))');(0,sre.ClearspeakFrench.defineRule_)("lines-constraints",
|
855
|
+
"clearspeak.MultiLineLabel_Constraint",'[p] (pause:short); [m] children/* (ctxtFunc:CTXFnodeCounter,context:"Contrainte-:",sepFunc:CTXFpauseSeparator,separator:"long"); [p] (pause:long)',"self::table");(0,sre.ClearspeakFrench.defineRuleAlias_)("lines-constraints","self::multiline");(0,sre.ClearspeakFrench.defineRule_)("lines-none","clearspeak.MultiLineLabel_None",'[p] (pause:short); [m] children/* (sepFunc:CTXFpauseSeparator,separator:"long"); [p] (pause:long)',"self::table",'contains(@grammar, "layoutSummary")');
|
856
|
+
(0,sre.ClearspeakFrench.defineRuleAlias_)("lines-none","self::multiline",'contains(@grammar, "layoutSummary")');(0,sre.ClearspeakFrench.defineRuleAlias_)("lines-none","self::cases",'contains(@grammar, "layoutSummary")');(0,sre.ClearspeakFrench.defineRule_)("bigop","clearspeak.default",'[t] "le"; [n] children/*[1]; [t] "de"; [n] children/*[2]; [p] (pause:short)',"self::bigop");(0,sre.ClearspeakFrench.defineRule_)("limboth","clearspeak.default",'[n] children/*[1]; [t] "de"; [n] children/*[2];[t] "\u00e0"; [n] children/*[3];',
|
857
|
+
"self::limboth");(0,sre.ClearspeakFrench.defineRule_)("limlower","clearspeak.default",'[n] children/*[1]; [t] "sur"; [n] children/*[2]; [p] (pause:short)',"self::limlower");(0,sre.ClearspeakFrench.defineRule_)("limupper","clearspeak.default",'[n] children/*[1]; [t] "sous"; [n] children/*[2]; [p] (pause:short)',"self::limupper");(0,sre.ClearspeakFrench.defineRule_)("integral","clearspeak.default",'[t] "le"; [n] children/*[1]; [t] "de"; [n] children/*[2]; [p] (pause:short)',"self::integral");(0,sre.ClearspeakFrench.defineRule_)("overscript",
|
858
|
+
"clearspeak.default",'[n] children/*[1]; [t] "sous"; [n] children/*[2]; [p] (pause:short)',"self::overscore");(0,sre.ClearspeakFrench.defineRule_)("overscript","clearspeak.default","[n] children/*[1]; [n] children/*[2];","self::overscore",'children/*[2][@role="overaccent"]');(0,sre.ClearspeakFrench.defineRule_)("overscript-limits","clearspeak.default",'[n] children/*[1]; [t] "\u00e0"; [n] children/*[2]',"self::overscore",'children/*[2][@role!="overaccent"]','name(children/*[1])="underscore"','children/*[1]/children/*[2][@role!="underaccent"]');
|
859
|
+
(0,sre.ClearspeakFrench.defineRule_)("underscript","clearspeak.default",'[n] children/*[1]; [t] "sur"; [n] children/*[2]; [p] (pause:short)',"self::underscore");(0,sre.ClearspeakFrench.defineRule_)("underscript-limits","clearspeak.default",'[n] children/*[1]; [t] "de"; [n] children/*[2]',"self::underscore",'@role="underover"','children/*[2][@role!="underaccent"]');(0,sre.ClearspeakFrench.defineRule_)("number","clearspeak.default","[n] text()","self::number");(0,sre.ClearspeakFrench.defineRule_)("mixed-number",
|
860
|
+
"clearspeak.default",'[n] children/*[1]; [t] "et"; [n] children/*[2]; ',"self::number",'@role="mixed"');(0,sre.ClearspeakFrench.defineRule_)("number-with-chars","clearspeak.default",'[t] "nombre"; [m] CQFspaceoutNumber (grammar:protected)',"self::number",'@role="othernumber"','"" != translate(text(), "0123456789.,", "")','not(contains(@grammar, "protected"))');(0,sre.ClearspeakFrench.defineRule_)("decimal-period","clearspeak.default",'[t] "la d\u00e9cimale"; [n] children/*[1] (grammar:spaceout); [t] "virgule suivi par les chiffres r\u00e9p\u00e9t\u00e9s"; [n] children/*[3]/children/*[1] (grammar:spaceout)',
|
861
|
+
"self::punctuated",'@role="sequence"',"count(./content/*)=1",'./content/*[1][@role="fullstop"]','name(children/*[1])="number"','children/*[1][@role="integer"]','name(children/*[3])="overscore"','children/*[3][@role="integer"]','children/*[3]/children/*[2][@role="overaccent"]','children/*[3]/children/*[2][text()="\u00af" or text()="\uffe3" or text()="\uff3f" or text()="_" or text()="\u203e"]');(0,sre.ClearspeakFrench.defineRule_)("decimal-period","clearspeak.default",'[t] "la d\u00e9cimale"; [n] children/*[1] (grammar:spaceout); [t] "suivi par les chiffres r\u00e9p\u00e9t\u00e9s"; [n] children/*[2]/children/*[1] (grammar:spaceout);',
|
862
|
+
"self::infixop",'@role="implicit"',"count(./children/*)=2",'name(children/*[1])="number"','children/*[1][@role="float"]','name(children/*[2])="overscore"','children/*[2][@role="integer"]','children/*[2]/children/*[2][@role="overaccent"]','children/*[2]/children/*[2][text()="\u00af" or text()="\uffe3" or text()="\uff3f" or text()="_" or text()="\u203e"]');(0,sre.ClearspeakFrench.defineRule_)("decimal-period-singular","clearspeak.default",'[t] "la d\u00e9cimale"; [n] children/*[1] (grammar:spaceout); [t] "virgule suivi par le chiffre r\u00e9p\u00e9t\u00e9"; [n] children/*[3]/children/*[1] (grammar:spaceout)',
|
863
|
+
"self::punctuated",'@role="sequence"',"count(./content/*)=1",'./content/*[1][@role="fullstop"]','name(children/*[1])="number"','children/*[1][@role="integer"]','name(children/*[3])="overscore"','children/*[3][@role="integer"]','children/*[3]/children/*[2][@role="overaccent"]','children/*[3]/children/*[2][text()="\u00af" or text()="\uffe3" or text()="\uff3f" or text()="_" or text()="\u203e"]',"string-length(./children/*[3]/children/*[1]/text())=1");(0,sre.ClearspeakFrench.defineRule_)("decimal-period-singular",
|
864
|
+
"clearspeak.default",'[t] "la d\u00e9cimale"; [n] children/*[1] (grammar:spaceout); [t] "suivi par le chiffre r\u00e9p\u00e9t\u00e9"; [n] children/*[2]/children/*[1] (grammar:spaceout);',"self::infixop",'@role="implicit"',"count(./children/*)=2",'name(children/*[1])="number"','children/*[1][@role="float"]','name(children/*[2])="overscore"','children/*[2][@role="integer"]','children/*[2]/children/*[2][@role="overaccent"]','children/*[2]/children/*[2][text()="\u00af" or text()="\uffe3" or text()="\uff3f" or text()="_" or text()="\u203e"]',
|
865
|
+
"string-length(./children/*[2]/children/*[1]/text())=1");(0,sre.ClearspeakFrench.defineRule_)("number-with-spaces","clearspeak.default","[m] CQFspaceoutNumber (grammar:!spaceout:number)","self::number",'contains(@grammar, "spaceout")');(0,sre.ClearspeakFrench.defineRule_)("decimal-point","clearspeak.default",'[t] "point"',"self::punctuation",'@role="fullstop"','contains(@grammar,"number")');(0,sre.ClearspeakFrench.defineRule_)("line-segment","clearspeak.default",'[t] "le segment"; [n] children/*[1]/children/*[1]; [n] children/*[1]/children/*[2]; [p] (pause:short)',
|
866
|
+
"self::overscore",'@role="implicit"','children/*[2][@role="overaccent"]','children/*[2][text()="\u00af" or text()="\uffe3" or text()="\uff3f" or text()="_" or text()="\u203e"]','name(children/*[1])="infixop"',"count(./children/*[1]/children/*)=2");(0,sre.ClearspeakFrench.defineRule_)("conjugate","clearspeak.Bar_Conjugate",'[t] "le complexe conjugu\u00e9 de"; [n] children/*[1]',"self::overscore",'children/*[2][@role="overaccent"]','children/*[2][text()="\u00af" or text()="\uffe3" or text()="\uff3f" or text()="_" or text()="\u203e"]');
|
867
|
+
(0,sre.ClearspeakFrench.defineRule_)("defined-by","clearspeak.default",'[t] "est d\u00e9fini par" (pause:short)',"self::overscore",'@role="equality"','@embellished="relation"','name(children/*[2])="text"','children/*[2][text()]="def"');(0,sre.ClearspeakFrench.defineRule_)("adorned-sign","clearspeak.default",'[t] "signe"; [n] children/*[1] ; [t] "avec"; [n] children/*[2]; [t] "dessus"',"self::overscore","@embellished",'name(children/*[1])="operator" or name(children/*[1])="relation"');(0,sre.ClearspeakFrench.defineRule_)("factorial",
|
868
|
+
"clearspeak.default",'[t] "factorielle"',"self::punctuation",'text()="!"','name(preceding-sibling::*[1])!="text"');(0,sre.ClearspeakFrench.defineRule_)("tensor-base","clearspeak.default","[n] children/*[2]; [n] children/*[3]; [n] children/*[1]; [n] children/*[4]; [n] children/*[5]","self::tensor");(0,sre.ClearspeakFrench.defineRule_)("left-super","clearspeak.default",'[t] "exposant gauche"; [n] text()','self::*[@role="leftsuper"]','not(contains(@grammar,"combinatorics"))');(0,sre.ClearspeakFrench.defineRule_)("left-super",
|
869
|
+
"clearspeak.default",'[t] "exposant gauche"; [m] children/*',"self::punctuated",'@role="leftsuper"','not(contains(@grammar,"combinatorics"))');(0,sre.ClearspeakFrench.defineRule_)("left-sub","clearspeak.default",'[t] "indice gauche"; [n] text()','self::*[@role="leftsub"]','not(contains(@grammar,"combinatorics"))');(0,sre.ClearspeakFrench.defineRule_)("left-sub","clearspeak.default",'[t] "indice gauche"; [m] children/*',"self::punctuated",'@role="leftsub"','not(contains(@grammar,"combinatorics"))');
|
870
|
+
(0,sre.ClearspeakFrench.defineRule_)("right-super","clearspeak.default",'[t] "exposant droite"; [n] text()','self::*[@role="rightsuper"]','not(contains(@grammar,"combinatorics"))');(0,sre.ClearspeakFrench.defineRule_)("right-super","clearspeak.default",'[t] "exposant droite"; [m] children/*',"self::punctuated",'@role="rightsuper"','not(contains(@grammar,"combinatorics"))');(0,sre.ClearspeakFrench.defineRule_)("right-sub","clearspeak.default",'[t] "indice droite"; [n] text()','self::*[@role="rightsub"]',
|
871
|
+
'not(contains(@grammar,"combinatorics"))');(0,sre.ClearspeakFrench.defineRule_)("right-sub","clearspeak.default",'[t] "indice droite"; [m] children/*',"self::punctuated",'@role="rightsub"','not(contains(@grammar,"combinatorics"))');(0,sre.ClearspeakFrench.defineRule_)("empty-index","clearspeak.default","[p] (pause:medium)","self::empty",'@role="rightsub" or @role="rightsuper" or @role="leftsub" or @role="leftsuper"');(0,sre.ClearspeakFrench.defineRule_)("combinatorics","clearspeak.default","[n] children/*[2] (grammar:combinatorics); [n] children/*[1]; [n] children/*[4] (grammar:combinatorics)",
|
872
|
+
"self::tensor",'name(children/*[3])="empty"','name(children/*[5])="empty"','children/*[1][text()="P" or text()="C"]');(0,sre.ClearspeakFrench.defineRule_)("choose","clearspeak.CombinationPermutation_ChoosePermute",'[t] "combinaison de"; [n] children/*[3] (grammar:combinatorics); [t] "parmi"; [n] children/*[4] (grammar:combinatorics)',"self::tensor",'name(children/*[3])="empty"','name(children/*[5])="empty"','children/*[1][text()="C"]');(0,sre.ClearspeakFrench.defineRule_)("permute","clearspeak.CombinationPermutation_ChoosePermute",
|
873
|
+
'[t] "permutation de"; [n] children/*[2] (grammar:combinatorics); [t] "parmi"; [n] children/*[4] (grammar:combinatorics)',"self::tensor",'name(children/*[3])="empty"','name(children/*[5])="empty"','children/*[1][text()="P"]')};sre.ClearspeakFrench.getInstance().initializer=[sre.ClearspeakFrench.initCustomFunctions_,sre.ClearspeakFrench.initClearspeakFrench_];sre.Grammar.getInstance().setPreprocessor("numbers2alpha",sre.ClearspeakUtil.numbersToAlpha);sre.ClearspeakRules=function(){sre.MathStore.call(this)};goog.inherits(sre.ClearspeakRules,sre.MathStore);goog.addSingletonGetter(sre.ClearspeakRules);sre.ClearspeakRules.mathStore=sre.ClearspeakRules.getInstance();sre.ClearspeakRules.defineRule_=goog.bind(sre.ClearspeakRules.mathStore.defineRule,sre.ClearspeakRules.mathStore);sre.ClearspeakRules.defineRuleAlias_=goog.bind(sre.ClearspeakRules.mathStore.defineRulesAlias,sre.ClearspeakRules.mathStore);
|
874
|
+
sre.ClearspeakRules.defineSpecialisedRule_=goog.bind(sre.ClearspeakRules.mathStore.defineSpecialisedRule,sre.ClearspeakRules.mathStore);sre.ClearspeakRules.addContextFunction_=goog.bind(sre.ClearspeakRules.mathStore.contextFunctions.add,sre.ClearspeakRules.mathStore.contextFunctions);sre.ClearspeakRules.addCustomQuery_=goog.bind(sre.ClearspeakRules.mathStore.customQueries.add,sre.ClearspeakRules.mathStore.customQueries);
|
875
|
+
sre.ClearspeakRules.addCustomString_=goog.bind(sre.ClearspeakRules.mathStore.customStrings.add,sre.ClearspeakRules.mathStore.customStrings);sre.ClearspeakRules.addAnnotators_=function(){sre.SemanticAnnotations.getInstance().register(sre.ClearspeakUtil.simpleExpression());sre.SemanticAnnotations.getInstance().register(sre.ClearspeakUtil.unitExpression())};
|
876
|
+
sre.ClearspeakRules.initCustomFunctions_=function(){(0,sre.ClearspeakRules.addContextFunction_)("CTXFpauseSeparator",sre.StoreUtil.pauseSeparator);(0,sre.ClearspeakRules.addContextFunction_)("CTXFnodeCounter",sre.ClearspeakUtil.nodeCounter);(0,sre.ClearspeakRules.addContextFunction_)("CTXFcontentIterator",sre.MathmlStoreUtil.contentIterator);(0,sre.ClearspeakRules.addCustomString_)("CSFvulgarFraction",sre.NumbersUtil.vulgarFraction);(0,sre.ClearspeakRules.addCustomQuery_)("CQFvulgarFractionSmall",
|
877
|
+
sre.ClearspeakUtil.isSmallVulgarFraction);(0,sre.ClearspeakRules.addCustomQuery_)("CQFcellsSimple",sre.ClearspeakUtil.allCellsSimple);(0,sre.ClearspeakRules.addCustomString_)("CSFordinalExponent",sre.ClearspeakUtil.ordinalExponent);(0,sre.ClearspeakRules.addCustomString_)("CSFwordOrdinal",sre.ClearspeakUtil.wordOrdinal);(0,sre.ClearspeakRules.addCustomQuery_)("CQFisCapital",sre.ClearspeakUtil.isCapitalLetter);(0,sre.ClearspeakRules.addCustomQuery_)("CQFmatchingFences",sre.ClearspeakUtil.matchingFences);
|
878
|
+
(0,sre.ClearspeakRules.addCustomString_)("CSFnestingDepth",sre.ClearspeakUtil.nestingDepth);(0,sre.ClearspeakRules.addCustomQuery_)("CQFfencedArguments",sre.ClearspeakUtil.fencedArguments);(0,sre.ClearspeakRules.addCustomQuery_)("CQFsimpleArguments",sre.ClearspeakUtil.simpleArguments);(0,sre.ClearspeakRules.addCustomQuery_)("CQFisHyperbolic",sre.ClearspeakUtil.isHyperbolic);(0,sre.ClearspeakRules.addCustomQuery_)("CQFisLogarithm",sre.ClearspeakUtil.isLogarithmWithBase);(0,sre.ClearspeakRules.addCustomQuery_)("CQFspaceoutNumber",
|
879
|
+
sre.MathspeakUtil.spaceoutNumber)};
|
880
|
+
sre.ClearspeakRules.initClearspeakRules_=function(){(0,sre.ClearspeakRules.defineRule_)("collapsed","clearspeak.default",'[t] "collapsed"; [n] . (engine:modality=summary,grammar:collapsed)',"self::*","@alternative",'not(contains(@grammar, "collapsed"))',"self::*","self::*","self::*","self::*","self::*");(0,sre.ClearspeakRules.defineRule_)("stree","clearspeak.default","[n] ./*[1]","self::stree");(0,sre.ClearspeakRules.defineRule_)("unknown","clearspeak.default","[n] text()","self::unknown");(0,sre.ClearspeakRules.defineRule_)("protected",
|
881
|
+
"clearspeak.default","[t] text()","self::number",'contains(@grammar, "protected")');(0,sre.ClearspeakRules.defineRule_)("omit-empty","clearspeak.default",'[p] (pause:"short")',"self::empty");(0,sre.ClearspeakRules.defineRule_)("font","clearspeak.default",'[t] @font (grammar:localFont); [n] self::* (grammar:ignoreFont=@font,pause:"short")',"self::*","@font",'not(contains(@grammar, "ignoreFont"))','@font!="normal"');(0,sre.ClearspeakRules.defineRule_)("font-identifier","clearspeak.default",'[t] @font (grammar:localFont); [n] self::* (grammar:ignoreFont=@font,pause:"short")',
|
882
|
+
"self::identifier","string-length(text())=1","@font",'@font="normal"','not(contains(@grammar, "ignoreFont"))','@role!="unit"');(0,sre.ClearspeakRules.defineRule_)("omit-font","clearspeak.default","[n] self::* (grammar:ignoreFont=@font)","self::identifier","string-length(text())=1","@font",'not(contains(@grammar, "ignoreFont"))','@font="italic"');(0,sre.ClearspeakRules.defineRule_)("german-font","clearspeak.default",'[t] "German"; [n] self::* (grammar:ignoreFont=@font)',"self::*","@font",'not(contains(@grammar, "ignoreFont"))',
|
883
|
+
'@font="fraktur"');(0,sre.ClearspeakRules.defineRule_)("german-font","clearspeak.default",'[t] "bold German"; [n] self::* (grammar:ignoreFont=@font)',"self::*","@font",'not(contains(@grammar, "ignoreFont"))','@font="bold-fraktur"');(0,sre.ClearspeakRules.defineRule_)("text","clearspeak.default","[n] text()","self::text");(0,sre.ClearspeakRules.defineRule_)("capital","clearspeak.default",'[n] text() (pitch:0.6,grammar:ignoreCaps="cap")',"self::identifier",'@role="latinletter" or @role="greekletter" or @role="simple function"',
|
884
|
+
"CQFisCapital");(0,sre.ClearspeakRules.defineRule_)("capital","clearspeak.Caps_SayCaps","[n] text()","self::identifier",'@role="latinletter" or @role="greekletter"',"CQFisCapital");(0,sre.ClearspeakRules.defineRule_)("capital","clearspeak.Caps_SayCaps",'[p] (pause:"short"); [n] text()',"self::identifier",'@role="latinletter" or @role="greekletter"',"CQFisCapital","preceding-sibling::*[1]",'not(name(preceding-sibling::*[1])="function")','not(contains(@grammar, "angle"))');(0,sre.ClearspeakRules.defineRule_)("capital",
|
885
|
+
"clearspeak.Caps_SayCaps",'[n] text() (pause:"short")',"self::identifier",'@role="latinletter" or @role="greekletter"',"CQFisCapital","following-sibling::*[1]");(0,sre.ClearspeakRules.defineRule_)("capital","clearspeak.Caps_SayCaps",'[p] (pause:"short"); [n] text() (pause:"short")',"self::identifier",'@role="latinletter" or @role="greekletter"',"CQFisCapital","preceding-sibling::*[1]","following-sibling::*[1]",'not(name(preceding-sibling::*[1])="function")','not(contains(@grammar, "angle"))');(0,sre.ClearspeakRules.defineRule_)("punctuation-lr",
|
886
|
+
"clearspeak.default",'[p] (pause:"short"); [n] text() (pause:"short")',"self::punctuation",'@role="comma"');(0,sre.ClearspeakRules.defineRule_)("punctuation","clearspeak.default","[n] text()","self::punctuation",'@role="comma"',"not(preceding-sibling::*[1]/children)","not(following-sibling::*[1]/children)");(0,sre.ClearspeakRules.defineRule_)("punctuation-l","clearspeak.default",'[p] (pause:"short"); [n] text()',"self::punctuation",'@role="comma"',"not(following-sibling::*[1]/children)");(0,sre.ClearspeakRules.defineRule_)("punctuation-r",
|
887
|
+
"clearspeak.default",'[n] text() (pause:"short")',"self::punctuation",'@role="comma"',"not(preceding-sibling::*[1]/children)");(0,sre.ClearspeakRules.defineRule_)("ellipsis","clearspeak.Ellipses_AndSoOn",'[t] "and so on"',"self::punctuation",'@role="ellipsis"',"not(following-sibling::*[1])",'not(preceding-sibling::*[last()][@role="ellipsis"])');(0,sre.ClearspeakRules.defineRule_)("ellipsis","clearspeak.Ellipses_AndSoOn",'[t] "and so on up to"',"self::punctuation",'@role="ellipsis"',"preceding-sibling::*[1]",
|
888
|
+
"following-sibling::*[1]");(0,sre.ClearspeakRules.defineRule_)("vbar-evaluated","clearspeak.default",'[n] children/*[1]; [p] (pause:"short"); [t] "evaluated at"; [n] content/*[1]/children/*[2]; [p] (pause:"short")',"self::punctuated",'@role="endpunct"','content/*[1][@role="vbar"]',"content/*[1][@embellished]",'name(content/*[1])="subscript"');(0,sre.ClearspeakRules.defineRule_)("vbar-evaluated","clearspeak.default",'[n] children/*[1]; [p] (pause:"short"); [t] "evaluated at"; [n] content/*[1]/children/*[2]; [p] (pause:"short"); [t] "minus the same expression evaluated at"; [n] content/*[1]/children/*[1]/children/*[2]; [p] (pause:"short")',
|
889
|
+
"self::punctuated",'@role="endpunct"','content/*[1][@role="vbar"]',"content/*[1][@embellished]",'name(content/*[1])="superscript"','name(content/*[1]/children/*[1])="subscript"');(0,sre.ClearspeakRules.defineRule_)("vbar-such-that","clearspeak.VerticalLine_SuchThat",'[t] "such that"',"self::punctuation",'@role="vbar"','not(parent::*/parent::*[@embellished="punctuation"])');(0,sre.ClearspeakRules.defineRule_)("vbar-such-that","clearspeak.VerticalLine_Divides",'[t] "divides"',"self::punctuation",'@role="vbar"',
|
890
|
+
'not(parent::*/parent::*[@embellished="punctuation"])');(0,sre.ClearspeakRules.defineRule_)("vbar-such-that","clearspeak.VerticalLine_Given",'[t] "given"',"self::punctuation",'@role="vbar"','not(parent::*/parent::*[@embellished="punctuation"])');(0,sre.ClearspeakRules.defineRule_)("set-member","clearspeak.default",'[t] "in"',"self::operator",'@role="set extended"','text()="\u2208" or text()="\u220a"');(0,sre.ClearspeakRules.defineSpecialisedRule_)("set-member","clearspeak.default","clearspeak.SetMemberSymbol_Member",
|
891
|
+
'[t] "member of"');(0,sre.ClearspeakRules.defineSpecialisedRule_)("set-member","clearspeak.default","clearspeak.SetMemberSymbol_Element",'[t] "element of"');(0,sre.ClearspeakRules.defineSpecialisedRule_)("set-member","clearspeak.default","clearspeak.SetMemberSymbol_Belongs",'[t] "belonging to"');(0,sre.ClearspeakRules.defineRule_)("set-not-member","clearspeak.default",'[t] "not in"',"self::operator",'@role="set extended"','text()="\u2209"');(0,sre.ClearspeakRules.defineSpecialisedRule_)("set-not-member",
|
892
|
+
"clearspeak.default","clearspeak.SetMemberSymbol_Member",'[t] "not member of"');(0,sre.ClearspeakRules.defineSpecialisedRule_)("set-not-member","clearspeak.default","clearspeak.SetMemberSymbol_Element",'[t] "not element of"');(0,sre.ClearspeakRules.defineSpecialisedRule_)("set-not-member","clearspeak.default","clearspeak.SetMemberSymbol_Belongs",'[t] "not belonging to"');(0,sre.ClearspeakRules.defineRule_)("prime","clearspeak.default","[n] children/*[1]; [n] children/*[2]","self::superscript","children/*[2]",
|
893
|
+
'children/*[2][@role="prime"]',"self::*");(0,sre.ClearspeakRules.defineRule_)("feet","clearspeak.default",'[n] children/*[1]; [t] "feet"',"self::superscript",'children/*[2][@role="prime"]','name(children/*[1])="number"','children/*[2][text()="\u2032"]','not(preceding-sibling::*[@role="degree"])');(0,sre.ClearspeakRules.defineRule_)("foot","clearspeak.default",'[n] children/*[1]; [t] "foot"',"self::superscript",'children/*[2][@role="prime"]','name(children/*[1])="number"','children/*[2][text()="\u2032"]',
|
894
|
+
'children/*[1][text()="1"]','not(preceding-sibling::*[@role="degree"])');(0,sre.ClearspeakRules.defineRule_)("inches","clearspeak.default",'[n] children/*[1]; [t] "inches"',"self::superscript",'children/*[2][@role="prime"]','name(children/*[1])="number"','children/*[2][text()="\u2033"]','not(preceding-sibling::*[@role="degree"])');(0,sre.ClearspeakRules.defineRule_)("inch","clearspeak.default",'[n] children/*[1]; [t] "inch"',"self::superscript",'children/*[2][@role="prime"]','name(children/*[1])="number"',
|
895
|
+
'children/*[2][text()="\u2033"]','children/*[1][text()="1"]','not(preceding-sibling::*[@role="degree"])');(0,sre.ClearspeakRules.defineRule_)("minutes","clearspeak.default",'[p] (pause:short); [n] children/*[1]; [t] "minutes"',"self::superscript",'children/*[2][@role="prime"]','preceding-sibling::*[@role="degree"]','children/*[2][text()="\u2032"]');(0,sre.ClearspeakRules.defineRule_)("minute","clearspeak.default",'[p] (pause:short); [n] children/*[1]; [t] "minute"',"self::superscript",'children/*[2][@role="prime"]',
|
896
|
+
'preceding-sibling::*[@role="degree"]','children/*[2][text()="\u2032"]','children/*[1][text()="1"]');(0,sre.ClearspeakRules.defineRule_)("seconds","clearspeak.default",'[p] (pause:short); [n] children/*[1]; [t] "seconds"',"self::superscript",'children/*[2][@role="prime"]','preceding-sibling::*[@role="degree"]','children/*[2][text()="\u2033"]');(0,sre.ClearspeakRules.defineRule_)("second","clearspeak.default",'[p] (pause:short); [n] children/*[1]; [t] "second"',"self::superscript",'children/*[2][@role="prime"]',
|
897
|
+
'preceding-sibling::*[@role="degree"]','children/*[2][text()="\u2033"]','children/*[1][text()="1"]');(0,sre.ClearspeakRules.defineRule_)("degrees-angle","clearspeak.Prime_Angle",'[n] children/*[1]; [t] "degrees"; [p] (pause:short)',"self::punctuation",'@role="degree"');(0,sre.ClearspeakRules.defineRule_)("degree-angle","clearspeak.Prime_Angle",'[n] children/*[1]; [t] "degree"; [p] (pause:short)',"self::punctuation",'@role="degree"','children/*[1][text()="1"]');(0,sre.ClearspeakRules.defineRule_)("minutes-angle",
|
898
|
+
"clearspeak.Prime_Angle",'[n] children/*[1]; [t] "minutes"; [p] (pause:short)',"self::superscript",'children/*[2][@role="prime"]','name(children/*[1])="number" or (children/*[1][@role="latinletter"] and ""=translate(children/*[1]/text(),"abcdefghijklmnopqrstuvwxyz", ""))','children/*[2][text()="\u2032"]');(0,sre.ClearspeakRules.defineRule_)("minute-angle","clearspeak.Prime_Angle",'[n] children/*[1]; [t] "minute"; [p] (pause:short)',"self::superscript",'children/*[2][@role="prime"]','children/*[2][text()="\u2032"]',
|
899
|
+
'children/*[1][text()="1"]');(0,sre.ClearspeakRules.defineRule_)("seconds-angle","clearspeak.Prime_Angle",'[n] children/*[1]; [t] "seconds"; [p] (pause:short)',"self::superscript",'children/*[2][@role="prime"]','name(children/*[1])="number" or (children/*[1][@role="latinletter"] and ""=translate(children/*[1]/text(),"abcdefghijklmnopqrstuvwxyz", ""))','children/*[2][text()="\u2033"]');(0,sre.ClearspeakRules.defineRule_)("second-angle","clearspeak.Prime_Angle",'[n] children/*[1]; [t] "second"; [p] (pause:short)',
|
900
|
+
"self::superscript",'children/*[2][@role="prime"]','children/*[2][text()="\u2033"]','children/*[1][text()="1"]');(0,sre.ClearspeakRules.defineRule_)("feet-length","clearspeak.Prime_Length",'[n] children/*[1]; [t] "feet"; [p] (pause:short)',"self::superscript",'children/*[2][@role="prime"]','name(children/*[1])="number" or (children/*[1][@role="latinletter"] and ""=translate(children/*[1]/text(),"abcdefghijklmnopqrstuvwxyz", ""))','children/*[2][text()="\u2032"]');(0,sre.ClearspeakRules.defineRule_)("foot-length",
|
901
|
+
"clearspeak.Prime_Length",'[n] children/*[1]; [t] "foot"; [p] (pause:short)',"self::superscript",'children/*[2][@role="prime"]','children/*[2][text()="\u2032"]','children/*[1][text()="1"]');(0,sre.ClearspeakRules.defineRule_)("inches-length","clearspeak.Prime_Length",'[n] children/*[1]; [t] "inches"; [p] (pause:short)',"self::superscript",'children/*[2][@role="prime"]','name(children/*[1])="number" or (children/*[1][@role="latinletter"] and ""=translate(children/*[1]/text(),"abcdefghijklmnopqrstuvwxyz", ""))',
|
902
|
+
'children/*[2][text()="\u2033"]');(0,sre.ClearspeakRules.defineRule_)("inch-length","clearspeak.Prime_Length",'[n] children/*[1]; [t] "inch"; [p] (pause:short)',"self::superscript",'children/*[2][@role="prime"]','children/*[2][text()="\u2033"]','children/*[1][text()="1"]');(0,sre.ClearspeakRules.defineRule_)("punctuated","clearspeak.default","[m] children/*","self::punctuated");(0,sre.ClearspeakRules.defineRule_)("function","clearspeak.default","[n] text()","self::function");(0,sre.ClearspeakRules.defineRule_)("appl",
|
903
|
+
"clearspeak.default",'[n] children/*[1]; [t] "of"; [n] children/*[2]; [p] (pause:"short")',"self::appl");(0,sre.ClearspeakRules.defineRule_)("appl-simple","clearspeak.default",'[n] children/*[1]; [t] "of"; [p] (pause:"short"); [n] children/*[2]; [p] (pause:"short")',"self::appl",'@role="simple function"','name(children/*[2])="appl"');(0,sre.ClearspeakRules.defineRule_)("appl-simple","clearspeak.default",'[n] children/*[1]; [t] "of"; [p] (pause:"short"); [n] children/*[2]; [p] (pause:"short")',"self::appl",
|
904
|
+
'@role="simple function"','name(children/*[2])="fenced"','name(children/*[2]/children/*[1])="appl"');(0,sre.ClearspeakRules.defineRule_)("appl","clearspeak.Functions_None",'[p] (pause:"short"); [n] children/*[1]; [t] "times"; [n] children/*[2]; [p] (pause:"short")',"self::appl");(0,sre.ClearspeakRules.defineRule_)("function-prefix","clearspeak.default","[n] children/*[1]; [n] children/*[2]","self::appl",'@role="prefix function"');(0,sre.ClearspeakRules.defineRule_)("binary-operation","clearspeak.ImpliedTimes_MoreImpliedTimes",
|
905
|
+
'[n] . (grammar:impliedTimes); [p] (pause:"short")',"self::appl",'@role="prefix function"','parent::*/parent::infixop[@role="implicit"]',"following-sibling::*",'not(contains(@grammar, "impliedTimes"))');(0,sre.ClearspeakRules.defineRule_)("function-prefix-simple-arg","clearspeak.default","[n] children/*[1]; [n] children/*[2]","self::appl",'@role="prefix function"','name(children/*[2])="fenced"','contains(children/*[2]/children/*[1]/@annotation, "clearspeak:simple")','name(children/*[2]/children/*[1])!="number"',
|
906
|
+
'name(children/*[2]/children/*[1])!="identifier"','name(children/*[2]/children/*[1])!="appl"');(0,sre.ClearspeakRules.defineRule_)("function-prefix-embell","clearspeak.default",'[p] (pause:"short"); [n] children/*[1]; [n] children/*[2]; [p] (pause:"short"); ',"self::appl",'@role="prefix function"','name(children/*[1])!="function"');(0,sre.ClearspeakRules.defineRule_)("function-prefix-fenced-or-frac-arg","clearspeak.default",'[p] (pause:"short"); [t] "the"; [n] children/*[1]; [t] "of"; [n] children/*[2]; [p] (pause:"short")',
|
907
|
+
"self::appl",'@role="prefix function"','(name(children/*[2])="fenced" and not(contains(children/*[2]/children/*[1]/@annotation, "clearspeak:simple"))) or name(children/*[2])="fraction" or (name(children/*[2])!="fenced" and not(contains(children/*[2]/@annotation, "clearspeak:simple")))',"self::*");(0,sre.ClearspeakRules.defineRule_)("function-prefix-subscript","clearspeak.default",'[p] (pause:"short"); [t] "the"; [n] children/*[1]; [t] "of"; [p] (pause:"short"); [n] children/*[2]; [p] (pause:"short")',
|
908
|
+
"self::appl",'@role="prefix function"','name(children/*[1])="subscript"',"self::*");(0,sre.ClearspeakRules.defineRule_)("function-ln","clearspeak.default","[n] children/*[1]; [n] children/*[2]","self::appl",'@role="prefix function"','content/*[2][text()="ln"]',"not(following-sibling::*)",'not(contains(@grammar, "NatLog"))');(0,sre.ClearspeakRules.defineRule_)("function-ln","clearspeak.default",'[n] children/*[1]; [n] children/*[2]; [p] (pause:"short")',"self::appl",'@role="prefix function"','content/*[2][text()="ln"]',
|
909
|
+
'not(contains(@grammar, "NatLog"))');(0,sre.ClearspeakRules.defineRule_)("function-ln","clearspeak.default",'[n] children/*[1]; [t] "of"; [n] children/*[2]; [p] (pause:"short")',"self::appl",'@role="prefix function"','content/*[2][text()="ln"]','name(children/*[2])="fenced"','not(contains(@grammar, "NatLog"))');(0,sre.ClearspeakRules.defineRule_)("function-ln","clearspeak.Log_LnAsNaturalLog","[n] . (grammar:NatLog)","self::appl",'@role="prefix function"','content/*[2][text()="ln"]',"not(following-sibling::*)",
|
910
|
+
'not(contains(@grammar, "NatLog"))');(0,sre.ClearspeakRules.defineRule_)("function-ln","clearspeak.Log_LnAsNaturalLog",'[n] . (grammar:NatLog); [p] (pause:"short")',"self::appl",'@role="prefix function"','content/*[2][text()="ln"]','not(contains(@grammar, "NatLog"))');(0,sre.ClearspeakRules.defineRule_)("function-prefix-as-exp","clearspeak.default",'[n] children/*[1]; [t] "of"; [p] (pause:"short"); [n] children/*[2]; [p] (pause:"short")',"self::appl",'@role="prefix function"','name(parent::*/parent::*)="superscript"',
|
911
|
+
"not(following-sibling::*)",'(name(children/*[2])="fenced" and not(contains(children/*[2]/children/*[1]/@annotation, "clearspeak:simple"))) or name(children/*[2])="fraction" or (name(children/*[2])!="fenced" and not(contains(children/*[2]/@annotation, "clearspeak:simple")))');(0,sre.ClearspeakRules.defineRule_)("function-prefix-subscript-as-exp","clearspeak.default",'[n] children/*[1]; [t] "of"; [p] (pause:"short"); [n] children/*[2]; [p] (pause:"short")',"self::appl",'@role="prefix function"','name(parent::*/parent::*)="superscript"',
|
912
|
+
"not(following-sibling::*)",'name(children/*[1])="subscript"');(0,sre.ClearspeakRules.defineRule_)("function-prefix-hyper","clearspeak.default",'[p] (pause:"short"); [n] children/*[1]; [t] "of"; [n] children/*[2]; [p] (pause:"short")',"self::appl",'@role="prefix function"',"CQFisHyperbolic");(0,sre.ClearspeakRules.defineRule_)("function-prefix-inverse","clearspeak.default",'[p] (pause:"short"); [t] "the inverse"; [n] children/*[1]/children/*[1]; [t] "of"; [n] children/*[2]; [p] (pause:"short")',"self::appl",
|
913
|
+
'@role="prefix function"','name(children/*[1])="superscript"','name(children/*[1]/children/*[2])="prefixop"','children/*[1]/children/*[2][@role="negative"]','children/*[1]/children/*[2]/children/*[1][text()="1"]','not(contains(@grammar, "functions_none"))');(0,sre.ClearspeakRules.defineRule_)("appl-triginverse","clearspeak.Trig_TrigInverse",'[p] (pause:"short"); [n] children/*[1]; [t] "of"; [n] children/*[2]; [p] (pause:"short")',"self::appl",'@role="prefix function"','name(children/*[1])="superscript"',
|
914
|
+
'name(children/*[1]/children/*[2])="prefixop"','children/*[1]/children/*[2][@role="negative"]','children/*[1]/children/*[2]/children/*[1][text()="1"]');(0,sre.ClearspeakRules.defineRule_)("function-prefix-arc-simple","clearspeak.Trig_ArcTrig",'[p] (pause:"short"); [t] "arc"; [n] children/*[1]/children/*[1]; [n] children/*[2]; [p] (pause:"short")',"self::appl",'@role="prefix function"','name(children/*[1])="superscript"','name(children/*[1]/children/*[2])="prefixop"','children/*[1]/children/*[2][@role="negative"]',
|
915
|
+
'children/*[1]/children/*[2]/children/*[1][text()="1"]','not(contains(@grammar, "functions_none"))');(0,sre.ClearspeakRules.defineRule_)("function-prefix-arc-simple","clearspeak.Trig_ArcTrig",'[p] (pause:"short"); [t] "arc"; [n] children/*[1]/children/*[1]; [p] (pause:"short"); [n] children/*[2]; [p] (pause:"short")',"self::appl",'@role="prefix function"','name(children/*[1])="superscript"','name(children/*[1]/children/*[2])="prefixop"','children/*[1]/children/*[2][@role="negative"]','children/*[1]/children/*[2]/children/*[1][text()="1"]',
|
916
|
+
'name(children/*[2])="fenced"','children/*[2]/children/*[1][@role="prefix function"]','contains(children/*[2]/children/*[1]/@annotation, "clearspeak:simple")','not(contains(@grammar, "functions_none"))');(0,sre.ClearspeakRules.defineRule_)("function-prefix-arc","clearspeak.Trig_ArcTrig",'[p] (pause:"short"); [t] "arc"; [n] children/*[1]/children/*[1]; [t] "of"; [n] children/*[2]; [p] (pause:"short")',"self::appl",'@role="prefix function"','name(children/*[1])="superscript"','name(children/*[1]/children/*[2])="prefixop"',
|
917
|
+
'children/*[1]/children/*[2][@role="negative"]','children/*[1]/children/*[2]/children/*[1][text()="1"]','not(contains(@grammar, "functions_none"))','(name(children/*[2])="fenced" and not(contains(children/*[2]/children/*[1]/@annotation, "clearspeak:simple"))) or (name(children/*[2])="fraction" and children/*[2][@role!="vulgar"])');(0,sre.ClearspeakRules.defineRule_)("function-inverse","clearspeak.default",'[n] children/*[1]; [t] "inverse"',"self::superscript",'@role="prefix function" or @role="simple function"',
|
918
|
+
'name(children/*[2])="prefixop"','children/*[2][@role="negative"]','children/*[2]/children/*[1][text()="1"]','not(contains(@grammar, "functions_none"))');(0,sre.ClearspeakRules.defineRule_)("superscript-prefix-function","clearspeak.default",'[t] "the"; [n] children/*[2] (grammar:ordinal); [t] "power of"; [n] children/*[1]',"self::superscript",'@role="prefix function"','name(children/*[2])="number"','children/*[2][@role="integer"]');(0,sre.ClearspeakRules.defineRule_)("superscript-prefix-function",
|
919
|
+
"clearspeak.default",'[t] "the"; [n] children/*[2] (grammar:ordinal); [t] "power of"; [n] children/*[1]',"self::superscript",'@role="prefix function"','name(children/*[2])="identifier"');(0,sre.ClearspeakRules.defineRule_)("function-inverse","clearspeak.Functions_None","[n] . (grammar:functions_none)","self::superscript",'@role="prefix function" or @role="simple function"','name(children/*[2])="prefixop"','children/*[2][@role="negative"]','children/*[2]/children/*[1][text()="1"]','not(contains(@grammar, "functions_none"))');
|
920
|
+
(0,sre.ClearspeakRules.defineRule_)("superscript","clearspeak.default",'[n] children/*[1]; [t] "raised to the exponent" (pause:"short"); [n] children/*[2]; [p] (pause:"short"); [t] "end exponent" (pause:"short")',"self::superscript");(0,sre.ClearspeakRules.defineRule_)("superscript-simple-exponent","clearspeak.default",'[n] children/*[1]; [t] "raised to the"; [n] children/*[2]; [t] "power" (pause:"short")',"self::superscript","not(descendant::superscript)");(0,sre.ClearspeakRules.defineRule_)("superscript-simple-exponent-end",
|
921
|
+
"clearspeak.default",'[n] children/*[1]; [t] "raised to the"; [n] children/*[2]; [t] "power"',"self::superscript","not(descendant::superscript)","not(following-sibling::*)");(0,sre.ClearspeakRules.defineRuleAlias_)("superscript-simple-exponent","self::superscript",'children/superscript/children/*[2][text()="2"] or children/superscript/children/*[2][text()="3"]','name(children/superscript/children/*[1])="number"','contains(children/superscript/children/*[1]/@annotation, "clearspeak:simple")');(0,sre.ClearspeakRules.defineRuleAlias_)("superscript-simple-exponent",
|
922
|
+
"self::superscript",'children/superscript/children/*[2][text()="2"] or children/superscript/children/*[2][text()="3"]','name(children/superscript/children/*[1])="fraction"','contains(children/superscript/children/*[1]/@annotation, "clearspeak:simple")');(0,sre.ClearspeakRules.defineRuleAlias_)("superscript-simple-exponent","self::superscript",'children/superscript/children/*[2][text()="2"] or children/superscript/children/*[2][text()="3"]','name(children/superscript/children/*[1])="identifier"');
|
923
|
+
(0,sre.ClearspeakRules.defineRuleAlias_)("superscript-simple-exponent","self::superscript",'children/*[2][@role="implicit"]',"count(children/*[2]/children/*)=2",'contains(children/*[2]/children/*[1]/@annotation, "simple")','name(children/*[2]/children/*[2])="superscript"','(name(children/*[2]/children/*[2]/children/*[1])="number" and contains(children/*[2]/children/*[2]/children/*[1]/@annotation, "clearspeak:simple")) or name(children/*[2]/children/*[2]/children/*[1])="identifier"','children/*[2]/children/*[2]/children/*[2][text()="2"] or children/*[2]/children/*[2]/children/*[2][text()="3"]');
|
924
|
+
(0,sre.ClearspeakRules.defineRule_)("superscript-ordinal","clearspeak.default",'[n] children/*[1]; [t] "to the"; [n] children/*[2] (grammar:ordinal); [t] "power" (pause:"short")',"self::superscript",'name(children/*[2])="number"','children/*[2][@role="integer"]');(0,sre.ClearspeakRules.defineRuleAlias_)("superscript-ordinal","self::superscript",'name(children/*[2])="identifier"','children/*[2][@role="latinletter" or @role="greekletter" or @role="otherletter"]');(0,sre.ClearspeakRules.defineRule_)("superscript-non-ordinal",
|
925
|
+
"clearspeak.default",'[n] children/*[1]; [t] "to the"; [n] children/*[2]; [t] "power" (pause:"short")',"self::superscript",'children/*[2][@role="negative"]','name(children/*[2]/children/*[1])="number"','children/*[2]/children/*[1][@role="integer"]');(0,sre.ClearspeakRules.defineRule_)("superscript-simple-function","clearspeak.default",'[t] "the"; [n] children/*[2] (grammar:ordinal); [t] "power of" (pause:"short"); [n] children/*[1]',"self::superscript",'name(children/*[1])="identifier"','children/*[1][@role="simple function"]',
|
926
|
+
'children/*[2][@role!="prime"]','not(contains(@grammar, "functions_none"))');(0,sre.ClearspeakRules.defineRule_)("superscript-simple-function","clearspeak.Functions_None","[n] . (grammar:functions_none)","self::superscript",'name(children/*[1])="identifier"','children/*[1][@role="simple function"]','not(contains(@grammar, "functions_none"))');(0,sre.ClearspeakRules.defineRule_)("superscript-ordinal","clearspeak.Exponent_Ordinal",'[n] children/*[1]; [t] "to the"; [n] children/*[2] (grammar:ordinal); [p] (pause:"short")',
|
927
|
+
"self::superscript",'name(children/*[2])="number"','children/*[2][@role="integer"]');(0,sre.ClearspeakRules.defineRule_)("superscript-ordinal","clearspeak.Exponent_Ordinal",'[n] children/*[1]; [t] "to the"; [n] children/*[2]; [p] (pause:"short")',"self::superscript",'name(children/*[2])="prefixop"','children/*[2][@role="negative"]','name(children/*[2]/children/*[1])="number"','children/*[2]/children/*[1][@role="integer"]');(0,sre.ClearspeakRules.defineRule_)("superscript-ordinal","clearspeak.Exponent_Ordinal",
|
928
|
+
'[n] children/*[1]; [t] "to the"; [n] children/*[2] (grammar:ordinal); [p] (pause:"short")',"self::superscript",'name(children/*[2])="identifier"','children/*[2][@role="latinletter" or @role="greekletter" or @role="otherletter"]');(0,sre.ClearspeakRules.defineRule_)("superscript-ordinal-default","clearspeak.Exponent_Ordinal",'[n] children/*[1]; [t] "raised to the exponent" (pause:"short"); [n] children/*[2]; [p] (pause:"short"); [t] "end exponent" (pause:"short")',"self::superscript","children//superscript");
|
929
|
+
(0,sre.ClearspeakRules.defineRule_)("superscript-ordinal","clearspeak.Exponent_OrdinalPower",'[n] children/*[1]; [t] "to the"; [n] children/*[2] (grammar:ordinal); [t] "power"; [p] (pause:"short")',"self::superscript",'name(children/*[2])="number"','children/*[2][@role="integer"]');(0,sre.ClearspeakRules.defineRule_)("superscript-ordinal","clearspeak.Exponent_OrdinalPower",'[n] children/*[1]; [t] "to the"; [n] children/*[2]; [t] "power"; [p] (pause:"short")',"self::superscript",'name(children/*[2])="prefixop"',
|
930
|
+
'children/*[2][@role="negative"]','name(children/*[2]/children/*[1])="number"','children/*[2]/children/*[1][@role="integer"]');(0,sre.ClearspeakRules.defineRule_)("superscript-ordinal","clearspeak.Exponent_OrdinalPower",'[n] children/*[1]; [t] "to the"; [n] children/*[2] (grammar:ordinal); [t] "power"; [p] (pause:"short")',"self::superscript",'name(children/*[2])="identifier"','children/*[2][@role="latinletter" or @role="greekletter" or @role="otherletter"]');(0,sre.ClearspeakRules.defineRule_)("superscript-ordinal-default",
|
931
|
+
"clearspeak.Exponent_OrdinalPower",'[n] children/*[1]; [t] "raised to the exponent" (pause:"short"); [n] children/*[2]; [p] (pause:"short"); [t] "end exponent" (pause:"short")',"self::superscript","children//superscript");(0,sre.ClearspeakRules.defineRule_)("superscript-power","clearspeak.Exponent_AfterPower",'[n] children/*[1]; [t] "raised to the power"; [n] children/*[2] (grammar:afterPower); [p] (pause:"short")',"self::superscript");(0,sre.ClearspeakRules.defineRule_)("superscript-power-default",
|
932
|
+
"clearspeak.Exponent_AfterPower",'[n] children/*[1]; [t] "raised to the exponent" (pause:"short"); [n] children/*[2]; [p] (pause:"short"); [t] "end exponent" (pause:"short")',"self::superscript","children//superscript");(0,sre.ClearspeakRules.defineRule_)("exponent","clearspeak.default",'[n] text() (join:""); [t] "th"',"self::identifier",'contains(@grammar, "ordinal")');(0,sre.ClearspeakRules.defineRule_)("exponent","clearspeak.default","[t] CSFordinalExponent","self::number",'@role="integer"','contains(@grammar, "ordinal")',
|
933
|
+
'text()!="0"');(0,sre.ClearspeakRules.defineRule_)("exponent","clearspeak.Exponent_Ordinal","[t] CSFwordOrdinal","self::number",'@role="integer"','contains(@grammar, "ordinal")','text()!="0"');(0,sre.ClearspeakRules.defineRule_)("exponent","clearspeak.Exponent_Ordinal",'[t] "zero"',"self::number",'@role="integer"','contains(@grammar, "ordinal")','text()="0"');(0,sre.ClearspeakRules.defineRule_)("exponent","clearspeak.Exponent_OrdinalPower","[t] CSFwordOrdinal","self::number",'@role="integer"','contains(@grammar, "ordinal")',
|
934
|
+
'text()!="0"');(0,sre.ClearspeakRules.defineRule_)("exponent","clearspeak.Exponent_OrdinalPower",'[t] "zero"',"self::number",'@role="integer"','contains(@grammar, "ordinal")','text()="0"');(0,sre.ClearspeakRules.defineRule_)("square","clearspeak.default",'[n] children/*[1]; [t] "squared"',"self::superscript",'children/*[2][text()="2"]','name(children/*[1])!="text" or not(name(children/*[1])="text" and (name(../../../punctuated[@role="text"]/..)="stree" or name(..)="stree"))',"self::*","self::*");
|
935
|
+
(0,sre.ClearspeakRules.defineRule_)("cube","clearspeak.default",'[n] children/*[1]; [t] "cubed"',"self::superscript",'children/*[2][text()="3"]','name(children/*[1])!="text" or not(name(children/*[1])="text" and (name(../../../punctuated[@role="text"]/..)="stree" or name(..)="stree"))',"self::*","self::*");(0,sre.ClearspeakRules.defineRule_)("paren-simple","clearspeak.default","[n] children/*[1]","self::fenced",'@role="leftright"','contains(children/*[1]/@annotation, "clearspeak:simple")','name(../..)!="superscript" and name(../..)!="subscript"');
|
936
|
+
(0,sre.ClearspeakRules.defineRule_)("paren-simple-exp","clearspeak.default","[n] children/*[1]","self::fenced",'@role="leftright"','name(../..)="superscript"','children/*[1][@role="integer"] or children/*[1][@role="float"] or (children/*[1][@role="vulgar"] and contains(children/*[1]/@annotation, "clearspeak:simple")) or children/*[1][@role="latinletter"] or children/*[1][@role="greekletter"] or children/*[1][@role="otherletter"]');(0,sre.ClearspeakRules.defineRule_)("paren-simple-nested-func","clearspeak.default",
|
937
|
+
"[n] children/*[1]","self::fenced",'@role="leftright"','name(../*[1])="identifier" or name(../*[1])="function"','parent::*/parent::*[@role="simple function" or @role="prefix function"]','children/*[1][@role="simple function" or @role="prefix function"]','contains(children/*[1]/children/*[2]/children/*[1]/@annotation, "clearspeak:simple") or name(children/*[1]/children/*[2]/children/*[1])="subscript" or name(children/*[1]/children/*[2]/children/*[1])="superscript" or children/*[1]/children/*[2]/children/*[1][@role="vulgar"] ');
|
938
|
+
(0,sre.ClearspeakRules.defineRule_)("paren-simple-nested-func-no-bracket","clearspeak.Functions_None","[n] children/*[1];","self::fenced",'@role="leftright"','name(../*[1])="identifier" or name(../*[1])="function"','parent::*/parent::*[@role="simple function" or @role="prefix function"]','children/*[1][@role="simple function" or @role="prefix function"]','name(children/*[1]/children/*[1])="identifier" or name(children/*[1]/children/*[1])="function"','contains(children/*[1]/children/*[2]/children/*[1]/@annotation, "clearspeak:simple")',
|
939
|
+
'name(children/*[1]/children/*[2]/children/*[1])="identifier" or name(children/*[1]/children/*[2]/children/*[1])="number"');(0,sre.ClearspeakRules.defineRule_)("fences-open-close","clearspeak.default",'[p] (pause:"short"); [n] content/*[1] (grammar:spokenFence); [p] (pause:"short"); [n] children/*[1]; [p] (pause:"short"); [n] content/*[2] (grammar:spokenFence); [p] (pause:"short")',"self::fenced",'@role="leftright"');(0,sre.ClearspeakRules.defineRule_)("paren-simple-nested-func","clearspeak.default",
|
940
|
+
'[p] (pause:"short"); [n] content/*[1]; [p] (pause:"short"); [n] children/*[1]; [p] (pause:"short"); [n] content/*[2]; [p] (pause:"short")',"self::fenced",'@role="leftright"','name(../*[1])="identifier" or name(../*[1])="function"','parent::*/parent::*[@role="simple function" or @role="prefix function"]','not(contains(children/*[1]/@annotation, "clearspeak:simple"))');(0,sre.ClearspeakRules.defineRule_)("paren-simple-nested-func","clearspeak.Functions_None",'[p] (pause:"short"); [n] content/*[1] (grammar:spokenFence); [p] (pause:"short"); [n] children/*[1]; [p] (pause:"short"); [n] content/*[2] (grammar:spokenFence); [p] (pause:"short")',
|
941
|
+
"self::fenced",'@role="leftright"','name(../*[1])="identifier" or name(../*[1])="function"','parent::*/parent::*[@role="simple function" or @role="prefix function"]','children/*[1][@role="simple function" or @role="prefix function"]','contains(children/*[1]/children/*[2]/children/*[1]/@annotation, "clearspeak:simple") or name(children/*[1]/children/*[2]/children/*[1])="subscript" or name(children/*[1]/children/*[2]/children/*[1])="superscript" or children/*[1]/children/*[2]/children/*[1][@role="vulgar"] ');
|
942
|
+
(0,sre.ClearspeakRules.defineSpecialisedRule_)("fences-open-close","clearspeak.default","clearspeak.Paren_Speak");(0,sre.ClearspeakRules.defineRuleAlias_)("fences-open-close","self::fenced",'@role="composed function"');(0,sre.ClearspeakRules.defineRule_)("fence-silent","clearspeak.Paren_Silent",'[p] (pause:"short"); [n] children/*[1]; [p] (pause:"short")',"self::fenced");(0,sre.ClearspeakRules.defineRule_)("fences-open-close","clearspeak.ImpliedTimes_None",'[p] (pause:"short"); [n] content/*[1] (grammar:spokenFence); [p] (pause:"short"); [n] children/*[1]; [p] (pause:"short"); [n] content/*[2] (grammar:spokenFence); [p] (pause:"short")',
|
943
|
+
"self::fenced",'@role="leftright"','parent::*/parent::*[@role!="simple function"]','parent::*/parent::*[@role!="prefix function"]');(0,sre.ClearspeakRules.defineRule_)("fence-nesting","clearspeak.Paren_SpeakNestingLevel","[n] text() (grammar:insertNesting=CSFnestingDepth)","self::fence",'contains(@grammar, "spokenFence")',"CQFmatchingFences");(0,sre.ClearspeakRules.defineRule_)("fence-no-nesting","clearspeak.Paren_SpeakNestingLevel","[n] text()","self::fence");(0,sre.ClearspeakRules.defineRule_)("fences-points",
|
944
|
+
"clearspeak.Paren_CoordPoint",'[t] "the point with coordinates"; [n] children/*[1]',"self::fenced",'name(children/*[1])="punctuated"','children/*[1][@role="sequence"]');(0,sre.ClearspeakRules.defineRule_)("fences-interval","clearspeak.Paren_Interval",'[t] "the interval from"; [n] children/*[1]/children/*[1]; [t] "to"; [n] children/*[1]/children/*[3]; [p] (pause:"short"); [n] . (grammar:interval)',"self::fenced",'not(contains(@grammar, "interval"))','name(children/*[1])="punctuated"','children/*[1][@role="sequence"]',
|
945
|
+
"count(./children/*[1]/content/*)=1",'children/*[1]/content/*[1][@role="comma"]');(0,sre.ClearspeakRules.defineRule_)("interval-open","clearspeak.Paren_Interval",'[t] "not including"; [n] children/*[1]/children/*[1]; [t] "or"; [n] children/*[1]/children/*[3]',"self::fenced",'contains(@grammar, "interval")','content/*[1]/text()="("','content/*[2]/text()=")"');(0,sre.ClearspeakRules.defineRule_)("interval-closed-open","clearspeak.Paren_Interval",'[t] "including"; [n] children/*[1]/children/*[1]; [p] (pause:"short"); [t] "but not including"; [n] children/*[1]/children/*[3]',
|
946
|
+
"self::fenced",'contains(@grammar, "interval")','content/*[1]/text()="["','content/*[2]/text()=")"');(0,sre.ClearspeakRules.defineRule_)("interval-open-closed","clearspeak.Paren_Interval",'[t] "not including"; [n] children/*[1]/children/*[1]; [p] (pause:"short"); [t] "but including"; [n] children/*[1]/children/*[3]',"self::fenced",'contains(@grammar, "interval")','content/*[1]/text()="("','content/*[2]/text()="]"');(0,sre.ClearspeakRules.defineRule_)("interval-closed","clearspeak.Paren_Interval",
|
947
|
+
'[t] "including"; [n] children/*[1]/children/*[1]; [t] "and"; [n] children/*[1]/children/*[3]',"self::fenced",'contains(@grammar, "interval")','content/*[1]/text()="["','content/*[2]/text()="]"');(0,sre.ClearspeakRules.defineRule_)("interval-open-inf-r","clearspeak.Paren_Interval",'[t] "not including"; [n] children/*[1]/children/*[1]',"self::fenced",'contains(@grammar, "interval")','content/*[1]/text()="("','content/*[2]/text()=")"','children/*[1]/children/*[3]/text()="\u221e" or (name(children/*[1]/children/*[3])="prefixop" and children/*[1]/children/*[3]/children/*[1]/text()="\u221e")');
|
948
|
+
(0,sre.ClearspeakRules.defineRule_)("interval-open-inf-l","clearspeak.Paren_Interval",'[t] "not including"; [n] children/*[1]/children/*[3]',"self::fenced",'contains(@grammar, "interval")','content/*[1]/text()="("','content/*[2]/text()=")"','children/*[1]/children/*[1]/text()="\u221e" or (name(children/*[1]/children/*[1])="prefixop" and children/*[1]/children/*[1]/children/*[1]/text()="\u221e")');(0,sre.ClearspeakRules.defineRule_)("interval-open-inf-lr","clearspeak.Paren_Interval","","self::fenced",
|
949
|
+
'contains(@grammar, "interval")','content/*[1]/text()="("','content/*[2]/text()=")"','children/*[1]/children/*[3]/text()="\u221e" or (name(children/*[1]/children/*[3])="prefixop" and children/*[1]/children/*[3]/children/*[1]/text()="\u221e")','children/*[1]/children/*[1]/text()="\u221e" or (name(children/*[1]/children/*[1])="prefixop" and children/*[1]/children/*[1]/children/*[1]/text()="\u221e")');(0,sre.ClearspeakRules.defineRule_)("interval-closed-open-inf","clearspeak.Paren_Interval",'[t] "including"; [n] children/*[1]/children/*[1]',
|
950
|
+
"self::fenced",'contains(@grammar, "interval")','content/*[1]/text()="["','content/*[2]/text()=")"','children/*[1]/children/*[3]/text()="\u221e" or (name(children/*[1]/children/*[3])="prefixop" and children/*[1]/children/*[3]/children/*[1]/text()="\u221e")');(0,sre.ClearspeakRules.defineRule_)("interval-open-closed-inf","clearspeak.Paren_Interval",'[t] "including"; [n] children/*[1]/children/*[3]',"self::fenced",'contains(@grammar, "interval")','content/*[1]/text()="("','content/*[2]/text()="]"',
|
951
|
+
'children/*[1]/children/*[1]/text()="\u221e" or (name(children/*[1]/children/*[1])="prefixop" and children/*[1]/children/*[1]/children/*[1]/text()="\u221e")');(0,sre.ClearspeakRules.defineRule_)("paren-nested-embellished-funcs","clearspeak.Functions_None",'[p] (pause:"short"); [n] content/*[1]; [p] (pause:"short"); [n] children/*[1]; [p] (pause:"short"); [n] content/*[2]; [p] (pause:"short")',"self::fenced",'@role="leftright"','name(../..)="appl"','name(children/*[1]) = "appl"','preceding-sibling::*/descendant-or-self::*[@role="subsup"] or children/*[1]/descendant-or-self::*[@role="subsup"]');
|
952
|
+
(0,sre.ClearspeakRules.defineRule_)("set-empty","clearspeak.default",'[t] "the empty set"',"self::fenced",'@role="set empty"');(0,sre.ClearspeakRules.defineRule_)("set-extended","clearspeak.default",'[t] "the set of all"; [n] children/*[1]/children/*[1]; [t] "such that"; [n] children/*[1]/children/*[3]',"self::fenced",'@role="set extended"');(0,sre.ClearspeakRules.defineRule_)("set-collection","clearspeak.default",'[t] "the set"; [n] children/*[1]',"self::fenced",'@role="set collection"');(0,sre.ClearspeakRules.defineRuleAlias_)("set-collection",
|
953
|
+
"self::fenced",'@role="set singleton"');(0,sre.ClearspeakRules.defineRule_)("set-extended","clearspeak.Sets_woAll",'[t] "the set of"; [n] children/*[1]/children/*[1]; [t] "such that"; [n] children/*[1]/children/*[3]',"self::fenced",'@role="set extended"');(0,sre.ClearspeakRules.defineRule_)("set-collection","clearspeak.Sets_SilentBracket","[n] children/*[1]","self::fenced",'@role="set collection"');(0,sre.ClearspeakRules.defineRule_)("subscript","clearspeak.default",'[p] (pause:short); [n] children/*[1]; [t] "sub"; [n] children/*[2]; [p] (pause:short)',
|
954
|
+
"self::subscript");(0,sre.ClearspeakRules.defineRule_)("subscript-base","clearspeak.default",'[n] children/*[1]; [t] "base"; [n] children/*[2]',"self::subscript","CQFisLogarithm");(0,sre.ClearspeakRules.defineRule_)("subscript-index","clearspeak.default",'[n] children/*[1]; [t] "sub"; [n] children/*[2]',"self::subscript",'contains(@grammar, "simpleDet")');(0,sre.ClearspeakRules.defineRule_)("fraction","clearspeak.default",'[p] (pause:short); [t] "the fraction with numerator"; [n] children/*[1]; [p] (pause:short); [t] "and denominator"; [n] children/*[2]; [p] (pause:short)',
|
955
|
+
"self::fraction");(0,sre.ClearspeakRules.defineRule_)("fraction","clearspeak.Functions_None",'[p] (pause:short); [t] "the fraction with numerator"; [n] children/*[1]; [p] (pause:short); [t] "and denominator"; [n] children/*[2]; [p] (pause:short)',"self::fraction",'name(children/*[1])="appl" or name(children/*[2])="appl"');(0,sre.ClearspeakRules.defineRule_)("simple-fraction","clearspeak.default",'[p] (pause:short); [n] children/*[1]; [t] "over"; [n] children/*[2]; [p] (pause:short)',"self::fraction",
|
956
|
+
'contains(children/*[1]/@annotation, "clearspeak:simple") or contains(children/*[1]/@annotation, "clearspeak:unit")','contains(children/*[2]/@annotation, "clearspeak:simple") or contains(children/*[2]/@annotation, "clearspeak:unit")');(0,sre.ClearspeakRules.defineRule_)("simple-vulgar-fraction","clearspeak.default",'[p] (pause:short); [n] children/*[1]; [t] "over"; [n] children/*[2]; [p] (pause:short)',"self::fraction",'@role="vulgar"');(0,sre.ClearspeakRules.defineRule_)("simple-text-fraction","clearspeak.default",
|
957
|
+
'[p] (pause:short); [n] children/*[1]; [t] "over"; [n] children/*[2]; [p] (pause:short)',"self::fraction",'name(children/*[1])="text"','name(children/*[2])="text"');(0,sre.ClearspeakRules.defineRule_)("simple-text-fraction","clearspeak.default",'[p] (pause:short); [n] children/*[1]; [t] "over"; [n] children/*[2]; [p] (pause:short)',"self::fraction",'name(children/*[1])="infixop"','children/*[1][@role="unit"]','name(children/*[2])="text"');(0,sre.ClearspeakRules.defineRule_)("vulgar-fraction","clearspeak.default",
|
958
|
+
"[t] CSFvulgarFraction","self::fraction",'@role="vulgar"',"CQFvulgarFractionSmall");(0,sre.ClearspeakRules.defineRule_)("fraction","clearspeak.Fraction_Over",'[p] (pause:short); [n] children/*[1]; [t] "over"; [n] children/*[2]; [p] (pause:short)',"self::fraction");(0,sre.ClearspeakRules.defineRule_)("fraction","clearspeak.Fraction_OverEndFrac",'[p] (pause:short); [n] children/*[1]; [t] "over"; [n] children/*[2]; [p] (pause:short); [t] "end fraction"; [p] (pause:short)',"self::fraction");(0,sre.ClearspeakRules.defineRule_)("fraction",
|
959
|
+
"clearspeak.Fraction_FracOver",'[p] (pause:short); [t] "the fraction"; [n] children/*[1]; [t] "over"; [n] children/*[2]; [p] (pause:short)',"self::fraction");(0,sre.ClearspeakRules.defineRule_)("fraction","clearspeak.Fraction_Per",'[p] (pause:short); [n] children/*[1]; [t] "per"; [n] children/*[2]; [p] (pause:short)',"self::fraction");(0,sre.ClearspeakRules.defineRule_)("fraction","clearspeak.Fraction_GeneralEndFrac",'[p] (pause:short); [t] "the fraction with numerator"; [n] children/*[1]; [p] (pause:short); [t] "and denominator"; [n] children/*[2]; [p] (pause:short); [t] "end fraction"; [p] (pause:short)',
|
960
|
+
"self::fraction");(0,sre.ClearspeakRules.defineRule_)("fraction","clearspeak.Fraction_General",'[p] (pause:short); [t] "the fraction with numerator"; [n] children/*[1]; [p] (pause:short); [t] "and denominator"; [n] children/*[2]; [p] (pause:short)',"self::fraction");(0,sre.ClearspeakRules.defineRule_)("simple-vulgar-fraction","clearspeak.Fraction_Ordinal","[t] CSFvulgarFraction","self::fraction",'@role="vulgar"');(0,sre.ClearspeakRules.defineRule_)("fraction","clearspeak.Fraction_EndFrac",'[p] (pause:short); [n] . (grammar:endfrac); [t] "end fraction"; [p] (pause:short)',
|
961
|
+
"self::fraction",'not(contains(@grammar, "endfrac"))','not(contains(children/*[1]/@annotation, "clearspeak:unit"))','not(contains(children/*[2]/@annotation, "clearspeak:unit"))');(0,sre.ClearspeakRules.defineRule_)("vulgar-fraction","clearspeak.Fraction_EndFrac",'[p] (pause:short); [n] children/*[1]; [t] "over"; [n] children/*[2]; [p] (pause:short)',"self::fraction",'name(children/*[1])="fraction"','name(children/*[2])="fraction"','contains(children/*[1]/@annotation, "clearspeak:simple")','contains(children/*[2]/@annotation, "clearspeak:simple")');
|
962
|
+
(0,sre.ClearspeakRules.defineRule_)("simple-vulgar-fraction","clearspeak.Fraction_EndFrac","[t] CSFvulgarFraction","self::fraction",'@role="vulgar"','contains(@annotation, "clearspeak:simple")',"self::*");(0,sre.ClearspeakRules.defineRule_)("sqrt","clearspeak.default",'[t] "the square root of"; [n] children/*[1] (grammar:EndRoot=false); [p] (pause:short)',"self::sqrt");(0,sre.ClearspeakRules.defineRule_)("sqrt-nested","clearspeak.default",'[p] (pause: "short"); [t] "the square root of"; [n] children/*[1] (grammar:EndRoot=false); [p] (pause:short)',
|
963
|
+
"self::sqrt","not(preceding-sibling::*)","ancestor::sqrt|ancestor::root");(0,sre.ClearspeakRules.defineRule_)("negative-sqrt","clearspeak.default",'[t] "the negative square root of"; [n] children/*[1]/children/*[1] (grammar:EndRoot=false); [p] (pause:short)',"self::prefixop",'@role="negative"','name(children/*[1])="sqrt"');(0,sre.ClearspeakRules.defineRule_)("negative-sqrt","clearspeak.default",'[p] (pause: "short"); [t] "the negative square root of"; [n] children/*[1]/children/*[1] (grammar:EndRoot=false); [p] (pause:short)',
|
964
|
+
"self::prefixop",'@role="negative"','name(children/*[1])="sqrt"',"not(preceding-sibling::*)","ancestor::sqrt|ancestor::root");(0,sre.ClearspeakRules.defineRule_)("sqrt-plus-minus","clearspeak.Roots_PosNegSqRoot",'[t] "the positive square root of"; [n] children/*[1] (grammar:EndRoot=false); [p] (pause:short)',"self::sqrt",'parent::stree or not(parent::*/parent::infixop[@role="addition"]) or (parent::*/parent::*[1]/text()!="\u00b1" and parent::*/parent::*/text()!="\u2213")');(0,sre.ClearspeakRules.defineRule_)("sqrt-nested-plus-minus",
|
965
|
+
"clearspeak.Roots_PosNegSqRoot",'[p] (pause: "short"); [t] "the positive square root of"; [n] children/*[1] (grammar:EndRoot=false); [p] (pause:short)',"self::sqrt","not(preceding-sibling::*)","ancestor::sqrt|ancestor::root",'parent::stree or not(parent::*/parent::infixop[@role="addition"]) or (parent::*/parent::*[1]/text()!="\u00b1" and parent::*/parent::*/text()!="\u2213")');(0,sre.ClearspeakRules.defineRule_)("sqrt-plus-minus","clearspeak.Roots_PosNegSqRootEnd",'[t] "the positive square root of"; [n] children/*[1] (grammar:EndRoot=false); [p] (pause:short)',
|
966
|
+
"self::sqrt",'parent::stree or not(parent::*/parent::infixop[@role="addition"]) or (parent::*/parent::*[1]/text()!="\u00b1" and parent::*/parent::*/text()!="\u2213")');(0,sre.ClearspeakRules.defineRule_)("sqrt-nested-plus-minus","clearspeak.Roots_PosNegSqRootEnd",'[p] (pause: "short"); [t] "the positive square root of"; [n] children/*[1] (grammar:EndRoot=false); [p] (pause:short)',"self::sqrt","not(preceding-sibling::*)","ancestor::sqrt|ancestor::root",'parent::stree or not(parent::*/parent::infixop[@role="addition"]) or (parent::*/parent::*[1]/text()!="\u00b1" and parent::*/parent::*/text()!="\u2213")');
|
967
|
+
(0,sre.ClearspeakRules.defineRule_)("sqrt-endroot","clearspeak.Roots_RootEnd",'[n] . (grammar:EndRoot); [t] "end root"; [p] (pause:short)',"self::sqrt",'not(contains(@grammar, "EndRoot"))');(0,sre.ClearspeakRules.defineRule_)("negative-sqrt-endroot","clearspeak.Roots_RootEnd",'[n] . (grammar:EndRoot); [t] "end root"; [p] (pause:short)',"self::prefixop",'@role="negative"','name(children/*[1])="sqrt"','not(contains(@grammar, "EndRoot"))');(0,sre.ClearspeakRules.defineRule_)("sqrt-endroot","clearspeak.Roots_PosNegSqRootEnd",
|
968
|
+
'[n] . (grammar:EndRoot); [t] "end root"; [p] (pause:short)',"self::sqrt",'not(contains(@grammar, "EndRoot"))');(0,sre.ClearspeakRules.defineRule_)("negative-sqrt-endroot","clearspeak.Roots_PosNegSqRootEnd",'[n] . (grammar:EndRoot); [t] "end root"; [p] (pause:short)',"self::prefixop",'@role="negative"','name(children/*[1])="sqrt"','not(contains(@grammar, "EndRoot"))');(0,sre.ClearspeakRules.defineRule_)("cube","clearspeak.default",'[t] "the cube root of"; [n] children/*[2] (grammar:EndRoot=false); [p] (pause:short)',
|
969
|
+
"self::root",'children/*[1][text()="3"]');(0,sre.ClearspeakRules.defineRule_)("cube-nested","clearspeak.default",'[p] (pause:short); [t] "the cube root of"; [n] children/*[2] (grammar:EndRoot=false); [p] (pause:short)',"self::root",'children/*[1][text()="3"]',"not(preceding-sibling::*)","ancestor::sqrt|ancestor::root");(0,sre.ClearspeakRules.defineRule_)("root","clearspeak.default",'[t] "the"; [n] children/*[1] (grammar:ordinal); [t] "root of"; [n] children/*[2] (grammar:EndRoot=false); [p] (pause:short)',
|
970
|
+
"self::root");(0,sre.ClearspeakRules.defineRule_)("root-nested","clearspeak.default",'[p] (pause:short); [t] "the"; [n] children/*[1] (grammar:ordinal); [t] "root of"; [n] children/*[2] (grammar:EndRoot=false); [p] (pause:short)',"self::root","not(preceding-sibling::*)","ancestor::sqrt|ancestor::root");(0,sre.ClearspeakRules.defineRule_)("root-endroot","clearspeak.Roots_RootEnd",'[n] . (grammar:EndRoot); [t] "end root"; [p] (pause:short)',"self::root",'not(contains(@grammar, "EndRoot"))');(0,sre.ClearspeakRules.defineRule_)("root-endroot",
|
971
|
+
"clearspeak.Roots_PosNegSqRootEnd",'[n] . (grammar:EndRoot); [t] "end root"; [p] (pause:short)',"self::root",'not(contains(@grammar, "EndRoot"))');(0,sre.ClearspeakRules.defineRule_)("negative","clearspeak.default",'[t] "negative"; [n] children/*[1]',"self::prefixop",'@role="negative"');(0,sre.ClearspeakRules.defineRule_)("positive","clearspeak.default",'[t] "positive"; [n] children/*[1]',"self::prefixop",'@role="positive"');(0,sre.ClearspeakRules.defineRule_)("angle-measure","clearspeak.default",
|
972
|
+
'[t] "the measure of"; [n] content/*[1]; [n] children/*[2] (grammar:angle)',"self::infixop",'content/*[1]/text()="\u2220"','children/*[1][text()="m"]');(0,sre.ClearspeakRules.defineRule_)("prefix","clearspeak.default","[m] content/* (grammar:prefix); [n] children/*[1]","self::prefixop");(0,sre.ClearspeakRules.defineRule_)("postfix","clearspeak.default","[n] children/*[1]; [m] content/* (grammar:postfix)","self::postfixop");(0,sre.ClearspeakRules.defineRule_)("set-prefix-operators","clearspeak.default",
|
973
|
+
'[t] "the"; [n] self::* (grammar:!prefix); [t] "of"',"self::*",'contains(@grammar,"prefix")','descendant-or-self::*/text()="\u2229" or descendant-or-self::*/text()="\u222a"',"self::*","self::*","self::*");(0,sre.ClearspeakRules.defineRule_)("binary-operation","clearspeak.default","[m] children/* (sepFunc:CTXFcontentIterator);","self::infixop");(0,sre.ClearspeakRules.defineRule_)("binary-operation","clearspeak.ImpliedTimes_MoreImpliedTimes","[m] children/* (sepFunc:CTXFcontentIterator);","self::infixop",
|
974
|
+
'@role="implicit"');(0,sre.ClearspeakRules.defineRule_)("binary-operation-pause","clearspeak.default","[p] (pause:short); [m] children/* (sepFunc:CTXFcontentIterator);","self::infixop",'@role="implicit"','name(children/*[1])="appl"');(0,sre.ClearspeakRules.defineRule_)("binary-operation-pause","clearspeak.default","[m] children/* (sepFunc:CTXFcontentIterator); [p] (pause:short)","self::infixop",'@role="implicit"','name(children/*[last()])="appl"');(0,sre.ClearspeakRules.defineRule_)("binary-operation-pause",
|
975
|
+
"clearspeak.default","[p] (pause:short); [m] children/* (sepFunc:CTXFcontentIterator); [p] (pause:short)","self::infixop",'@role="implicit"','name(children/*[1])="appl"','name(children/*[last()])="appl"');(0,sre.ClearspeakRules.defineRule_)("implicit-times","clearspeak.default","[p] (pause:short)","self::operator",'@role="multiplication"','text()="\u2062"');(0,sre.ClearspeakRules.defineRule_)("implicit-times","clearspeak.default","","self::operator",'@role="multiplication"','text()="\u2062"',"CQFsimpleArguments");
|
976
|
+
(0,sre.ClearspeakRules.defineRule_)("implicit-times","clearspeak.default","[n] text()","self::operator",'@role="multiplication"','text()="\u2062"',"CQFfencedArguments");(0,sre.ClearspeakRules.defineRule_)("implicit-times","clearspeak.ImpliedTimes_MoreImpliedTimes","[n] text()","self::operator",'@role="multiplication"','text()="\u2062"');(0,sre.ClearspeakRules.defineRule_)("implicit-times","clearspeak.ImpliedTimes_None","","self::operator",'@role="multiplication"','text()="\u2062"');(0,sre.ClearspeakRules.defineRule_)("binary-operation-simple",
|
977
|
+
"clearspeak.default",'[m] children/* (rate:"0.5"); [p] (pause:short)',"self::infixop",'@role="implicit"','contains(@annotation, "clearspeak:simple")','not(contains(@grammar, "inFrac"))');(0,sre.ClearspeakRules.defineRule_)("simple-in-fraction","clearspeak.default",'[n] . (rate:"0.5",grammar:inFrac)',"self::*",'contains(@annotation, "clearspeak:simple")','not(contains(@grammar, "inFrac"))','name(.)!="identifier"','name(.)!="function"','name(.)!="number"','name(parent::*/parent::*)="fraction"',"not(preceding-sibling::*)");
|
978
|
+
(0,sre.ClearspeakRules.defineRule_)("operators-after-power","clearspeak.Exponent_AfterPower",'[m] children/* (rate:"0.5")',"self::infixop",'@role="implicit"','contains(@grammar, "afterPower")');(0,sre.ClearspeakRules.defineRule_)("relseq","clearspeak.default","[m] children/* (sepFunc:CTXFcontentIterator)","self::relseq");(0,sre.ClearspeakRules.defineRule_)("multrel","clearspeak.default","[m] children/* (sepFunc:CTXFcontentIterator)","self::multirel");(0,sre.ClearspeakRules.defineRule_)("natural-numbers",
|
979
|
+
"clearspeak.default",'[t] "the natural numbers"',"self::identifier",'text()="\u2115" or (text()="N" and @font="double-struck")',"self::*","self::*","self::*");(0,sre.ClearspeakRules.defineRule_)("integers","clearspeak.default",'[t] "the integers"',"self::identifier",'text()="\u2124" or (text()="Z" and @font="double-struck")',"self::*","self::*","self::*");(0,sre.ClearspeakRules.defineRule_)("rational-numbers","clearspeak.default",'[t] "the rational numbers"',"self::identifier",'text()="\u211a" or (text()="Q" and @font="double-struck")',
|
980
|
+
"self::*","self::*","self::*");(0,sre.ClearspeakRules.defineRule_)("real-numbers","clearspeak.default",'[t] "the real numbers"',"self::identifier",'text()="\u211d" or (text()="R" and @font="double-struck")',"self::*","self::*","self::*");(0,sre.ClearspeakRules.defineRule_)("complex-numbers","clearspeak.default",'[t] "the complex numbers"',"self::identifier",'text()="\u2102" or (text()="C" and @font="double-struck")',"self::*","self::*","self::*");(0,sre.ClearspeakRules.defineRule_)("natural-numbers-super",
|
981
|
+
"clearspeak.default",'[t] "n" (join: "-"); [n] children/*[2] (grammar:numbers2alpha)',"self::superscript",'children/*[1]/text()="\u2115" or (children/*[1]/text()="N" and @font="double-struck")',"self::*","self::*","self::*");(0,sre.ClearspeakRules.defineRule_)("integers-super","clearspeak.default",'[t] "z" (join: "-"); [n] children/*[2] (grammar:numbers2alpha)',"self::superscript",'children/*[1]/text()="\u2124" or (children/*[1]/text()="Z" and @font="double-struck")',"self::*","self::*","self::*");
|
982
|
+
(0,sre.ClearspeakRules.defineRule_)("rational-numbers-super","clearspeak.default",'[t] "q" (join: "-"); [n] children/*[2] (grammar:numbers2alpha)',"self::superscript",'children/*[1]/text()="\u211a" or (children/*[1]/text()="Q" and @font="double-struck")',"self::*","self::*","self::*");(0,sre.ClearspeakRules.defineRule_)("real-numbers-super","clearspeak.default",'[t] "r" (join:"-"); [n] children/*[2] (grammar:numbers2alpha)',"self::superscript",'children/*[1]/text()="\u211d" or (children/*[1]/text()="R" and @font="double-struck")',
|
983
|
+
"self::*","self::*","self::*");(0,sre.ClearspeakRules.defineRule_)("complex-numbers-super","clearspeak.default",'[t] "c" (join:"-"); [n] children/*[2] (grammar:numbers2alpha)',"self::superscript",'children/*[1]/text()="\u2102" or (children/*[1]/text()="C" and @font="double-struck")',"self::*","self::*","self::*");(0,sre.ClearspeakRules.defineRule_)("natural-numbers-with-zero","clearspeak.default",'[t] "the natural numbers with zero"',"self::subscript",'children/*[1]/text()="\u2115" or (children/*[1]/text()="N" and @font="double-struck")',
|
984
|
+
'children/*[2]/text()="0"');(0,sre.ClearspeakRules.defineRule_)("positive-integers","clearspeak.default",'[t] "the positive integers"',"self::superscript",'children/*[1]/text()="\u2124" or (children/*[1]/text()="Z" and @font="double-struck")','children/*[2]/text()="+"',"self::*","self::*","self::*");(0,sre.ClearspeakRules.defineRule_)("positive-integers","clearspeak.default",'[t] "the negative integers"',"self::superscript",'children/*[1]/text()="\u2124" or (children/*[1]/text()="Z" and @font="double-struck")',
|
985
|
+
'children/*[2]/text()="-"',"self::*","self::*","self::*");(0,sre.ClearspeakRules.defineRule_)("positive-rational-numbers","clearspeak.default",'[t] "the positive rational numbers"',"self::superscript",'children/*[1]/text()="\u211a" or (children/*[1]/text()="Q" and @font="double-struck")','children/*[2]/text()="+"',"self::*","self::*","self::*");(0,sre.ClearspeakRules.defineRule_)("negative-rational-numbers","clearspeak.default",'[t] "the negative rational numbers"',"self::superscript",'children/*[1]/text()="\u211a" or (children/*[1]/text()="Q" and @font="double-struck")',
|
986
|
+
'children/*[2]/text()="-"',"self::*","self::*","self::*");(0,sre.ClearspeakRules.defineRule_)("fences-neutral","clearspeak.default",'[p] (pause:short); [t] "the absolute value of"; [n] children/*[1]; [p] (pause: short)',"self::fenced",'@role="neutral"','content/*[1][text()]="|" or content/*[1][text()]="\u2758" or content/*[1][text()]="\uff5c"');(0,sre.ClearspeakRules.defineRule_)("fences-neutral","clearspeak.AbsoluteValue_AbsEnd",'[p] (pause:short); [t] "the absolute value of"; [n] children/*[1]; [p] (pause: short); [t] "end absolute value"; [p] (pause: short)',
|
987
|
+
"self::fenced",'@role="neutral"','content/*[1][text()]="|" or content/*[1][text()]="\u2758" or content/*[1][text()]="\uff5c"');(0,sre.ClearspeakRules.defineRule_)("fences-neutral","clearspeak.AbsoluteValue_Cardinality",'[p] (pause:short); [t] "the cardinality of"; [n] children/*[1]; [p] (pause: short)',"self::fenced",'@role="neutral"','content/*[1][text()]="|" or content/*[1][text()]="\u2758" or content/*[1][text()]="\uff5c"');(0,sre.ClearspeakRules.defineRule_)("fences-neutral","clearspeak.AbsoluteValue_Determinant",
|
988
|
+
'[p] (pause:short); [t] "the determinant of"; [n] children/*[1]; [p] (pause: short)',"self::fenced",'@role="neutral"','content/*[1][text()]="|" or content/*[1][text()]="\u2758" or content/*[1][text()]="\uff5c"');(0,sre.ClearspeakRules.defineRule_)("matrix","clearspeak.default",'[t] "the"; [t] count(children/*); [t] "by";[t] count(children/*[1]/children/*); [t] "matrix"; [p] (pause:long); [m] children/* (ctxtFunc:CTXFnodeCounter,context:"Row-:"); [p] (pause:long)',"self::matrix");(0,sre.ClearspeakRules.defineRule_)("matrix-simple",
|
989
|
+
"clearspeak.default",'[t] "the"; [t] count(children/*); [t] "by";[t] count(children/*[1]/children/*); [t] "matrix"; [p] (pause:long); [m] children/* (ctxtFunc:CTXFnodeCounter,context:"Row-:",grammar:simpleDet); [p] (pause:long)',"self::matrix","count(children/*)<4","count(children/*[1]/children/*)<4","CQFcellsSimple");(0,sre.ClearspeakRules.defineRule_)("matrix-trivial","clearspeak.default",'[t] "the 1 by 1 matrix with entry"; [n] children/*[1]; [p] (pause:long)',"self::vector",'@role="squarematrix"');
|
990
|
+
(0,sre.ClearspeakRules.defineRule_)("determinant","clearspeak.default",'[t] "the determinant of the"; [t] count(children/*); [t] "by";[t] count(children/*[1]/children/*); [t] "matrix"; [p] (pause:long); [m] children/* (ctxtFunc:CTXFnodeCounter,context:"Row-:",grammar:simpleDet); [p] (pause:long)',"self::matrix",'@role="determinant"',"count(children/*)<4","CQFcellsSimple");(0,sre.ClearspeakRules.defineRule_)("determinant-simple","clearspeak.default",'[t] "the determinant of the"; [t] count(children/*); [t] "by";[t] count(children/*[1]/children/*); [t] "matrix"; [p] (pause:long); [m] children/* (ctxtFunc:CTXFnodeCounter,context:"Row-:"); [p] (pause:long)',
|
991
|
+
"self::matrix",'@role="determinant"');(0,sre.ClearspeakRules.defineRule_)("matrix-vector","clearspeak.default",'[t] "the"; [t] count(children/*); [t] "by";[t] count(children/*[1]/children/*); [t] "column matrix"; [p] (pause:long); [m] children/* (ctxtFunc:CTXFnodeCounter,context:"Row-:",grammar:simpleDet); [p] (pause:long)',"self::vector");(0,sre.ClearspeakRules.defineSpecialisedRule_)("matrix-vector","clearspeak.default","clearspeak.Matrix_SpeakColNum");(0,sre.ClearspeakRules.defineRule_)("matrix-vector-simple",
|
992
|
+
"clearspeak.default",'[t] "the"; [t] count(children/*); [t] "by";[t] count(children/*[1]/children/*); [t] "column matrix"; [p] (pause:long); [m] children/* (sepFunc:CTXFpauseSeparator,separator:"short",grammar:simpleDet); [p] (pause:long)',"self::vector","count(children/*)<4","CQFcellsSimple",'@role!="squarematrix"');(0,sre.ClearspeakRules.defineRule_)("matrix-vector-simple","clearspeak.Matrix_SilentColNum",'[t] "the"; [t] count(children/*); [t] "by";[t] count(children/*[1]/children/*); [t] "column matrix"; [p] (pause:long); [m] children/* (sepFunc:CTXFpauseSeparator,separator:"short",grammar:simpleDet); [p] (pause:long)',
|
993
|
+
"self::vector");(0,sre.ClearspeakRules.defineRule_)("matrix-row-vector","clearspeak.default",'[t] "the"; [t] count(children/*); [t] "by";[t] count(children/*[1]/children/*); [t] "row matrix"; [p] (pause:long); [m] children/*[1]/children/* (ctxtFunc:CTXFnodeCounter,context:"Column-:",grammar:simpleDet); [p] (pause:long)',"self::matrix",'@role="rowvector"');(0,sre.ClearspeakRules.defineSpecialisedRule_)("matrix-row-vector","clearspeak.default","clearspeak.Matrix_SpeakColNum");(0,sre.ClearspeakRules.defineRule_)("matrix-row-vector-simple",
|
994
|
+
"clearspeak.default",'[t] "the"; [t] count(children/*); [t] "by";[t] count(children/*[1]/children/*); [t] "row matrix"; [p] (pause:long); [m] children/*[1]/children/* (sepFunc:CTXFpauseSeparator,separator:"short",grammar:simpleDet); [p] (pause:long)',"self::matrix",'@role="rowvector"',"count(children/*[1]/children/*)<4","CQFcellsSimple");(0,sre.ClearspeakRules.defineRule_)("matrix-row-vector-simple","clearspeak.Matrix_SilentColNum",'[t] "the"; [t] count(children/*); [t] "by";[t] count(children/*[1]/children/*); [t] "row matrix"; [p] (pause:long); [m] children/*[1]/children/* (sepFunc:CTXFpauseSeparator,separator:"short",grammar:simpleDet); [p] (pause:long)',
|
995
|
+
"self::matrix",'@role="rowvector"');(0,sre.ClearspeakRules.defineRule_)("matrix-row-simple","clearspeak.default",'[m] children/* (sepFunc:CTXFpauseSeparator,separator:"short")',"self::row",'contains(@grammar, "simpleDet")');(0,sre.ClearspeakRules.defineRule_)("matrix-row-simple","clearspeak.Matrix_SilentColNum",'[m] children/* (sepFunc:CTXFpauseSeparator,separator:"short")',"self::row");(0,sre.ClearspeakRules.defineRule_)("line-simple","clearspeak.default","[n] children/*[1]","self::line",'contains(@grammar, "simpleDet")');
|
996
|
+
(0,sre.ClearspeakRules.defineRule_)("matrix-row","clearspeak.default",'[m] children/* (ctxtFunc:CTXFnodeCounter,context:"Column-,- ",sepFunc:CTXFpauseSeparator,separator:"medium"); [p] (pause:long)',"self::row");(0,sre.ClearspeakRules.defineSpecialisedRule_)("matrix-row","clearspeak.default","clearspeak.Matrix_SpeakColNum");(0,sre.ClearspeakRules.defineRule_)("matrix-cell","clearspeak.default","[n] children/*[1]","self::cell");(0,sre.ClearspeakRules.defineRule_)("matrix-end-matrix","clearspeak.Matrix_EndMatrix",
|
997
|
+
'[n] . (grammar:EndMatrix); [t] "end matrix"',"self::matrix",'not(contains(@grammar, "EndMatrix"))');(0,sre.ClearspeakRules.defineRule_)("matrix-end-vector","clearspeak.Matrix_EndMatrix",'[n] . (grammar:EndMatrix); [t] "end matrix"',"self::vector",'not(contains(@grammar, "EndMatrix"))');(0,sre.ClearspeakRules.defineRule_)("matrix-end-determinant","clearspeak.Matrix_EndMatrix",'[n] . (grammar:EndMatrix); [t] "end determinant"',"self::matrix",'@role="determinant"','not(contains(@grammar, "EndMatrix"))');
|
998
|
+
(0,sre.ClearspeakRules.defineRule_)("vector","clearspeak.Matrix_Vector",'[t] "the"; [t] count(children/*); [t] "by";[t] count(children/*[1]/children/*); [t] "column vector"; [p] (pause:long); [m] children/* (ctxtFunc:CTXFnodeCounter,context:"Row-:",grammar:simpleDet); [p] (pause:long)',"self::vector");(0,sre.ClearspeakRules.defineSpecialisedRule_)("vector","clearspeak.Matrix_Vector","clearspeak.Matrix_EndVector");(0,sre.ClearspeakRules.defineRule_)("vector-simple","clearspeak.Matrix_Vector",'[t] "the"; [t] count(children/*); [t] "by"; [t] count(children/*[1]/children/*); [t] "column vector"; [p] (pause:long); [m] children/* (sepFunc:CTXFpauseSeparator,separator:"short",grammar:simpleDet); [p] (pause:long)',
|
999
|
+
"self::vector","count(children/*)<4","CQFcellsSimple");(0,sre.ClearspeakRules.defineSpecialisedRule_)("vector-simple","clearspeak.Matrix_Vector","clearspeak.Matrix_EndVector");(0,sre.ClearspeakRules.defineRule_)("row-vector","clearspeak.Matrix_Vector",'[t] "the"; [t] count(children/*); [t] "by";[t] count(children/*[1]/children/*); [t] "row vector"; [p] (pause:long); [m] children/*[1]/children/* (ctxtFunc:CTXFnodeCounter,context:"Column-:",grammar:simpleDet); [p] (pause:long)',"self::matrix",'@role="rowvector"');
|
1000
|
+
(0,sre.ClearspeakRules.defineSpecialisedRule_)("row-vector","clearspeak.Matrix_Vector","clearspeak.Matrix_EndVector");(0,sre.ClearspeakRules.defineRule_)("row-vector-simple","clearspeak.Matrix_Vector",'[t] "the"; [t] count(children/*); [t] "by";[t] count(children/*[1]/children/*); [t] "row vector"; [p] (pause:long); [m] children/*[1]/children/* (sepFunc:CTXFpauseSeparator,separator:"short",grammar:simpleDet); [p] (pause:long)',"self::matrix",'@role="rowvector"',"count(children/*[1]/children/*)<4",
|
1001
|
+
"CQFcellsSimple");(0,sre.ClearspeakRules.defineSpecialisedRule_)("row-vector-simple","clearspeak.Matrix_Vector","clearspeak.Matrix_EndVector");(0,sre.ClearspeakRules.defineRule_)("vector-end-matrix","clearspeak.Matrix_EndVector",'[n] . (grammar:EndMatrix); [t] "end matrix"',"self::matrix",'not(contains(@grammar, "EndMatrix"))',"self::*");(0,sre.ClearspeakRules.defineRule_)("vector-end-vector","clearspeak.Matrix_EndVector",'[n] . (grammar:EndMatrix); [t] "end vector"',"self::vector",'not(contains(@grammar, "EndMatrix"))',
|
1002
|
+
"self::*");(0,sre.ClearspeakRules.defineRule_)("vector-end-vector","clearspeak.Matrix_EndVector",'[n] . (grammar:EndMatrix); [t] "end vector"',"self::matrix",'@role="rowvector"','not(contains(@grammar, "EndMatrix"))',"self::*");(0,sre.ClearspeakRules.defineRule_)("vector-end-determinant","clearspeak.Matrix_EndVector",'[n] . (grammar:EndMatrix); [t] "end determinant"',"self::matrix",'@role="determinant"','not(contains(@grammar, "EndMatrix"))',"self::*");(0,sre.ClearspeakRules.defineRule_)("binomial",
|
1003
|
+
"clearspeak.Matrix_Combinatoric",'[n] children/*[1]/children/*[1]; [t] "choose"; [n] children/*[2]/children/*[1]; ',"self::vector",'@role="binomial"');(0,sre.ClearspeakRules.defineRule_)("lines-summary","clearspeak.default",'[p] (pause:short); [t] count(children/*); [t] "lines"; [n] . (grammar:layoutSummary)',"self::multiline",'not(contains(@grammar, "layoutSummary"))',"self::*");(0,sre.ClearspeakRules.defineRule_)("lines-summary","clearspeak.MultiLineOverview_None","[n] . (grammar:layoutSummary)",
|
1004
|
+
"self::multiline",'not(contains(@grammar, "layoutSummary"))',"self::*");(0,sre.ClearspeakRules.defineRuleAlias_)("lines-summary","self::table",'not(contains(@grammar, "layoutSummary"))');(0,sre.ClearspeakRules.defineRule_)("cases-summary","clearspeak.default",'[p] (pause:short); [t] count(children/*); [t] "cases"; [n] . (grammar:layoutSummary)',"self::cases",'not(contains(@grammar, "layoutSummary"))');(0,sre.ClearspeakRules.defineRule_)("cases-summary","clearspeak.MultiLineOverview_None","[n] . (grammar:layoutSummary)",
|
1005
|
+
"self::cases",'not(contains(@grammar, "layoutSummary"))',"self::*");(0,sre.ClearspeakRules.defineRule_)("lines","clearspeak.default",'[p] (pause:short); [m] children/* (ctxtFunc:CTXFnodeCounter,context:"Line-:",sepFunc:CTXFpauseSeparator,separator:"long"); [p] (pause:long)',"self::table");(0,sre.ClearspeakRules.defineRuleAlias_)("lines","self::multiline");(0,sre.ClearspeakRules.defineRule_)("line","clearspeak.default","[n] children/*[1]","self::line");(0,sre.ClearspeakRules.defineRule_)("row-medium",
|
1006
|
+
"clearspeak.default",'[m] children/* (sepFunc:CTXFpauseSeparator,separator:"medium")',"self::row",'@role="table"');(0,sre.ClearspeakRules.defineRuleAlias_)("row-medium","self::row",'@role="cases"');(0,sre.ClearspeakRules.defineRule_)("row-long","clearspeak.MultiLinePausesBetweenColumns_Long",'[m] children/* (sepFunc:CTXFpauseSeparator,separator:"long")',"self::row",'@role="table"');(0,sre.ClearspeakRules.defineRuleAlias_)("row-long","self::row",'@role="cases"');(0,sre.ClearspeakRules.defineRule_)("row-short",
|
1007
|
+
"clearspeak.MultiLinePausesBetweenColumns_Short",'[m] children/* (sepFunc:CTXFpauseSeparator,separator:"short")',"self::row",'@role="table"');(0,sre.ClearspeakRules.defineRuleAlias_)("row-short","self::row",'@role="cases"');(0,sre.ClearspeakRules.defineRule_)("blank-cell","clearspeak.default",'[t] "blank"',"self::cell","count(children/*)=0");(0,sre.ClearspeakRules.defineRule_)("blank-empty","clearspeak.default",'[t] "blank"',"self::empty","count(../*)=1",'name(../..)="cell" or name(../..)="line"');
|
1008
|
+
(0,sre.ClearspeakRules.defineRule_)("cases","clearspeak.default",'[p] (pause:short); [m] children/* (ctxtFunc:CTXFnodeCounter,context:"Case-:",sepFunc:CTXFpauseSeparator,separator:"long"); [p] (pause:long)',"self::cases");(0,sre.ClearspeakRules.defineRule_)("lines-cases-summary","clearspeak.MultiLineLabel_Case",'[p] (pause:short); [t] count(children/*); [t] "cases"; [n] . (grammar:layoutSummary)',"self::multiline",'not(contains(@grammar, "layoutSummary"))');(0,sre.ClearspeakRules.defineRuleAlias_)("lines-cases-summary",
|
1009
|
+
"self::table",'not(contains(@grammar, "layoutSummary"))');(0,sre.ClearspeakRules.defineRule_)("lines-cases","clearspeak.MultiLineLabel_Case",'[p] (pause:short); [m] children/* (ctxtFunc:CTXFnodeCounter,context:"Case-:",sepFunc:CTXFpauseSeparator,separator:"long"); [p] (pause:long)',"self::table");(0,sre.ClearspeakRules.defineRuleAlias_)("lines-cases","self::multiline");(0,sre.ClearspeakRules.defineRule_)("lines-equations-summary","clearspeak.MultiLineLabel_Equation",'[p] (pause:short); [t] count(children/*); [t] "equations"; [n] . (grammar:layoutSummary)',
|
1010
|
+
"self::multiline",'not(contains(@grammar, "layoutSummary"))');(0,sre.ClearspeakRules.defineRuleAlias_)("lines-equations-summary","self::table",'not(contains(@grammar, "layoutSummary"))');(0,sre.ClearspeakRules.defineRule_)("lines-equations","clearspeak.MultiLineLabel_Equation",'[p] (pause:short); [m] children/* (ctxtFunc:CTXFnodeCounter,context:"Equation-:",sepFunc:CTXFpauseSeparator,separator:"long"); [p] (pause:long)',"self::table");(0,sre.ClearspeakRules.defineRuleAlias_)("lines-equations","self::multiline");
|
1011
|
+
(0,sre.ClearspeakRules.defineRule_)("lines-steps-summary","clearspeak.MultiLineLabel_Step",'[p] (pause:short); [t] count(children/*); [t] "steps"; [n] . (grammar:layoutSummary)',"self::multiline",'not(contains(@grammar, "layoutSummary"))');(0,sre.ClearspeakRules.defineRuleAlias_)("lines-steps-summary","self::table",'not(contains(@grammar, "layoutSummary"))');(0,sre.ClearspeakRules.defineRule_)("lines-steps","clearspeak.MultiLineLabel_Step",'[p] (pause:short); [m] children/* (ctxtFunc:CTXFnodeCounter,context:"Step-:",sepFunc:CTXFpauseSeparator,separator:"long"); [p] (pause:long)',
|
1012
|
+
"self::table");(0,sre.ClearspeakRules.defineRuleAlias_)("lines-steps","self::multiline");(0,sre.ClearspeakRules.defineRule_)("lines-rows-summary","clearspeak.MultiLineLabel_Row",'[p] (pause:short); [t] count(children/*); [t] "rows"; [n] . (grammar:layoutSummary)',"self::multiline",'not(contains(@grammar, "layoutSummary"))');(0,sre.ClearspeakRules.defineRuleAlias_)("lines-rows-summary","self::table",'not(contains(@grammar, "layoutSummary"))');(0,sre.ClearspeakRules.defineRule_)("lines-rows","clearspeak.MultiLineLabel_Row",
|
1013
|
+
'[p] (pause:short); [m] children/* (ctxtFunc:CTXFnodeCounter,context:"Row-:",sepFunc:CTXFpauseSeparator,separator:"long"); [p] (pause:long)',"self::table");(0,sre.ClearspeakRules.defineRuleAlias_)("lines-rows","self::multiline");(0,sre.ClearspeakRules.defineRule_)("lines-constraints-summary","clearspeak.MultiLineLabel_Constraint",'[p] (pause:short); [t] count(children/*); [t] "constraints"; [n] . (grammar:layoutSummary)',"self::multiline",'not(contains(@grammar, "layoutSummary"))');(0,sre.ClearspeakRules.defineRuleAlias_)("lines-constraints-summary",
|
1014
|
+
"self::table",'not(contains(@grammar, "layoutSummary"))');(0,sre.ClearspeakRules.defineRule_)("lines-constraints","clearspeak.MultiLineLabel_Constraint",'[p] (pause:short); [m] children/* (ctxtFunc:CTXFnodeCounter,context:"Constraint-:",sepFunc:CTXFpauseSeparator,separator:"long"); [p] (pause:long)',"self::table");(0,sre.ClearspeakRules.defineRuleAlias_)("lines-constraints","self::multiline");(0,sre.ClearspeakRules.defineRule_)("lines-none","clearspeak.MultiLineLabel_None",'[p] (pause:short); [m] children/* (sepFunc:CTXFpauseSeparator,separator:"long"); [p] (pause:long)',
|
1015
|
+
"self::table",'contains(@grammar, "layoutSummary")');(0,sre.ClearspeakRules.defineRuleAlias_)("lines-none","self::multiline",'contains(@grammar, "layoutSummary")');(0,sre.ClearspeakRules.defineRuleAlias_)("lines-none","self::cases",'contains(@grammar, "layoutSummary")');(0,sre.ClearspeakRules.defineRule_)("bigop","clearspeak.default",'[t] "the"; [n] children/*[1]; [t] "of"; [n] children/*[2]; [p] (pause:short)',"self::bigop");(0,sre.ClearspeakRules.defineRule_)("limboth","clearspeak.default",'[n] children/*[1]; [t] "from"; [n] children/*[2];[t] "to"; [n] children/*[3];',
|
1016
|
+
"self::limboth");(0,sre.ClearspeakRules.defineRule_)("limlower","clearspeak.default",'[n] children/*[1]; [t] "over"; [n] children/*[2]; [p] (pause:short)',"self::limlower");(0,sre.ClearspeakRules.defineRule_)("limupper","clearspeak.default",'[n] children/*[1]; [t] "under"; [n] children/*[2]; [p] (pause:short)',"self::limupper");(0,sre.ClearspeakRules.defineRule_)("integral","clearspeak.default",'[t] "the"; [n] children/*[1]; [t] "of"; [n] children/*[2]; [p] (pause:short)',"self::integral");(0,sre.ClearspeakRules.defineRule_)("overscript",
|
1017
|
+
"clearspeak.default",'[n] children/*[1]; [t] "under"; [n] children/*[2]; [p] (pause:short)',"self::overscore");(0,sre.ClearspeakRules.defineRule_)("overscript","clearspeak.default","[n] children/*[1]; [n] children/*[2];","self::overscore",'children/*[2][@role="overaccent"]');(0,sre.ClearspeakRules.defineRule_)("overscript-limits","clearspeak.default",'[n] children/*[1]; [t] "to"; [n] children/*[2]',"self::overscore",'children/*[2][@role!="overaccent"]','name(children/*[1])="underscore"','children/*[1]/children/*[2][@role!="underaccent"]');
|
1018
|
+
(0,sre.ClearspeakRules.defineRule_)("underscript","clearspeak.default",'[n] children/*[1]; [t] "over"; [n] children/*[2]; [p] (pause:short)',"self::underscore");(0,sre.ClearspeakRules.defineRule_)("underscript-limits","clearspeak.default",'[n] children/*[1]; [t] "from"; [n] children/*[2]',"self::underscore",'@role="underover"','children/*[2][@role!="underaccent"]');(0,sre.ClearspeakRules.defineRule_)("number","clearspeak.default","[n] text()","self::number");(0,sre.ClearspeakRules.defineRule_)("mixed-number",
|
1019
|
+
"clearspeak.default",'[n] children/*[1]; [t] "and"; [n] children/*[2]; ',"self::number",'@role="mixed"');(0,sre.ClearspeakRules.defineRule_)("number-with-chars","clearspeak.default",'[t] "number"; [m] CQFspaceoutNumber (grammar:protected)',"self::number",'@role="othernumber"','"" != translate(text(), "0123456789.,", "")','not(contains(@grammar, "protected"))');(0,sre.ClearspeakRules.defineRule_)("decimal-period","clearspeak.default",'[t] "the repeating decimal"; [n] children/*[1] (grammar:spaceout); [t] "point followed by repeating digits"; [n] children/*[3]/children/*[1] (grammar:spaceout)',
|
1020
|
+
"self::punctuated",'@role="sequence"',"count(./content/*)=1",'./content/*[1][@role="fullstop"]','name(children/*[1])="number"','children/*[1][@role="integer"]','name(children/*[3])="overscore"','children/*[3][@role="integer"]','children/*[3]/children/*[2][@role="overaccent"]','children/*[3]/children/*[2][text()="\u00af" or text()="\uffe3" or text()="\uff3f" or text()="_" or text()="\u203e"]');(0,sre.ClearspeakRules.defineRule_)("decimal-period","clearspeak.default",'[t] "the repeating decimal"; [n] children/*[1] (grammar:spaceout); [t] "followed by repeating digits"; [n] children/*[2]/children/*[1] (grammar:spaceout);',
|
1021
|
+
"self::infixop",'@role="implicit"',"count(./children/*)=2",'name(children/*[1])="number"','children/*[1][@role="float"]','name(children/*[2])="overscore"','children/*[2][@role="integer"]','children/*[2]/children/*[2][@role="overaccent"]','children/*[2]/children/*[2][text()="\u00af" or text()="\uffe3" or text()="\uff3f" or text()="_" or text()="\u203e"]');(0,sre.ClearspeakRules.defineRule_)("decimal-period-singular","clearspeak.default",'[t] "the repeating decimal"; [n] children/*[1] (grammar:spaceout); [t] "point followed by repeating digit"; [n] children/*[3]/children/*[1] (grammar:spaceout)',
|
1022
|
+
"self::punctuated",'@role="sequence"',"count(./content/*)=1",'./content/*[1][@role="fullstop"]','name(children/*[1])="number"','children/*[1][@role="integer"]','name(children/*[3])="overscore"','children/*[3][@role="integer"]','children/*[3]/children/*[2][@role="overaccent"]','children/*[3]/children/*[2][text()="\u00af" or text()="\uffe3" or text()="\uff3f" or text()="_" or text()="\u203e"]',"string-length(./children/*[3]/children/*[1]/text())=1");(0,sre.ClearspeakRules.defineRule_)("decimal-period-singular",
|
1023
|
+
"clearspeak.default",'[t] "the repeating decimal"; [n] children/*[1] (grammar:spaceout); [t] "followed by repeating digit"; [n] children/*[2]/children/*[1] (grammar:spaceout);',"self::infixop",'@role="implicit"',"count(./children/*)=2",'name(children/*[1])="number"','children/*[1][@role="float"]','name(children/*[2])="overscore"','children/*[2][@role="integer"]','children/*[2]/children/*[2][@role="overaccent"]','children/*[2]/children/*[2][text()="\u00af" or text()="\uffe3" or text()="\uff3f" or text()="_" or text()="\u203e"]',
|
1024
|
+
"string-length(./children/*[2]/children/*[1]/text())=1");(0,sre.ClearspeakRules.defineRule_)("number-with-spaces","clearspeak.default","[m] CQFspaceoutNumber (grammar:!spaceout:number)","self::number",'contains(@grammar, "spaceout")');(0,sre.ClearspeakRules.defineRule_)("decimal-point","clearspeak.default",'[t] "point"',"self::punctuation",'@role="fullstop"','contains(@grammar,"number")');(0,sre.ClearspeakRules.defineRule_)("line-segment","clearspeak.default",'[t] "the line segment"; [n] children/*[1]/children/*[1]; [n] children/*[1]/children/*[2]; [p] (pause:short)',
|
1025
|
+
"self::overscore",'@role="implicit"','children/*[2][@role="overaccent"]','children/*[2][text()="\u00af" or text()="\uffe3" or text()="\uff3f" or text()="_" or text()="\u203e"]','name(children/*[1])="infixop"',"count(./children/*[1]/children/*)=2");(0,sre.ClearspeakRules.defineRule_)("conjugate","clearspeak.Bar_Conjugate",'[t] "the complex conjugate of"; [n] children/*[1]',"self::overscore",'children/*[2][@role="overaccent"]','children/*[2][text()="\u00af" or text()="\uffe3" or text()="\uff3f" or text()="_" or text()="\u203e"]');
|
1026
|
+
(0,sre.ClearspeakRules.defineRule_)("defined-by","clearspeak.default",'[t] "is defined to be" (pause:short)',"self::overscore",'@role="equality"','@embellished="relation"','name(children/*[2])="text"','children/*[2][text()]="def"');(0,sre.ClearspeakRules.defineRule_)("adorned-sign","clearspeak.default",'[n] children/*[1] ; [t] "sign with"; [n] children/*[2]; [t] "over it"',"self::overscore","@embellished",'name(children/*[1])="operator" or name(children/*[1])="relation"');(0,sre.ClearspeakRules.defineRule_)("factorial",
|
1027
|
+
"clearspeak.default",'[t] "factorial"',"self::punctuation",'text()="!"','name(preceding-sibling::*[1])!="text"');(0,sre.ClearspeakRules.defineRule_)("tensor-base","clearspeak.default","[n] children/*[2]; [n] children/*[3]; [n] children/*[1]; [n] children/*[4]; [n] children/*[5]","self::tensor");(0,sre.ClearspeakRules.defineRule_)("left-super","clearspeak.default",'[t] "left super"; [n] text()','self::*[@role="leftsuper"]','not(contains(@grammar,"combinatorics"))');(0,sre.ClearspeakRules.defineRule_)("left-super",
|
1028
|
+
"clearspeak.default",'[t] "left super"; [m] children/*',"self::punctuated",'@role="leftsuper"','not(contains(@grammar,"combinatorics"))');(0,sre.ClearspeakRules.defineRule_)("left-sub","clearspeak.default",'[t] "left sub"; [n] text()','self::*[@role="leftsub"]','not(contains(@grammar,"combinatorics"))');(0,sre.ClearspeakRules.defineRule_)("left-sub","clearspeak.default",'[t] "left sub"; [m] children/*',"self::punctuated",'@role="leftsub"','not(contains(@grammar,"combinatorics"))');(0,sre.ClearspeakRules.defineRule_)("right-super",
|
1029
|
+
"clearspeak.default",'[t] "right super"; [n] text()','self::*[@role="rightsuper"]','not(contains(@grammar,"combinatorics"))');(0,sre.ClearspeakRules.defineRule_)("right-super","clearspeak.default",'[t] "right super"; [m] children/*',"self::punctuated",'@role="rightsuper"','not(contains(@grammar,"combinatorics"))');(0,sre.ClearspeakRules.defineRule_)("right-sub","clearspeak.default",'[t] "right sub"; [n] text()','self::*[@role="rightsub"]','not(contains(@grammar,"combinatorics"))');(0,sre.ClearspeakRules.defineRule_)("right-sub",
|
1030
|
+
"clearspeak.default",'[t] "right sub"; [m] children/*',"self::punctuated",'@role="rightsub"','not(contains(@grammar,"combinatorics"))');(0,sre.ClearspeakRules.defineRule_)("empty-index","clearspeak.default","[p] (pause:medium)","self::empty",'@role="rightsub" or @role="rightsuper" or @role="leftsub" or @role="leftsuper"');(0,sre.ClearspeakRules.defineRule_)("combinatorics","clearspeak.default","[n] children/*[2] (grammar:combinatorics); [n] children/*[1]; [n] children/*[4] (grammar:combinatorics)",
|
1031
|
+
"self::tensor",'name(children/*[3])="empty"','name(children/*[5])="empty"','children/*[1][text()="P" or text()="C"]');(0,sre.ClearspeakRules.defineRule_)("choose","clearspeak.CombinationPermutation_ChoosePermute",'[n] children/*[2] (grammar:combinatorics); [t] "choose"; [n] children/*[4] (grammar:combinatorics)',"self::tensor",'name(children/*[3])="empty"','name(children/*[5])="empty"','children/*[1][text()="C"]');(0,sre.ClearspeakRules.defineRule_)("permute","clearspeak.CombinationPermutation_ChoosePermute",
|
1032
|
+
'[n] children/*[2] (grammar:combinatorics); [t] "permute"; [n] children/*[4] (grammar:combinatorics)',"self::tensor",'name(children/*[3])="empty"','name(children/*[5])="empty"','children/*[1][text()="P"]')};sre.ClearspeakRules.getInstance().initializer=[sre.ClearspeakRules.initCustomFunctions_,sre.ClearspeakRules.initClearspeakRules_,sre.ClearspeakRules.addAnnotators_];sre.Grammar.getInstance().setPreprocessor("numbers2alpha",sre.ClearspeakUtil.numbersToAlpha);sre.MathUtil={};sre.MathUtil.isMathmlNodeOfClass_=function(a,b){return-1!=b.indexOf(a.tagName.toUpperCase())};sre.MathUtil.isMathjaxNodeOfClass_=function(a,b){return"SPAN"==a.tagName?a.className.split(" ").some(function(a){return-1!=b.indexOf(a.toUpperCase())}):!1};sre.MathUtil.isMathNodeOfClass_=function(a,b){return a.nodeType==sre.DomUtil.NodeType.ELEMENT_NODE&&(sre.MathUtil.isMathmlNodeOfClass_(a,b)||sre.MathUtil.isMathjaxNodeOfClass_(a,b))};sre.MathUtil.TOKEN_LIST="MI MN MO MTEXT MSPACE MS".split(" ");
|
1033
|
+
sre.MathUtil.isToken=function(a){return sre.MathUtil.isMathNodeOfClass_(a,sre.MathUtil.TOKEN_LIST)};sre.MathUtil.LAYOUT_LIST="MROW MFRAC MSQRT MROOT MSTYLE MERROR MPADDED MPHANTOM MFENCED MENCLOSE".split(" ");sre.MathUtil.isLayout=function(a){return sre.MathUtil.isMathNodeOfClass_(a,sre.MathUtil.LAYOUT_LIST)};sre.MathUtil.SCRIPT_LIST="MSUB MSUP MSUBSUP MUNDER MOVER MUNDEROVER MMULTISCRIPTS MPRESCRIPTS".split(" ");sre.MathUtil.isScript=function(a){return sre.MathUtil.isMathNodeOfClass_(a,sre.MathUtil.SCRIPT_LIST)};
|
1034
|
+
sre.MathUtil.TABLES_LIST="MTABLE MLABELEDTR MTR MTD MALIGNGROUP MALIGNMARK".split(" ");sre.MathUtil.isTables=function(a){return sre.MathUtil.isMathNodeOfClass_(a,sre.MathUtil.TABLES_LIST)};sre.MathUtil.ELEMENTARY_LIST="MSTACK MLONGDIV MSGROUP MSROW MSCARRIES MSCARRY MSLINE".split(" ");sre.MathUtil.isElementary=function(a){return sre.MathUtil.isMathNodeOfClass_(a,sre.MathUtil.ELEMENTARY_LIST)};
|
1035
|
+
sre.MathUtil.MATHML_TAG_LIST=[sre.MathUtil.TOKEN_LIST,sre.MathUtil.LAYOUT_LIST,sre.MathUtil.SCRIPT_LIST,sre.MathUtil.TABLES_LIST,sre.MathUtil.ELEMENTARY_LIST].reduce(function(a,b){return a.concat(b)});sre.MathUtil.isMathmlTag=function(a){return sre.MathUtil.isMathNodeOfClass_(a,sre.MathUtil.MATHML_TAG_LIST)};sre.MathUtil.WHITESPACE_LIST=["MSROW","MROW","MSPACE","MPHANTOM","MPADDED"];sre.MathUtil.isWhitespace=function(a){return sre.MathUtil.isMathNodeOfClass_(a,sre.MathUtil.WHITESPACE_LIST)};
|
1036
|
+
sre.MathUtil.isNotWhitespace=function(a){return sre.MathUtil.isMathmlTag(a)&&!sre.MathUtil.isWhitespace(a)};sre.MathUtil.nextSeparatorFunction=function(a){if(a){if(a.match(/^\s+$/))return null;var b=a.replace(/\s/g,"").split("").filter(function(a){return a})}else b=[","];return function(){return 1<b.length?b.shift():b[0]}};sre.MathmlStoreUtil={};sre.MathmlStoreUtil.matchMathjaxToMathml=function(a){return sre.Engine.getInstance().alternativeHost.querySelector("#"+a.id)};sre.MathmlStoreUtil.retrieveMathjaxExtender=function(a){return(a=sre.MathmlStoreUtil.matchMathjaxToMathml(a))?[a]:[]};sre.MathmlStoreUtil.retrieveMathjaxLeaf=function(a){return(a=sre.MathmlStoreUtil.matchMathjaxToMathml(a))?[a]:[]};
|
1037
|
+
sre.MathmlStoreUtil.checkMathjaxTag=function(a,b){return(a=sre.MathmlStoreUtil.matchMathjaxToMathml(a))&&a.tagName.toUpperCase()==b?[a]:[]};sre.MathmlStoreUtil.checkMathjaxMunder=function(a){return sre.MathmlStoreUtil.checkMathjaxTag(a,"MUNDER")};sre.MathmlStoreUtil.checkMathjaxMover=function(a){return sre.MathmlStoreUtil.checkMathjaxTag(a,"MOVER")};sre.MathmlStoreUtil.checkMathjaxMsub=function(a){return sre.MathmlStoreUtil.checkMathjaxTag(a,"MSUB")};
|
1038
|
+
sre.MathmlStoreUtil.checkMathjaxMsup=function(a){return sre.MathmlStoreUtil.checkMathjaxTag(a,"MSUP")};sre.MathmlStoreUtil.mfencedSeparators=function(a,b){var c=sre.MathUtil.nextSeparatorFunction(b);return function(){return c?[sre.AuditoryDescription.create({text:c()},{translate:!0})]:[]}};
|
1039
|
+
sre.MathmlStoreUtil.contentIterator=function(a,b){var c=0<a.length?sre.XpathUtil.evalXPath("../../content/*",a[0]):[];return function(){var a=c.shift(),e=b?[sre.AuditoryDescription.create({text:b},{translate:!0})]:[];if(!a)return e;a=sre.SpeechRuleEngine.getInstance().evaluateNode(a);return e.concat(a)}};sre.EmacspeakRules=function(){sre.MathStore.call(this)};goog.inherits(sre.EmacspeakRules,sre.MathStore);goog.addSingletonGetter(sre.EmacspeakRules);sre.EmacspeakRules.mathStore=sre.EmacspeakRules.getInstance();sre.EmacspeakRules.defineRule_=goog.bind(sre.EmacspeakRules.mathStore.defineRule,sre.EmacspeakRules.mathStore);sre.EmacspeakRules.defineRuleAlias_=goog.bind(sre.EmacspeakRules.mathStore.defineRuleAlias,sre.EmacspeakRules.mathStore);
|
1040
|
+
sre.EmacspeakRules.addContextFunction_=goog.bind(sre.EmacspeakRules.mathStore.contextFunctions.add,sre.EmacspeakRules.mathStore.contextFunctions);sre.EmacspeakRules.addCustomQuery_=goog.bind(sre.EmacspeakRules.mathStore.customQueries.add,sre.EmacspeakRules.mathStore.customQueries);sre.EmacspeakRules.addCustomString_=goog.bind(sre.EmacspeakRules.mathStore.customStrings.add,sre.EmacspeakRules.mathStore.customStrings);
|
1041
|
+
sre.EmacspeakRules.initCustomFunctions_=function(){(0,sre.EmacspeakRules.addContextFunction_)("CTXFnodeCounter",sre.StoreUtil.nodeCounter);(0,sre.EmacspeakRules.addContextFunction_)("CTXFcontentIterator",sre.MathmlStoreUtil.contentIterator);(0,sre.EmacspeakRules.addCustomQuery_)("CQFvulgarFractionSmall",sre.MathspeakUtil.isSmallVulgarFraction);(0,sre.EmacspeakRules.addCustomString_)("CSFvulgarFraction",sre.NumbersUtil.vulgarFraction)};
|
1042
|
+
sre.EmacspeakRules.initSemanticRules_=function(){(0,sre.EmacspeakRules.defineRule_)("stree","emacspeak.default","[n] ./*[1]","self::stree");(0,sre.EmacspeakRules.defineRule_)("multrel","emacspeak.default",'[t] "multirelation"; [m] children/* (sepFunc:CTXFcontentIterator)',"self::multirel");(0,sre.EmacspeakRules.defineRule_)("variable-equality","emacspeak.default",'[t] "equation sequence"; [m] children/* (context:"part",ctxtFunc:CTXFnodeCounter,sepFunc:CTXFcontentIterator)','self::relseq[@role="equality"]',
|
1043
|
+
"count(./children/*)>2",'./children/punctuation[@role="ellipsis"]');(0,sre.EmacspeakRules.defineRule_)("multi-equality","emacspeak.default",'[t] "equation sequence"; [m] children/* (context:"part",ctxtFunc:CTXFnodeCounter,sepFunc:CTXFcontentIterator)','self::relseq[@role="equality"]',"count(./children/*)>2");(0,sre.EmacspeakRules.defineRule_)("equality","emacspeak.default",'[t] "equation"; [t] "left hand side"; [n] children/*[1];[p] (pause:200); [n] content/*[1] (pause:200);[t] "right hand side"; [n] children/*[2]',
|
1044
|
+
'self::relseq[@role="equality"]',"count(./children/*)=2");(0,sre.EmacspeakRules.defineRule_)("simple-equality","emacspeak.default","[n] children/*[1]; [p] (pause:200); [n] content/*[1] (pause:200);[n] children/*[2]",'self::relseq[@role="equality"]',"count(./children/*)=2","./children/identifier or ./children/number");(0,sre.EmacspeakRules.defineRule_)("simple-equality2","emacspeak.default","[n] children/*[1]; [p] (pause:200); [n] content/*[1] (pause:200);[n] children/*[2]",'self::relseq[@role="equality"]',
|
1045
|
+
"count(./children/*)=2","./children/function or ./children/appl");(0,sre.EmacspeakRules.defineRule_)("relseq","emacspeak.default","[m] children/* (sepFunc:CTXFcontentIterator)","self::relseq");(0,sre.EmacspeakRules.defineRule_)("implicit","emacspeak.default","[m] children/*","self::infixop",'@role="implicit"','children/*[1][@role="latinletter"] or children/*[1][@role="greekletter"] or children/*[1][@role="otherletter"] or name(children/*[1])="number"','children/*[2][@role="latinletter"] or children/*[2][@role="greekletter"] or children/*[2][@role="otherletter"] or name(children/*[2])="number"');
|
1046
|
+
(0,sre.EmacspeakRules.defineRule_)("binary-operation","emacspeak.default","[p] (pause:100); [m] children/* (sepFunc:CTXFcontentIterator); [p] (pause:100);","self::infixop");(0,sre.EmacspeakRules.defineRule_)("variable-addition","emacspeak.default",'[t] "sum with variable number of summands";[p] (pause:400); [m] children/* (sepFunc:CTXFcontentIterator)','self::infixop[@role="addition"]',"count(children/*)>2",'children/punctuation[@role="ellipsis"]');(0,sre.EmacspeakRules.defineRule_)("prefix","emacspeak.default",
|
1047
|
+
'[t] "prefix"; [n] text(); [t] "of" (pause 150);[n] children/*[1]',"self::prefixop");(0,sre.EmacspeakRules.defineRule_)("negative","emacspeak.default",'[t] "negative"; [n] children/*[1]',"self::prefixop",'self::prefixop[@role="negative"]');(0,sre.EmacspeakRules.defineRule_)("postfix","emacspeak.default",'[n] children/*[1]; [t] "postfix"; [n] text() (pause 300)',"self::postfixop");(0,sre.EmacspeakRules.defineRule_)("identifier","emacspeak.default","[n] text()","self::identifier");(0,sre.EmacspeakRules.defineRule_)("number",
|
1048
|
+
"emacspeak.default","[n] text()","self::number");(0,sre.EmacspeakRules.defineRule_)("font","emacspeak.default","[t] @font; [n] . (grammar:ignoreFont=@font)","self::*","@font",'not(contains(@grammar, "ignoreFont"))','@font!="normal"');(0,sre.EmacspeakRules.defineRule_)("font-identifier-short","emacspeak.default","[t] @font; [n] CQFhideFont; [t] CSFshowFont","self::identifier","string-length(text())=1","@font",'@font="normal"','""=translate(text(), "abcdefghijklmnopqrstuvwxyz\u03b1\u03b2\u03b3\u03b4\u03b5\u03b6\u03b7\u03b8\u03b9\u03ba\u03bb\u03bc\u03bd\u03be\u03bf\u03c0\u03c1\u03c2\u03c3\u03c4\u03c5\u03c6\u03c7\u03c8\u03c9ABCDEFGHIJKLMNOPQRSTUVWXYZ\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039a\u039b\u039c\u039d\u039e\u039f\u03a0\u03a1\u03a3\u03a3\u03a4\u03a5\u03a6\u03a7\u03a8\u03a9", "")',
|
1049
|
+
'@role!="unit"');(0,sre.EmacspeakRules.defineRule_)("font-identifier","emacspeak.default","[t] @font; [n] . (grammar:ignoreFont=@font)","self::identifier","string-length(text())=1","@font",'@font="normal"','not(contains(@grammar, "ignoreFont"))','@role!="unit"');(0,sre.EmacspeakRules.defineRule_)("omit-font","emacspeak.default","[n] . (grammar:ignoreFont=@font)","self::identifier","string-length(text())=1","@font",'not(contains(@grammar, "ignoreFont"))','@font="italic"');(0,sre.EmacspeakRules.defineRule_)("simple-fraction",
|
1050
|
+
"emacspeak.default",'[p] (pause:100); [n] children/*[1] (rate:0.35); [t] "over"; [n] children/*[2] (rate:-0.35); [p] (pause:100)',"self::fraction",'name(children/*[1])="number" or name(children/*[1])="identifier"','name(children/*[2])="number" or name(children/*[2])="identifier"');(0,sre.EmacspeakRules.defineRule_)("vulgar-fraction","emacspeak.default","[t] CSFvulgarFraction","self::fraction",'@role="vulgar"',"CQFvulgarFractionSmall");(0,sre.EmacspeakRules.defineRule_)("fraction","emacspeak.default",
|
1051
|
+
'[p] (pause:250); [n] children/*[1] (rate:0.35); [p] (pause:250); [t] "divided by"; [p] (pause:250); [n] children/*[2] (rate:-0.35); [p] (pause:250)',"self::fraction");(0,sre.EmacspeakRules.defineRule_)("superscript","emacspeak.default",'[n] children/*[1]; [t] "super"; [n] children/*[2] (pitch:0.35);[p] (pause:300)',"self::superscript");(0,sre.EmacspeakRules.defineRule_)("subscript","emacspeak.default",'[n] children/*[1]; [t] "sub"; [n] children/*[2] (pitch:-0.35);[p] (pause:300)',"self::subscript");
|
1052
|
+
(0,sre.EmacspeakRules.defineRule_)("ellipsis","emacspeak.default",'[p] (pause:200); [t] "ellipsis"; [p] (pause:300)',"self::punctuation",'self::punctuation[@role="ellipsis"]');(0,sre.EmacspeakRules.defineRule_)("fence-single","emacspeak.default","[n] text()","self::punctuation",'self::punctuation[@role="openfence"]');(0,sre.EmacspeakRules.defineRuleAlias_)("fence-single","self::punctuation",'self::punctuation[@role="closefence"]');(0,sre.EmacspeakRules.defineRuleAlias_)("fence-single","self::punctuation",
|
1053
|
+
'self::punctuation[@role="vbar"]');(0,sre.EmacspeakRules.defineRuleAlias_)("fence-single","self::punctuation",'self::punctuation[@role="application"]');(0,sre.EmacspeakRules.defineRule_)("omit-empty","emacspeak.default","[p] (pause:100)","self::empty");(0,sre.EmacspeakRules.defineRule_)("fences-open-close","emacspeak.default","[p] (pause:200); [n] children/*[1] (rate:0.35); [p] (pause:200)","self::fenced",'@role="leftright"');(0,sre.EmacspeakRules.defineRule_)("fences-open-close-in-appl","emacspeak.default",
|
1054
|
+
"[p] (pause:200); [n] children/*[1]; [p] (pause:200);",'self::fenced[@role="leftright"]',"./parent::children/parent::appl");(0,sre.EmacspeakRules.defineRule_)("fences-neutral","emacspeak.default",'[p] (pause:100); [t] "absolute value of"; [n] children/*[1];[p] (pause:350);',"self::fenced",'self::fenced[@role="neutral"]');(0,sre.EmacspeakRules.defineRule_)("omit-fences","emacspeak.default","[p] (pause:500); [n] children/*[1]; [p] (pause:200);","self::fenced");(0,sre.EmacspeakRules.defineRule_)("matrix",
|
1055
|
+
"emacspeak.default",'[t] "matrix"; [m] children/* (ctxtFunc:CTXFnodeCounter,context:"row",pause:100)',"self::matrix");(0,sre.EmacspeakRules.defineRule_)("matrix-row","emacspeak.default",'[m] children/* (ctxtFunc:CTXFnodeCounter,context:"column",pause:100)','self::row[@role="matrix"]');(0,sre.EmacspeakRules.defineRule_)("matrix-cell","emacspeak.default","[n] children/*[1]",'self::cell[@role="matrix"]');(0,sre.EmacspeakRules.defineRule_)("vector","emacspeak.default",'[t] "vector"; [m] children/* (ctxtFunc:CTXFnodeCounter,context:"element",pause:100)',
|
1056
|
+
"self::vector");(0,sre.EmacspeakRules.defineRule_)("cases","emacspeak.default",'[t] "case statement"; [m] children/* (ctxtFunc:CTXFnodeCounter,context:"case",pause:100)',"self::cases");(0,sre.EmacspeakRules.defineRule_)("cases-row","emacspeak.default","[m] children/*",'self::row[@role="cases"]');(0,sre.EmacspeakRules.defineRule_)("cases-cell","emacspeak.default","[n] children/*[1]",'self::cell[@role="cases"]');(0,sre.EmacspeakRules.defineRule_)("row","emacspeak.default",'[m] ./* (ctxtFunc:CTXFnodeCounter,context:"column",pause:100)',
|
1057
|
+
"self::row");(0,sre.EmacspeakRules.defineRule_)("cases-end","emacspeak.default",'[t] "case statement"; [m] children/* (ctxtFunc:CTXFnodeCounter,context:"case",pause:100);[t] "end cases"',"self::cases","following-sibling::*");(0,sre.EmacspeakRules.defineRule_)("multiline","emacspeak.default",'[t] "multiline equation";[m] children/* (ctxtFunc:CTXFnodeCounter,context:"line",pause:100)',"self::multiline");(0,sre.EmacspeakRules.defineRule_)("line","emacspeak.default","[m] children/*","self::line");(0,sre.EmacspeakRules.defineRule_)("table",
|
1058
|
+
"emacspeak.default",'[t] "multiline equation";[m] children/* (ctxtFunc:CTXFnodeCounter,context:"row",pause:200)',"self::table");(0,sre.EmacspeakRules.defineRule_)("table-row","emacspeak.default","[m] children/* (pause:100)",'self::row[@role="table"]');(0,sre.EmacspeakRules.defineRuleAlias_)("cases-cell",'self::cell[@role="table"]');(0,sre.EmacspeakRules.defineRule_)("end-punct","emacspeak.default","[m] children/*; [p] (pause:300)","self::punctuated",'@role="endpunct"');(0,sre.EmacspeakRules.defineRule_)("start-punct",
|
1059
|
+
"emacspeak.default","[n] content/*[1]; [p] (pause:200); [m] children/*[position()>1]","self::punctuated",'@role="startpunct"');(0,sre.EmacspeakRules.defineRule_)("integral-punct","emacspeak.default","[n] children/*[1] (rate:0.2); [n] children/*[3] (rate:0.2)","self::punctuated",'@role="integral"');(0,sre.EmacspeakRules.defineRule_)("punctuated","emacspeak.default","[m] children/* (pause:100)","self::punctuated");(0,sre.EmacspeakRules.defineRule_)("function","emacspeak.default","[n] text()","self::function");
|
1060
|
+
(0,sre.EmacspeakRules.defineRule_)("appl","emacspeak.default","[n] children/*[1]; [n] content/*[1]; [n] children/*[2]","self::appl");(0,sre.EmacspeakRules.defineRule_)("sum-only","emacspeak.default",'[n] children/*[1]; [t] "from"; [n] children/*[2]; [t] "to";[n] children/*[3]',"self::limboth",'@role="sum" or @role="integral"');(0,sre.EmacspeakRules.defineRule_)("limboth","emacspeak.default",'[n] children/*[1]; [p] (pause 100); [t] "over"; [n] children/*[2];[t] "under"; [n] children/*[3]; [p] (pause 250);',
|
1061
|
+
"self::limboth");(0,sre.EmacspeakRules.defineRule_)("limlower","emacspeak.default",'[n] children/*[1]; [t] "over"; [n] children/*[2];',"self::limlower");(0,sre.EmacspeakRules.defineRule_)("limupper","emacspeak.default",'[n] children/*[1]; [t] "under"; [n] children/*[2];',"self::limupper");(0,sre.EmacspeakRules.defineRule_)("largeop","emacspeak.default","[n] text()","self::largeop");(0,sre.EmacspeakRules.defineRule_)("bigop","emacspeak.default",'[n] children/*[1]; [p] (pause 100); [t] "over"; [n] children/*[2];[p] (pause 250);',
|
1062
|
+
"self::bigop");(0,sre.EmacspeakRules.defineRule_)("integral","emacspeak.default","[n] children/*[1]; [p] (pause 100); [n] children/*[2];[p] (pause 200); [n] children/*[3] (rate:0.35);","self::integral");(0,sre.EmacspeakRules.defineRule_)("sqrt","emacspeak.default",'[t] "Square root of"; [n] children/*[1] (rate:0.35); [p] (pause:400)',"self::sqrt");(0,sre.EmacspeakRules.defineRule_)("square","emacspeak.default",'[n] children/*[1]; [t] "squared" (pitch:0.35); [p] (pause:200)',"self::superscript","children/*[2][text()=2]",
|
1063
|
+
'name(./children/*[1])!="text"');(0,sre.EmacspeakRules.defineRule_)("cube","emacspeak.default",'[n] children/*[1]; [t] "cubed" (pitch:0.35); [p] (pause:200)',"self::superscript","children/*[2][text()=3]",'name(./children/*[1])!="text"');(0,sre.EmacspeakRules.defineRule_)("root","emacspeak.default",'[t] "root of order"; [n] children/*[1];[t] "over"; [n] children/*[1] (rate:0.35); [p] (pause:400)',"self::root");(0,sre.EmacspeakRules.defineRule_)("text-no-mult","emacspeak.default","[n] children/*[1]; [p] (pause:200); [n] children/*[2]",
|
1064
|
+
"self::infixop","children/text");(0,sre.EmacspeakRules.defineRule_)("text","emacspeak.default","[n] text(); [p] (pause:200)","self::text");(0,sre.EmacspeakRules.defineRule_)("unit","emacspeak.default","[t] text() (annotation:unit, preprocess)","self::identifier",'@role="unit"');(0,sre.EmacspeakRules.defineRule_)("unit-square","emacspeak.default",'[t] "square"; [n] children/*[1]',"self::superscript",'@role="unit"',"children/*[2][text()=2]",'name(children/*[1])="identifier"');(0,sre.EmacspeakRules.defineRule_)("unit-cubic",
|
1065
|
+
"emacspeak.default",'[t] "cubic"; [n] children/*[1]',"self::superscript",'@role="unit"',"children/*[2][text()=3]",'name(children/*[1])="identifier"');(0,sre.EmacspeakRules.defineRule_)("reciprocal","emacspeak.default",'[t] "reciprocal"; [n] children/*[1]',"self::superscript",'@role="unit"','name(children/*[1])="identifier"','name(children/*[2])="prefixop"','children/*[2][@role="negative"]',"children/*[2]/children/*[1][text()=1]",'count(preceding-sibling::*)=0 or preceding-sibling::*[@role!="unit"]');
|
1066
|
+
(0,sre.EmacspeakRules.defineRule_)("reciprocal","emacspeak.default",'[t] "per"; [n] children/*[1]',"self::superscript",'@role="unit"','name(children/*[1])="identifier"','name(children/*[2])="prefixop"','children/*[2][@role="negative"]',"children/*[2]/children/*[1][text()=1]",'preceding-sibling::*[@role="unit"]');(0,sre.EmacspeakRules.defineRule_)("unit-combine","emacspeak.default","[m] children/*","self::infixop",'@role="unit"');(0,sre.EmacspeakRules.defineRule_)("unit-divide","emacspeak.default",
|
1067
|
+
'[n] children/*[1] (pitch:0.3); [t] "per"; [n] children/*[2] (pitch:-0.3)',"self::fraction",'@role="unit"')};sre.EmacspeakRules.getInstance().initializer=[sre.EmacspeakRules.initCustomFunctions_,sre.EmacspeakRules.initSemanticRules_];sre.MathmlStore=function(){sre.MathStore.call(this)};goog.inherits(sre.MathmlStore,sre.MathStore);goog.addSingletonGetter(sre.MathmlStore);sre.MathmlStore.prototype.defineMathmlRule=function(a,b,c){this.defineRule(a,b,c,"self::mathml:"+a)};sre.MathmlStore.prototype.defineDefaultMathmlRule=function(a,b){this.defineRule(a,"default.default",b,"self::mathml:"+a)};sre.MathmlStoreRules=function(){sre.MathmlStore.call(this)};goog.inherits(sre.MathmlStoreRules,sre.MathmlStore);goog.addSingletonGetter(sre.MathmlStoreRules);sre.MathmlStoreRules.mathStore=sre.MathmlStoreRules.getInstance();sre.MathmlStoreRules.defineDefaultMathmlRule_=goog.bind(sre.MathmlStoreRules.mathStore.defineDefaultMathmlRule,sre.MathmlStoreRules.mathStore);sre.MathmlStoreRules.defineRule_=goog.bind(sre.MathmlStoreRules.mathStore.defineRule,sre.MathmlStoreRules.mathStore);
|
1068
|
+
sre.MathmlStoreRules.defineRuleAlias_=goog.bind(sre.MathmlStoreRules.mathStore.defineRuleAlias,sre.MathmlStoreRules.mathStore);sre.MathmlStoreRules.addContextFunction_=goog.bind(sre.MathmlStoreRules.mathStore.contextFunctions.add,sre.MathmlStoreRules.mathStore.contextFunctions);sre.MathmlStoreRules.addCustomQuery_=goog.bind(sre.MathmlStoreRules.mathStore.customQueries.add,sre.MathmlStoreRules.mathStore.customQueries);
|
1069
|
+
sre.MathmlStoreRules.initCustomFunctions_=function(){(0,sre.MathmlStoreRules.addContextFunction_)("CTXFnodeCounter",sre.StoreUtil.nodeCounter);(0,sre.MathmlStoreRules.addContextFunction_)("CTXFmfSeparators",sre.MathmlStoreUtil.mfencedSeparators);(0,sre.MathmlStoreRules.addCustomQuery_)("CQFextender",sre.MathmlStoreUtil.retrieveMathjaxExtender);(0,sre.MathmlStoreRules.addCustomQuery_)("CQFmathmlmunder",sre.MathmlStoreUtil.checkMathjaxMunder);(0,sre.MathmlStoreRules.addCustomQuery_)("CQFmathmlmover",
|
1070
|
+
sre.MathmlStoreUtil.checkMathjaxMover);(0,sre.MathmlStoreRules.addCustomQuery_)("CQFmathmlmsub",sre.MathmlStoreUtil.checkMathjaxMsub);(0,sre.MathmlStoreRules.addCustomQuery_)("CQFmathmlmsup",sre.MathmlStoreUtil.checkMathjaxMsup);(0,sre.MathmlStoreRules.addCustomQuery_)("CQFlookupleaf",sre.MathmlStoreUtil.retrieveMathjaxLeaf)};
|
1071
|
+
sre.MathmlStoreRules.initDefaultRules_=function(){(0,sre.MathmlStoreRules.defineDefaultMathmlRule_)("math","[m] ./*");(0,sre.MathmlStoreRules.defineDefaultMathmlRule_)("semantics","[n] ./*[1]");(0,sre.MathmlStoreRules.defineDefaultMathmlRule_)("mspace","[p] (pause:250)");(0,sre.MathmlStoreRules.defineDefaultMathmlRule_)("mstyle","[m] ./*");(0,sre.MathmlStoreRules.defineDefaultMathmlRule_)("mpadded","[m] ./*");(0,sre.MathmlStoreRules.defineDefaultMathmlRule_)("merror","[m] ./*");(0,sre.MathmlStoreRules.defineDefaultMathmlRule_)("mphantom",
|
1072
|
+
"[m] ./*");(0,sre.MathmlStoreRules.defineDefaultMathmlRule_)("mtext","[t] text(); [p] (pause:200)");(0,sre.MathmlStoreRules.defineDefaultMathmlRule_)("mi","[n] text()");(0,sre.MathmlStoreRules.defineDefaultMathmlRule_)("mo","[n] text() (rate:-0.1)");(0,sre.MathmlStoreRules.defineDefaultMathmlRule_)("mn","[n] text()");(0,sre.MathmlStoreRules.defineRule_)("mtext-variant","default.default",'[t] "begin"; [t] @mathvariant (pause:150);[t] text() (pause:150); [t] "end"; [t] @mathvariant (pause:200)',"self::mathml:mtext",
|
1073
|
+
"@mathvariant",'@mathvariant!="normal"');(0,sre.MathmlStoreRules.defineRule_)("mi-variant","default.default","[t] @mathvariant; [n] text()","self::mathml:mi","@mathvariant",'@mathvariant!="normal"');(0,sre.MathmlStoreRules.defineRuleAlias_)("mi-variant","self::mathml:mn","@mathvariant",'@mathvariant!="normal"');(0,sre.MathmlStoreRules.defineRule_)("mo-variant","default.default","[t] @mathvariant; [n] text() (rate:-0.1)","self::mathml:mo","@mathvariant",'@mathvariant!="normal"');(0,sre.MathmlStoreRules.defineDefaultMathmlRule_)("ms",
|
1074
|
+
'[t] "string" (pitch:0.5, rate:0.5); [t] text()');(0,sre.MathmlStoreRules.defineRule_)("unit","default.default",'[t] text() (grammar:annotation="unit":translate)',"self::mathml:mi",'@class="MathML-Unit"');(0,sre.MathmlStoreRules.defineDefaultMathmlRule_)("msup",'[n] ./*[1]; [t] "super";[n] ./*[2] (pitch:0.35); [p] (pause:300)');(0,sre.MathmlStoreRules.defineDefaultMathmlRule_)("msubsup",'[n] ./*[1]; [t] "sub"; [n] ./*[2] (pitch:-0.35); [p] (pause:200);[t] "super"; [n] ./*[3] (pitch:0.35); [p] (pause:300)');
|
1075
|
+
(0,sre.MathmlStoreRules.defineDefaultMathmlRule_)("msub",'[n] ./*[1]; [t] "sub"; [n] ./*[2] (pitch:-0.35); [p] (pause:300)');(0,sre.MathmlStoreRules.defineDefaultMathmlRule_)("mover",'[n] ./*[2] (pitch:0.35); [p] (pause:200); [t] "over"; [n] ./*[1]; [p] (pause:400)');(0,sre.MathmlStoreRules.defineDefaultMathmlRule_)("munder",'[n] ./*[2] (pitch:-0.35); [t] "under"; [n] ./*[1]; [p] (pause:400)');(0,sre.MathmlStoreRules.defineDefaultMathmlRule_)("munderover",'[n] ./*[2] (pitch:-0.35); [t] "under and"; [n] ./*[3] (pitch:0.35); [t] "over"; [n] ./*[1]; [p] (pause:400)');
|
1076
|
+
(0,sre.MathmlStoreRules.defineDefaultMathmlRule_)("mrow","[m] ./*");(0,sre.MathmlStoreRules.defineDefaultMathmlRule_)("msqrt",'[t] "Square root of"; [m] ./* (rate:0.2); [p] (pause:400)');(0,sre.MathmlStoreRules.defineDefaultMathmlRule_)("mroot",'[t] "root of order"; [n] ./*[2]; [t] "of";[n] ./*[1] (rate:0.2); [p] (pause:400)');(0,sre.MathmlStoreRules.defineDefaultMathmlRule_)("mfrac",' [p] (pause:400); [n] ./*[1] (pitch:0.3); [t] "divided by"; [n] ./*[2] (pitch:-0.3); [p] (pause:400)');(0,sre.MathmlStoreRules.defineRule_)("mfrac",
|
1077
|
+
"default.short",'[p] (pause:200); [t] "start frac";[n] ./*[1] (pitch:0.3); [t] "over"; [n] ./*[2] (pitch:-0.3); [p] (pause:400); [t] "end frac"',"self::mathml:mfrac");(0,sre.MathmlStoreRules.defineRule_)("mfenced-single","default.default","[n] @open; [m] ./* (separator:@separators); [n] @close","self::mathml:mfenced","@open","@close","string-length(string(@separators))=1");(0,sre.MathmlStoreRules.defineRule_)("mfenced-single","default.default",'[t] "(" (grammar:translate); [m] ./* (separator:@separators); [n] @close',
|
1078
|
+
"self::mathml:mfenced","not(@open)","@close","string-length(string(@separators))=1");(0,sre.MathmlStoreRules.defineRule_)("mfenced-single","default.default",'[t] "(" (grammar:translate); [m] ./* (separator:@separators); [t] ")" (grammar:translate)',"self::mathml:mfenced","not(@open)","not(@close)","string-length(string(@separators))=1");(0,sre.MathmlStoreRules.defineRule_)("mfenced-single","default.default",'[n] @open; [m] ./* (separator:@separators); [t] ")" (grammar:translate)',"self::mathml:mfenced",
|
1079
|
+
"@open","not(@close)","string-length(string(@separators))=1");(0,sre.MathmlStoreRules.defineRule_)("mfenced-omit","default.default","[n] @open; [m] ./*; [n] @close","self::mathml:mfenced","@separators","@open","@close",'string(@separators)="" or string(@separators)=" "');(0,sre.MathmlStoreRules.defineRule_)("mfenced-omit","default.default",'[t] "(" (grammar:translate); [m] ./*; [n] @close',"self::mathml:mfenced","@separators","not(@open)","@close",'string(@separators)="" or string(@separators)=" "');
|
1080
|
+
(0,sre.MathmlStoreRules.defineRule_)("mfenced-omit","default.default",'[n] @open; [m] ./*; [t] ")" (grammar:translate)',"self::mathml:mfenced","@separators","@open","not(@close)",'string(@separators)="" or string(@separators)=" "');(0,sre.MathmlStoreRules.defineRule_)("mfenced-omit","default.default",'[t] "(" (grammar:translate); [m] ./*; [t] ")" (grammar:translate)',"self::mathml:mfenced","@separators","not(@open)","not(@close)",'string(@separators)="" or string(@separators)=" "');(0,sre.MathmlStoreRules.defineRule_)("mfenced-comma",
|
1081
|
+
"default.default",'[n] @open; [m] ./* (separator:"comma"); [n] @close',"self::mathml:mfenced","@open","@close","not(@separators)");(0,sre.MathmlStoreRules.defineRule_)("mfenced-comma","default.default",'[t] "(" (grammar:translate); [m] ./* (separator:"comma"); [n] @close',"self::mathml:mfenced","not(@open)","@close","not(@separators)");(0,sre.MathmlStoreRules.defineRule_)("mfenced-comma","default.default",'[n] @open; [m] ./* (separator:"comma"); [t] ")" (grammar:translate)',"self::mathml:mfenced",
|
1082
|
+
"@open","not(@close)","not(@separators)");(0,sre.MathmlStoreRules.defineRule_)("mfenced-comma","default.default",'[t] "(" (grammar:translate); [m] ./* (separator:"comma"); [t] ")" (grammar:translate)',"self::mathml:mfenced","not(@open)","not(@close)","not(@separators)");(0,sre.MathmlStoreRules.defineRule_)("mfenced-multi","default.default","[n] @open; [m] ./* (sepFunc:CTXFmfSeparators, separator:@separators); [n] @close","self::mathml:mfenced","@open","@close","string-length(string(@separators))>1");
|
1083
|
+
(0,sre.MathmlStoreRules.defineRule_)("mfenced-multi","default.default",'[t] "(" (grammar:translate); [m] ./* (sepFunc:CTXFmfSeparators, separator:@separators); [n] @close',"self::mathml:mfenced","not(@open)","@close","string-length(string(@separators))>1");(0,sre.MathmlStoreRules.defineRule_)("mfenced-multi","default.default",'[n] @open; [m] ./* (sepFunc:CTXFmfSeparators, separator:@separators); [t] ")" (grammar:translate)',"self::mathml:mfenced","@open","not(@close)","string-length(string(@separators))>1");
|
1084
|
+
(0,sre.MathmlStoreRules.defineRule_)("mfenced-multi","default.default",'[t] "(" (grammar:translate); [m] ./* (sepFunc:CTXFmfSeparators, separator:@separators); [t] ")" (grammar:translate)',"self::mathml:mfenced","not(@open)","not(@close)","string-length(string(@separators))>1");(0,sre.MathmlStoreRules.defineRule_)("mtable","default.default",'[t] "matrix"; [m] ./* (ctxtFunc:CTXFnodeCounter,context:"row",pause:100)',"self::mathml:mtable");(0,sre.MathmlStoreRules.defineRule_)("mtr","default.default",
|
1085
|
+
'[m] ./* (ctxtFunc:CTXFnodeCounter,context:"column",pause:100)',"self::mathml:mtr");(0,sre.MathmlStoreRules.defineRule_)("mtd","default.default","[m] ./*","self::mathml:mtd");(0,sre.MathmlStoreRules.defineRule_)("mtable","default.superbrief",'[t] count(child::mathml:mtr); [t] "by";[t] count(child::mathml:mtr[1]/mathml:mtd); [t] "matrix";',"self::mathml:mtable");(0,sre.MathmlStoreRules.defineRule_)("mtable","default.short",'[t] "matrix"; [m] ./*',"self::mathml:mtable");(0,sre.MathmlStoreRules.defineRule_)("mtr",
|
1086
|
+
"default.short","[m] ./*","self::mathml:mtr");(0,sre.MathmlStoreRules.defineRule_)("mtd","default.short",'[t] "Element"; [t] count(./preceding-sibling::mathml:mtd)+1;[t] count(./parent::mathml:mtr/preceding-sibling::mathml:mtr)+1;[p] (pause:500); [m] ./*',"self::mathml:mtd");(0,sre.MathmlStoreRules.defineRule_)("mmultiscripts-4","default.default",'[n] ./*[1]; [p] (pause:200);[t] "left sub"; [n] ./*[5] (pitch:-0.35); [p] (pause:200);[t] "left super"; [n] ./*[6] (pitch:0.35); [p] (pause:200);[t] "right sub"; [n] ./*[2] (pitch:-0.35); [p] (pause:200);[t] "right super"; [n] ./*[3] (pitch:0.35); [p] (pause:300);',
|
1087
|
+
"self::mathml:mmultiscripts");(0,sre.MathmlStoreRules.defineRule_)("mmultiscripts-3-1","default.default",'[n] ./*[1]; [p] (pause:200);[t] "left sub"; [n] ./*[5] (pitch:-0.35); [p] (pause:200);[t] "left super"; [n] ./*[6] (pitch:0.35); [p] (pause:200);[t] "right super"; [n] ./*[3] (pitch:0.35); [p] (pause:300);',"self::mathml:mmultiscripts","./mathml:none=./*[2]","./mathml:mprescripts=./*[4]");(0,sre.MathmlStoreRules.defineRule_)("mmultiscripts-3-2","default.default",'[n] ./*[1]; [p] (pause:200);[t] "left sub"; [n] ./*[5] (pitch:-0.35); [p] (pause:200);[t] "left super"; [n] ./*[6] (pitch:0.35); [p] (pause:200);[t] "right sub"; [n] ./*[2] (pitch:-0.35); [p] (pause:200);',
|
1088
|
+
"self::mathml:mmultiscripts","./mathml:none=./*[3]","./mathml:mprescripts=./*[4]");(0,sre.MathmlStoreRules.defineRule_)("mmultiscripts-3-3","default.default",'[n] ./*[1]; [p] (pause:200);[t] "left super"; [n] ./*[6] (pitch:0.35); [p] (pause:200);[t] "right sub"; [n] ./*[2] (pitch:-0.35); [p] (pause:200);[t] "right super"; [n] ./*[3] (pitch:0.35); [p] (pause:300);',"self::mathml:mmultiscripts","./mathml:none=./*[5]","./mathml:mprescripts=./*[4]");(0,sre.MathmlStoreRules.defineRule_)("mmultiscripts-3-4",
|
1089
|
+
"default.default",'[n] ./*[1]; [p] (pause:200);[t] "left sub"; [n] ./*[5] (pitch:-0.35); [p] (pause:200);[t] "right sub"; [n] ./*[2] (pitch:-0.35); [p] (pause:200);[t] "right super"; [n] ./*[3] (pitch:0.35); [p] (pause:300);',"self::mathml:mmultiscripts","./mathml:none=./*[6]","./mathml:mprescripts=./*[4]");(0,sre.MathmlStoreRules.defineRule_)("mmultiscripts-2-1","default.default",'[n] ./*[1]; [p] (pause:200);[t] "left sub"; [n] ./*[5] (pitch:-0.35); [p] (pause:200);[t] "left super"; [n] ./*[6] (pitch:0.35); [p] (pause:300);',
|
1090
|
+
"self::mathml:mmultiscripts","./mathml:none=./*[2]","./mathml:none=./*[3]","./mathml:mprescripts=./*[4]");(0,sre.MathmlStoreRules.defineRule_)("mmultiscripts-1-1","default.default",'[n] ./*[1]; [p] (pause:200);[t] "left super"; [n] ./*[6] (pitch:0.35); [p] (pause:300);',"self::mathml:mmultiscripts","./mathml:none=./*[2]","./mathml:none=./*[3]","./mathml:mprescripts=./*[4]","./mathml:none=./*[5]");(0,sre.MathmlStoreRules.defineRule_)("mmultiscripts-1-2","default.default",'[n] ./*[1]; [p] (pause:200);[t] "left sub"; [n] ./*[5] (pitch:-0.35); [p] (pause:200);',
|
1091
|
+
"self::mathml:mmultiscripts","./mathml:none=./*[2]","./mathml:none=./*[3]","./mathml:mprescripts=./*[4]","./mathml:none=./*[6]")};
|
1092
|
+
sre.MathmlStoreRules.initMathjaxRules_=function(){(0,sre.MathmlStoreRules.defineRule_)("mj-math","default.default","[n] ./*[1]/*[1]/*[1]",'self::span[@class="math"]');(0,sre.MathmlStoreRules.defineRule_)("mj-leaf","default.default","[n] CQFlookupleaf",'self::span[@class="mi"]');(0,sre.MathmlStoreRules.defineRuleAlias_)("mj-leaf",'self::span[@class="mo"]');(0,sre.MathmlStoreRules.defineRuleAlias_)("mj-leaf",'self::span[@class="mn"]');(0,sre.MathmlStoreRules.defineRuleAlias_)("mj-leaf",'self::span[@class="mtext"]');
|
1093
|
+
(0,sre.MathmlStoreRules.defineRule_)("mj-mo-ext","default.default","[n] CQFextender",'self::span[@class="mo"]',"./*[1]/*[1]/text()","./*[1]/*[2]/text()");(0,sre.MathmlStoreRules.defineRule_)("mj-texatom","default.default","[n] ./*[1]",'self::span[@class="texatom"]');(0,sre.MathmlStoreRules.defineRule_)("mj-msubsup","default.default",'[n] ./*[1]/*[1]/*[1]; [t] "sub"; [n] ./*[1]/*[3]/*[1] (pitch:-0.35);[p] (pause:200); [t] "super"; [n] ./*[1]/*[2]/*[1] (pitch:0.35);[p] (pause:300)','self::span[@class="msubsup"]');
|
1094
|
+
(0,sre.MathmlStoreRules.defineRule_)("mj-msub","default.default",'[n] ./*[1]/*[1]/*[1]; [t] "sub";[n] ./*[1]/*[2]/*[1] (pitch:-0.35); [p] (pause:300)','self::span[@class="msub"]');(0,sre.MathmlStoreRules.defineRule_)("mj-msup","default.default",'[n] ./*[1]/*[1]/*[1]; [t] "super";[n] ./*[1]/*[2]/*[1] (pitch:0.35); [p] (pause:300)','self::span[@class="msup"]');(0,sre.MathmlStoreRules.defineRule_)("mj-munderover","default.default",'[n] ./*[1]/*[2]/*[1] (pitch:0.35); [t] "under and";[n] ./*[1]/*[3]/*[1] (pitch:-0.35); [t] "over";[n] ./*[1]/*[1]/*[1]; [p] (pause:400)',
|
1095
|
+
'self::span[@class="munderover"]');(0,sre.MathmlStoreRules.defineRule_)("mj-munder","default.default",'[n] ./*[1]/*[2]/*[1] (pitch:0.35); [t] "under";[n] ./*[1]/*[1]/*[1]; [p] (pause:400)','self::span[@class="munder"]');(0,sre.MathmlStoreRules.defineRule_)("mj-mover","default.default",'[n] ./*[1]/*[2]/*[1] (pitch:0.35); [t] "over";[n] ./*[1]/*[1]/*[1]; [p] (pause:400)','self::span[@class="mover"]');(0,sre.MathmlStoreRules.defineRule_)("mj-mfrac","default.default",'[p] (pause:250); [n] ./*[1]/*[1]/*[1] (pitch:0.3); [p] (pause:250); [t] "divided by"; [n] ./*[1]/*[2]/*[1] (pitch:-0.3);[p] (pause:400)',
|
1096
|
+
'self::span[@class="mfrac"]');(0,sre.MathmlStoreRules.defineRule_)("mj-msqrt","default.default",'[t] "Square root of";[n] ./*[1]/*[1]/*[1] (rate:0.2); [p] (pause:400)','self::span[@class="msqrt"]');(0,sre.MathmlStoreRules.defineRule_)("mj-mroot","default.default",'[t] "root of order"; [n] ./*[1]/*[4]/*[1]; [t] "of";[n] ./*[1]/*[1]/*[1] (rate:0.2); [p] (pause:400)','self::span[@class="mroot"]');(0,sre.MathmlStoreRules.defineRule_)("mj-mfenced","default.default",'[t] "opening"; [n] ./*[1]; [m] ./*[position()>1 and position()<last()]; [t] "closing"; [n] ./*[last()]',
|
1097
|
+
'self::span[@class="mfenced"]');(0,sre.MathmlStoreRules.defineRuleAlias_)("mj-leaf",'self::span[@class="mtable"]');(0,sre.MathmlStoreRules.defineRuleAlias_)("mj-leaf",'self::span[@class="mmultiscripts"]')};
|
1098
|
+
sre.MathmlStoreRules.initAliases_=function(){(0,sre.MathmlStoreRules.defineRuleAlias_)("mspace",'self::span[@class="mspace"]');(0,sre.MathmlStoreRules.defineRuleAlias_)("mstyle",'self::span[@class="mstyle"]');(0,sre.MathmlStoreRules.defineRuleAlias_)("mpadded",'self::span[@class="mpadded"]');(0,sre.MathmlStoreRules.defineRuleAlias_)("merror",'self::span[@class="merror"]');(0,sre.MathmlStoreRules.defineRuleAlias_)("mphantom",'self::span[@class="mphantom"]');(0,sre.MathmlStoreRules.defineRuleAlias_)("ms",
|
1099
|
+
'self::span[@class="ms"]');(0,sre.MathmlStoreRules.defineRuleAlias_)("mrow",'self::span[@class="mrow"]');(0,sre.MathmlStoreRules.defineRuleAlias_)("mj-msub",'self::span[@class="msubsup"]',"CQFmathmlmsub");(0,sre.MathmlStoreRules.defineRuleAlias_)("mj-msup",'self::span[@class="msubsup"]',"CQFmathmlmsup");(0,sre.MathmlStoreRules.defineRuleAlias_)("mj-munder",'self::span[@class="munderover"]',"CQFmathmlmunder");(0,sre.MathmlStoreRules.defineRuleAlias_)("mj-mover",'self::span[@class="munderover"]',"CQFmathmlmover")};
|
1100
|
+
sre.MathmlStoreRules.initSpecializationRules_=function(){(0,sre.MathmlStoreRules.defineRule_)("square","default.default",'[n] ./*[1]; [t] "square" (pitch:0.35); [p] (pause:300)',"self::mathml:msup","./*[2][text()=2]");(0,sre.MathmlStoreRules.defineRuleAlias_)("square","self::mathml:msup","./mathml:mrow=./*[2]","count(./*[2]/*)=1","./*[2]/*[1][text()=2]");(0,sre.MathmlStoreRules.defineRule_)("cube","default.default",'[n] ./*[1]; [t] "cube" (pitch:0.35); [p] (pause:300)',"self::mathml:msup","./*[2][text()=3]");
|
1101
|
+
(0,sre.MathmlStoreRules.defineRuleAlias_)("cube","self::mathml:msup","./mathml:mrow=./*[2]","count(./*[2]/*)=1","./*[2]/*[1][text()=3]");(0,sre.MathmlStoreRules.defineRule_)("square-sub","default.default",'[n] ./*[1]; [t] "sub"; [n] ./*[2] (pitch:-0.35);[p] (pause:300); [t] "square" (pitch:0.35); [p] (pause:400)',"self::mathml:msubsup","./*[3][text()=2]");(0,sre.MathmlStoreRules.defineRuleAlias_)("square-sub","self::mathml:msubsup","./mathml:mrow=./*[3]","count(./*[3]/*)=1","./*[3]/*[1][text()=2]");
|
1102
|
+
(0,sre.MathmlStoreRules.defineRule_)("cube-sub","default.default",'[n] ./*[1]; [t] "sub"; [n] ./*[2] (pitch:-0.35);[p] (pause:300); [t] "cube" (pitch:0.35); [p] (pause:400)',"self::mathml:msubsup","./*[3][text()=3]");(0,sre.MathmlStoreRules.defineRuleAlias_)("cube-sub","self::mathml:msubsup","./mathml:mrow=./*[3]","count(./*[3]/*)=1","./*[3]/*[1][text()=3]");(0,sre.MathmlStoreRules.defineRule_)("mj-square","default.default",'[n] ./*[1]/*[1]/*[1]; [t] "square" (pitch:0.35); [p] (pause:300)','self::span[@class="msup"]',
|
1103
|
+
"./*[1]/*[2]/*[1][text()=2]");(0,sre.MathmlStoreRules.defineRuleAlias_)("mj-square",'self::span[@class="msup"]','./*[1]/*[2]/*[1]=./*[1]/*[2]/span[@class="mrow"]',"count(./*[1]/*[2]/*[1]/*)=1","./*[1]/*[2]/*[1]/*[1][text()=2]");(0,sre.MathmlStoreRules.defineRuleAlias_)("mj-square",'self::span[@class="msubsup"]',"CQFmathmlmsup","./*[1]/*[2]/*[1][text()=2]");(0,sre.MathmlStoreRules.defineRuleAlias_)("mj-square",'self::span[@class="msubsup"]',"CQFmathmlmsup",'./*[1]/*[2]/*[1]=./*[1]/*[2]/span[@class="mrow"]',
|
1104
|
+
"count(./*[1]/*[2]/*[1]/*)=1","./*[1]/*[2]/*[1]/*[1][text()=2]");(0,sre.MathmlStoreRules.defineRule_)("mj-cube","default.default",'[n] ./*[1]/*[1]/*[1]; [t] "cube" (pitch:0.35); [p] (pause:300)','self::span[@class="msup"]',"./*[1]/*[2]/*[1][text()=3]");(0,sre.MathmlStoreRules.defineRuleAlias_)("mj-cube",'self::span[@class="msup"]','./*[1]/*[2]/*[1]=./*[1]/*[2]/span[@class="mrow"]',"count(./*[1]/*[2]/*[1]/*)=1","./*[1]/*[2]/*[1]/*[1][text()=3]");(0,sre.MathmlStoreRules.defineRuleAlias_)("mj-cube",
|
1105
|
+
'self::span[@class="msubsup"]',"CQFmathmlmsup","./*[1]/*[2]/*[1][text()=3]");(0,sre.MathmlStoreRules.defineRuleAlias_)("mj-cube",'self::span[@class="msubsup"]',"CQFmathmlmsup",'./*[1]/*[2]/*[1]=./*[1]/*[2]/span[@class="mrow"]',"count(./*[1]/*[2]/*[1]/*)=1","./*[1]/*[2]/*[1]/*[1][text()=3]");(0,sre.MathmlStoreRules.defineRule_)("mj-square-sub","default.default",'[n] ./*[1]/*[1]/*[1]; [t] "sub"; [n] ./*[1]/*[3]/*[1] (pitch:-0.35); [p] (pause:300); [t] "square" (pitch:0.35); [p] (pause:400)','self::span[@class="msubsup"]',
|
1106
|
+
"./*[1]/*[2]/*[1][text()=2]");(0,sre.MathmlStoreRules.defineRuleAlias_)("mj-square-sub",'self::span[@class="msubsup"]','./*[1]/*[2]/*[1]=./*[1]/*[2]/span[@class="mrow"]',"count(./*[1]/*[2]/*[1]/*)=1","./*[1]/*[2]/*[1]/*[1][text()=2]");(0,sre.MathmlStoreRules.defineRule_)("mj-cube-sub","default.default",'[n] ./*[1]/*[1]/*[1]; [t] "sub"; [n] ./*[1]/*[3]/*[1] (pitch:-0.35); [p] (pause:300); [t] "cube" (pitch:0.35); [p] (pause:400)','self::span[@class="msubsup"]',"./*[1]/*[2]/*[1][text()=3]");(0,sre.MathmlStoreRules.defineRuleAlias_)("mj-cube-sub",
|
1107
|
+
'self::span[@class="msubsup"]','./*[1]/*[2]/*[1]=./*[1]/*[2]/span[@class="mrow"]',"count(./*[1]/*[2]/*[1]/*)=1","./*[1]/*[2]/*[1]/*[1][text()=3]")};sre.MathmlStoreRules.getInstance().initializer=[sre.MathmlStoreRules.initCustomFunctions_,sre.MathmlStoreRules.initDefaultRules_,sre.MathmlStoreRules.initMathjaxRules_,sre.MathmlStoreRules.initAliases_,sre.MathmlStoreRules.initSpecializationRules_];sre.MathspeakFrenchUtil={};sre.MathspeakFrenchUtil.smallRoot=function(a){if(!a.childNodes||0===a.childNodes.length||!a.childNodes[0].childNodes)return[];var b=a.childNodes[0].childNodes[0].textContent;if(!/^\d+$/.test(b))return[];b=parseInt(b,10);return 1<b&&3>=b?[a]:[]};sre.MathspeakFrenchUtil.baselineVerbose=function(a){return sre.MathspeakUtil.baselineVerbose(a).replace(/\-$/,"")};sre.MathspeakFrenchUtil.baselineBrief=function(a){return sre.MathspeakUtil.baselineBrief(a).replace(/\-$/,"")};
|
1108
|
+
sre.MathspeakFrenchUtil.leftSuperscriptVerbose=function(a){return sre.MathspeakUtil.superscriptVerbose(a).replace(/^exposant/,"exposant gauche")};sre.MathspeakFrenchUtil.leftSubscriptVerbose=function(a){return sre.MathspeakUtil.subscriptVerbose(a).replace(/^indice/,"indice gauche")};sre.MathspeakFrenchUtil.leftSuperscriptBrief=function(a){return sre.MathspeakUtil.superscriptBrief(a).replace(/^sup/,"sup gauche")};
|
1109
|
+
sre.MathspeakFrenchUtil.leftSubscriptBrief=function(a){return sre.MathspeakUtil.subscriptBrief(a).replace(/^sub/,"sub gauche")};sre.MathspeakFrench=function(){sre.MathStore.call(this);this.locale="fr"};goog.inherits(sre.MathspeakFrench,sre.MathStore);goog.addSingletonGetter(sre.MathspeakFrench);sre.MathspeakFrench.mathStore=sre.MathspeakFrench.getInstance();sre.MathspeakFrench.defineRule_=goog.bind(sre.MathspeakFrench.mathStore.defineRule,sre.MathspeakFrench.mathStore);sre.MathspeakFrench.defineRuleAlias_=goog.bind(sre.MathspeakFrench.mathStore.defineRulesAlias,sre.MathspeakFrench.mathStore);
|
1110
|
+
sre.MathspeakFrench.defineSpecialisedRule_=goog.bind(sre.MathspeakFrench.mathStore.defineSpecialisedRule,sre.MathspeakFrench.mathStore);sre.MathspeakFrench.addContextFunction_=goog.bind(sre.MathspeakFrench.mathStore.contextFunctions.add,sre.MathspeakFrench.mathStore.contextFunctions);sre.MathspeakFrench.addCustomQuery_=goog.bind(sre.MathspeakFrench.mathStore.customQueries.add,sre.MathspeakFrench.mathStore.customQueries);
|
1111
|
+
sre.MathspeakFrench.addCustomString_=goog.bind(sre.MathspeakFrench.mathStore.customStrings.add,sre.MathspeakFrench.mathStore.customStrings);
|
1112
|
+
sre.MathspeakFrench.initCustomFunctions_=function(){(0,sre.MathspeakFrench.addCustomQuery_)("CQFspaceoutNumber",sre.MathspeakUtil.spaceoutNumber);(0,sre.MathspeakFrench.addCustomQuery_)("CQFspaceoutIdentifier",sre.MathspeakUtil.spaceoutIdentifier);(0,sre.MathspeakFrench.addCustomString_)("CSFspaceoutText",sre.MathspeakUtil.spaceoutText);(0,sre.MathspeakFrench.addCustomString_)("CSFopenFracVerbose",sre.MathspeakUtil.openingFractionVerbose);(0,sre.MathspeakFrench.addCustomString_)("CSFcloseFracVerbose",
|
1113
|
+
sre.MathspeakUtil.closingFractionVerbose);(0,sre.MathspeakFrench.addCustomString_)("CSFoverFracVerbose",sre.MathspeakUtil.overFractionVerbose);(0,sre.MathspeakFrench.addCustomString_)("CSFopenFracBrief",sre.MathspeakUtil.openingFractionBrief);(0,sre.MathspeakFrench.addCustomString_)("CSFcloseFracBrief",sre.MathspeakUtil.closingFractionBrief);(0,sre.MathspeakFrench.addCustomString_)("CSFopenFracSbrief",sre.MathspeakUtil.openingFractionSbrief);(0,sre.MathspeakFrench.addCustomString_)("CSFcloseFracSbrief",
|
1114
|
+
sre.MathspeakUtil.closingFractionSbrief);(0,sre.MathspeakFrench.addCustomString_)("CSFoverFracSbrief",sre.MathspeakUtil.overFractionSbrief);(0,sre.MathspeakFrench.addCustomString_)("CSFvulgarFrFraction",sre.NumbersUtil.vulgarFraction);(0,sre.MathspeakFrench.addCustomQuery_)("CQFvulgarFractionSmall",sre.MathspeakUtil.isSmallVulgarFraction);(0,sre.MathspeakFrench.addCustomString_)("CSFopenRadicalVerbose",sre.MathspeakUtil.openingRadicalVerbose);(0,sre.MathspeakFrench.addCustomString_)("CSFcloseRadicalVerbose",
|
1115
|
+
sre.MathspeakUtil.closingRadicalVerbose);(0,sre.MathspeakFrench.addCustomString_)("CSFindexRadicalVerbose",sre.MathspeakUtil.indexRadicalVerbose);(0,sre.MathspeakFrench.addCustomString_)("CSFopenRadicalBrief",sre.MathspeakUtil.openingRadicalBrief);(0,sre.MathspeakFrench.addCustomString_)("CSFcloseRadicalBrief",sre.MathspeakUtil.closingRadicalBrief);(0,sre.MathspeakFrench.addCustomString_)("CSFindexRadicalBrief",sre.MathspeakUtil.indexRadicalBrief);(0,sre.MathspeakFrench.addCustomString_)("CSFopenRadicalSbrief",
|
1116
|
+
sre.MathspeakUtil.openingRadicalSbrief);(0,sre.MathspeakFrench.addCustomString_)("CSFindexRadicalSbrief",sre.MathspeakUtil.indexRadicalSbrief);(0,sre.MathspeakFrench.addCustomQuery_)("CQFisSmallRoot",sre.MathspeakFrenchUtil.smallRoot);(0,sre.MathspeakFrench.addCustomString_)("CSFsuperscriptVerbose",sre.MathspeakUtil.superscriptVerbose);(0,sre.MathspeakFrench.addCustomString_)("CSFsuperscriptBrief",sre.MathspeakUtil.superscriptBrief);(0,sre.MathspeakFrench.addCustomString_)("CSFsubscriptVerbose",sre.MathspeakUtil.subscriptVerbose);
|
1117
|
+
(0,sre.MathspeakFrench.addCustomString_)("CSFsubscriptBrief",sre.MathspeakUtil.subscriptBrief);(0,sre.MathspeakFrench.addCustomString_)("CSFbaselineVerbose",sre.MathspeakFrenchUtil.baselineVerbose);(0,sre.MathspeakFrench.addCustomString_)("CSFbaselineBrief",sre.MathspeakFrenchUtil.baselineBrief);(0,sre.MathspeakFrench.addCustomString_)("CSFleftsuperscriptVerbose",sre.MathspeakFrenchUtil.leftSuperscriptVerbose);(0,sre.MathspeakFrench.addCustomString_)("CSFleftsubscriptVerbose",sre.MathspeakFrenchUtil.leftSubscriptVerbose);
|
1118
|
+
(0,sre.MathspeakFrench.addCustomString_)("CSFrightsuperscriptVerbose",sre.MathspeakUtil.superscriptVerbose);(0,sre.MathspeakFrench.addCustomString_)("CSFrightsubscriptVerbose",sre.MathspeakUtil.subscriptVerbose);(0,sre.MathspeakFrench.addCustomString_)("CSFleftsuperscriptBrief",sre.MathspeakFrenchUtil.leftSuperscriptBrief);(0,sre.MathspeakFrench.addCustomString_)("CSFleftsubscriptBrief",sre.MathspeakFrenchUtil.leftSubscriptBrief);(0,sre.MathspeakFrench.addCustomString_)("CSFrightsuperscriptBrief",
|
1119
|
+
sre.MathspeakUtil.superscriptBrief);(0,sre.MathspeakFrench.addCustomString_)("CSFrightsubscriptBrief",sre.MathspeakUtil.subscriptBrief);(0,sre.MathspeakFrench.addCustomString_)("CSFunderscript",sre.MathspeakUtil.nestedUnderscore);(0,sre.MathspeakFrench.addCustomString_)("CSFoverscript",sre.MathspeakUtil.nestedOverscore);(0,sre.MathspeakFrench.addContextFunction_)("CTXFordinalCounter",sre.NumbersUtil.ordinalCounter);(0,sre.MathspeakFrench.addContextFunction_)("CTXFcontentIterator",sre.MathmlStoreUtil.contentIterator);
|
1120
|
+
(0,sre.MathspeakFrench.addCustomQuery_)("CQFdetIsSimple",sre.MathspeakUtil.determinantIsSimple);(0,sre.MathspeakFrench.addCustomString_)("CSFRemoveParens",sre.MathspeakUtil.removeParens);(0,sre.MathspeakFrench.addCustomQuery_)("CQFresetNesting",sre.MathspeakUtil.resetNestingDepth);(0,sre.MathspeakFrench.addCustomQuery_)("CQFisLogarithm",sre.ClearspeakUtil.isLogarithmWithBase)};
|
1121
|
+
sre.MathspeakFrench.initMathspeakFrench_=function(){(0,sre.MathspeakFrench.defineRule_)("collapsed","mathspeak.default","[n] . (engine:modality=summary,grammar:collapsed)","self::*","@alternative",'not(contains(@grammar, "collapsed"))',"self::*","self::*","self::*","self::*","self::*");(0,sre.MathspeakFrench.defineSpecialisedRule_)("collapsed","mathspeak.default","mathspeak.brief");(0,sre.MathspeakFrench.defineSpecialisedRule_)("collapsed","mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakFrench.defineRule_)("stree",
|
1122
|
+
"mathspeak.default","[n] ./*[1]","self::stree","CQFresetNesting");(0,sre.MathspeakFrench.defineRule_)("unknown","mathspeak.default","[n] text()","self::unknown");(0,sre.MathspeakFrench.defineRule_)("protected","mathspeak.default","[t] text()","self::*",'@role="protected"');(0,sre.MathspeakFrench.defineRule_)("omit-empty","mathspeak.default","[p] (pause:100)","self::empty");(0,sre.MathspeakFrench.defineRule_)("blank-empty","mathspeak.default",'[t] "vide"',"self::empty","count(../*)=1",'name(../..)="cell" or name(../..)="line"');
|
1123
|
+
(0,sre.MathspeakFrench.defineRule_)("font","mathspeak.default","[n] . (grammar:ignoreFont=@font); [t] @font (grammar:localFont)","self::*","@font",'not(contains(@grammar, "ignoreFont"))','@font!="normal"');(0,sre.MathspeakFrench.defineRule_)("font-identifier-short","mathspeak.default","[n] . (grammar:ignoreFont=@font); [t] @font (grammar:localFont);","self::identifier","string-length(text())=1","@font",'not(contains(@grammar, "ignoreFont"))','@font="normal"','""=translate(text(), "abcdefghijklmnopqrstuvwxyz\u03b1\u03b2\u03b3\u03b4\u03b5\u03b6\u03b7\u03b8\u03b9\u03ba\u03bb\u03bc\u03bd\u03be\u03bf\u03c0\u03c1\u03c2\u03c3\u03c4\u03c5\u03c6\u03c7\u03c8\u03c9ABCDEFGHIJKLMNOPQRSTUVWXYZ\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039a\u039b\u039c\u039d\u039e\u039f\u03a0\u03a1\u03a3\u03a3\u03a4\u03a5\u03a6\u03a7\u03a8\u03a9", "")',
|
1124
|
+
'@role!="unit"');(0,sre.MathspeakFrench.defineRule_)("font-identifier","mathspeak.default","[n] . (grammar:ignoreFont=@font); [t] @font (grammar:localFont)","self::identifier","string-length(text())=1","@font",'@font="normal"','not(contains(@grammar, "ignoreFont"))','@role!="unit"');(0,sre.MathspeakFrench.defineRule_)("omit-font","mathspeak.default","[n] . (grammar:ignoreFont=@font)","self::identifier","string-length(text())=1","@font",'not(contains(@grammar, "ignoreFont"))','@font="italic"');(0,sre.MathspeakFrench.defineRule_)("number",
|
1125
|
+
"mathspeak.default","[n] text()","self::number");(0,sre.MathspeakFrench.defineRule_)("mixed-number","mathspeak.default",'[n] children/*[1]; [t] "et"; [n] children/*[2]; ',"self::number",'@role="mixed"');(0,sre.MathspeakFrench.defineRule_)("number-with-chars","mathspeak.default",'[t] "nombre"; [m] CQFspaceoutNumber',"self::number",'"" != translate(text(), "0123456789.,", "")','text() != translate(text(), "0123456789.,", "")');(0,sre.MathspeakFrench.defineRule_)("number-as-upper-word","mathspeak.default",
|
1126
|
+
'[t] "MotMajuscule"; [t] CSFspaceoutText',"self::number","string-length(text())>1",'text()=translate(text(), "abcdefghijklmnopqrstuvwxyz\u03b1\u03b2\u03b3\u03b4\u03b5\u03b6\u03b7\u03b8\u03b9\u03ba\u03bb\u03bc\u03bd\u03be\u03bf\u03c0\u03c1\u03c2\u03c3\u03c4\u03c5\u03c6\u03c7\u03c8\u03c9", "ABCDEFGHIJKLMNOPQRSTUVWXYZ\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039a\u039b\u039c\u039d\u039e\u039f\u03a0\u03a1\u03a3\u03a3\u03a4\u03a5\u03a6\u03a7\u03a8\u03a9")','""=translate(text(), "ABCDEFGHIJKLMNOPQRSTUVWXYZ\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039a\u039b\u039c\u039d\u039e\u039f\u03a0\u03a1\u03a3\u03a3\u03a4\u03a5\u03a6\u03a7\u03a8\u03a9","")');
|
1127
|
+
(0,sre.MathspeakFrench.defineRule_)("number-baseline","mathspeak.default",'[t] "position de base"; [n] . (grammar:baseline)',"self::number",'not(contains(@grammar, "ignoreFont"))',"preceding-sibling::identifier",'not(contains(@grammar, "baseline"))','preceding-sibling::*[1][@role="latinletter" or @role="greekletter" or @role="otherletter"]','parent::*/parent::infixop[@role="implicit"]');(0,sre.MathspeakFrench.defineSpecialisedRule_)("number-baseline","mathspeak.default","mathspeak.brief",'[t] "base"; [n] . (grammar:baseline)');
|
1128
|
+
(0,sre.MathspeakFrench.defineSpecialisedRule_)("number-baseline","mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakFrench.defineRule_)("number-baseline-font","mathspeak.default",'[t] "position de base"; [n] . (grammar:ignoreFont=@font); [t] @font (grammar:localFont)',"self::number","@font",'not(contains(@grammar, "ignoreFont"))','@font!="normal"',"preceding-sibling::identifier",'preceding-sibling::*[@role="latinletter" or @role="greekletter" or @role="otherletter"]','parent::*/parent::infixop[@role="implicit"]');
|
1129
|
+
(0,sre.MathspeakFrench.defineSpecialisedRule_)("number-baseline-font","mathspeak.default","mathspeak.brief",'[t] "base"; [n] . (grammar:ignoreFont=@font); [t] @font (grammar:localFont)');(0,sre.MathspeakFrench.defineSpecialisedRule_)("number-baseline-font","mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakFrench.defineRule_)("identifier","mathspeak.default","[m] CQFspaceoutIdentifier","self::identifier","string-length(text())>1",'@role!="unit"','@role!="protected"','not(@font) or @font="normal" or contains(@grammar, "ignoreFont")',
|
1130
|
+
'text()!=translate(text(), "abcdefghijklmnopqrstuvwxyz\u03b1\u03b2\u03b3\u03b4\u03b5\u03b6\u03b7\u03b8\u03b9\u03ba\u03bb\u03bc\u03bd\u03be\u03bf\u03c0\u03c1\u03c2\u03c3\u03c4\u03c5\u03c6\u03c7\u03c8\u03c9ABCDEFGHIJKLMNOPQRSTUVWXYZ\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039a\u039b\u039c\u039d\u039e\u039f\u03a0\u03a1\u03a3\u03a3\u03a4\u03a5\u03a6\u03a7\u03a8\u03a9", "")');(0,sre.MathspeakFrench.defineRule_)("identifier","mathspeak.default","[n] text()","self::identifier");(0,sre.MathspeakFrench.defineRule_)("negative",
|
1131
|
+
"mathspeak.default",'[t] "n\u00e9gatif"; [n] children/*[1]',"self::prefixop",'@role="negative"',"children/identifier");(0,sre.MathspeakFrench.defineRuleAlias_)("negative","self::prefixop",'@role="negative"',"children/number");(0,sre.MathspeakFrench.defineRuleAlias_)("negative","self::prefixop",'@role="negative"','children/fraction[@role="vulgar"]');(0,sre.MathspeakFrench.defineRule_)("negative","mathspeak.default",'[t] "n\u00e9gatif"; [n] children/*[1]',"self::prefixop",'@role="negative"');(0,sre.MathspeakFrench.defineRule_)("prefix",
|
1132
|
+
"mathspeak.default","[m] content/*; [n] children/*[1]","self::prefixop");(0,sre.MathspeakFrench.defineRule_)("postfix","mathspeak.default","[n] children/*[1]; [m] content/*","self::postfixop");(0,sre.MathspeakFrench.defineRule_)("binary-operation","mathspeak.default","[m] children/* (sepFunc:CTXFcontentIterator);","self::infixop");(0,sre.MathspeakFrench.defineRule_)("implicit","mathspeak.default","[m] children/*","self::infixop",'@role="implicit"');(0,sre.MathspeakFrench.defineRuleAlias_)("implicit",
|
1133
|
+
"self::infixop",'@role="leftsuper" or @role="leftsub" or @role="rightsuper" or @role="rightsub"');(0,sre.MathspeakFrench.defineRule_)("subtraction","mathspeak.default",'[m] children/* (separator:"moins");',"self::infixop",'@role="subtraction"');(0,sre.MathspeakFrench.defineRule_)("function-unknown","mathspeak.default","[n] children/*[1]; [n] children/*[2]","self::appl");(0,sre.MathspeakFrench.defineRule_)("function-prefix","mathspeak.default","[n] children/*[1]; [n] children/*[2]","self::appl",'children/*[1][@role="prefix function"]');
|
1134
|
+
(0,sre.MathspeakFrench.defineRule_)("fences-open-close","mathspeak.default","[n] content/*[1]; [n] children/*[1]; [n] content/*[2]","self::fenced",'@role="leftright"');(0,sre.MathspeakFrench.defineRule_)("fences-neutral","mathspeak.default",'[t] "d\u00e9but valeur absolue"; [n] children/*[1]; [t] "fin valeur absolue"',"self::fenced",'@role="neutral"','content/*[1][text()]="|" or content/*[1][text()]="\u2758" or content/*[1][text()]="\uff5c"');(0,sre.MathspeakFrench.defineSpecialisedRule_)("fences-neutral",
|
1135
|
+
"mathspeak.default","mathspeak.sbrief",'[t] "valeur absolue"; [n] children/*[1]; [t] "fin valeur absolue"');(0,sre.MathspeakFrench.defineRule_)("fences-neutral","mathspeak.default","[n] content/*[1]; [n] children/*[1]; [n] content/*[2]","self::fenced",'@role="neutral"');(0,sre.MathspeakFrench.defineRule_)("fences-set","mathspeak.default",'[t] "d\u00e9but ensemble"; [n] children/*[1]; [t] "fin ensemble"',"self::fenced",'@role="set empty" or @role="set extended" or @role="set singleton" or @role="set collection"',
|
1136
|
+
'not(name(../..)="appl")');(0,sre.MathspeakFrench.defineSpecialisedRule_)("fences-set","mathspeak.default","mathspeak.sbrief",'[t] "ensemble"; [n] children/*[1]; [t] "fin ensemble"');(0,sre.MathspeakFrench.defineRule_)("text","mathspeak.default","[n] text()","self::text");(0,sre.MathspeakFrench.defineRule_)("factorial","mathspeak.default",'[t] "factorielle"',"self::punctuation",'text()="!"','name(preceding-sibling::*[1])!="text"');(0,sre.MathspeakFrench.defineRule_)("minus","mathspeak.default",'[t] "moins"',
|
1137
|
+
"self::operator",'text()="-"');(0,sre.MathspeakFrench.defineRule_)("single-prime","mathspeak.default",'[t] "prime"',"self::punctuated",'@role="prime"',"count(children/*)=1");(0,sre.MathspeakFrench.defineRule_)("double-prime","mathspeak.default",'[t] "double prime"',"self::punctuated",'@role="prime"',"count(children/*)=2");(0,sre.MathspeakFrench.defineRule_)("triple-prime","mathspeak.default",'[t] "triple prime"',"self::punctuated",'@role="prime"',"count(children/*)=3");(0,sre.MathspeakFrench.defineRule_)("quadruple-prime",
|
1138
|
+
"mathspeak.default",'[t] "quadruple prime"',"self::punctuated",'@role="prime"',"count(children/*)=4");(0,sre.MathspeakFrench.defineRule_)("counted-prime","mathspeak.default",'[t] count(children/*); [t] "prime"',"self::punctuated",'@role="prime"');(0,sre.MathspeakFrench.defineRule_)("fraction","mathspeak.default","[t] CSFopenFracVerbose; [n] children/*[1]; [t] CSFoverFracVerbose; [n] children/*[2]; [t] CSFcloseFracVerbose","self::fraction");(0,sre.MathspeakFrench.defineRule_)("fraction","mathspeak.brief",
|
1139
|
+
"[t] CSFopenFracBrief; [n] children/*[1]; [t] CSFoverFracVerbose; [n] children/*[2]; [t] CSFcloseFracBrief","self::fraction");(0,sre.MathspeakFrench.defineRule_)("fraction","mathspeak.sbrief","[t] CSFopenFracSbrief; [n] children/*[1]; [t] CSFoverFracSbrief; [n] children/*[2]; [t] CSFcloseFracSbrief","self::fraction");(0,sre.MathspeakFrench.defineRule_)("vulgar-fraction","mathspeak.default","[t] CSFvulgarFrFraction","self::fraction",'@role="vulgar"',"CQFvulgarFractionSmall");(0,sre.MathspeakFrench.defineSpecialisedRule_)("vulgar-fraction",
|
1140
|
+
"mathspeak.default","mathspeak.brief");(0,sre.MathspeakFrench.defineSpecialisedRule_)("vulgar-fraction","mathspeak.default","mathspeak.sbrief");(0,sre.MathspeakFrench.defineRule_)("continued-fraction-outer","mathspeak.default",'[t] "fraction continue"; [n] children/*[1];[t] "sur"; [n] children/*[2]',"self::fraction","not(ancestor::fraction)",'children/*[2]/descendant-or-self::*[@role="ellipsis" and not(following-sibling::*)]');(0,sre.MathspeakFrench.defineSpecialisedRule_)("continued-fraction-outer",
|
1141
|
+
"mathspeak.default","mathspeak.brief",'[t] "frac continue"; [n] children/*[1];[t] "sur"; [n] children/*[2]');(0,sre.MathspeakFrench.defineSpecialisedRule_)("continued-fraction-outer","mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakFrench.defineRule_)("continued-fraction-inner","mathspeak.default",'[t] "d\u00e9but fraction"; [n] children/*[1];[t] "sur"; [n] children/*[2]',"self::fraction","ancestor::fraction",'children/*[2]/descendant-or-self::*[@role="ellipsis" and not(following-sibling::*)]');
|
1142
|
+
(0,sre.MathspeakFrench.defineSpecialisedRule_)("continued-fraction-inner","mathspeak.default","mathspeak.brief",'[t] "d\u00e9but frac"; [n] children/*[1];[t] "sur"; [n] children/*[2]');(0,sre.MathspeakFrench.defineSpecialisedRule_)("continued-fraction-inner","mathspeak.brief","mathspeak.sbrief",'[t] "frac"; [n] children/*[1];[t] "sur"; [n] children/*[2]');(0,sre.MathspeakFrench.defineRule_)("sqrt","mathspeak.default","[t] CSFopenRadicalVerbose; [n] children/*[1]; [t] CSFcloseRadicalVerbose","self::sqrt");
|
1143
|
+
(0,sre.MathspeakFrench.defineRule_)("sqrt","mathspeak.brief","[t] CSFopenRadicalBrief; [n] children/*[1]; [t] CSFcloseRadicalBrief","self::sqrt");(0,sre.MathspeakFrench.defineRule_)("sqrt","mathspeak.sbrief","[t] CSFopenRadicalSbrief; [n] children/*[1]; [t] CSFcloseRadicalBrief","self::sqrt");(0,sre.MathspeakFrench.defineRule_)("root-small","mathspeak.default","[t] CSFopenRadicalVerbose; [n] children/*[2]; [t] CSFcloseRadicalVerbose","self::root","CQFisSmallRoot");(0,sre.MathspeakFrench.defineRule_)("root-small",
|
1144
|
+
"mathspeak.brief","[t] CSFopenRadicalBrief; [n] children/*[2]; [t] CSFcloseRadicalBrief","self::root","CQFisSmallRoot");(0,sre.MathspeakFrench.defineRule_)("root-small","mathspeak.sbrief","[t] CSFopenRadicalSbrief; [n] children/*[2]; [t] CSFcloseRadicalBrief","self::root","CQFisSmallRoot");(0,sre.MathspeakFrench.defineRule_)("root","mathspeak.default","[t] CSFindexRadicalVerbose; [n] children/*[1];[t] CSFopenRadicalVerbose; [n] children/*[2]; [t] CSFcloseRadicalVerbose","self::root");(0,sre.MathspeakFrench.defineRule_)("root",
|
1145
|
+
"mathspeak.brief","[t] CSFindexRadicalBrief; [n] children/*[1];[t] CSFopenRadicalBrief; [n] children/*[2]; [t] CSFcloseRadicalBrief","self::root");(0,sre.MathspeakFrench.defineRule_)("root","mathspeak.sbrief","[t] CSFindexRadicalSbrief; [n] children/*[1];[t] CSFopenRadicalSbrief; [n] children/*[2]; [t] CSFcloseRadicalBrief","self::root");(0,sre.MathspeakFrench.defineRule_)("limboth","mathspeak.default",'[n] children/*[1]; [t] "d\u00e9but"; [t] CSFunderscript; [n] children/*[2];[t] "d\u00e9but"; [t] CSFoverscript; [n] children/*[3]',
|
1146
|
+
"self::limboth",'name(../..)="underscore" or name(../..)="overscore"','following-sibling::*[@role!="underaccent" and @role!="overaccent"]');(0,sre.MathspeakFrench.defineRule_)("limlower","mathspeak.default",'[n] children/*[1]; [t] "d\u00e9but"; [t] CSFunderscript; [n] children/*[2];',"self::limlower",'name(../..)="underscore" or name(../..)="overscore"','following-sibling::*[@role!="underaccent" and @role!="overaccent"]');(0,sre.MathspeakFrench.defineRule_)("limupper","mathspeak.default",'[n] children/*[1]; [t] "d\u00e9but"; [t] CSFoverscript; [n] children/*[2];',
|
1147
|
+
"self::limupper",'name(../..)="underscore" or name(../..)="overscore"','following-sibling::*[@role!="underaccent" and @role!="overaccent"]');(0,sre.MathspeakFrench.defineRuleAlias_)("limlower","self::underscore",'@role="limit function"','name(../..)="underscore" or name(../..)="overscore"','following-sibling::*[@role!="underaccent" and @role!="overaccent"]');(0,sre.MathspeakFrench.defineRuleAlias_)("limlower","self::underscore",'children/*[2][@role!="underaccent"]','name(../..)="underscore" or name(../..)="overscore"',
|
1148
|
+
'following-sibling::*[@role!="underaccent" and @role!="overaccent"]');(0,sre.MathspeakFrench.defineRuleAlias_)("limupper","self::overscore",'children/*[2][@role!="overaccent"]','name(../..)="underscore" or name(../..)="overscore"','following-sibling::*[@role!="underaccent" and @role!="overaccent"]');(0,sre.MathspeakFrench.defineRule_)("limboth-end","mathspeak.default",'[n] children/*[1]; [t] "d\u00e9but"; [t] CSFunderscript; [n] children/*[2];[t] "d\u00e9but"; [t] CSFoverscript; [n] children/*[3]; [t] "fin scripts"',
|
1149
|
+
"self::limboth");(0,sre.MathspeakFrench.defineRule_)("limlower-end","mathspeak.default",'[n] children/*[1]; [t] "d\u00e9but"; [t] CSFunderscript; [n] children/*[2]; [t] "fin scripts"',"self::limlower");(0,sre.MathspeakFrench.defineRule_)("limupper-end","mathspeak.default",'[n] children/*[1]; [t] "d\u00e9but"; [t] CSFoverscript; [n] children/*[2]; [t] "fin scripts"',"self::limupper");(0,sre.MathspeakFrench.defineRuleAlias_)("limlower-end","self::underscore",'@role="limit function"');(0,sre.MathspeakFrench.defineRuleAlias_)("limlower-end",
|
1150
|
+
"self::underscore");(0,sre.MathspeakFrench.defineRuleAlias_)("limupper-end","self::overscore");(0,sre.MathspeakFrench.defineRule_)("integral","mathspeak.default","[n] children/*[1]; [n] children/*[2]; [n] children/*[3];","self::integral");(0,sre.MathspeakFrench.defineRule_)("integral","mathspeak.default",'[n] children/*[1]; [t] "indice inf\u00e9rieur"; [n] children/*[2];[t] "indice sup\u00e9rieur"; [n] children/*[3]; [t] "position de base";',"self::limboth",'@role="integral"');(0,sre.MathspeakFrench.defineSpecialisedRule_)("integral",
|
1151
|
+
"mathspeak.default","mathspeak.brief",'[n] children/*[1]; [t] "inf"; [n] children/*[2];[t] "sup"; [n] children/*[3]; [t] "position de base";');(0,sre.MathspeakFrench.defineSpecialisedRule_)("integral","mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakFrench.defineRule_)("bigop","mathspeak.default","[n] children/*[1]; [n] children/*[2];","self::bigop");(0,sre.MathspeakFrench.defineRule_)("relseq","mathspeak.default","[m] children/* (sepFunc:CTXFcontentIterator)","self::relseq");(0,sre.MathspeakFrench.defineRule_)("equality",
|
1152
|
+
"mathspeak.default","[n] children/*[1]; [n] content/*[1]; [n] children/*[2]","self::relseq",'@role="equality"',"count(./children/*)=2");(0,sre.MathspeakFrench.defineRule_)("multi-equality","mathspeak.default","[m] children/* (sepFunc:CTXFcontentIterator)","self::relseq",'@role="equality"',"count(./children/*)>2");(0,sre.MathspeakFrench.defineRule_)("multrel","mathspeak.default","[m] children/* (sepFunc:CTXFcontentIterator)","self::multirel");(0,sre.MathspeakFrench.defineRule_)("subscript","mathspeak.default",
|
1153
|
+
"[n] children/*[1]; [t] CSFsubscriptVerbose; [n] children/*[2]","self::subscript");(0,sre.MathspeakFrench.defineRule_)("subscript","mathspeak.brief","[n] children/*[1]; [t] CSFsubscriptBrief; [n] children/*[2]","self::subscript");(0,sre.MathspeakFrench.defineSpecialisedRule_)("subscript","mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakFrench.defineRule_)("subscript-base","mathspeak.default",'[n] children/*[1]; [t] "base"; [n] children/*[2]',"self::subscript","CQFisLogarithm","self::*","self::*",
|
1154
|
+
"self::*");(0,sre.MathspeakFrench.defineSpecialisedRule_)("subscript-base","mathspeak.default","mathspeak.brief");(0,sre.MathspeakFrench.defineSpecialisedRule_)("subscript-base","mathspeak.default","mathspeak.sbrief");(0,sre.MathspeakFrench.defineRule_)("subscript-simple","mathspeak.brief","[n] children/*[1]; [n] children/*[2]","self::subscript",'name(./children/*[1])="identifier"','name(./children/*[2])="number"','./children/*[2][@role!="mixed"]','./children/*[2][@role!="othernumber"]');(0,sre.MathspeakFrench.defineSpecialisedRule_)("subscript-simple",
|
1155
|
+
"mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakFrench.defineRule_)("subscript-baseline","mathspeak.default","[n] children/*[1]; [t] CSFsubscriptVerbose; [n] children/*[2]; [t] CSFbaselineVerbose","self::subscript","following-sibling::*",'not(name(following-sibling::subscript/children/*[1])="empty" or (name(following-sibling::infixop[@role="implicit"]/children/*[1])="subscript" and name(following-sibling::*/children/*[1]/children/*[1])="empty")) and @role!="subsup"','not(following-sibling::*[@role="rightsuper" or @role="rightsub" or @role="leftsub" or @role="leftsub"])');
|
1156
|
+
(0,sre.MathspeakFrench.defineSpecialisedRule_)("subscript-baseline","mathspeak.default","mathspeak.brief","[n] children/*[1]; [t] CSFsubscriptBrief; [n] children/*[2]; [t] CSFbaselineBrief");(0,sre.MathspeakFrench.defineSpecialisedRule_)("subscript-baseline","mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakFrench.defineRuleAlias_)("subscript-baseline","self::subscript","not(following-sibling::*)","ancestor::fenced|ancestor::root|ancestor::sqrt|ancestor::punctuated|ancestor::fraction",'not(ancestor::punctuated[@role="leftsuper" or @role="rightsub" or @role="rightsuper" or @role="rightsub"])');
|
1157
|
+
(0,sre.MathspeakFrench.defineRuleAlias_)("subscript-baseline","self::subscript","not(following-sibling::*)","ancestor::relseq|ancestor::multirel",sre.MathspeakUtil.generateBaselineConstraint());(0,sre.MathspeakFrench.defineRuleAlias_)("subscript-baseline","self::subscript","not(following-sibling::*)","@embellished");(0,sre.MathspeakFrench.defineRule_)("subscript-empty-sup","mathspeak.default","[n] children/*[1]; [n] children/*[2]","self::subscript",'name(children/*[2])="infixop"','name(children/*[2][@role="implicit"]/children/*[1])="superscript"',
|
1158
|
+
'name(children/*[2]/children/*[1]/children/*[1])="empty"');(0,sre.MathspeakFrench.defineSpecialisedRule_)("subscript-empty-sup","mathspeak.default","mathspeak.brief");(0,sre.MathspeakFrench.defineSpecialisedRule_)("subscript-empty-sup","mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakFrench.defineRuleAlias_)("subscript-empty-sup","self::subscript",'name(children/*[2])="superscript"','name(children/*[2]/children/*[1])="empty"');(0,sre.MathspeakFrench.defineRule_)("superscript","mathspeak.default",
|
1159
|
+
"[n] children/*[1]; [t] CSFsuperscriptVerbose; [n] children/*[2]","self::superscript");(0,sre.MathspeakFrench.defineSpecialisedRule_)("superscript","mathspeak.default","mathspeak.brief","[n] children/*[1]; [t] CSFsuperscriptBrief; [n] children/*[2]");(0,sre.MathspeakFrench.defineSpecialisedRule_)("superscript","mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakFrench.defineRule_)("superscript-baseline","mathspeak.default","[n] children/*[1]; [t] CSFsuperscriptVerbose; [n] children/*[2];[t] CSFbaselineVerbose",
|
1160
|
+
"self::superscript","following-sibling::*",'not(name(following-sibling::superscript/children/*[1])="empty" or (name(following-sibling::infixop[@role="implicit"]/children/*[1])="superscript" and name(following-sibling::*/children/*[1]/children/*[1])="empty")) and not(following-sibling::*[@role="rightsuper" or @role="rightsub" or @role="leftsub" or @role="leftsub"])');(0,sre.MathspeakFrench.defineSpecialisedRule_)("superscript-baseline","mathspeak.default","mathspeak.brief","[n] children/*[1]; [t] CSFsuperscriptBrief; [n] children/*[2];[t] CSFbaselineBrief");
|
1161
|
+
(0,sre.MathspeakFrench.defineSpecialisedRule_)("superscript-baseline","mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakFrench.defineRuleAlias_)("superscript-baseline","self::superscript","not(following-sibling::*)","ancestor::punctuated",'ancestor::*/following-sibling::* and not(ancestor::punctuated[@role="leftsuper" or @role="rightsub" or @role="rightsuper" or @role="rightsub"])');(0,sre.MathspeakFrench.defineRuleAlias_)("superscript-baseline","self::superscript","not(following-sibling::*)",
|
1162
|
+
"ancestor::fraction|ancestor::fenced|ancestor::root|ancestor::sqrt");(0,sre.MathspeakFrench.defineRuleAlias_)("superscript-baseline","self::superscript","not(following-sibling::*)","ancestor::relseq|ancestor::multirel","not(@embellished)",sre.MathspeakUtil.generateBaselineConstraint());(0,sre.MathspeakFrench.defineRuleAlias_)("superscript-baseline","self::superscript","not(following-sibling::*)","@embellished",'not(children/*[2][@role="prime"])');(0,sre.MathspeakFrench.defineRule_)("superscript-empty-sub",
|
1163
|
+
"mathspeak.default","[n] children/*[1]; [n] children/*[2]","self::superscript",'name(children/*[2])="infixop"','name(children/*[2][@role="implicit"]/children/*[1])="subscript"','name(children/*[2]/children/*[1]/children/*[1])="empty"');(0,sre.MathspeakFrench.defineSpecialisedRule_)("superscript-empty-sub","mathspeak.default","mathspeak.brief");(0,sre.MathspeakFrench.defineSpecialisedRule_)("superscript-empty-sub","mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakFrench.defineRuleAlias_)("superscript-empty-sub",
|
1164
|
+
"self::superscript",'name(children/*[2])="subscript"','name(children/*[2]/children/*[1])="empty"');(0,sre.MathspeakFrench.defineRule_)("square","mathspeak.default",'[n] children/*[1]; [t] "au carr\u00e9"',"self::superscript","children/*[2]","children/*[2][text()=2]",'name(children/*[1])!="text" or not(name(children/*[1])="text" and (name(../../../punctuated[@role="text"]/..)="stree" or name(..)="stree"))','name(children/*[1])!="subscript" or (name(children/*[1])="subscript" and name(children/*[1]/children/*[1])="identifier" and name(children/*[1]/children/*[2])="number" and children/*[1]/children/*[2][@role!="mixed"] and children/*[1]/children/*[2][@role!="othernumber"])',
|
1165
|
+
"not(@embellished)");(0,sre.MathspeakFrench.defineSpecialisedRule_)("square","mathspeak.default","mathspeak.brief");(0,sre.MathspeakFrench.defineSpecialisedRule_)("square","mathspeak.default","mathspeak.sbrief");(0,sre.MathspeakFrench.defineRuleAlias_)("square","self::superscript","children/*[2]","children/*[2][text()=2]","@embellished",'children/*[1][@role="prefix operator"]');(0,sre.MathspeakFrench.defineRule_)("cube","mathspeak.default",'[n] children/*[1]; [t] "cubique"',"self::superscript","children/*[2]",
|
1166
|
+
"children/*[2][text()=3]",'name(children/*[1])!="text" or not(name(children/*[1])="text" and (name(../../../punctuated[@role="text"]/..)="stree" or name(..)="stree"))','name(children/*[1])!="subscript" or (name(children/*[1])="subscript" and name(children/*[1]/children/*[1])="identifier" and name(children/*[1]/children/*[2])="number" and children/*[1]/children/*[2][@role!="mixed"] and children/*[1]/children/*[2][@role!="othernumber"])',"not(@embellished)");(0,sre.MathspeakFrench.defineSpecialisedRule_)("cube",
|
1167
|
+
"mathspeak.default","mathspeak.brief");(0,sre.MathspeakFrench.defineSpecialisedRule_)("cube","mathspeak.default","mathspeak.sbrief");(0,sre.MathspeakFrench.defineRuleAlias_)("cube","self::superscript","children/*[2]","children/*[2][text()=3]","@embellished",'children/*[1][@role="prefix operator"]');(0,sre.MathspeakFrench.defineRule_)("prime","mathspeak.default","[n] children/*[1]; [n] children/*[2]","self::superscript","children/*[2]",'children/*[2][@role="prime"]');(0,sre.MathspeakFrench.defineSpecialisedRule_)("prime",
|
1168
|
+
"mathspeak.default","mathspeak.brief");(0,sre.MathspeakFrench.defineSpecialisedRule_)("prime","mathspeak.default","mathspeak.sbrief");(0,sre.MathspeakFrench.defineRule_)("prime-subscript","mathspeak.default","[n] children/*[1]/children/*[1]; [n] children/*[2]; [t] CSFsubscriptVerbose; [n] children/*[1]/children/*[2]","self::superscript",'children/*[2][@role="prime"]','name(children/*[1])="subscript"',"not(following-sibling::*)");(0,sre.MathspeakFrench.defineSpecialisedRule_)("prime-subscript","mathspeak.default",
|
1169
|
+
"mathspeak.brief","[n] children/*[1]/children/*[1]; [n] children/*[2]; [t] CSFsubscriptBrief; [n] children/*[1]/children/*[2]");(0,sre.MathspeakFrench.defineSpecialisedRule_)("prime-subscript","mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakFrench.defineRule_)("prime-subscript-baseline","mathspeak.default","[n] children/*[1]/children/*[1]; [n] children/*[2]; [t] CSFsubscriptVerbose; [n] children/*[1]/children/*[2]; [t] CSFbaselineVerbose","self::superscript",'children/*[2][@role="prime"]','name(children/*[1])="subscript"',
|
1170
|
+
"following-sibling::*");(0,sre.MathspeakFrench.defineSpecialisedRule_)("prime-subscript-baseline","mathspeak.default","mathspeak.brief","[n] children/*[1]/children/*[1]; [n] children/*[2]; [t] CSFsubscriptBrief; [n] children/*[1]/children/*[2]; [t] CSFbaselineBrief");(0,sre.MathspeakFrench.defineSpecialisedRule_)("prime-subscript-baseline","mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakFrench.defineRuleAlias_)("prime-subscript-baseline","self::superscript",'children/*[2][@role="prime"]','name(children/*[1])="subscript"',
|
1171
|
+
"not(following-sibling::*)","@embellished");(0,sre.MathspeakFrench.defineRule_)("prime-subscript-simple","mathspeak.brief","[n] children/*[1]/children/*[1]; [n] children/*[2];[n] children/*[1]/children/*[2]","self::superscript",'children/*[2][@role="prime"]','name(children/*[1])="subscript"','name(children/*[1]/children/*[1])="identifier"','name(children/*[1]/children/*[2])="number"','children/*[1]/children/*[2][@role!="mixed"]','children/*[1]/children/*[2][@role!="othernumber"]');(0,sre.MathspeakFrench.defineSpecialisedRule_)("prime-subscript-simple",
|
1172
|
+
"mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakFrench.defineRule_)("overscore","mathspeak.default",'[t] "suscrire"; [n] children/*[1]; [t] "avec"; [n] children/*[2]',"self::overscore",'children/*[2][@role="overaccent"]');(0,sre.MathspeakFrench.defineRule_)("double-overscore","mathspeak.default",'[t] "sus-suscrire"; [n] children/*[1]; [t] "avec"; [n] children/*[2]',"self::overscore",'children/*[2][@role="overaccent"]','name(children/*[1])="overscore"','children/*[1]/children/*[2][@role="overaccent"]');
|
1173
|
+
(0,sre.MathspeakFrench.defineRule_)("underscore","mathspeak.default",'[t] "souscrire"; [n] children/*[1]; [t] "avec"; [n] children/*[2]',"self::underscore",'children/*[2][@role="underaccent"]');(0,sre.MathspeakFrench.defineRule_)("double-underscore","mathspeak.default",'[t] "sous-souscrire"; [n] children/*[1]; [t] "avec"; [n] children/*[2]',"self::underscore",'children/*[2][@role="underaccent"]','name(children/*[1])="underscore"','children/*[1]/children/*[2][@role="underaccent"]');(0,sre.MathspeakFrench.defineRule_)("matrix-fence",
|
1174
|
+
"mathspeak.default","[n] children/*[1];","self::fenced","count(children/*)=1",'name(children/*[1])="matrix"');(0,sre.MathspeakFrench.defineRule_)("matrix","mathspeak.default",'[t] "d\u00e9but matrice"; [t] count(children/*); [t] "par";[t] count(children/*[1]/children/*); [m] children/* (ctxtFunc:CTXFordinalCounter,context:"rang\u00e9e "); [t] "fin matrice"',"self::matrix");(0,sre.MathspeakFrench.defineRule_)("matrix","mathspeak.sbrief",'[t] "matrice"; [t] count(children/*); [t] "par";[t] count(children/*[1]/children/*); [m] children/* (ctxtFunc:CTXFordinalCounter,context:"rang\u00e9e "); [t] "fin matrice"',
|
1175
|
+
"self::matrix");(0,sre.MathspeakFrench.defineRuleAlias_)("matrix","self::vector");(0,sre.MathspeakFrench.defineRule_)("matrix-row","mathspeak.default",'[m] children/* (ctxtFunc:CTXFordinalCounter,context:"colonne");[p] (pause: 200)',"self::row");(0,sre.MathspeakFrench.defineRule_)("row-with-label","mathspeak.default",'[t] "avec \u00e9tiquette"; [n] content/*[1]; [t] "fin \u00e9tiquette"(pause: 200); [m] children/* (ctxtFunc:CTXFordinalCounter,context:"colonne")',"self::row","content");(0,sre.MathspeakFrench.defineRule_)("row-with-label",
|
1176
|
+
"mathspeak.brief",'[t] "\u00e9tiquette"; [n] content/*[1]; [m] children/* (ctxtFunc:CTXFordinalCounter,context:"colonne")',"self::row","content");(0,sre.MathspeakFrench.defineSpecialisedRule_)("row-with-label","mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakFrench.defineRule_)("row-with-text-label","mathspeak.sbrief",'[t] "\u00e9tiquette"; [t] CSFRemoveParens;[m] children/* (ctxtFunc:CTXFordinalCounter,context:"colonne")',"self::row","content",'name(content/cell/children/*[1])="text"');(0,sre.MathspeakFrench.defineRule_)("empty-row",
|
1177
|
+
"mathspeak.default",'[t] "vide"',"self::row","count(children/*)=0");(0,sre.MathspeakFrench.defineRule_)("matrix-cell","mathspeak.default","[n] children/*[1]; [p] (pause: 300)","self::cell");(0,sre.MathspeakFrench.defineRule_)("empty-cell","mathspeak.default",'[t] "vide"; [p] (pause: 300)',"self::cell","count(children/*)=0");(0,sre.MathspeakFrench.defineRule_)("determinant","mathspeak.default",'[t] "d\u00e9but d\u00e9terminant"; [t] count(children/*); [t] "par";[t] count(children/*[1]/children/*); [t] ""; [m] children/* (ctxtFunc:CTXFordinalCounter,context:"rang\u00e9e "); [t] "fin d\u00e9terminant"',
|
1178
|
+
"self::matrix",'@role="determinant"');(0,sre.MathspeakFrench.defineSpecialisedRule_)("determinant","mathspeak.default","mathspeak.sbrief",'[t] "d\u00e9terminant"; [t] count(children/*); [t] "par";[t] count(children/*[1]/children/*); [m] children/* (ctxtFunc:CTXFordinalCounter,context:"rang\u00e9e "); [t] "fin d\u00e9terminant"');(0,sre.MathspeakFrench.defineRule_)("determinant-simple","mathspeak.default",'[t] "d\u00e9but d\u00e9terminant"; [t] count(children/*); [t] "par";[t] count(children/*[1]/children/*); [m] children/* (ctxtFunc:CTXFordinalCounter,context:"rang\u00e9e",grammar:simpleDet); [t] "fin d\u00e9terminant"',
|
1179
|
+
"self::matrix",'@role="determinant"',"CQFdetIsSimple");(0,sre.MathspeakFrench.defineSpecialisedRule_)("determinant-simple","mathspeak.default","mathspeak.sbrief",'[t] "d\u00e9terminant"; [t] count(children/*); [t] "par";[t] count(children/*[1]/children/*); [m] children/* (ctxtFunc:CTXFordinalCounter,context:"rang\u00e9e",grammar:simpleDet); [t] "fin d\u00e9terminant"');(0,sre.MathspeakFrench.defineRule_)("row-simple","mathspeak.default","[m] children/*;","self::row",'@role="determinant"','contains(@grammar, "simpleDet")');
|
1180
|
+
(0,sre.MathspeakFrench.defineRule_)("layout","mathspeak.default",'[t] "d\u00e9but tableau"; [m] children/* (ctxtFunc:CTXFordinalCounter,context:"rang\u00e9e "); [t] "fin tableau"',"self::table");(0,sre.MathspeakFrench.defineRule_)("layout","mathspeak.sbrief",'[t] "tableau"; [m] children/* (ctxtFunc:CTXFordinalCounter,context:"rang\u00e9e "); [t] "fin tableau"',"self::table");(0,sre.MathspeakFrench.defineRule_)("binomial","mathspeak.default",'[t] "d\u00e9but binomiale"; [n] children/*[2]/children/*[1]; [t] "parmi"; [n] children/*[1]/children/*[1]; [t] "fin binomiale"',
|
1181
|
+
"self::vector",'@role="binomial"');(0,sre.MathspeakFrench.defineRule_)("binomial","mathspeak.sbrief",'[t] "binomiale"; [n] children/*[1]/children/*[1]; [t] "parmi"; [n] children/*[2]/children/*[1]; [t] "fin binomiale"',"self::vector",'@role="binomial"');(0,sre.MathspeakFrench.defineRule_)("cases","mathspeak.default",'[t] "d\u00e9but tableau"; [n] content/*[1]; [t] "\u00e9largie";[m] children/* (ctxtFunc:CTXFordinalCounter,context:"rang\u00e9e "); [t] "fin tableau"',"self::cases");(0,sre.MathspeakFrench.defineRule_)("cases",
|
1182
|
+
"mathspeak.sbrief",'[t] "tableau"; [n] content/*[1]; [t] "\u00e9largie"; [m] children/* (ctxtFunc:CTXFordinalCounter,context:"rang\u00e9e "); [t] "fin tableau"',"self::cases");(0,sre.MathspeakFrench.defineRuleAlias_)("layout","self::multiline");(0,sre.MathspeakFrench.defineRule_)("line","mathspeak.default","[m] children/*","self::line");(0,sre.MathspeakFrench.defineRule_)("line-with-label","mathspeak.default",'[t] "avec etiquette"; [n] content/*[1]; [t] "fin etiquette" (pause: 200); [m] children/*',
|
1183
|
+
"self::line","content");(0,sre.MathspeakFrench.defineSpecialisedRule_)("line-with-label","mathspeak.default","mathspeak.brief",'[t] "etiquette"; [n] content/*[1] (pause: 200); [m] children/*');(0,sre.MathspeakFrench.defineSpecialisedRule_)("line-with-label","mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakFrench.defineRule_)("line-with-text-label","mathspeak.sbrief",'[t] "etiquette"; [t] CSFRemoveParens; [m] children/*',"self::line","content",'name(content/cell/children/*[1])="text"');(0,sre.MathspeakFrench.defineRule_)("empty-line",
|
1184
|
+
"mathspeak.default",'[t] "vide"',"self::line","count(children/*)=0","not(content)");(0,sre.MathspeakFrench.defineSpecialisedRule_)("empty-line","mathspeak.default","mathspeak.brief");(0,sre.MathspeakFrench.defineSpecialisedRule_)("empty-line","mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakFrench.defineRule_)("empty-line-with-label","mathspeak.default",'[t] "avec etiquette"; [n] content/*[1]; [t] "fin etiquette" (pause: 200); [t] "vide"',"self::line","count(children/*)=0","content");(0,sre.MathspeakFrench.defineSpecialisedRule_)("empty-line-with-label",
|
1185
|
+
"mathspeak.default","mathspeak.brief",'[t] "etiquette"; [n] content/*[1] (pause: 200); [t] "vide"');(0,sre.MathspeakFrench.defineSpecialisedRule_)("empty-line-with-label","mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakFrench.defineRule_)("enclose","mathspeak.default",'[t] "d\u00e9but enfermer en"; [t] @role (grammar:localEnclose); [n] children/*[1]; [t] "fin enfermer"',"self::enclose");(0,sre.MathspeakFrench.defineRule_)("overbar","mathspeak.default",'[t] "d\u00e9but trait suscrit"; [n] children/*[1]; [t] "fin trait suscrit"',
|
1186
|
+
"self::enclose",'@role="top"');(0,sre.MathspeakFrench.defineRule_)("underbar","mathspeak.default",'[t] "d\u00e9but trait souscrit"; [n] children/*[1]; [t] "fin trait souscrit"',"self::enclose",'@role="bottom"');(0,sre.MathspeakFrench.defineRule_)("leftbar","mathspeak.default",'[t] "barre verticale"; [n] children/*[1]',"self::enclose",'@role="left"');(0,sre.MathspeakFrench.defineRule_)("rightbar","mathspeak.default",'[n] children/*[1]; [t] "barre verticale"',"self::enclose",'@role="right"');(0,sre.MathspeakFrench.defineRule_)("crossout",
|
1187
|
+
"mathspeak.default",'[t] "d\u00e9but biff\u00e9"; [n] children/*[1]; [t] "fin biff\u00e9"',"self::enclose",'@role="updiagonalstrike" or @role="downdiagonalstrike" or @role="horizontalstrike"');(0,sre.MathspeakFrench.defineRule_)("cancel","mathspeak.default",'[t] "d\u00e9but biff\u00e9"; [n] children/*[1]/children/*[1]; [t] "avec"; [n] children/*[2]; [t] "fin biff\u00e9"',"self::overscore",'@role="updiagonalstrike" or @role="downdiagonalstrike" or @role="horizontalstrike"');(0,sre.MathspeakFrench.defineSpecialisedRule_)("cancel",
|
1188
|
+
"mathspeak.default","mathspeak.brief");(0,sre.MathspeakFrench.defineSpecialisedRule_)("cancel","mathspeak.default","mathspeak.sbrief");(0,sre.MathspeakFrench.defineRuleAlias_)("cancel","self::underscore",'@role="updiagonalstrike" or @role="downdiagonalstrike" or @role="horizontalstrike"');(0,sre.MathspeakFrench.defineRule_)("cancel-reverse","mathspeak.default",'[t] "d\u00e9but biff\u00e9"; [n] children/*[2]/children/*[1]; [t] "avec"; [n] children/*[1]; [t] "fin biff\u00e9"',"self::overscore",'name(children/*[2])="enclose"',
|
1189
|
+
'children/*[2][@role="updiagonalstrike" or @role="downdiagonalstrike" or @role="horizontalstrike"]');(0,sre.MathspeakFrench.defineSpecialisedRule_)("cancel-reverse","mathspeak.default","mathspeak.brief");(0,sre.MathspeakFrench.defineSpecialisedRule_)("cancel-reverse","mathspeak.default","mathspeak.sbrief");(0,sre.MathspeakFrench.defineRuleAlias_)("cancel-reverse","self::underscore",'name(children/*[2])="enclose"','children/*[2][@role="updiagonalstrike" or @role="downdiagonalstrike" or @role="horizontalstrike"]');
|
1190
|
+
(0,sre.MathspeakFrench.defineRule_)("end-punct","mathspeak.default","[m] children/*","self::punctuated",'@role="endpunct"');(0,sre.MathspeakFrench.defineRule_)("start-punct","mathspeak.default","[n] content/*[1]; [m] children/*[position()>1]","self::punctuated",'@role="startpunct"');(0,sre.MathspeakFrench.defineRule_)("integral-punct","mathspeak.default","[n] children/*[1]; [n] children/*[3]","self::punctuated",'@role="integral"');(0,sre.MathspeakFrench.defineRule_)("punctuated","mathspeak.default",
|
1191
|
+
"[m] children/*","self::punctuated");(0,sre.MathspeakFrench.defineRule_)("unit","mathspeak.default",'[t] text() (grammar:annotation="unit":translate)',"self::identifier",'@role="unit"');(0,sre.MathspeakFrench.defineRule_)("unit-square","mathspeak.default",'[t] "au carr\u00e9"; [n] children/*[1]',"self::superscript",'@role="unit"',"children/*[2][text()=2]",'name(children/*[1])="identifier"');(0,sre.MathspeakFrench.defineRule_)("unit-cubic","mathspeak.default",'[t] "cubique"; [n] children/*[1]',"self::superscript",
|
1192
|
+
'@role="unit"',"children/*[2][text()=3]",'name(children/*[1])="identifier"');(0,sre.MathspeakFrench.defineRule_)("reciprocal","mathspeak.default",'[t] "r\u00e9ciproque"; [n] children/*[1]',"self::superscript",'@role="unit"','name(children/*[1])="identifier"','name(children/*[2])="prefixop"','children/*[2][@role="negative"]',"children/*[2]/children/*[1][text()=1]",'count(preceding-sibling::*)=0 or preceding-sibling::*[@role!="unit"]');(0,sre.MathspeakFrench.defineRule_)("reciprocal","mathspeak.default",
|
1193
|
+
'[t] "par"; [n] children/*[1]',"self::superscript",'@role="unit"','name(children/*[1])="identifier"','name(children/*[2])="prefixop"','children/*[2][@role="negative"]',"children/*[2]/children/*[1][text()=1]",'preceding-sibling::*[@role="unit"]');(0,sre.MathspeakFrench.defineRule_)("unit-combine","mathspeak.default","[m] children/*","self::infixop",'@role="unit"');(0,sre.MathspeakFrench.defineRule_)("unit-divide","mathspeak.default",'[n] children/*[1]; [t] "par"; [n] children/*[2]',"self::fraction",
|
1194
|
+
'@role="unit"')};sre.MathspeakFrench.generateTensorRules_=function(){sre.MathspeakUtil.generateTensorRules(sre.MathspeakFrench.mathStore)};sre.MathspeakFrench.getInstance().initializer=[sre.MathspeakFrench.initCustomFunctions_,sre.MathspeakFrench.initMathspeakFrench_,sre.MathspeakFrench.generateTensorRules_];sre.MathspeakRules=function(){sre.MathStore.call(this)};goog.inherits(sre.MathspeakRules,sre.MathStore);goog.addSingletonGetter(sre.MathspeakRules);sre.MathspeakRules.mathStore=sre.MathspeakRules.getInstance();sre.MathspeakRules.defineRule_=goog.bind(sre.MathspeakRules.mathStore.defineRule,sre.MathspeakRules.mathStore);sre.MathspeakRules.defineRuleAlias_=goog.bind(sre.MathspeakRules.mathStore.defineRulesAlias,sre.MathspeakRules.mathStore);
|
1195
|
+
sre.MathspeakRules.defineSpecialisedRule_=goog.bind(sre.MathspeakRules.mathStore.defineSpecialisedRule,sre.MathspeakRules.mathStore);sre.MathspeakRules.addContextFunction_=goog.bind(sre.MathspeakRules.mathStore.contextFunctions.add,sre.MathspeakRules.mathStore.contextFunctions);sre.MathspeakRules.addCustomQuery_=goog.bind(sre.MathspeakRules.mathStore.customQueries.add,sre.MathspeakRules.mathStore.customQueries);
|
1196
|
+
sre.MathspeakRules.addCustomString_=goog.bind(sre.MathspeakRules.mathStore.customStrings.add,sre.MathspeakRules.mathStore.customStrings);
|
1197
|
+
sre.MathspeakRules.initCustomFunctions_=function(){(0,sre.MathspeakRules.addCustomQuery_)("CQFspaceoutNumber",sre.MathspeakUtil.spaceoutNumber);(0,sre.MathspeakRules.addCustomQuery_)("CQFspaceoutIdentifier",sre.MathspeakUtil.spaceoutIdentifier);(0,sre.MathspeakRules.addCustomString_)("CSFspaceoutText",sre.MathspeakUtil.spaceoutText);(0,sre.MathspeakRules.addCustomString_)("CSFopenFracVerbose",sre.MathspeakUtil.openingFractionVerbose);(0,sre.MathspeakRules.addCustomString_)("CSFcloseFracVerbose",sre.MathspeakUtil.closingFractionVerbose);
|
1198
|
+
(0,sre.MathspeakRules.addCustomString_)("CSFoverFracVerbose",sre.MathspeakUtil.overFractionVerbose);(0,sre.MathspeakRules.addCustomString_)("CSFopenFracBrief",sre.MathspeakUtil.openingFractionBrief);(0,sre.MathspeakRules.addCustomString_)("CSFcloseFracBrief",sre.MathspeakUtil.closingFractionBrief);(0,sre.MathspeakRules.addCustomString_)("CSFopenFracSbrief",sre.MathspeakUtil.openingFractionSbrief);(0,sre.MathspeakRules.addCustomString_)("CSFcloseFracSbrief",sre.MathspeakUtil.closingFractionSbrief);
|
1199
|
+
(0,sre.MathspeakRules.addCustomString_)("CSFoverFracSbrief",sre.MathspeakUtil.overFractionSbrief);(0,sre.MathspeakRules.addCustomString_)("CSFvulgarFraction",sre.NumbersUtil.vulgarFraction);(0,sre.MathspeakRules.addCustomQuery_)("CQFvulgarFractionSmall",sre.MathspeakUtil.isSmallVulgarFraction);(0,sre.MathspeakRules.addCustomString_)("CSFopenRadicalVerbose",sre.MathspeakUtil.openingRadicalVerbose);(0,sre.MathspeakRules.addCustomString_)("CSFcloseRadicalVerbose",sre.MathspeakUtil.closingRadicalVerbose);
|
1200
|
+
(0,sre.MathspeakRules.addCustomString_)("CSFindexRadicalVerbose",sre.MathspeakUtil.indexRadicalVerbose);(0,sre.MathspeakRules.addCustomString_)("CSFopenRadicalBrief",sre.MathspeakUtil.openingRadicalBrief);(0,sre.MathspeakRules.addCustomString_)("CSFcloseRadicalBrief",sre.MathspeakUtil.closingRadicalBrief);(0,sre.MathspeakRules.addCustomString_)("CSFindexRadicalBrief",sre.MathspeakUtil.indexRadicalBrief);(0,sre.MathspeakRules.addCustomString_)("CSFopenRadicalSbrief",sre.MathspeakUtil.openingRadicalSbrief);
|
1201
|
+
(0,sre.MathspeakRules.addCustomString_)("CSFindexRadicalSbrief",sre.MathspeakUtil.indexRadicalSbrief);(0,sre.MathspeakRules.addCustomString_)("CSFsuperscriptVerbose",sre.MathspeakUtil.superscriptVerbose);(0,sre.MathspeakRules.addCustomString_)("CSFsuperscriptBrief",sre.MathspeakUtil.superscriptBrief);(0,sre.MathspeakRules.addCustomString_)("CSFsubscriptVerbose",sre.MathspeakUtil.subscriptVerbose);(0,sre.MathspeakRules.addCustomString_)("CSFsubscriptBrief",sre.MathspeakUtil.subscriptBrief);(0,sre.MathspeakRules.addCustomString_)("CSFbaselineVerbose",
|
1202
|
+
sre.MathspeakUtil.baselineVerbose);(0,sre.MathspeakRules.addCustomString_)("CSFbaselineBrief",sre.MathspeakUtil.baselineBrief);(0,sre.MathspeakRules.addCustomString_)("CSFleftsuperscriptVerbose",sre.MathspeakUtil.superscriptVerbose);(0,sre.MathspeakRules.addCustomString_)("CSFleftsubscriptVerbose",sre.MathspeakUtil.subscriptVerbose);(0,sre.MathspeakRules.addCustomString_)("CSFrightsuperscriptVerbose",sre.MathspeakUtil.superscriptVerbose);(0,sre.MathspeakRules.addCustomString_)("CSFrightsubscriptVerbose",
|
1203
|
+
sre.MathspeakUtil.subscriptVerbose);(0,sre.MathspeakRules.addCustomString_)("CSFleftsuperscriptBrief",sre.MathspeakUtil.superscriptBrief);(0,sre.MathspeakRules.addCustomString_)("CSFleftsubscriptBrief",sre.MathspeakUtil.subscriptBrief);(0,sre.MathspeakRules.addCustomString_)("CSFrightsuperscriptBrief",sre.MathspeakUtil.superscriptBrief);(0,sre.MathspeakRules.addCustomString_)("CSFrightsubscriptBrief",sre.MathspeakUtil.subscriptBrief);(0,sre.MathspeakRules.addCustomString_)("CSFunderscript",sre.MathspeakUtil.nestedUnderscore);
|
1204
|
+
(0,sre.MathspeakRules.addCustomString_)("CSFoverscript",sre.MathspeakUtil.nestedOverscore);(0,sre.MathspeakRules.addContextFunction_)("CTXFordinalCounter",sre.NumbersUtil.ordinalCounter);(0,sre.MathspeakRules.addContextFunction_)("CTXFcontentIterator",sre.MathmlStoreUtil.contentIterator);(0,sre.MathspeakRules.addCustomQuery_)("CQFdetIsSimple",sre.MathspeakUtil.determinantIsSimple);(0,sre.MathspeakRules.addCustomString_)("CSFRemoveParens",sre.MathspeakUtil.removeParens);(0,sre.MathspeakRules.addCustomQuery_)("CQFresetNesting",
|
1205
|
+
sre.MathspeakUtil.resetNestingDepth)};
|
1206
|
+
sre.MathspeakRules.initMathspeakRules_=function(){(0,sre.MathspeakRules.defineRule_)("collapsed","mathspeak.default",'[t] "collapsed"; [n] . (engine:modality=summary,grammar:collapsed)',"self::*","@alternative",'not(contains(@grammar, "collapsed"))',"self::*","self::*","self::*","self::*","self::*");(0,sre.MathspeakRules.defineSpecialisedRule_)("collapsed","mathspeak.default","mathspeak.brief");(0,sre.MathspeakRules.defineSpecialisedRule_)("collapsed","mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakRules.defineRule_)("stree",
|
1207
|
+
"mathspeak.default","[n] ./*[1]","self::stree","CQFresetNesting");(0,sre.MathspeakRules.defineRule_)("unknown","mathspeak.default","[n] text()","self::unknown");(0,sre.MathspeakRules.defineRule_)("protected","mathspeak.default","[t] text()","self::number",'contains(@grammar, "protected")');(0,sre.MathspeakRules.defineRule_)("omit-empty","mathspeak.default","[p] (pause:100)","self::empty");(0,sre.MathspeakRules.defineRule_)("blank-empty","mathspeak.default",'[t] "Blank"',"self::empty","count(../*)=1",
|
1208
|
+
'name(../..)="cell" or name(../..)="line"');(0,sre.MathspeakRules.defineRule_)("font","mathspeak.default","[t] @font (grammar:localFont); [n] . (grammar:ignoreFont=@font)","self::*","@font",'not(contains(@grammar, "ignoreFont"))','@font!="normal"');(0,sre.MathspeakRules.defineRule_)("font-identifier-short","mathspeak.default","[t] @font (grammar:localFont); [n] . (grammar:ignoreFont=@font)","self::identifier","string-length(text())=1","@font",'not(contains(@grammar, "ignoreFont"))','@font="normal"',
|
1209
|
+
'""=translate(text(), "abcdefghijklmnopqrstuvwxyz\u03b1\u03b2\u03b3\u03b4\u03b5\u03b6\u03b7\u03b8\u03b9\u03ba\u03bb\u03bc\u03bd\u03be\u03bf\u03c0\u03c1\u03c2\u03c3\u03c4\u03c5\u03c6\u03c7\u03c8\u03c9ABCDEFGHIJKLMNOPQRSTUVWXYZ\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039a\u039b\u039c\u039d\u039e\u039f\u03a0\u03a1\u03a3\u03a3\u03a4\u03a5\u03a6\u03a7\u03a8\u03a9", "")','@role!="unit"');(0,sre.MathspeakRules.defineRule_)("font-identifier","mathspeak.default","[t] @font (grammar:localFont); [n] . (grammar:ignoreFont=@font)",
|
1210
|
+
"self::identifier","string-length(text())=1","@font",'@font="normal"','not(contains(@grammar, "ignoreFont"))','@role!="unit"');(0,sre.MathspeakRules.defineRule_)("omit-font","mathspeak.default","[n] . (grammar:ignoreFont=@font)","self::identifier","string-length(text())=1","@font",'not(contains(@grammar, "ignoreFont"))','@font="italic"');(0,sre.MathspeakRules.defineRule_)("german-font","mathspeak.default",'[t] "German"; [n] . (grammar:ignoreFont=@font)',"self::*","@font",'not(contains(@grammar, "ignoreFont"))',
|
1211
|
+
'@font="fraktur"');(0,sre.MathspeakRules.defineRule_)("german-font","mathspeak.default",'[t] "bold German"; [n] . (grammar:ignoreFont=@font)',"self::*","@font",'not(contains(@grammar, "ignoreFont"))','@font="bold-fraktur"');(0,sre.MathspeakRules.defineRule_)("number","mathspeak.default","[n] text()","self::number");(0,sre.MathspeakRules.defineRule_)("mixed-number","mathspeak.default",'[n] children/*[1]; [t] "and"; [n] children/*[2]; ',"self::number",'@role="mixed"');(0,sre.MathspeakRules.defineRule_)("number-with-chars",
|
1212
|
+
"mathspeak.default",'[t] "Number"; [m] CQFspaceoutNumber (grammar:protected)',"self::number",'@role="othernumber"','"" != translate(text(), "0123456789.,", "")','not(contains(@grammar, "protected"))');(0,sre.MathspeakRules.defineSpecialisedRule_)("number-with-chars","mathspeak.default","mathspeak.brief",'[t] "Num"; [m] CQFspaceoutNumber (grammar:protected)');(0,sre.MathspeakRules.defineSpecialisedRule_)("number-with-chars","mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakRules.defineRule_)("number-as-upper-word",
|
1213
|
+
"mathspeak.default",'[t] "UpperWord"; [t] CSFspaceoutText',"self::number","string-length(text())>1",'text()=translate(text(), "abcdefghijklmnopqrstuvwxyz\u03b1\u03b2\u03b3\u03b4\u03b5\u03b6\u03b7\u03b8\u03b9\u03ba\u03bb\u03bc\u03bd\u03be\u03bf\u03c0\u03c1\u03c2\u03c3\u03c4\u03c5\u03c6\u03c7\u03c8\u03c9", "ABCDEFGHIJKLMNOPQRSTUVWXYZ\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039a\u039b\u039c\u039d\u039e\u039f\u03a0\u03a1\u03a3\u03a3\u03a4\u03a5\u03a6\u03a7\u03a8\u03a9")','""=translate(text(), "ABCDEFGHIJKLMNOPQRSTUVWXYZ\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039a\u039b\u039c\u039d\u039e\u039f\u03a0\u03a1\u03a3\u03a3\u03a4\u03a5\u03a6\u03a7\u03a8\u03a9","")');
|
1214
|
+
(0,sre.MathspeakRules.defineSpecialisedRule_)("number-as-upper-word","mathspeak.default","mathspeak.brief");(0,sre.MathspeakRules.defineSpecialisedRule_)("number-as-upper-word","mathspeak.default","mathspeak.sbrief");(0,sre.MathspeakRules.defineRule_)("number-baseline","mathspeak.default",'[t] "Baseline"; [n] . (grammar:baseline)',"self::number",'not(contains(@grammar, "ignoreFont"))',"preceding-sibling::identifier",'not(contains(@grammar, "baseline"))','preceding-sibling::*[1][@role="latinletter" or @role="greekletter" or @role="otherletter"]',
|
1215
|
+
'parent::*/parent::infixop[@role="implicit"]');(0,sre.MathspeakRules.defineSpecialisedRule_)("number-baseline","mathspeak.default","mathspeak.brief",'[t] "Base"; [n] . (grammar:baseline)');(0,sre.MathspeakRules.defineSpecialisedRule_)("number-baseline","mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakRules.defineRule_)("number-baseline-font","mathspeak.default",'[t] "Baseline"; [t] @font; [n] . (grammar:ignoreFont=@font)',"self::number","@font",'not(contains(@grammar, "ignoreFont"))','@font!="normal"',
|
1216
|
+
"preceding-sibling::identifier",'preceding-sibling::*[@role="latinletter" or @role="greekletter" or @role="otherletter"]','parent::*/parent::infixop[@role="implicit"]');(0,sre.MathspeakRules.defineSpecialisedRule_)("number-baseline-font","mathspeak.default","mathspeak.brief",'[t] "Base"; [t] @font; [n] . (grammar:ignoreFont=@font)');(0,sre.MathspeakRules.defineSpecialisedRule_)("number-baseline-font","mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakRules.defineRule_)("identifier","mathspeak.default",
|
1217
|
+
"[m] CQFspaceoutIdentifier","self::identifier","string-length(text())>1",'@role!="unit"','not(@font) or @font="normal" or contains(@grammar, "ignoreFont")','text()!=translate(text(), "abcdefghijklmnopqrstuvwxyz\u03b1\u03b2\u03b3\u03b4\u03b5\u03b6\u03b7\u03b8\u03b9\u03ba\u03bb\u03bc\u03bd\u03be\u03bf\u03c0\u03c1\u03c2\u03c3\u03c4\u03c5\u03c6\u03c7\u03c8\u03c9ABCDEFGHIJKLMNOPQRSTUVWXYZ\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039a\u039b\u039c\u039d\u039e\u039f\u03a0\u03a1\u03a3\u03a3\u03a4\u03a5\u03a6\u03a7\u03a8\u03a9", "")');
|
1218
|
+
(0,sre.MathspeakRules.defineRule_)("identifier","mathspeak.default","[n] text()","self::identifier");(0,sre.MathspeakRules.defineRule_)("negative","mathspeak.default",'[t] "negative"; [n] children/*[1]',"self::prefixop",'@role="negative"',"children/identifier");(0,sre.MathspeakRules.defineRuleAlias_)("negative","self::prefixop",'@role="negative"',"children/number");(0,sre.MathspeakRules.defineRuleAlias_)("negative","self::prefixop",'@role="negative"','children/fraction[@role="vulgar"]');(0,sre.MathspeakRules.defineRule_)("negative",
|
1219
|
+
"mathspeak.default",'[t] "minus"; [n] children/*[1]',"self::prefixop",'@role="negative"');(0,sre.MathspeakRules.defineRule_)("prefix","mathspeak.default","[m] content/*; [n] children/*[1]","self::prefixop");(0,sre.MathspeakRules.defineRule_)("postfix","mathspeak.default","[n] children/*[1]; [m] content/*","self::postfixop");(0,sre.MathspeakRules.defineRule_)("binary-operation","mathspeak.default","[m] children/* (sepFunc:CTXFcontentIterator);","self::infixop");(0,sre.MathspeakRules.defineRule_)("implicit",
|
1220
|
+
"mathspeak.default","[m] children/*","self::infixop",'@role="implicit"');(0,sre.MathspeakRules.defineRuleAlias_)("implicit","self::infixop",'@role="leftsuper" or @role="leftsub" or @role="rightsuper" or @role="rightsub"');(0,sre.MathspeakRules.defineRule_)("subtraction","mathspeak.default",'[m] children/* (separator:"minus");',"self::infixop",'@role="subtraction"');(0,sre.MathspeakRules.defineRule_)("function-unknown","mathspeak.default","[n] children/*[1]; [n] children/*[2]","self::appl");(0,sre.MathspeakRules.defineRule_)("function-prefix",
|
1221
|
+
"mathspeak.default","[n] children/*[1]; [n] children/*[2]","self::appl",'children/*[1][@role="prefix function"]');(0,sre.MathspeakRules.defineRule_)("fences-open-close","mathspeak.default","[n] content/*[1]; [n] children/*[1]; [n] content/*[2]","self::fenced",'@role="leftright"');(0,sre.MathspeakRules.defineRule_)("fences-neutral","mathspeak.default",'[t] "StartAbsoluteValue"; [n] children/*[1]; [t] "EndAbsoluteValue"',"self::fenced",'@role="neutral"','content/*[1][text()]="|" or content/*[1][text()]="\u2758" or content/*[1][text()]="\uff5c"');
|
1222
|
+
(0,sre.MathspeakRules.defineSpecialisedRule_)("fences-neutral","mathspeak.default","mathspeak.sbrief",'[t] "AbsoluteValue"; [n] children/*[1]; [t] "EndAbsoluteValue"');(0,sre.MathspeakRules.defineRule_)("fences-neutral","mathspeak.default","[n] content/*[1]; [n] children/*[1]; [n] content/*[2]","self::fenced",'@role="neutral"');(0,sre.MathspeakRules.defineRule_)("fences-set","mathspeak.default",'[t] "StartSet"; [n] children/*[1]; [t] "EndSet"',"self::fenced",'@role="set empty" or @role="set extended" or @role="set singleton" or @role="set collection"',
|
1223
|
+
'not(name(../..)="appl")');(0,sre.MathspeakRules.defineSpecialisedRule_)("fences-set","mathspeak.default","mathspeak.sbrief",'[t] "Set"; [n] children/*[1]; [t] "EndSet"');(0,sre.MathspeakRules.defineRule_)("text","mathspeak.default","[n] text()","self::text");(0,sre.MathspeakRules.defineRule_)("factorial","mathspeak.default",'[t] "factorial"',"self::punctuation",'text()="!"','name(preceding-sibling::*[1])!="text"');(0,sre.MathspeakRules.defineRule_)("minus","mathspeak.default",'[t] "minus"',"self::operator",
|
1224
|
+
'text()="-"');(0,sre.MathspeakRules.defineRule_)("single-prime","mathspeak.default",'[t] "prime"',"self::punctuated",'@role="prime"',"count(children/*)=1");(0,sre.MathspeakRules.defineRule_)("double-prime","mathspeak.default",'[t] "double prime"',"self::punctuated",'@role="prime"',"count(children/*)=2");(0,sre.MathspeakRules.defineRule_)("triple-prime","mathspeak.default",'[t] "triple prime"',"self::punctuated",'@role="prime"',"count(children/*)=3");(0,sre.MathspeakRules.defineRule_)("quadruple-prime",
|
1225
|
+
"mathspeak.default",'[t] "quadruple prime"',"self::punctuated",'@role="prime"',"count(children/*)=4");(0,sre.MathspeakRules.defineRule_)("counted-prime","mathspeak.default",'[t] count(children/*); [t] "prime"',"self::punctuated",'@role="prime"');(0,sre.MathspeakRules.defineRule_)("fraction","mathspeak.default","[t] CSFopenFracVerbose; [n] children/*[1]; [t] CSFoverFracVerbose; [n] children/*[2]; [t] CSFcloseFracVerbose","self::fraction");(0,sre.MathspeakRules.defineRule_)("fraction","mathspeak.brief",
|
1226
|
+
"[t] CSFopenFracBrief; [n] children/*[1]; [t] CSFoverFracVerbose; [n] children/*[2]; [t] CSFcloseFracBrief","self::fraction");(0,sre.MathspeakRules.defineRule_)("fraction","mathspeak.sbrief","[t] CSFopenFracSbrief; [n] children/*[1]; [t] CSFoverFracSbrief; [n] children/*[2]; [t] CSFcloseFracSbrief","self::fraction");(0,sre.MathspeakRules.defineRule_)("vulgar-fraction","mathspeak.default","[t] CSFvulgarFraction","self::fraction",'@role="vulgar"',"CQFvulgarFractionSmall");(0,sre.MathspeakRules.defineSpecialisedRule_)("vulgar-fraction",
|
1227
|
+
"mathspeak.default","mathspeak.brief");(0,sre.MathspeakRules.defineSpecialisedRule_)("vulgar-fraction","mathspeak.default","mathspeak.sbrief");(0,sre.MathspeakRules.defineRule_)("continued-fraction-outer","mathspeak.default",'[t] "ContinuedFraction"; [n] children/*[1];[t] "Over"; [n] children/*[2]',"self::fraction","not(ancestor::fraction)",'children/*[2]/descendant-or-self::*[@role="ellipsis" and not(following-sibling::*)]');(0,sre.MathspeakRules.defineSpecialisedRule_)("continued-fraction-outer",
|
1228
|
+
"mathspeak.default","mathspeak.brief",'[t] "ContinuedFrac"; [n] children/*[1];[t] "Over"; [n] children/*[2]');(0,sre.MathspeakRules.defineSpecialisedRule_)("continued-fraction-outer","mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakRules.defineRule_)("continued-fraction-inner","mathspeak.default",'[t] "StartFraction"; [n] children/*[1];[t] "Over"; [n] children/*[2]',"self::fraction","ancestor::fraction",'children/*[2]/descendant-or-self::*[@role="ellipsis" and not(following-sibling::*)]');(0,sre.MathspeakRules.defineSpecialisedRule_)("continued-fraction-inner",
|
1229
|
+
"mathspeak.default","mathspeak.brief",'[t] "StartFrac"; [n] children/*[1];[t] "Over"; [n] children/*[2]');(0,sre.MathspeakRules.defineSpecialisedRule_)("continued-fraction-inner","mathspeak.brief","mathspeak.sbrief",'[t] "Frac"; [n] children/*[1];[t] "Over"; [n] children/*[2]');(0,sre.MathspeakRules.defineRule_)("sqrt","mathspeak.default","[t] CSFopenRadicalVerbose; [n] children/*[1]; [t] CSFcloseRadicalVerbose","self::sqrt");(0,sre.MathspeakRules.defineRule_)("sqrt","mathspeak.brief","[t] CSFopenRadicalBrief; [n] children/*[1]; [t] CSFcloseRadicalBrief",
|
1230
|
+
"self::sqrt");(0,sre.MathspeakRules.defineRule_)("sqrt","mathspeak.sbrief","[t] CSFopenRadicalSbrief; [n] children/*[1]; [t] CSFcloseRadicalBrief","self::sqrt");(0,sre.MathspeakRules.defineRule_)("root","mathspeak.default","[t] CSFindexRadicalVerbose; [n] children/*[1];[t] CSFopenRadicalVerbose; [n] children/*[2]; [t] CSFcloseRadicalVerbose","self::root");(0,sre.MathspeakRules.defineRule_)("root","mathspeak.brief","[t] CSFindexRadicalBrief; [n] children/*[1];[t] CSFopenRadicalBrief; [n] children/*[2]; [t] CSFcloseRadicalBrief",
|
1231
|
+
"self::root");(0,sre.MathspeakRules.defineRule_)("root","mathspeak.sbrief","[t] CSFindexRadicalSbrief; [n] children/*[1];[t] CSFopenRadicalSbrief; [n] children/*[2]; [t] CSFcloseRadicalBrief","self::root");(0,sre.MathspeakRules.defineRule_)("limboth","mathspeak.default","[n] children/*[1]; [t] CSFunderscript; [n] children/*[2];[t] CSFoverscript; [n] children/*[3]","self::limboth",'name(../..)="underscore" or name(../..)="overscore"','following-sibling::*[@role!="underaccent" and @role!="overaccent"]');
|
1232
|
+
(0,sre.MathspeakRules.defineRule_)("limlower","mathspeak.default","[n] children/*[1]; [t] CSFunderscript; [n] children/*[2];","self::limlower",'name(../..)="underscore" or name(../..)="overscore"','following-sibling::*[@role!="underaccent" and @role!="overaccent"]');(0,sre.MathspeakRules.defineRule_)("limupper","mathspeak.default","[n] children/*[1]; [t] CSFoverscript; [n] children/*[2];","self::limupper",'name(../..)="underscore" or name(../..)="overscore"','following-sibling::*[@role!="underaccent" and @role!="overaccent"]');
|
1233
|
+
(0,sre.MathspeakRules.defineRuleAlias_)("limlower","self::underscore",'@role="limit function"','name(../..)="underscore" or name(../..)="overscore"','following-sibling::*[@role!="underaccent" and @role!="overaccent"]');(0,sre.MathspeakRules.defineRuleAlias_)("limlower","self::underscore",'children/*[2][@role!="underaccent"]','name(../..)="underscore" or name(../..)="overscore"','following-sibling::*[@role!="underaccent" and @role!="overaccent"]');(0,sre.MathspeakRules.defineRuleAlias_)("limupper",
|
1234
|
+
"self::overscore",'children/*[2][@role!="overaccent"]','name(../..)="underscore" or name(../..)="overscore"','following-sibling::*[@role!="underaccent" and @role!="overaccent"]');(0,sre.MathspeakRules.defineRule_)("limboth-end","mathspeak.default",'[n] children/*[1]; [t] CSFunderscript; [n] children/*[2];[t] CSFoverscript; [n] children/*[3]; [t] "Endscripts"',"self::limboth");(0,sre.MathspeakRules.defineRule_)("limlower-end","mathspeak.default",'[n] children/*[1]; [t] CSFunderscript; [n] children/*[2]; [t] "Endscripts"',
|
1235
|
+
"self::limlower");(0,sre.MathspeakRules.defineRule_)("limupper-end","mathspeak.default",'[n] children/*[1]; [t] CSFoverscript; [n] children/*[2]; [t] "Endscripts"',"self::limupper");(0,sre.MathspeakRules.defineRuleAlias_)("limlower-end","self::underscore",'@role="limit function"');(0,sre.MathspeakRules.defineRuleAlias_)("limlower-end","self::underscore");(0,sre.MathspeakRules.defineRuleAlias_)("limupper-end","self::overscore");(0,sre.MathspeakRules.defineRule_)("integral","mathspeak.default","[n] children/*[1]; [n] children/*[2]; [n] children/*[3];",
|
1236
|
+
"self::integral");(0,sre.MathspeakRules.defineRule_)("integral","mathspeak.default",'[n] children/*[1]; [t] "Subscript"; [n] children/*[2];[t] "Superscript"; [n] children/*[3]; [t] "Baseline";',"self::limboth",'@role="integral"');(0,sre.MathspeakRules.defineSpecialisedRule_)("integral","mathspeak.default","mathspeak.brief",'[n] children/*[1]; [t] "Sub"; [n] children/*[2];[t] "Sup"; [n] children/*[3]; [t] "Base";');(0,sre.MathspeakRules.defineSpecialisedRule_)("integral","mathspeak.brief","mathspeak.sbrief");
|
1237
|
+
(0,sre.MathspeakRules.defineRule_)("bigop","mathspeak.default","[n] children/*[1]; [n] children/*[2];","self::bigop");(0,sre.MathspeakRules.defineRule_)("relseq","mathspeak.default","[m] children/* (sepFunc:CTXFcontentIterator)","self::relseq");(0,sre.MathspeakRules.defineRule_)("equality","mathspeak.default","[n] children/*[1]; [n] content/*[1]; [n] children/*[2]","self::relseq",'@role="equality"',"count(./children/*)=2");(0,sre.MathspeakRules.defineRule_)("multi-equality","mathspeak.default","[m] children/* (sepFunc:CTXFcontentIterator)",
|
1238
|
+
"self::relseq",'@role="equality"',"count(./children/*)>2");(0,sre.MathspeakRules.defineRule_)("multrel","mathspeak.default","[m] children/* (sepFunc:CTXFcontentIterator)","self::multirel");(0,sre.MathspeakRules.defineRule_)("subscript","mathspeak.default","[n] children/*[1]; [t] CSFsubscriptVerbose; [n] children/*[2]","self::subscript");(0,sre.MathspeakRules.defineRule_)("subscript","mathspeak.brief","[n] children/*[1]; [t] CSFsubscriptBrief; [n] children/*[2]","self::subscript");(0,sre.MathspeakRules.defineSpecialisedRule_)("subscript",
|
1239
|
+
"mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakRules.defineRule_)("subscript-simple","mathspeak.default","[n] children/*[1]; [n] children/*[2]","self::subscript",'name(./children/*[1])="identifier"','name(./children/*[2])="number"','./children/*[2][@role!="mixed"]','./children/*[2][@role!="othernumber"]');(0,sre.MathspeakRules.defineSpecialisedRule_)("subscript-simple","mathspeak.default","mathspeak.brief");(0,sre.MathspeakRules.defineSpecialisedRule_)("subscript-simple","mathspeak.default",
|
1240
|
+
"mathspeak.sbrief");(0,sre.MathspeakRules.defineRule_)("subscript-baseline","mathspeak.default","[n] children/*[1]; [t] CSFsubscriptVerbose; [n] children/*[2]; [t] CSFbaselineVerbose","self::subscript","following-sibling::*",'not(name(following-sibling::subscript/children/*[1])="empty" or (name(following-sibling::infixop[@role="implicit"]/children/*[1])="subscript" and name(following-sibling::*/children/*[1]/children/*[1])="empty")) and @role!="subsup"','not(following-sibling::*[@role="rightsuper" or @role="rightsub" or @role="leftsub" or @role="leftsub"])');
|
1241
|
+
(0,sre.MathspeakRules.defineSpecialisedRule_)("subscript-baseline","mathspeak.default","mathspeak.brief","[n] children/*[1]; [t] CSFsubscriptBrief; [n] children/*[2]; [t] CSFbaselineBrief");(0,sre.MathspeakRules.defineSpecialisedRule_)("subscript-baseline","mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakRules.defineRuleAlias_)("subscript-baseline","self::subscript","not(following-sibling::*)","ancestor::fenced|ancestor::root|ancestor::sqrt|ancestor::punctuated|ancestor::fraction",'not(ancestor::punctuated[@role="leftsuper" or @role="rightsub" or @role="rightsuper" or @role="rightsub"])');
|
1242
|
+
(0,sre.MathspeakRules.defineRuleAlias_)("subscript-baseline","self::subscript","not(following-sibling::*)","ancestor::relseq|ancestor::multirel",sre.MathspeakUtil.generateBaselineConstraint());(0,sre.MathspeakRules.defineRuleAlias_)("subscript-baseline","self::subscript","not(following-sibling::*)","@embellished");(0,sre.MathspeakRules.defineRule_)("subscript-empty-sup","mathspeak.default","[n] children/*[1]; [n] children/*[2]","self::subscript",'name(children/*[2])="infixop"','name(children/*[2][@role="implicit"]/children/*[1])="superscript"',
|
1243
|
+
'name(children/*[2]/children/*[1]/children/*[1])="empty"');(0,sre.MathspeakRules.defineSpecialisedRule_)("subscript-empty-sup","mathspeak.default","mathspeak.brief");(0,sre.MathspeakRules.defineSpecialisedRule_)("subscript-empty-sup","mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakRules.defineRuleAlias_)("subscript-empty-sup","self::subscript",'name(children/*[2])="superscript"','name(children/*[2]/children/*[1])="empty"');(0,sre.MathspeakRules.defineRule_)("superscript","mathspeak.default",
|
1244
|
+
"[n] children/*[1]; [t] CSFsuperscriptVerbose; [n] children/*[2]","self::superscript");(0,sre.MathspeakRules.defineSpecialisedRule_)("superscript","mathspeak.default","mathspeak.brief","[n] children/*[1]; [t] CSFsuperscriptBrief; [n] children/*[2]");(0,sre.MathspeakRules.defineSpecialisedRule_)("superscript","mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakRules.defineRule_)("superscript-baseline","mathspeak.default","[n] children/*[1]; [t] CSFsuperscriptVerbose; [n] children/*[2];[t] CSFbaselineVerbose",
|
1245
|
+
"self::superscript","following-sibling::*",'not(name(following-sibling::superscript/children/*[1])="empty" or (name(following-sibling::infixop[@role="implicit"]/children/*[1])="superscript" and name(following-sibling::*/children/*[1]/children/*[1])="empty")) and not(following-sibling::*[@role="rightsuper" or @role="rightsub" or @role="leftsub" or @role="leftsub"])');(0,sre.MathspeakRules.defineSpecialisedRule_)("superscript-baseline","mathspeak.default","mathspeak.brief","[n] children/*[1]; [t] CSFsuperscriptBrief; [n] children/*[2];[t] CSFbaselineBrief");
|
1246
|
+
(0,sre.MathspeakRules.defineSpecialisedRule_)("superscript-baseline","mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakRules.defineRuleAlias_)("superscript-baseline","self::superscript","not(following-sibling::*)","ancestor::punctuated",'ancestor::*/following-sibling::* and not(ancestor::punctuated[@role="leftsuper" or @role="rightsub" or @role="rightsuper" or @role="rightsub"])');(0,sre.MathspeakRules.defineRuleAlias_)("superscript-baseline","self::superscript","not(following-sibling::*)","ancestor::fraction|ancestor::fenced|ancestor::root|ancestor::sqrt");
|
1247
|
+
(0,sre.MathspeakRules.defineRuleAlias_)("superscript-baseline","self::superscript","not(following-sibling::*)","ancestor::relseq|ancestor::multirel","not(@embellished)",sre.MathspeakUtil.generateBaselineConstraint());(0,sre.MathspeakRules.defineRuleAlias_)("superscript-baseline","self::superscript","not(following-sibling::*)","@embellished",'not(children/*[2][@role="prime"])');(0,sre.MathspeakRules.defineRule_)("superscript-empty-sub","mathspeak.default","[n] children/*[1]; [n] children/*[2]","self::superscript",
|
1248
|
+
'name(children/*[2])="infixop"','name(children/*[2][@role="implicit"]/children/*[1])="subscript"','name(children/*[2]/children/*[1]/children/*[1])="empty"');(0,sre.MathspeakRules.defineSpecialisedRule_)("superscript-empty-sub","mathspeak.default","mathspeak.brief");(0,sre.MathspeakRules.defineSpecialisedRule_)("superscript-empty-sub","mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakRules.defineRuleAlias_)("superscript-empty-sub","self::superscript",'name(children/*[2])="subscript"','name(children/*[2]/children/*[1])="empty"');
|
1249
|
+
(0,sre.MathspeakRules.defineRule_)("square","mathspeak.default",'[n] children/*[1]; [t] "squared"',"self::superscript","children/*[2]","children/*[2][text()=2]",'name(children/*[1])!="text" or not(name(children/*[1])="text" and (name(../../../punctuated[@role="text"]/..)="stree" or name(..)="stree"))','name(children/*[1])!="subscript" or (name(children/*[1])="subscript" and name(children/*[1]/children/*[1])="identifier" and name(children/*[1]/children/*[2])="number" and children/*[1]/children/*[2][@role!="mixed"] and children/*[1]/children/*[2][@role!="othernumber"])',
|
1250
|
+
"not(@embellished)");(0,sre.MathspeakRules.defineSpecialisedRule_)("square","mathspeak.default","mathspeak.brief");(0,sre.MathspeakRules.defineSpecialisedRule_)("square","mathspeak.default","mathspeak.sbrief");(0,sre.MathspeakRules.defineRuleAlias_)("square","self::superscript","children/*[2]","children/*[2][text()=2]","@embellished",'children/*[1][@role="prefix operator"]');(0,sre.MathspeakRules.defineRule_)("cube","mathspeak.default",'[n] children/*[1]; [t] "cubed"',"self::superscript","children/*[2]",
|
1251
|
+
"children/*[2][text()=3]",'name(children/*[1])!="text" or not(name(children/*[1])="text" and (name(../../../punctuated[@role="text"]/..)="stree" or name(..)="stree"))','name(children/*[1])!="subscript" or (name(children/*[1])="subscript" and name(children/*[1]/children/*[1])="identifier" and name(children/*[1]/children/*[2])="number" and children/*[1]/children/*[2][@role!="mixed"] and children/*[1]/children/*[2][@role!="othernumber"])',"not(@embellished)");(0,sre.MathspeakRules.defineSpecialisedRule_)("cube",
|
1252
|
+
"mathspeak.default","mathspeak.brief");(0,sre.MathspeakRules.defineSpecialisedRule_)("cube","mathspeak.default","mathspeak.sbrief");(0,sre.MathspeakRules.defineRuleAlias_)("cube","self::superscript","children/*[2]","children/*[2][text()=3]","@embellished",'children/*[1][@role="prefix operator"]');(0,sre.MathspeakRules.defineRule_)("prime","mathspeak.default","[n] children/*[1]; [n] children/*[2]","self::superscript","children/*[2]",'children/*[2][@role="prime"]');(0,sre.MathspeakRules.defineSpecialisedRule_)("prime",
|
1253
|
+
"mathspeak.default","mathspeak.brief");(0,sre.MathspeakRules.defineSpecialisedRule_)("prime","mathspeak.default","mathspeak.sbrief");(0,sre.MathspeakRules.defineRule_)("prime-subscript","mathspeak.default","[n] children/*[1]/children/*[1]; [n] children/*[2]; [t] CSFsubscriptVerbose; [n] children/*[1]/children/*[2]","self::superscript",'children/*[2][@role="prime"]','name(children/*[1])="subscript"',"not(following-sibling::*)");(0,sre.MathspeakRules.defineSpecialisedRule_)("prime-subscript","mathspeak.default",
|
1254
|
+
"mathspeak.brief","[n] children/*[1]/children/*[1]; [n] children/*[2]; [t] CSFsubscriptBrief; [n] children/*[1]/children/*[2]");(0,sre.MathspeakRules.defineSpecialisedRule_)("prime-subscript","mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakRules.defineRule_)("prime-subscript-baseline","mathspeak.default","[n] children/*[1]/children/*[1]; [n] children/*[2]; [t] CSFsubscriptVerbose; [n] children/*[1]/children/*[2]; [t] CSFbaselineVerbose","self::superscript",'children/*[2][@role="prime"]','name(children/*[1])="subscript"',
|
1255
|
+
"following-sibling::*");(0,sre.MathspeakRules.defineSpecialisedRule_)("prime-subscript-baseline","mathspeak.default","mathspeak.brief","[n] children/*[1]/children/*[1]; [n] children/*[2]; [t] CSFsubscriptBrief; [n] children/*[1]/children/*[2]; [t] CSFbaselineBrief");(0,sre.MathspeakRules.defineSpecialisedRule_)("prime-subscript-baseline","mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakRules.defineRuleAlias_)("prime-subscript-baseline","self::superscript",'children/*[2][@role="prime"]','name(children/*[1])="subscript"',
|
1256
|
+
"not(following-sibling::*)","@embellished");(0,sre.MathspeakRules.defineRule_)("prime-subscript-simple","mathspeak.default","[n] children/*[1]/children/*[1]; [n] children/*[2];[n] children/*[1]/children/*[2]","self::superscript",'children/*[2][@role="prime"]','name(children/*[1])="subscript"','name(children/*[1]/children/*[1])="identifier"','name(children/*[1]/children/*[2])="number"','children/*[1]/children/*[2][@role!="mixed"]','children/*[1]/children/*[2][@role!="othernumber"]');(0,sre.MathspeakRules.defineSpecialisedRule_)("prime-subscript-simple",
|
1257
|
+
"mathspeak.default","mathspeak.brief");(0,sre.MathspeakRules.defineSpecialisedRule_)("prime-subscript-simple","mathspeak.default","mathspeak.sbrief");(0,sre.MathspeakRules.defineRule_)("overscore","mathspeak.default",'[t] "ModifyingAbove"; [n] children/*[1]; [t] "With"; [n] children/*[2]',"self::overscore",'children/*[2][@role="overaccent"]');(0,sre.MathspeakRules.defineSpecialisedRule_)("overscore","mathspeak.default","mathspeak.brief",'[t] "ModAbove"; [n] children/*[1]; [t] "With"; [n] children/*[2]');
|
1258
|
+
(0,sre.MathspeakRules.defineSpecialisedRule_)("overscore","mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakRules.defineRule_)("double-overscore","mathspeak.default",'[t] "ModifyingAbove Above"; [n] children/*[1]; [t] "With"; [n] children/*[2]',"self::overscore",'children/*[2][@role="overaccent"]','name(children/*[1])="overscore"','children/*[1]/children/*[2][@role="overaccent"]');(0,sre.MathspeakRules.defineSpecialisedRule_)("double-overscore","mathspeak.default","mathspeak.brief",'[t] "ModAbove Above"; [n] children/*[1]; [t] "With"; [n] children/*[2]');
|
1259
|
+
(0,sre.MathspeakRules.defineSpecialisedRule_)("double-overscore","mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakRules.defineRule_)("underscore","mathspeak.default",'[t] "ModifyingBelow"; [n] children/*[1]; [t] "With"; [n] children/*[2]',"self::underscore",'children/*[2][@role="underaccent"]');(0,sre.MathspeakRules.defineSpecialisedRule_)("underscore","mathspeak.default","mathspeak.brief",'[t] "ModBelow"; [n] children/*[1]; [t] "With"; [n] children/*[2]');(0,sre.MathspeakRules.defineSpecialisedRule_)("underscore",
|
1260
|
+
"mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakRules.defineRule_)("double-underscore","mathspeak.default",'[t] "ModifyingBelow Below"; [n] children/*[1]; [t] "With"; [n] children/*[2]',"self::underscore",'children/*[2][@role="underaccent"]','name(children/*[1])="underscore"','children/*[1]/children/*[2][@role="underaccent"]');(0,sre.MathspeakRules.defineSpecialisedRule_)("double-underscore","mathspeak.default","mathspeak.brief",'[t] "ModBelow Below"; [n] children/*[1]; [t] "With"; [n] children/*[2]');
|
1261
|
+
(0,sre.MathspeakRules.defineSpecialisedRule_)("double-underscore","mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakRules.defineRule_)("overbar","mathspeak.default",'[n] children/*[1]; [t] "overbar"',"self::overscore",'@role="latinletter" or @role="greekletter" or @role="otherletter"','children/*[2][@role="overaccent"]','children/*[2][text()="\u00af" or text()="\uffe3" or text()="\uff3f" or text()="_" or text()="\u203e"]');(0,sre.MathspeakRules.defineSpecialisedRule_)("overbar","mathspeak.default",
|
1262
|
+
"mathspeak.brief",'[n] children/*[1]; [t] "overBar"');(0,sre.MathspeakRules.defineSpecialisedRule_)("overbar","mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakRules.defineRule_)("underbar","mathspeak.default",'[n] children/*[1]; [t] "underbar"',"self::underscore",'@role="latinletter" or @role="greekletter" or @role="otherletter"','children/*[2][@role="underaccent"]','children/*[2][text()="\u00af" or text()="\uffe3" or text()="\uff3f" or text()="_" or text()="\u203e"]');(0,sre.MathspeakRules.defineSpecialisedRule_)("underbar",
|
1263
|
+
"mathspeak.default","mathspeak.brief",'[n] children/*[1]; [t] "underBar"');(0,sre.MathspeakRules.defineSpecialisedRule_)("underbar","mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakRules.defineRule_)("overtilde","mathspeak.default",'[n] children/*[1]; [t] "overTilde"',"self::overscore",'children/*[2][@role="overaccent"]','@role="latinletter" or @role="greekletter" or @role="otherletter"','children/*[2][text()="~" or text()="\u02dc" or text()="\u223c" or text()="\uff5e"]');(0,sre.MathspeakRules.defineSpecialisedRule_)("overtilde",
|
1264
|
+
"mathspeak.default","mathspeak.brief",'[n] children/*[1]; [t] "overtilde"');(0,sre.MathspeakRules.defineSpecialisedRule_)("overtilde","mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakRules.defineRule_)("undertilde","mathspeak.default",'[n] children/*[1]; [t] "underTilde"',"self::underscore",'@role="latinletter" or @role="greekletter" or @role="otherletter"','children/*[2][@role="underaccent"]','children/*[2][text()="~" or text()="\u02dc" or text()="\u223c" or text()="\uff5e"]');(0,sre.MathspeakRules.defineSpecialisedRule_)("undertilde",
|
1265
|
+
"mathspeak.default","mathspeak.brief",'[n] children/*[1]; [t] "undertilde"');(0,sre.MathspeakRules.defineSpecialisedRule_)("undertilde","mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakRules.defineRule_)("matrix-fence","mathspeak.default","[n] children/*[1];","self::fenced","count(children/*)=1",'name(children/*[1])="matrix"');(0,sre.MathspeakRules.defineRule_)("matrix","mathspeak.default",'[t] "Start"; [t] count(children/*); [t] "By";[t] count(children/*[1]/children/*); [t] "Matrix"; [m] children/* (ctxtFunc:CTXFordinalCounter,context:"Row "); [t] "EndMatrix"',
|
1266
|
+
"self::matrix");(0,sre.MathspeakRules.defineRule_)("matrix","mathspeak.sbrief",'[t] count(children/*); [t] "By";[t] count(children/*[1]/children/*); [t] "Matrix"; [m] children/* (ctxtFunc:CTXFordinalCounter,context:"Row "); [t] "EndMatrix"',"self::matrix");(0,sre.MathspeakRules.defineRuleAlias_)("matrix","self::vector");(0,sre.MathspeakRules.defineRule_)("matrix-row","mathspeak.default",'[m] children/* (ctxtFunc:CTXFordinalCounter,context:"Column");[p] (pause: 200)',"self::row");(0,sre.MathspeakRules.defineRule_)("row-with-label",
|
1267
|
+
"mathspeak.default",'[t] "with Label"; [n] content/*[1]; [t] "EndLabel"(pause: 200); [m] children/* (ctxtFunc:CTXFordinalCounter,context:"Column")',"self::row","content");(0,sre.MathspeakRules.defineRule_)("row-with-label","mathspeak.brief",'[t] "Label"; [n] content/*[1]; [m] children/* (ctxtFunc:CTXFordinalCounter,context:"Column")',"self::row","content");(0,sre.MathspeakRules.defineSpecialisedRule_)("row-with-label","mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakRules.defineRule_)("row-with-text-label",
|
1268
|
+
"mathspeak.sbrief",'[t] "Label"; [t] CSFRemoveParens;[m] children/* (ctxtFunc:CTXFordinalCounter,context:"Column")',"self::row","content",'name(content/cell/children/*[1])="text"');(0,sre.MathspeakRules.defineRule_)("empty-row","mathspeak.default",'[t] "Blank"',"self::row","count(children/*)=0");(0,sre.MathspeakRules.defineRule_)("matrix-cell","mathspeak.default","[n] children/*[1]; [p] (pause: 300)","self::cell");(0,sre.MathspeakRules.defineRule_)("empty-cell","mathspeak.default",'[t] "Blank"; [p] (pause: 300)',
|
1269
|
+
"self::cell","count(children/*)=0");(0,sre.MathspeakRules.defineRule_)("determinant","mathspeak.default",'[t] "Start"; [t] count(children/*); [t] "By";[t] count(children/*[1]/children/*); [t] "Determinant"; [m] children/* (ctxtFunc:CTXFordinalCounter,context:"Row "); [t] "EndDeterminant"',"self::matrix",'@role="determinant"');(0,sre.MathspeakRules.defineSpecialisedRule_)("determinant","mathspeak.default","mathspeak.sbrief",'[t] count(children/*); [t] "By";[t] count(children/*[1]/children/*); [t] "Determinant"; [m] children/* (ctxtFunc:CTXFordinalCounter,context:"Row "); [t] "EndDeterminant"');
|
1270
|
+
(0,sre.MathspeakRules.defineRule_)("determinant-simple","mathspeak.default",'[t] "Start"; [t] count(children/*); [t] "By";[t] count(children/*[1]/children/*); [t] "Determinant"; [m] children/* (ctxtFunc:CTXFordinalCounter,context:"Row",grammar:simpleDet); [t] "EndDeterminant"',"self::matrix",'@role="determinant"',"CQFdetIsSimple");(0,sre.MathspeakRules.defineSpecialisedRule_)("determinant-simple","mathspeak.default","mathspeak.sbrief",'[t] count(children/*); [t] "By";[t] count(children/*[1]/children/*); [t] "Determinant"; [m] children/* (ctxtFunc:CTXFordinalCounter,context:"Row",grammar:simpleDet); [t] "EndDeterminant"');
|
1271
|
+
(0,sre.MathspeakRules.defineRule_)("row-simple","mathspeak.default","[m] children/*;","self::row",'@role="determinant"','contains(@grammar, "simpleDet")');(0,sre.MathspeakRules.defineRule_)("layout","mathspeak.default",'[t] "StartLayout"; [m] children/* (ctxtFunc:CTXFordinalCounter,context:"Row "); [t] "EndLayout"',"self::table");(0,sre.MathspeakRules.defineRule_)("layout","mathspeak.sbrief",'[t] "Layout"; [m] children/* (ctxtFunc:CTXFordinalCounter,context:"Row "); [t] "EndLayout"',"self::table");
|
1272
|
+
(0,sre.MathspeakRules.defineRule_)("binomial","mathspeak.default",'[t] "StartBinomialOrMatrix"; [n] children/*[1]/children/*[1]; [t] "Choose"; [n] children/*[2]/children/*[1]; [t] "EndBinomialOrMatrix"',"self::vector",'@role="binomial"');(0,sre.MathspeakRules.defineRule_)("binomial","mathspeak.sbrief",'[t] "BinomialOrMatrix"; [n] children/*[1]/children/*[1]; [t] "Choose"; [n] children/*[2]/children/*[1]; [t] "EndBinomialOrMatrix"',"self::vector",'@role="binomial"');(0,sre.MathspeakRules.defineRule_)("cases",
|
1273
|
+
"mathspeak.default",'[t] "StartLayout"; [t] "Enlarged"; [n] content/*[1];[m] children/* (ctxtFunc:CTXFordinalCounter,context:"Row "); [t] "EndLayout"',"self::cases");(0,sre.MathspeakRules.defineRule_)("cases","mathspeak.sbrief",'[t] "Layout"; [t] "Enlarged"; [n] content/*[1];[m] children/* (ctxtFunc:CTXFordinalCounter,context:"Row "); [t] "EndLayout"',"self::cases");(0,sre.MathspeakRules.defineRuleAlias_)("layout","self::multiline");(0,sre.MathspeakRules.defineRule_)("line","mathspeak.default","[m] children/*",
|
1274
|
+
"self::line");(0,sre.MathspeakRules.defineRule_)("line-with-label","mathspeak.default",'[t] "with Label"; [n] content/*[1]; [t] "EndLabel" (pause: 200); [m] children/*',"self::line","content");(0,sre.MathspeakRules.defineSpecialisedRule_)("line-with-label","mathspeak.default","mathspeak.brief",'[t] "Label"; [n] content/*[1] (pause: 200); [m] children/*');(0,sre.MathspeakRules.defineSpecialisedRule_)("line-with-label","mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakRules.defineRule_)("line-with-text-label",
|
1275
|
+
"mathspeak.sbrief",'[t] "Label"; [t] CSFRemoveParens; [m] children/*',"self::line","content",'name(content/cell/children/*[1])="text"');(0,sre.MathspeakRules.defineRule_)("empty-line","mathspeak.default",'[t] "Blank"',"self::line","count(children/*)=0","not(content)");(0,sre.MathspeakRules.defineSpecialisedRule_)("empty-line","mathspeak.default","mathspeak.brief");(0,sre.MathspeakRules.defineSpecialisedRule_)("empty-line","mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakRules.defineRule_)("empty-line-with-label",
|
1276
|
+
"mathspeak.default",'[t] "with Label"; [n] content/*[1]; [t] "EndLabel"(pause: 200); [t] "Blank"',"self::line","count(children/*)=0","content");(0,sre.MathspeakRules.defineSpecialisedRule_)("empty-line-with-label","mathspeak.default","mathspeak.brief",'[t] "Label"; [n] content/*[1] (pause: 200); [t] "Blank"');(0,sre.MathspeakRules.defineSpecialisedRule_)("empty-line-with-label","mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakRules.defineRule_)("enclose","mathspeak.default",'[t] "StartEnclose"; [t] @role (grammar:localEnclose); [n] children/*[1]; [t] "EndEnclose"',
|
1277
|
+
"self::enclose");(0,sre.MathspeakRules.defineRuleAlias_)("overbar","self::enclose",'@role="top"');(0,sre.MathspeakRules.defineRuleAlias_)("underbar","self::enclose",'@role="bottom"');(0,sre.MathspeakRules.defineRule_)("leftbar","mathspeak.default",'[t] "vertical bar"; [n] children/*[1]',"self::enclose",'@role="left"');(0,sre.MathspeakRules.defineRule_)("rightbar","mathspeak.default",'[n] children/*[1]; [t] "vertical bar"',"self::enclose",'@role="right"');(0,sre.MathspeakRules.defineRule_)("crossout",
|
1278
|
+
"mathspeak.default",'[t] "CrossOut"; [n] children/*[1]; [t] "EndCrossOut"',"self::enclose",'@role="updiagonalstrike" or @role="downdiagonalstrike" or @role="horizontalstrike"');(0,sre.MathspeakRules.defineRule_)("cancel","mathspeak.default",'[t] "CrossOut"; [n] children/*[1]/children/*[1]; [t] "With"; [n] children/*[2]; [t] "EndCrossOut"',"self::overscore",'@role="updiagonalstrike" or @role="downdiagonalstrike" or @role="horizontalstrike"');(0,sre.MathspeakRules.defineSpecialisedRule_)("cancel","mathspeak.default",
|
1279
|
+
"mathspeak.brief");(0,sre.MathspeakRules.defineSpecialisedRule_)("cancel","mathspeak.default","mathspeak.sbrief");(0,sre.MathspeakRules.defineRuleAlias_)("cancel","self::underscore",'@role="updiagonalstrike" or @role="downdiagonalstrike" or @role="horizontalstrike"');(0,sre.MathspeakRules.defineRule_)("cancel-reverse","mathspeak.default",'[t] "CrossOut"; [n] children/*[2]/children/*[1]; [t] "With"; [n] children/*[1]; [t] "EndCrossOut"',"self::overscore",'name(children/*[2])="enclose"','children/*[2][@role="updiagonalstrike" or @role="downdiagonalstrike" or @role="horizontalstrike"]');
|
1280
|
+
(0,sre.MathspeakRules.defineSpecialisedRule_)("cancel-reverse","mathspeak.default","mathspeak.brief");(0,sre.MathspeakRules.defineSpecialisedRule_)("cancel-reverse","mathspeak.default","mathspeak.sbrief");(0,sre.MathspeakRules.defineRuleAlias_)("cancel-reverse","self::underscore",'name(children/*[2])="enclose"','children/*[2][@role="updiagonalstrike" or @role="downdiagonalstrike" or @role="horizontalstrike"]');(0,sre.MathspeakRules.defineRule_)("end-punct","mathspeak.default","[m] children/*","self::punctuated",
|
1281
|
+
'@role="endpunct"');(0,sre.MathspeakRules.defineRule_)("start-punct","mathspeak.default","[n] content/*[1]; [m] children/*[position()>1]","self::punctuated",'@role="startpunct"');(0,sre.MathspeakRules.defineRule_)("integral-punct","mathspeak.default","[n] children/*[1]; [n] children/*[3]","self::punctuated",'@role="integral"');(0,sre.MathspeakRules.defineRule_)("punctuated","mathspeak.default","[m] children/*","self::punctuated");(0,sre.MathspeakRules.defineRule_)("unit","mathspeak.default",'[t] text() (grammar:annotation="unit":translate:plural)',
|
1282
|
+
"self::identifier",'@role="unit"');(0,sre.MathspeakRules.defineRule_)("unit-square","mathspeak.default",'[t] "square"; [n] children/*[1]',"self::superscript",'@role="unit"',"children/*[2][text()=2]",'name(children/*[1])="identifier"');(0,sre.MathspeakRules.defineRule_)("unit-cubic","mathspeak.default",'[t] "cubic"; [n] children/*[1]',"self::superscript",'@role="unit"',"children/*[2][text()=3]",'name(children/*[1])="identifier"');(0,sre.MathspeakRules.defineRule_)("reciprocal","mathspeak.default",
|
1283
|
+
'[t] "reciprocal"; [n] children/*[1]',"self::superscript",'@role="unit"','name(children/*[1])="identifier"','name(children/*[2])="prefixop"','children/*[2][@role="negative"]',"children/*[2]/children/*[1][text()=1]",'count(preceding-sibling::*)=0 or preceding-sibling::*[@role!="unit"]');(0,sre.MathspeakRules.defineRule_)("reciprocal","mathspeak.default",'[t] "per"; [n] children/*[1]',"self::superscript",'@role="unit"','name(children/*[1])="identifier"','name(children/*[2])="prefixop"','children/*[2][@role="negative"]',
|
1284
|
+
"children/*[2]/children/*[1][text()=1]",'preceding-sibling::*[@role="unit"]');(0,sre.MathspeakRules.defineRule_)("unit-combine","mathspeak.default","[m] children/*","self::infixop",'@role="unit"');(0,sre.MathspeakRules.defineRule_)("unit-divide","mathspeak.default",'[n] children/*[1]; [t] "per"; [n] children/*[2]',"self::fraction",'@role="unit"');(0,sre.MathspeakRules.defineRule_)("inference","mathspeak.default",'[t] "inference rule"; [m] content/*; [t] "with conclusion"; [n] children/*[1]; [t] "and"; [t] count(children/*[2]/children/*); [t] "premises"',
|
1285
|
+
"self::inference");(0,sre.MathspeakRules.defineRule_)("inference","mathspeak.default",'[t] "inference rule"; ; [m] content/*; [t] "with conclusion"; [n] children/*[1]; [t] "and"; [t] count(children/*[2]/children/*); [t] "premise"',"self::inference","count(children/*[2]/children/*)<2");(0,sre.MathspeakRules.defineRule_)("premise","mathspeak.default",'[m] children/* (ctxtFunc:CTXFordinalCounter,context:"premise ");',"self::premises");(0,sre.MathspeakRules.defineRule_)("conclusion","mathspeak.default",
|
1286
|
+
"[n] children/*[1]","self::conclusion");(0,sre.MathspeakRules.defineRule_)("label","mathspeak.default",'[t] "label"; [n] children/*[1]',"self::rulelabel");(0,sre.MathspeakRules.defineRule_)("axiom","mathspeak.default",'[t] "axiom"; [m] children/*[1];',"self::inference",'@role="axiom"');(0,sre.MathspeakRules.defineRule_)("axiom","mathspeak.default",'[t] "empty axiom";',"self::empty",'@role="axiom"')};sre.MathspeakRules.generateTensorRules_=function(){sre.MathspeakUtil.generateTensorRules(sre.MathspeakRules.mathStore)};
|
1287
|
+
sre.MathspeakRules.getInstance().initializer=[sre.MathspeakRules.initCustomFunctions_,sre.MathspeakRules.initMathspeakRules_,sre.MathspeakRules.generateTensorRules_];sre.MathspeakSpanishUtil={};sre.MathspeakSpanishUtil.ordinalCounter=function(a,b){var c=0;return function(){return sre.Messages.NUMBERS.numberToOrdinal(++c,null)+" "+b}};sre.MathspeakSpanishUtil.smallRoot=function(a){if(!a.childNodes||0===a.childNodes.length||!a.childNodes[0].childNodes)return[];var b=a.childNodes[0].childNodes[0].textContent;if(!/^\d+$/.test(b))return[];b=parseInt(b,10);return 1<b&&10>=b?[a]:[]};
|
1288
|
+
sre.MathspeakSpanishUtil.unitMultipliers=function(a,b){var c=0;return function(){var b=sre.AuditoryDescription.create({text:sre.MathspeakSpanishUtil.rightMostUnit(a[c])&&sre.MathspeakSpanishUtil.leftMostUnit(a[c+1])?"por":""},{});c++;return[b]}};sre.MathspeakSpanishUtil.SCRIPT_ELEMENTS=[sre.SemanticAttr.Type.SUPERSCRIPT,sre.SemanticAttr.Type.SUBSCRIPT,sre.SemanticAttr.Type.OVERSCORE,sre.SemanticAttr.Type.UNDERSCORE];
|
1289
|
+
sre.MathspeakSpanishUtil.rightMostUnit=function(a){for(;a;){if("unit"===a.getAttribute("role"))return!0;var b=a.tagName;a=sre.XpathUtil.evalXPath("children/*",a);a=-1!==sre.MathspeakSpanishUtil.SCRIPT_ELEMENTS.indexOf(b)?a[0]:a[a.length-1]}return!1};sre.MathspeakSpanishUtil.leftMostUnit=function(a){for(;a;){if("unit"===a.getAttribute("role"))return!0;a=sre.XpathUtil.evalXPath("children/*",a)[0]}return!1};
|
1290
|
+
sre.MathspeakSpanishUtil.oneLeft=function(a){for(;a;){if("number"===a.tagName&&"1"===a.textContent)return[a];if("infixop"!==a.tagName||"multiplication"!==a.getAttribute("role")&&"implicit"!==a.getAttribute("role"))break;a=sre.XpathUtil.evalXPath("children/*",a)[0]}return[]};sre.MathspeakSpanish=function(){sre.MathStore.call(this);this.locale="es"};goog.inherits(sre.MathspeakSpanish,sre.MathStore);goog.addSingletonGetter(sre.MathspeakSpanish);sre.MathspeakSpanish.mathStore=sre.MathspeakSpanish.getInstance();sre.MathspeakSpanish.defineRule_=goog.bind(sre.MathspeakSpanish.mathStore.defineRule,sre.MathspeakSpanish.mathStore);sre.MathspeakSpanish.defineRuleAlias_=goog.bind(sre.MathspeakSpanish.mathStore.defineRulesAlias,sre.MathspeakSpanish.mathStore);
|
1291
|
+
sre.MathspeakSpanish.defineSpecialisedRule_=goog.bind(sre.MathspeakSpanish.mathStore.defineSpecialisedRule,sre.MathspeakSpanish.mathStore);sre.MathspeakSpanish.addContextFunction_=goog.bind(sre.MathspeakSpanish.mathStore.contextFunctions.add,sre.MathspeakSpanish.mathStore.contextFunctions);sre.MathspeakSpanish.addCustomQuery_=goog.bind(sre.MathspeakSpanish.mathStore.customQueries.add,sre.MathspeakSpanish.mathStore.customQueries);
|
1292
|
+
sre.MathspeakSpanish.addCustomString_=goog.bind(sre.MathspeakSpanish.mathStore.customStrings.add,sre.MathspeakSpanish.mathStore.customStrings);
|
1293
|
+
sre.MathspeakSpanish.initCustomFunctions_=function(){(0,sre.MathspeakSpanish.addCustomQuery_)("CQFspaceoutNumber",sre.MathspeakUtil.spaceoutNumber);(0,sre.MathspeakSpanish.addCustomQuery_)("CQFspaceoutIdentifier",sre.MathspeakUtil.spaceoutIdentifier);(0,sre.MathspeakSpanish.addCustomString_)("CSFspaceoutText",sre.MathspeakUtil.spaceoutText);(0,sre.MathspeakSpanish.addCustomString_)("CSFopenFracVerbose",sre.MathspeakUtil.openingFractionVerbose);(0,sre.MathspeakSpanish.addCustomString_)("CSFcloseFracVerbose",
|
1294
|
+
sre.MathspeakUtil.closingFractionVerbose);(0,sre.MathspeakSpanish.addCustomString_)("CSFoverFracVerbose",sre.MathspeakUtil.overFractionVerbose);(0,sre.MathspeakSpanish.addCustomString_)("CSFopenFracBrief",sre.MathspeakUtil.openingFractionBrief);(0,sre.MathspeakSpanish.addCustomString_)("CSFcloseFracBrief",sre.MathspeakUtil.closingFractionBrief);(0,sre.MathspeakSpanish.addCustomString_)("CSFopenFracSbrief",sre.MathspeakUtil.openingFractionSbrief);(0,sre.MathspeakSpanish.addCustomString_)("CSFcloseFracSbrief",
|
1295
|
+
sre.MathspeakUtil.closingFractionSbrief);(0,sre.MathspeakSpanish.addCustomString_)("CSFoverFracSbrief",sre.MathspeakUtil.overFractionSbrief);(0,sre.MathspeakSpanish.addCustomString_)("CSFopenRadicalVerbose",sre.MathspeakUtil.openingRadicalVerbose);(0,sre.MathspeakSpanish.addCustomString_)("CSFcloseRadicalVerbose",sre.MathspeakUtil.closingRadicalVerbose);(0,sre.MathspeakSpanish.addCustomString_)("CSFindexRadicalVerbose",sre.MathspeakUtil.indexRadicalVerbose);(0,sre.MathspeakSpanish.addCustomString_)("CSFopenRadicalBrief",
|
1296
|
+
sre.MathspeakUtil.openingRadicalBrief);(0,sre.MathspeakSpanish.addCustomString_)("CSFcloseRadicalBrief",sre.MathspeakUtil.closingRadicalBrief);(0,sre.MathspeakSpanish.addCustomString_)("CSFindexRadicalBrief",sre.MathspeakUtil.indexRadicalBrief);(0,sre.MathspeakSpanish.addCustomString_)("CSFopenRadicalSbrief",sre.MathspeakUtil.openingRadicalSbrief);(0,sre.MathspeakSpanish.addCustomString_)("CSFindexRadicalSbrief",sre.MathspeakUtil.indexRadicalSbrief);(0,sre.MathspeakSpanish.addCustomQuery_)("CQFisSmallRoot",
|
1297
|
+
sre.MathspeakSpanishUtil.smallRoot);(0,sre.MathspeakSpanish.addCustomString_)("CSFsuperscriptVerbose",sre.MathspeakUtil.superscriptVerbose);(0,sre.MathspeakSpanish.addCustomString_)("CSFsuperscriptBrief",sre.MathspeakUtil.superscriptBrief);(0,sre.MathspeakSpanish.addCustomString_)("CSFsubscriptVerbose",sre.MathspeakUtil.subscriptVerbose);(0,sre.MathspeakSpanish.addCustomString_)("CSFsubscriptBrief",sre.MathspeakUtil.subscriptBrief);(0,sre.MathspeakSpanish.addCustomString_)("CSFbaselineVerbose",sre.MathspeakUtil.baselineVerbose);
|
1298
|
+
(0,sre.MathspeakSpanish.addCustomString_)("CSFbaselineBrief",sre.MathspeakUtil.baselineBrief);(0,sre.MathspeakSpanish.addCustomString_)("CSFleftsuperscriptVerbose",sre.MathspeakUtil.superscriptVerbose);(0,sre.MathspeakSpanish.addCustomString_)("CSFleftsubscriptVerbose",sre.MathspeakUtil.subscriptVerbose);(0,sre.MathspeakSpanish.addCustomString_)("CSFrightsuperscriptVerbose",sre.MathspeakUtil.superscriptVerbose);(0,sre.MathspeakSpanish.addCustomString_)("CSFrightsubscriptVerbose",sre.MathspeakUtil.subscriptVerbose);
|
1299
|
+
(0,sre.MathspeakSpanish.addCustomString_)("CSFleftsuperscriptBrief",sre.MathspeakUtil.superscriptBrief);(0,sre.MathspeakSpanish.addCustomString_)("CSFleftsubscriptBrief",sre.MathspeakUtil.subscriptBrief);(0,sre.MathspeakSpanish.addCustomString_)("CSFrightsuperscriptBrief",sre.MathspeakUtil.superscriptBrief);(0,sre.MathspeakSpanish.addCustomString_)("CSFrightsubscriptBrief",sre.MathspeakUtil.subscriptBrief);(0,sre.MathspeakSpanish.addCustomString_)("CSFunderscript",sre.MathspeakUtil.nestedUnderscore);
|
1300
|
+
(0,sre.MathspeakSpanish.addCustomString_)("CSFoverscript",sre.MathspeakUtil.nestedOverscore);(0,sre.MathspeakSpanish.addContextFunction_)("CTXFordinalCounter",sre.MathspeakSpanishUtil.ordinalCounter);(0,sre.MathspeakSpanish.addContextFunction_)("CTXFcontentIterator",sre.MathmlStoreUtil.contentIterator);(0,sre.MathspeakSpanish.addContextFunction_)("CTXFunitMultipliers",sre.MathspeakSpanishUtil.unitMultipliers);(0,sre.MathspeakSpanish.addCustomQuery_)("CQFdetIsSimple",sre.MathspeakUtil.determinantIsSimple);
|
1301
|
+
(0,sre.MathspeakSpanish.addCustomString_)("CSFRemoveParens",sre.MathspeakUtil.removeParens);(0,sre.MathspeakSpanish.addCustomQuery_)("CQFoneLeft",sre.MathspeakSpanishUtil.oneLeft);(0,sre.MathspeakSpanish.addCustomQuery_)("CQFresetNesting",sre.MathspeakUtil.resetNestingDepth)};
|
1302
|
+
sre.MathspeakSpanish.initMathspeakSpanish_=function(){(0,sre.MathspeakSpanish.defineRule_)("collapsed","mathspeak.default",'[n] . (engine:modality=summary,grammar:collapsed); [t] "plegado";',"self::*","@alternative",'not(contains(@grammar, "collapsed"))',"self::*","self::*","self::*","self::*","self::*");(0,sre.MathspeakSpanish.defineSpecialisedRule_)("collapsed","mathspeak.default","mathspeak.brief");(0,sre.MathspeakSpanish.defineSpecialisedRule_)("collapsed","mathspeak.brief","mathspeak.sbrief");
|
1303
|
+
(0,sre.MathspeakSpanish.defineRule_)("stree","mathspeak.default","[n] ./*[1]","self::stree","CQFresetNesting");(0,sre.MathspeakSpanish.defineRule_)("unknown","mathspeak.default","[n] text()","self::unknown");(0,sre.MathspeakSpanish.defineRule_)("protected","mathspeak.default","[t] text()","self::number",'contains(@grammar, "protected")');(0,sre.MathspeakSpanish.defineRule_)("omit-empty","mathspeak.default","[p] (pause:100)","self::empty");(0,sre.MathspeakSpanish.defineRule_)("blank-empty","mathspeak.default",
|
1304
|
+
'[t] "espacio"',"self::empty","count(../*)=1",'name(../..)="cell" or name(../..)="line"');(0,sre.MathspeakSpanish.defineRule_)("font","mathspeak.default","[t] @font (grammar:localFont); [n] . (grammar:ignoreFont=@font)","self::*","@font",'not(contains(@grammar, "ignoreFont"))','@font!="normal"');(0,sre.MathspeakSpanish.defineRule_)("font-identifier-short","mathspeak.default","[t] @font (grammar:localFont); [n] . (grammar:ignoreFont=@font)","self::identifier","string-length(text())=1","@font",'not(contains(@grammar, "ignoreFont"))',
|
1305
|
+
'@font="normal"','""=translate(text(), "abcdefghijklmnopqrstuvwxyz\u03b1\u03b2\u03b3\u03b4\u03b5\u03b6\u03b7\u03b8\u03b9\u03ba\u03bb\u03bc\u03bd\u03be\u03bf\u03c0\u03c1\u03c2\u03c3\u03c4\u03c5\u03c6\u03c7\u03c8\u03c9ABCDEFGHIJKLMNOPQRSTUVWXYZ\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039a\u039b\u039c\u039d\u039e\u039f\u03a0\u03a1\u03a3\u03a3\u03a4\u03a5\u03a6\u03a7\u03a8\u03a9", "")','@role!="unit"');(0,sre.MathspeakSpanish.defineRule_)("font-identifier","mathspeak.default","[t] @font (grammar:localFont); [n] . (grammar:ignoreFont=@font)",
|
1306
|
+
"self::identifier","string-length(text())=1","@font",'@font="normal"','not(contains(@grammar, "ignoreFont"))','@role!="unit"');(0,sre.MathspeakSpanish.defineRule_)("omit-font","mathspeak.default","[n] . (grammar:ignoreFont=@font)","self::identifier","string-length(text())=1","@font",'not(contains(@grammar, "ignoreFont"))','@font="italic"');(0,sre.MathspeakSpanish.defineRule_)("number","mathspeak.default","[n] text()","self::number");(0,sre.MathspeakSpanish.defineRule_)("mixed-number","mathspeak.default",
|
1307
|
+
'[n] children/*[1]; [t] "m\u00e1s"; [n] children/*[2]; ',"self::number",'@role="mixed"');(0,sre.MathspeakSpanish.defineRule_)("number-with-chars","mathspeak.default",'[t] "n\u00famero"; [m] CQFspaceoutNumber (grammar:protected)',"self::number",'@role="othernumber"','"" != translate(text(), "0123456789.,", "")','not(contains(@grammar, "protected"))');(0,sre.MathspeakSpanish.defineSpecialisedRule_)("number-with-chars","mathspeak.default","mathspeak.brief",'[t] "n\u00fam"; [m] CQFspaceoutNumber (grammar:protected)');
|
1308
|
+
(0,sre.MathspeakSpanish.defineSpecialisedRule_)("number-with-chars","mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakSpanish.defineRule_)("number-as-upper-word","mathspeak.default",'[t] "may\u00fascula"; [t] CSFspaceoutText',"self::number","string-length(text())>1",'text()=translate(text(), "abcdefghijklmnopqrstuvwxyz\u03b1\u03b2\u03b3\u03b4\u03b5\u03b6\u03b7\u03b8\u03b9\u03ba\u03bb\u03bc\u03bd\u03be\u03bf\u03c0\u03c1\u03c2\u03c3\u03c4\u03c5\u03c6\u03c7\u03c8\u03c9", "ABCDEFGHIJKLMNOPQRSTUVWXYZ\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039a\u039b\u039c\u039d\u039e\u039f\u03a0\u03a1\u03a3\u03a3\u03a4\u03a5\u03a6\u03a7\u03a8\u03a9")',
|
1309
|
+
'""=translate(text(), "ABCDEFGHIJKLMNOPQRSTUVWXYZ\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039a\u039b\u039c\u039d\u039e\u039f\u03a0\u03a1\u03a3\u03a3\u03a4\u03a5\u03a6\u03a7\u03a8\u03a9","")');(0,sre.MathspeakSpanish.defineSpecialisedRule_)("number-as-upper-word","mathspeak.default","mathspeak.brief");(0,sre.MathspeakSpanish.defineSpecialisedRule_)("number-as-upper-word","mathspeak.default","mathspeak.sbrief");(0,sre.MathspeakSpanish.defineRule_)("number-baseline","mathspeak.default",
|
1310
|
+
'[t] "l\u00ednea base"; [n] . (grammar:baseline)',"self::number",'not(contains(@grammar, "ignoreFont"))',"preceding-sibling::identifier",'not(contains(@grammar, "baseline"))','preceding-sibling::*[1][@role="latinletter" or @role="greekletter" or @role="otherletter"]','parent::*/parent::infixop[@role="implicit"]');(0,sre.MathspeakSpanish.defineSpecialisedRule_)("number-baseline","mathspeak.default","mathspeak.brief",'[t] "base"; [n] text()');(0,sre.MathspeakSpanish.defineSpecialisedRule_)("number-baseline",
|
1311
|
+
"mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakSpanish.defineRule_)("number-baseline-font","mathspeak.default",'[t] "l\u00ednea base"; [t] @font (grammar:localFont); [n] . (grammar:ignoreFont=@font)',"self::number","@font",'not(contains(@grammar, "ignoreFont"))','@font!="normal"',"preceding-sibling::identifier",'preceding-sibling::*[@role="latinletter" or @role="greekletter" or @role="otherletter"]','parent::*/parent::infixop[@role="implicit"]');(0,sre.MathspeakSpanish.defineSpecialisedRule_)("number-baseline-font",
|
1312
|
+
"mathspeak.default","mathspeak.brief",'[t] "base"; [t] @font (grammar:localFont); [n] . (grammar:ignoreFont=@font)');(0,sre.MathspeakSpanish.defineSpecialisedRule_)("number-baseline-font","mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakSpanish.defineRule_)("identifier","mathspeak.default","[m] CQFspaceoutIdentifier","self::identifier","string-length(text())>1",'@role!="unit"','not(@font) or @font="normal" or contains(@grammar, "ignoreFont")','text()!=translate(text(), "abcdefghijklmnopqrstuvwxyz\u03b1\u03b2\u03b3\u03b4\u03b5\u03b6\u03b7\u03b8\u03b9\u03ba\u03bb\u03bc\u03bd\u03be\u03bf\u03c0\u03c1\u03c2\u03c3\u03c4\u03c5\u03c6\u03c7\u03c8\u03c9ABCDEFGHIJKLMNOPQRSTUVWXYZ\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039a\u039b\u039c\u039d\u039e\u039f\u03a0\u03a1\u03a3\u03a3\u03a4\u03a5\u03a6\u03a7\u03a8\u03a9", "")');
|
1313
|
+
(0,sre.MathspeakSpanish.defineRule_)("identifier","mathspeak.default","[n] text()","self::identifier");(0,sre.MathspeakSpanish.defineRule_)("negative","mathspeak.default",'[t] "menos"; [n] children/*[1]',"self::prefixop",'@role="negative"',"children/identifier");(0,sre.MathspeakSpanish.defineRuleAlias_)("negative","self::prefixop",'@role="negative"',"children/number");(0,sre.MathspeakSpanish.defineRuleAlias_)("negative","self::prefixop",'@role="negative"','children/fraction[@role="vulgar"]');(0,sre.MathspeakSpanish.defineRule_)("negative",
|
1314
|
+
"mathspeak.default",'[t] "menos"; [n] children/*[1]',"self::prefixop",'@role="negative"');(0,sre.MathspeakSpanish.defineRule_)("prefix","mathspeak.default","[m] content/*; [n] children/*[1]","self::prefixop");(0,sre.MathspeakSpanish.defineRule_)("postfix","mathspeak.default","[n] children/*[1]; [m] content/*","self::postfixop");(0,sre.MathspeakSpanish.defineRule_)("binary-operation","mathspeak.default","[m] children/* (sepFunc:CTXFcontentIterator);","self::infixop");(0,sre.MathspeakSpanish.defineRule_)("implicit",
|
1315
|
+
"mathspeak.default","[m] children/*","self::infixop",'@role="implicit"');(0,sre.MathspeakSpanish.defineRuleAlias_)("implicit","self::infixop",'@role="leftsuper" or @role="leftsub" or @role="rightsuper" or @role="rightsub"');(0,sre.MathspeakSpanish.defineRule_)("subtraction","mathspeak.default",'[m] children/* (separator:"menos");',"self::infixop",'@role="subtraction"');(0,sre.MathspeakSpanish.defineRule_)("function-unknown","mathspeak.default","[n] children/*[1]; [n] children/*[2]","self::appl");
|
1316
|
+
(0,sre.MathspeakSpanish.defineRule_)("function-prefix","mathspeak.default","[n] children/*[1]; [n] children/*[2]","self::appl",'children/*[1][@role="prefix function"]');(0,sre.MathspeakSpanish.defineRule_)("fences-open-close","mathspeak.default","[n] content/*[1]; [n] children/*[1]; [n] content/*[2]","self::fenced",'@role="leftright"');(0,sre.MathspeakSpanish.defineRule_)("fences-neutral","mathspeak.default",'[t] "empezar valor absoluto"; [n] children/*[1]; [t] "finalizar valor absoluto"',"self::fenced",
|
1317
|
+
'@role="neutral"','content/*[1][text()]="|" or content/*[1][text()]="\u2758" or content/*[1][text()]="\uff5c"');(0,sre.MathspeakSpanish.defineSpecialisedRule_)("fences-neutral","mathspeak.default","mathspeak.sbrief",'[t] "valor absoluto"; [n] children/*[1]; [t] "finalizar valor absoluto"');(0,sre.MathspeakSpanish.defineRule_)("fences-neutral","mathspeak.default","[n] content/*[1]; [n] children/*[1]; [n] content/*[2]","self::fenced",'@role="neutral"');(0,sre.MathspeakSpanish.defineRule_)("fences-set",
|
1318
|
+
"mathspeak.default",'[t] "empezar llave"; [n] children/*[1]; [t] "finalizar llave"',"self::fenced",'@role="set empty" or @role="set extended" or @role="set singleton" or @role="set collection"','not(name(../..)="appl")');(0,sre.MathspeakSpanish.defineSpecialisedRule_)("fences-set","mathspeak.default","mathspeak.sbrief",'[t] "llave"; [n] children/*[1]; [t] "finalizar llave"');(0,sre.MathspeakSpanish.defineRule_)("text","mathspeak.default","[n] text() (grammar:noTranslateText)","self::text");(0,sre.MathspeakSpanish.defineRule_)("factorial",
|
1319
|
+
"mathspeak.default",'[t] "factorial"',"self::punctuation",'text()="!"','name(preceding-sibling::*[1])!="text"');(0,sre.MathspeakSpanish.defineRule_)("minus","mathspeak.default",'[t] "menos"',"self::operator",'text()="-"');(0,sre.MathspeakSpanish.defineRule_)("single-prime","mathspeak.default",'[t] "prima"',"self::punctuated",'@role="prime"',"count(children/*)=1");(0,sre.MathspeakSpanish.defineRule_)("double-prime","mathspeak.default",'[t] "doble prima"',"self::punctuated",'@role="prime"',"count(children/*)=2");
|
1320
|
+
(0,sre.MathspeakSpanish.defineRule_)("triple-prime","mathspeak.default",'[t] "triple prima"',"self::punctuated",'@role="prime"',"count(children/*)=3");(0,sre.MathspeakSpanish.defineRule_)("quadruple-prime","mathspeak.default",'[t] "cuadruplicar prima"',"self::punctuated",'@role="prime"',"count(children/*)=4");(0,sre.MathspeakSpanish.defineRule_)("counted-prime","mathspeak.default",'[t] count(children/*); [t] "prime"',"self::punctuated",'@role="prime"');(0,sre.MathspeakSpanish.defineRule_)("fraction",
|
1321
|
+
"mathspeak.default","[t] CSFopenFracVerbose; [n] children/*[1]; [t] CSFoverFracVerbose; [n] children/*[2]; [t] CSFcloseFracVerbose","self::fraction");(0,sre.MathspeakSpanish.defineRule_)("fraction","mathspeak.brief","[t] CSFopenFracBrief; [n] children/*[1]; [t] CSFoverFracVerbose; [n] children/*[2]; [t] CSFcloseFracBrief","self::fraction");(0,sre.MathspeakSpanish.defineRule_)("fraction","mathspeak.sbrief","[t] CSFopenFracSbrief; [n] children/*[1]; [t] CSFoverFracSbrief; [n] children/*[2]; [t] CSFcloseFracSbrief",
|
1322
|
+
"self::fraction");(0,sre.MathspeakSpanish.defineRule_)("continued-fraction-outer","mathspeak.default",'[t] "fracci\u00f3n continua"; [n] children/*[1];[t] "entre"; [n] children/*[2]',"self::fraction","not(ancestor::fraction)",'children/*[2]/descendant-or-self::*[@role="ellipsis" and not(following-sibling::*)]');(0,sre.MathspeakSpanish.defineSpecialisedRule_)("continued-fraction-outer","mathspeak.default","mathspeak.brief",'[t] "frac continua"; [n] children/*[1];[t] "entre"; [n] children/*[2]');(0,sre.MathspeakSpanish.defineSpecialisedRule_)("continued-fraction-outer",
|
1323
|
+
"mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakSpanish.defineRule_)("continued-fraction-inner","mathspeak.default",'[t] "empezar fracci\u00f3n"; [n] children/*[1];[t] "entre"; [n] children/*[2]',"self::fraction","ancestor::fraction",'children/*[2]/descendant-or-self::*[@role="ellipsis" and not(following-sibling::*)]');(0,sre.MathspeakSpanish.defineSpecialisedRule_)("continued-fraction-inner","mathspeak.default","mathspeak.brief",'[t] "empezar frac"; [n] children/*[1];[t] "entre"; [n] children/*[2]');
|
1324
|
+
(0,sre.MathspeakSpanish.defineSpecialisedRule_)("continued-fraction-inner","mathspeak.brief","mathspeak.sbrief",'[t] "frac"; [n] children/*[1];[t] "entre"; [n] children/*[2]');(0,sre.MathspeakSpanish.defineRule_)("sqrt","mathspeak.default","[t] CSFopenRadicalVerbose; [n] children/*[1]; [t] CSFcloseRadicalVerbose","self::sqrt");(0,sre.MathspeakSpanish.defineRule_)("sqrt","mathspeak.brief","[t] CSFopenRadicalBrief; [n] children/*[1]; [t] CSFcloseRadicalBrief","self::sqrt");(0,sre.MathspeakSpanish.defineRule_)("sqrt",
|
1325
|
+
"mathspeak.sbrief","[t] CSFopenRadicalSbrief; [n] children/*[1]; [t] CSFcloseRadicalBrief","self::sqrt");(0,sre.MathspeakSpanish.defineRule_)("root-small","mathspeak.default","[t] CSFopenRadicalVerbose; [n] children/*[2]; [t] CSFcloseRadicalVerbose","self::root","CQFisSmallRoot");(0,sre.MathspeakSpanish.defineRule_)("root-small","mathspeak.brief","[t] CSFopenRadicalBrief; [n] children/*[2]; [t] CSFcloseRadicalBrief","self::root","CQFisSmallRoot");(0,sre.MathspeakSpanish.defineRule_)("root-small",
|
1326
|
+
"mathspeak.sbrief","[t] CSFopenRadicalSbrief; [n] children/*[2]; [t] CSFcloseRadicalBrief","self::root","CQFisSmallRoot");(0,sre.MathspeakSpanish.defineRule_)("root","mathspeak.default","[t] CSFindexRadicalVerbose; [n] children/*[1];[t] CSFopenRadicalVerbose; [n] children/*[2]; [t] CSFcloseRadicalVerbose","self::root");(0,sre.MathspeakSpanish.defineRule_)("root","mathspeak.brief","[t] CSFindexRadicalBrief; [n] children/*[1];[t] CSFopenRadicalBrief; [n] children/*[2]; [t] CSFcloseRadicalBrief","self::root");
|
1327
|
+
(0,sre.MathspeakSpanish.defineRule_)("root","mathspeak.sbrief","[t] CSFindexRadicalSbrief; [n] children/*[1];[t] CSFopenRadicalSbrief; [n] children/*[2]; [t] CSFcloseRadicalBrief","self::root");(0,sre.MathspeakSpanish.defineRule_)("limboth","mathspeak.default","[n] children/*[1]; [t] CSFunderscript; [n] children/*[2];[t] CSFoverscript; [n] children/*[3]","self::limboth",'name(../..)="underscore" or name(../..)="overscore"','following-sibling::*[@role!="underaccent" and @role!="overaccent"]');(0,sre.MathspeakSpanish.defineRule_)("limlower",
|
1328
|
+
"mathspeak.default","[n] children/*[1]; [t] CSFunderscript; [n] children/*[2];","self::limlower",'name(../..)="underscore" or name(../..)="overscore"','following-sibling::*[@role!="underaccent" and @role!="overaccent"]');(0,sre.MathspeakSpanish.defineRule_)("limupper","mathspeak.default","[n] children/*[1]; [t] CSFoverscript; [n] children/*[2];","self::limupper",'name(../..)="underscore" or name(../..)="overscore"','following-sibling::*[@role!="underaccent" and @role!="overaccent"]');(0,sre.MathspeakSpanish.defineRuleAlias_)("limlower",
|
1329
|
+
"self::underscore",'@role="limit function"','name(../..)="underscore" or name(../..)="overscore"','following-sibling::*[@role!="underaccent" and @role!="overaccent"]');(0,sre.MathspeakSpanish.defineRuleAlias_)("limlower","self::underscore",'children/*[2][@role!="underaccent"]','name(../..)="underscore" or name(../..)="overscore"','following-sibling::*[@role!="underaccent" and @role!="overaccent"]');(0,sre.MathspeakSpanish.defineRuleAlias_)("limupper","self::overscore",'children/*[2][@role!="overaccent"]',
|
1330
|
+
'name(../..)="underscore" or name(../..)="overscore"','following-sibling::*[@role!="underaccent" and @role!="overaccent"]');(0,sre.MathspeakSpanish.defineRule_)("limboth-end","mathspeak.default",'[n] children/*[1]; [t] CSFunderscript; [n] children/*[2];[t] CSFoverscript; [n] children/*[3]; [t] "finalizar \u00edndices"',"self::limboth");(0,sre.MathspeakSpanish.defineRule_)("limlower-end","mathspeak.default",'[n] children/*[1]; [t] CSFunderscript; [n] children/*[2]; [t] "finalizar \u00edndices"',"self::limlower");
|
1331
|
+
(0,sre.MathspeakSpanish.defineRule_)("limupper-end","mathspeak.default",'[n] children/*[1]; [t] CSFoverscript; [n] children/*[2]; [t] "finalizar \u00edndices"',"self::limupper");(0,sre.MathspeakSpanish.defineRuleAlias_)("limlower-end","self::underscore",'@role="limit function"');(0,sre.MathspeakSpanish.defineRuleAlias_)("limlower-end","self::underscore");(0,sre.MathspeakSpanish.defineRuleAlias_)("limupper-end","self::overscore");(0,sre.MathspeakSpanish.defineRule_)("integral","mathspeak.default",
|
1332
|
+
"[n] children/*[1]; [n] children/*[2]; [n] children/*[3];","self::integral");(0,sre.MathspeakSpanish.defineRule_)("integral","mathspeak.default",'[n] children/*[1]; [t] "definida"; [t] "sub\u00edndice"; [n] children/*[2];[t] "super\u00edndice"; [n] children/*[3]; [t] "l\u00ednea base";',"self::limboth",'@role="integral"');(0,sre.MathspeakSpanish.defineSpecialisedRule_)("integral","mathspeak.default","mathspeak.brief",'[n] children/*[1]; [t] "Sub"; [n] children/*[2];[t] "Sup"; [n] children/*[3]; [t] "Base";');
|
1333
|
+
(0,sre.MathspeakSpanish.defineSpecialisedRule_)("integral","mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakSpanish.defineRule_)("bigop","mathspeak.default","[n] children/*[1]; [n] children/*[2];","self::bigop");(0,sre.MathspeakSpanish.defineRule_)("relseq","mathspeak.default","[m] children/* (sepFunc:CTXFcontentIterator)","self::relseq");(0,sre.MathspeakSpanish.defineRule_)("equality","mathspeak.default","[n] children/*[1]; [n] content/*[1]; [n] children/*[2]","self::relseq",'@role="equality"',
|
1334
|
+
"count(./children/*)=2");(0,sre.MathspeakSpanish.defineRule_)("multi-equality","mathspeak.default","[m] children/* (sepFunc:CTXFcontentIterator)","self::relseq",'@role="equality"',"count(./children/*)>2");(0,sre.MathspeakSpanish.defineRule_)("multrel","mathspeak.default","[m] children/* (sepFunc:CTXFcontentIterator)","self::multirel");(0,sre.MathspeakSpanish.defineRule_)("subscript","mathspeak.default","[n] children/*[1]; [t] CSFsubscriptVerbose; [n] children/*[2]","self::subscript");(0,sre.MathspeakSpanish.defineRule_)("subscript",
|
1335
|
+
"mathspeak.brief","[n] children/*[1]; [t] CSFsubscriptBrief; [n] children/*[2]","self::subscript");(0,sre.MathspeakSpanish.defineSpecialisedRule_)("subscript","mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakSpanish.defineRule_)("subscript-baseline","mathspeak.default","[n] children/*[1]; [t] CSFsubscriptVerbose; [n] children/*[2]; [t] CSFbaselineVerbose","self::subscript","following-sibling::*",'not(name(following-sibling::subscript/children/*[1])="empty" or (name(following-sibling::infixop[@role="implicit"]/children/*[1])="subscript" and name(following-sibling::*/children/*[1]/children/*[1])="empty")) and @role!="subsup"',
|
1336
|
+
'not(following-sibling::*[@role="rightsuper" or @role="rightsub" or @role="leftsub" or @role="leftsub"])');(0,sre.MathspeakSpanish.defineSpecialisedRule_)("subscript-baseline","mathspeak.default","mathspeak.brief","[n] children/*[1]; [t] CSFsubscriptBrief; [n] children/*[2]; [t] CSFbaselineBriefS");(0,sre.MathspeakSpanish.defineSpecialisedRule_)("subscript-baseline","mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakSpanish.defineRuleAlias_)("subscript-baseline","self::subscript","not(following-sibling::*)",
|
1337
|
+
"ancestor::fenced|ancestor::root|ancestor::sqrt|ancestor::punctuated|ancestor::fraction",'not(ancestor::punctuated[@role="leftsuper" or @role="rightsub" or @role="rightsuper" or @role="rightsub"])');(0,sre.MathspeakSpanish.defineRuleAlias_)("subscript-baseline","self::subscript","not(following-sibling::*)","ancestor::relseq|ancestor::multirel",sre.MathspeakUtil.generateBaselineConstraint());(0,sre.MathspeakSpanish.defineRuleAlias_)("subscript-baseline","self::subscript","not(following-sibling::*)",
|
1338
|
+
"@embellished");(0,sre.MathspeakSpanish.defineRule_)("subscript-empty-sup","mathspeak.default","[n] children/*[1]; [n] children/*[2]","self::subscript",'name(children/*[2])="infixop"','name(children/*[2][@role="implicit"]/children/*[1])="superscript"','name(children/*[2]/children/*[1]/children/*[1])="empty"');(0,sre.MathspeakSpanish.defineSpecialisedRule_)("subscript-empty-sup","mathspeak.default","mathspeak.brief");(0,sre.MathspeakSpanish.defineSpecialisedRule_)("subscript-empty-sup","mathspeak.brief",
|
1339
|
+
"mathspeak.sbrief");(0,sre.MathspeakSpanish.defineRuleAlias_)("subscript-empty-sup","self::subscript",'name(children/*[2])="superscript"','name(children/*[2]/children/*[1])="empty"');(0,sre.MathspeakSpanish.defineRule_)("superscript","mathspeak.default","[n] children/*[1]; [t] CSFsuperscriptVerbose; [n] children/*[2]","self::superscript");(0,sre.MathspeakSpanish.defineSpecialisedRule_)("superscript","mathspeak.default","mathspeak.brief","[n] children/*[1]; [t] CSFsuperscriptBrief; [n] children/*[2]");
|
1340
|
+
(0,sre.MathspeakSpanish.defineSpecialisedRule_)("superscript","mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakSpanish.defineRule_)("superscript-baseline","mathspeak.default","[n] children/*[1]; [t] CSFsuperscriptVerbose; [n] children/*[2];[t] CSFbaselineVerbose","self::superscript","following-sibling::*",'not(name(following-sibling::superscript/children/*[1])="empty" or (name(following-sibling::infixop[@role="implicit"]/children/*[1])="superscript" and name(following-sibling::*/children/*[1]/children/*[1])="empty")) and not(following-sibling::*[@role="rightsuper" or @role="rightsub" or @role="leftsub" or @role="leftsub"])');
|
1341
|
+
(0,sre.MathspeakSpanish.defineSpecialisedRule_)("superscript-baseline","mathspeak.default","mathspeak.brief","[n] children/*[1]; [t] CSFsuperscriptBrief; [n] children/*[2];[t] CSFbaselineBriefS");(0,sre.MathspeakSpanish.defineSpecialisedRule_)("superscript-baseline","mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakSpanish.defineRuleAlias_)("superscript-baseline","self::superscript","not(following-sibling::*)","ancestor::punctuated",'ancestor::*/following-sibling::* and not(ancestor::punctuated[@role="leftsuper" or @role="rightsub" or @role="rightsuper" or @role="rightsub"])');
|
1342
|
+
(0,sre.MathspeakSpanish.defineRuleAlias_)("superscript-baseline","self::superscript","not(following-sibling::*)","ancestor::fraction|ancestor::fenced|ancestor::root|ancestor::sqrt");(0,sre.MathspeakSpanish.defineRuleAlias_)("superscript-baseline","self::superscript","not(following-sibling::*)","ancestor::relseq|ancestor::multirel","not(@embellished)",sre.MathspeakUtil.generateBaselineConstraint());(0,sre.MathspeakSpanish.defineRuleAlias_)("superscript-baseline","self::superscript","not(following-sibling::*)",
|
1343
|
+
"@embellished",'not(children/*[2][@role="prime"])');(0,sre.MathspeakSpanish.defineRule_)("superscript-empty-sub","mathspeak.default","[n] children/*[1]; [n] children/*[2]","self::superscript",'name(children/*[2])="infixop"','name(children/*[2][@role="implicit"]/children/*[1])="subscript"','name(children/*[2]/children/*[1]/children/*[1])="empty"');(0,sre.MathspeakSpanish.defineSpecialisedRule_)("superscript-empty-sub","mathspeak.default","mathspeak.brief");(0,sre.MathspeakSpanish.defineSpecialisedRule_)("superscript-empty-sub",
|
1344
|
+
"mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakSpanish.defineRuleAlias_)("superscript-empty-sub","self::superscript",'name(children/*[2])="subscript"','name(children/*[2]/children/*[1])="empty"');(0,sre.MathspeakSpanish.defineRule_)("square","mathspeak.default",'[n] children/*[1]; [t] "al cuadrado"',"self::superscript","children/*[2]","children/*[2][text()=2]",'name(children/*[1])!="text" or not(name(children/*[1])="text" and (name(../../../punctuated[@role="text"]/..)="stree" or name(..)="stree"))',
|
1345
|
+
'name(children/*[1])!="subscript" or (name(children/*[1])="subscript" and name(children/*[1]/children/*[1])="identifier" and name(children/*[1]/children/*[2])="number" and children/*[1]/children/*[2][@role!="mixed"] and children/*[1]/children/*[2][@role!="othernumber"])',"not(@embellished)");(0,sre.MathspeakSpanish.defineSpecialisedRule_)("square","mathspeak.default","mathspeak.brief");(0,sre.MathspeakSpanish.defineSpecialisedRule_)("square","mathspeak.default","mathspeak.sbrief");(0,sre.MathspeakSpanish.defineRuleAlias_)("square",
|
1346
|
+
"self::superscript","children/*[2]","children/*[2][text()=2]","@embellished",'children/*[1][@role="prefix operator"]');(0,sre.MathspeakSpanish.defineRule_)("cube","mathspeak.default",'[n] children/*[1]; [t] "al cubo"',"self::superscript","children/*[2]","children/*[2][text()=3]",'name(children/*[1])!="text" or not(name(children/*[1])="text" and (name(../../../punctuated[@role="text"]/..)="stree" or name(..)="stree"))','name(children/*[1])!="subscript" or (name(children/*[1])="subscript" and name(children/*[1]/children/*[1])="identifier" and name(children/*[1]/children/*[2])="number" and children/*[1]/children/*[2][@role!="mixed"] and children/*[1]/children/*[2][@role!="othernumber"])',
|
1347
|
+
"not(@embellished)");(0,sre.MathspeakSpanish.defineSpecialisedRule_)("cube","mathspeak.default","mathspeak.brief");(0,sre.MathspeakSpanish.defineSpecialisedRule_)("cube","mathspeak.default","mathspeak.sbrief");(0,sre.MathspeakSpanish.defineRuleAlias_)("cube","self::superscript","children/*[2]","children/*[2][text()=3]","@embellished",'children/*[1][@role="prefix operator"]');(0,sre.MathspeakSpanish.defineRule_)("prime","mathspeak.default","[n] children/*[1]; [n] children/*[2]","self::superscript",
|
1348
|
+
"children/*[2]",'children/*[2][@role="prime"]');(0,sre.MathspeakSpanish.defineSpecialisedRule_)("prime","mathspeak.default","mathspeak.brief");(0,sre.MathspeakSpanish.defineSpecialisedRule_)("prime","mathspeak.default","mathspeak.sbrief");(0,sre.MathspeakSpanish.defineRule_)("prime-subscript","mathspeak.default","[n] children/*[1]/children/*[1]; [n] children/*[2]; [t] CSFsubscriptVerbose; [n] children/*[1]/children/*[2]","self::superscript",'children/*[2][@role="prime"]','name(children/*[1])="subscript"',
|
1349
|
+
"not(following-sibling::*)");(0,sre.MathspeakSpanish.defineSpecialisedRule_)("prime-subscript","mathspeak.default","mathspeak.brief","[n] children/*[1]/children/*[1]; [n] children/*[2]; [t] CSFsubscriptBrief; [n] children/*[1]/children/*[2]");(0,sre.MathspeakSpanish.defineSpecialisedRule_)("prime-subscript","mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakSpanish.defineRule_)("prime-subscript-baseline","mathspeak.default","[n] children/*[1]/children/*[1]; [n] children/*[2]; [t] CSFsubscriptVerbose; [n] children/*[1]/children/*[2]; [t] CSFbaselineVerbose",
|
1350
|
+
"self::superscript",'children/*[2][@role="prime"]','name(children/*[1])="subscript"',"following-sibling::*");(0,sre.MathspeakSpanish.defineSpecialisedRule_)("prime-subscript-baseline","mathspeak.default","mathspeak.brief","[n] children/*[1]/children/*[1]; [n] children/*[2]; [t] CSFsubscriptBrief; [n] children/*[1]/children/*[2]; [t] CSFbaselineBriefS");(0,sre.MathspeakSpanish.defineSpecialisedRule_)("prime-subscript-baseline","mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakSpanish.defineRuleAlias_)("prime-subscript-baseline",
|
1351
|
+
"self::superscript",'children/*[2][@role="prime"]','name(children/*[1])="subscript"',"not(following-sibling::*)","@embellished");(0,sre.MathspeakSpanish.defineRule_)("overscore","mathspeak.default",'[t] "modificando superior"; [n] children/*[1]; [t] "con"; [n] children/*[2]',"self::overscore",'children/*[2][@role="overaccent"]');(0,sre.MathspeakSpanish.defineSpecialisedRule_)("overscore","mathspeak.default","mathspeak.brief",'[t] "mod superior"; [n] children/*[1]; [t] "con"; [n] children/*[2]');(0,sre.MathspeakSpanish.defineSpecialisedRule_)("overscore",
|
1352
|
+
"mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakSpanish.defineRule_)("double-overscore","mathspeak.default",'[t] "modificando superior superior"; [n] children/*[1]; [t] "con"; [n] children/*[2]',"self::overscore",'children/*[2][@role="overaccent"]','name(children/*[1])="overscore"','children/*[1]/children/*[2][@role="overaccent"]');(0,sre.MathspeakSpanish.defineSpecialisedRule_)("double-overscore","mathspeak.default","mathspeak.brief",'[t] "mod superior superior"; [n] children/*[1]; [t] "con"; [n] children/*[2]');
|
1353
|
+
(0,sre.MathspeakSpanish.defineSpecialisedRule_)("double-overscore","mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakSpanish.defineRule_)("underscore","mathspeak.default",'[t] "modificando inferior"; [n] children/*[1]; [t] "con"; [n] children/*[2]',"self::underscore",'children/*[2][@role="underaccent"]');(0,sre.MathspeakSpanish.defineSpecialisedRule_)("underscore","mathspeak.default","mathspeak.brief",'[t] "mod inferior"; [n] children/*[1]; [t] "con"; [n] children/*[2]');(0,sre.MathspeakSpanish.defineSpecialisedRule_)("underscore",
|
1354
|
+
"mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakSpanish.defineRule_)("double-underscore","mathspeak.default",'[t] "modificando inferior inferior"; [n] children/*[1]; [t] "con"; [n] children/*[2]',"self::underscore",'children/*[2][@role="underaccent"]','name(children/*[1])="underscore"','children/*[1]/children/*[2][@role="underaccent"]');(0,sre.MathspeakSpanish.defineSpecialisedRule_)("double-underscore","mathspeak.default","mathspeak.brief",'[t] "mod inferior inferior"; [n] children/*[1]; [t] "con"; [n] children/*[2]');
|
1355
|
+
(0,sre.MathspeakSpanish.defineSpecialisedRule_)("double-underscore","mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakSpanish.defineRule_)("overbar","mathspeak.default",'[n] children/*[1]; [t] "barra"',"self::overscore",'@role="latinletter" or @role="greekletter" or @role="otherletter"','children/*[2][@role="overaccent"]','children/*[2][text()="\u00af" or text()="\uffe3" or text()="\uff3f" or text()="_" or text()="\u203e"]');(0,sre.MathspeakSpanish.defineSpecialisedRule_)("overbar","mathspeak.default",
|
1356
|
+
"mathspeak.brief",'[n] children/*[1]; [t] "barra"');(0,sre.MathspeakSpanish.defineSpecialisedRule_)("overbar","mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakSpanish.defineRule_)("underbar","mathspeak.default",'[n] children/*[1]; [t] "subbarra"',"self::underscore",'@role="latinletter" or @role="greekletter" or @role="otherletter"','children/*[2][@role="underaccent"]','children/*[2][text()="\u00af" or text()="\uffe3" or text()="\uff3f" or text()="_" or text()="\u203e"]');(0,sre.MathspeakSpanish.defineSpecialisedRule_)("underbar",
|
1357
|
+
"mathspeak.default","mathspeak.brief",'[n] children/*[1]; [t] "subbarra"');(0,sre.MathspeakSpanish.defineSpecialisedRule_)("underbar","mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakSpanish.defineRule_)("overtilde","mathspeak.default",'[n] children/*[1]; [t] "tilde"',"self::overscore",'children/*[2][@role="overaccent"]','@role="latinletter" or @role="greekletter" or @role="otherletter"','children/*[2][text()="~" or text()="\u02dc" or text()="\u223c" or text()="\uff5e"]');(0,sre.MathspeakSpanish.defineSpecialisedRule_)("overtilde",
|
1358
|
+
"mathspeak.default","mathspeak.brief",'[n] children/*[1]; [t] "tilde"');(0,sre.MathspeakSpanish.defineSpecialisedRule_)("overtilde","mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakSpanish.defineRule_)("undertilde","mathspeak.default",'[n] children/*[1]; [t] "subtilde"',"self::underscore",'@role="latinletter" or @role="greekletter" or @role="otherletter"','children/*[2][@role="underaccent"]','children/*[2][text()="~" or text()="\u02dc" or text()="\u223c" or text()="\uff5e"]');(0,sre.MathspeakSpanish.defineSpecialisedRule_)("undertilde",
|
1359
|
+
"mathspeak.default","mathspeak.brief",'[n] children/*[1]; [t] "subtilde"');(0,sre.MathspeakSpanish.defineSpecialisedRule_)("undertilde","mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakSpanish.defineRule_)("matrix-fence","mathspeak.default","[n] children/*[1];","self::fenced","count(children/*)=1",'name(children/*[1])="matrix"');(0,sre.MathspeakSpanish.defineRule_)("matrix","mathspeak.default",'[t] "empezar matriz"; [t] count(children/*); [t] "por";[t] count(children/*[1]/children/*); [m] children/* (ctxtFunc:CTXFordinalCounter,context:"fila "); [t] "finalizar matriz"',
|
1360
|
+
"self::matrix");(0,sre.MathspeakSpanish.defineRule_)("matrix","mathspeak.sbrief",'[t] "matriz"; [t] count(children/*); [t] "por";[t] count(children/*[1]/children/*); [m] children/* (ctxtFunc:CTXFordinalCounter,context:" "); [t] "finalizar matriz"',"self::matrix");(0,sre.MathspeakSpanish.defineRuleAlias_)("matrix","self::vector");(0,sre.MathspeakSpanish.defineRule_)("matrix-row","mathspeak.default",'[m] children/* (ctxtFunc:CTXFordinalCounter,context:"columna");[p] (pause: 200)',"self::row");(0,sre.MathspeakSpanish.defineRule_)("row-with-label",
|
1361
|
+
"mathspeak.default",'[t] "con etiqueta"; [n] content/*[1]; [t] "finalizar etiqueta" (pause: 200); [m] children/* (ctxtFunc:CTXFordinalCounter,context:"columna")',"self::row","content");(0,sre.MathspeakSpanish.defineRule_)("row-with-label","mathspeak.brief",'[t] "etiqueta"; [n] content/*[1]; [m] children/* (ctxtFunc:CTXFordinalCounter,context:"columna")',"self::row","content");(0,sre.MathspeakSpanish.defineSpecialisedRule_)("row-with-label","mathspeak.brief","mathspeak.sbrief");(0,sre.MathspeakSpanish.defineRule_)("row-with-text-label",
|
1362
|
+
"mathspeak.sbrief",'[t] "etiqueta"; [t] CSFRemoveParens;[m] children/* (ctxtFunc:CTXFordinalCounter,context:"columna")',"self::row","content",'name(content/cell/children/*[1])="text"');(0,sre.MathspeakSpanish.defineRule_)("empty-row","mathspeak.default",'[t] "espacio"',"self::row","count(children/*)=0");(0,sre.MathspeakSpanish.defineRule_)("matrix-cell","mathspeak.default","[n] children/*[1]; [p] (pause: 300)","self::cell");(0,sre.MathspeakSpanish.defineRule_)("empty-cell","mathspeak.default",'[t] "espacio"; [p] (pause: 300)',
|
1363
|
+
"self::cell","count(children/*)=0");(0,sre.MathspeakSpanish.defineRule_)("determinant","mathspeak.default",'[t] "empezar determinante"; [t] count(children/*); [t] "por";[t] count(children/*[1]/children/*); [m] children/* (ctxtFunc:CTXFordinalCounter,context:"fila "); [t] "finalizar determinante"',"self::matrix",'@role="determinant"');(0,sre.MathspeakSpanish.defineSpecialisedRule_)("determinant","mathspeak.default","mathspeak.sbrief",'[t] "determinante"; [t] count(children/*); [t] "por";[t] count(children/*[1]/children/*); [m] children/* (ctxtFunc:CTXFordinalCounter,context:"fila "); [t] "finalizar determinante"');
|
1364
|
+
(0,sre.MathspeakSpanish.defineRule_)("determinant-simple","mathspeak.default",'[t] "empezar determinante"; [t] count(children/*); [t] "por";[t] count(children/*[1]/children/*); [m] children/* (ctxtFunc:CTXFordinalCounter,context:"fila",grammar:simpleDet); [t] "finalizar determinante"',"self::matrix",'@role="determinant"',"CQFdetIsSimple");(0,sre.MathspeakSpanish.defineSpecialisedRule_)("determinant-simple","mathspeak.default","mathspeak.sbrief",'[t] "determinante"; [t] count(children/*); [t] "por";[t] count(children/*[1]/children/*); [m] children/* (ctxtFunc:CTXFordinalCounter,context:"fila",grammar:simpleDet); [t] "finalizar determinante"');
|
1365
|
+
(0,sre.MathspeakSpanish.defineRule_)("row-simple","mathspeak.default","[m] children/*;","self::row",'@role="determinant"','contains(@grammar, "simpleDet")');(0,sre.MathspeakSpanish.defineRule_)("layout","mathspeak.default",'[t] "empezar esquema"; [m] children/* (ctxtFunc:CTXFordinalCounter,context:"fila "); [t] "finalizar esquema"',"self::table");(0,sre.MathspeakSpanish.defineRule_)("layout","mathspeak.sbrief",'[t] "esquema"; [m] children/* (ctxtFunc:CTXFordinalCounter,context:"fila "); [t] "finalizar esquema"',
|
1366
|
+
"self::table");(0,sre.MathspeakSpanish.defineRule_)("binomial","mathspeak.default",'[t] "empezar binomial"; [n] children/*[1]/children/*[1]; [t] "en"; [n] children/*[2]/children/*[1]; [t] "finalizar binomial"',"self::vector",'@role="binomial"');(0,sre.MathspeakSpanish.defineRule_)("binomial","mathspeak.sbrief",'[t] "binomial"; [n] children/*[1]/children/*[1]; [t] "en"; [n] children/*[2]/children/*[1]; [t] "finalizar binomial"',"self::vector",'@role="binomial"');(0,sre.MathspeakSpanish.defineRule_)("cases",
|
1367
|
+
"mathspeak.default",'[t] "empezar esquema"; [n] content/*[1]; [t] "alargada"; [m] children/* (ctxtFunc:CTXFordinalCounter,context:"fila "); [t] "finalizar esquema"',"self::cases");(0,sre.MathspeakSpanish.defineRule_)("cases","mathspeak.sbrief",'[t] "esquema"; [n] content/*[1]; [t] "alargada"; [m] children/* (ctxtFunc:CTXFordinalCounter,context:"fila "); [t] "finalizar esquema"',"self::cases");(0,sre.MathspeakSpanish.defineRuleAlias_)("layout","self::multiline");(0,sre.MathspeakSpanish.defineRule_)("line",
|
1368
|
+
"mathspeak.default","[m] children/*","self::line");(0,sre.MathspeakSpanish.defineRule_)("line-with-label","mathspeak.default",'[t] "con etiqueta"; [n] content/*[1]; [t] "finalizar etiqueta" (pause: 200); [m] children/*',"self::line","content");(0,sre.MathspeakSpanish.defineSpecialisedRule_)("line-with-label","mathspeak.default","mathspeak.brief",'[t] "etiqueta"; [n] content/*[1] (pause: 200); [m] children/*');(0,sre.MathspeakSpanish.defineSpecialisedRule_)("line-with-label","mathspeak.brief","mathspeak.sbrief");
|
1369
|
+
(0,sre.MathspeakSpanish.defineRule_)("line-with-text-label","mathspeak.sbrief",'[t] "etiqueta"; [t] CSFRemoveParens; [m] children/*',"self::line","content",'name(content/cell/children/*[1])="text"');(0,sre.MathspeakSpanish.defineRule_)("empty-line","mathspeak.default",'[t] "espacio"',"self::line","count(children/*)=0","not(content)");(0,sre.MathspeakSpanish.defineSpecialisedRule_)("empty-line","mathspeak.default","mathspeak.brief");(0,sre.MathspeakSpanish.defineSpecialisedRule_)("empty-line","mathspeak.brief",
|
1370
|
+
"mathspeak.sbrief");(0,sre.MathspeakSpanish.defineRule_)("empty-line-with-label","mathspeak.default",'[t] "con etiqueta"; [n] content/*[1]; [t] "finalizar etiqueta" (pause: 200); [t] "espacio"',"self::line","count(children/*)=0","content");(0,sre.MathspeakSpanish.defineSpecialisedRule_)("empty-line-with-label","mathspeak.default","mathspeak.brief",'[t] "etiqueta"; [n] content/*[1] (pause: 200); [t] "espacio"');(0,sre.MathspeakSpanish.defineSpecialisedRule_)("empty-line-with-label","mathspeak.brief",
|
1371
|
+
"mathspeak.sbrief");(0,sre.MathspeakSpanish.defineRule_)("enclose","mathspeak.default",'[t] "empezar rodear"; [t] @role (grammar:localEnclose); [n] children/*[1]; [t] "finalizar rodear"',"self::enclose");(0,sre.MathspeakSpanish.defineRuleAlias_)("overbar","self::enclose",'@role="top"');(0,sre.MathspeakSpanish.defineRuleAlias_)("underbar","self::enclose",'@role="bottom"');(0,sre.MathspeakSpanish.defineRule_)("leftbar","mathspeak.default",'[t] "barra vertical"; [n] children/*[1]',"self::enclose",'@role="left"');
|
1372
|
+
(0,sre.MathspeakSpanish.defineRule_)("rightbar","mathspeak.default",'[n] children/*[1]; [t] "barra vertical"',"self::enclose",'@role="right"');(0,sre.MathspeakSpanish.defineRule_)("crossout","mathspeak.default",'[t] "tachado"; [n] children/*[1]; [t] "finalizar tachado"',"self::enclose",'@role="updiagonalstrike" or @role="downdiagonalstrike" or @role="horizontalstrike"');(0,sre.MathspeakSpanish.defineRule_)("cancel","mathspeak.default",'[t] "tachado"; [n] children/*[1]/children/*[1]; [t] "con"; [n] children/*[2]; [t] "finalizar tachado"',
|
1373
|
+
"self::overscore",'@role="updiagonalstrike" or @role="downdiagonalstrike" or @role="horizontalstrike"');(0,sre.MathspeakSpanish.defineSpecialisedRule_)("cancel","mathspeak.default","mathspeak.brief");(0,sre.MathspeakSpanish.defineSpecialisedRule_)("cancel","mathspeak.default","mathspeak.sbrief");(0,sre.MathspeakSpanish.defineRuleAlias_)("cancel","self::underscore",'@role="updiagonalstrike" or @role="downdiagonalstrike" or @role="horizontalstrike"');(0,sre.MathspeakSpanish.defineRule_)("cancel-reverse",
|
1374
|
+
"mathspeak.default",'[t] "tachado"; [n] children/*[2]/children/*[1]; [t] "con"; [n] children/*[1]; [t] "finalizar tachado"',"self::overscore",'name(children/*[2])="enclose"','children/*[2][@role="updiagonalstrike" or @role="downdiagonalstrike" or @role="horizontalstrike"]');(0,sre.MathspeakSpanish.defineSpecialisedRule_)("cancel-reverse","mathspeak.default","mathspeak.brief");(0,sre.MathspeakSpanish.defineSpecialisedRule_)("cancel-reverse","mathspeak.default","mathspeak.sbrief");(0,sre.MathspeakSpanish.defineRuleAlias_)("cancel-reverse",
|
1375
|
+
"self::underscore",'name(children/*[2])="enclose"','children/*[2][@role="updiagonalstrike" or @role="downdiagonalstrike" or @role="horizontalstrike"]');(0,sre.MathspeakSpanish.defineRule_)("end-punct","mathspeak.default","[m] children/*","self::punctuated",'@role="endpunct"');(0,sre.MathspeakSpanish.defineRule_)("start-punct","mathspeak.default","[n] content/*[1]; [m] children/*[position()>1]","self::punctuated",'@role="startpunct"');(0,sre.MathspeakSpanish.defineRule_)("integral-punct","mathspeak.default",
|
1376
|
+
"[n] children/*[1]; [n] children/*[3]","self::punctuated",'@role="integral"');(0,sre.MathspeakSpanish.defineRule_)("punctuated","mathspeak.default","[m] children/*","self::punctuated");(0,sre.MathspeakSpanish.defineRule_)("unit","mathspeak.default",'[t] text() (grammar:annotation="unit":translate)',"self::identifier",'@role="unit"');(0,sre.MathspeakSpanish.defineRule_)("unit","mathspeak.default",'[t] text() (grammar:annotation="unit":translate:plural)',"self::identifier",'@role="unit"','not(contains(@grammar, "singularUnit"))');
|
1377
|
+
(0,sre.MathspeakSpanish.defineRule_)("unit-square","mathspeak.default",'[t] "al cuadrado"; [n] children/*[1]',"self::superscript",'@role="unit"',"children/*[2][text()=2]",'name(children/*[1])="identifier"');(0,sre.MathspeakSpanish.defineRule_)("unit-cubic","mathspeak.default",'[t] "al cubo"; [n] children/*[1]',"self::superscript",'@role="unit"',"children/*[2][text()=3]",'name(children/*[1])="identifier"');(0,sre.MathspeakSpanish.defineRule_)("reciprocal","mathspeak.default",'[t] "reciprocal"; [n] children/*[1]',
|
1378
|
+
"self::superscript",'@role="unit"','name(children/*[1])="identifier"','name(children/*[2])="prefixop"','children/*[2][@role="negative"]',"children/*[2]/children/*[1][text()=1]",'count(preceding-sibling::*)=0 or preceding-sibling::*[@role!="unit"]');(0,sre.MathspeakSpanish.defineRule_)("reciprocal","mathspeak.default",'[t] "per"; [n] children/*[1]',"self::superscript",'@role="unit"','name(children/*[1])="identifier"','name(children/*[2])="prefixop"','children/*[2][@role="negative"]',"children/*[2]/children/*[1][text()=1]",
|
1379
|
+
'preceding-sibling::*[@role="unit"]');(0,sre.MathspeakSpanish.defineRule_)("unit-combine","mathspeak.default","[m] children/* (sepFunc:CTXFunitMultipliers)","self::infixop",'@role="unit"');(0,sre.MathspeakSpanish.defineRule_)("unit-combine","mathspeak.default","[m] children/* (sepFunc:CTXFunitMultipliers);","self::infixop",'@role="multiplication" or @role="implicit"','children/*[@role="unit"]');(0,sre.MathspeakSpanish.defineRule_)("unit-combine","mathspeak.default","[n] . (grammar:singularUnit);",
|
1380
|
+
"self::infixop",'@role="multiplication" or @role="implicit"','children/*[@role="unit"]','not(contains(@grammar, "singularUnit"))',"CQFoneLeft");(0,sre.MathspeakSpanish.defineRule_)("unit-divide","mathspeak.default",'[n] children/*[1]; [t] "per"; [n] children/*[2]',"self::fraction",'@role="unit"')};sre.MathspeakSpanish.generateTensorRules_=function(){sre.MathspeakUtil.generateTensorRules(sre.MathspeakSpanish.mathStore)};
|
1381
|
+
sre.MathspeakSpanish.getInstance().initializer=[sre.MathspeakSpanish.initCustomFunctions_,sre.MathspeakSpanish.initMathspeakSpanish_,sre.MathspeakSpanish.generateTensorRules_];sre.NemethUtil={};sre.NemethUtil.openingFraction=function(a){a=sre.MathspeakUtil.fractionNestingDepth(a);return Array(a).join(sre.Messages.MS.FRACTION_REPEAT)+sre.Messages.MS.FRACTION_START};sre.NemethUtil.closingFraction=function(a){a=sre.MathspeakUtil.fractionNestingDepth(a);return Array(a).join(sre.Messages.MS.FRACTION_REPEAT)+sre.Messages.MS.FRACTION_END};sre.NemethUtil.overFraction=function(a){a=sre.MathspeakUtil.fractionNestingDepth(a);return Array(a).join(sre.Messages.MS.FRACTION_REPEAT)+sre.Messages.MS.FRACTION_OVER};
|
1382
|
+
sre.NemethUtil.nestedRadical=function(a,b){a=sre.NemethUtil.radicalNestingDepth(a);return 1===a?b:Array(a).join(sre.Messages.MS.NESTED)+b};sre.NemethUtil.radicalNestingDepth=function(a,b){b=b||0;return a.parentNode?sre.NemethUtil.radicalNestingDepth(a.parentNode,"root"===a.tagName||"sqrt"===a.tagName?b+1:b):b};sre.NemethUtil.openingRadical=function(a){return sre.NemethUtil.nestedRadical(a,sre.Messages.MS.STARTROOT)};sre.NemethUtil.closingRadical=function(a){return sre.NemethUtil.nestedRadical(a,sre.Messages.MS.ENDROOT)};
|
1383
|
+
sre.NemethUtil.indexRadical=function(a){return sre.NemethUtil.nestedRadical(a,sre.Messages.MS.ROOTINDEX)};sre.NemethUtil.enlargeFence=function(a){if(1===a.length)return"\u2820"+a;var b=a.split("");return b.every(function(a){return"\u2833"===a})?"\u2820"+b.join("\u2820"):a.slice(0,1)+"\u2820"+a.slice(1)};sre.Grammar.getInstance().setCorrection("enlargeFence",sre.NemethUtil.enlargeFence);
|
1384
|
+
sre.NemethUtil.NUMBER_PROPAGATORS=[sre.SemanticAttr.Type.MULTIREL,sre.SemanticAttr.Type.RELSEQ,sre.SemanticAttr.Type.PUNCTUATED,sre.SemanticAttr.Type.APPL];sre.NemethUtil.checkParent_=function(a){a=a.parent;if(!a)return!1;var b=a.type;return-1!==sre.NemethUtil.NUMBER_PROPAGATORS.indexOf(b)||b===sre.SemanticAttr.Type.PREFIXOP&&a.role===sre.SemanticAttr.Role.NEGATIVE?!0:!1};sre.NemethUtil.childNumber_=function(a){var b=a.parent;return b?b.childNodes.indexOf(a):0};
|
1385
|
+
sre.NemethUtil.propagateNumber=function(a,b){if(!a.childNodes.length)return sre.NemethUtil.checkParent_(a)&&(b.number=!0),[b.number?"number":"",{number:!1}];sre.NemethUtil.checkParent_(a)&&(b.number=!0);return["",b]};sre.NemethUtil.numberIndicator=function(){return new sre.SemanticVisitor("nemeth",sre.NemethUtil.propagateNumber,{number:!0})};sre.NemethRules=function(){sre.MathStore.call(this);this.locale="nemeth";this.modality="braille"};goog.inherits(sre.NemethRules,sre.MathStore);goog.addSingletonGetter(sre.NemethRules);
|
1386
|
+
sre.NemethRules.prototype.evaluateDefault=function(a){a=a.textContent.slice(0);var b=[];if(a.match(/^\s+$/))return b;for(;a;){var c=a[0],d=c.charCodeAt(0);55296<=d&&56319>=d&&1<a.length&&!isNaN(a.charCodeAt(1))?(b.push(sre.AuditoryDescription.create({text:a.slice(0,2)},{adjust:!0,translate:!0})),a=a.substring(2)):(b.push(sre.AuditoryDescription.create({text:c},{adjust:!0,translate:!0})),a=a.substring(1))}return b};sre.NemethRules.mathStore=sre.NemethRules.getInstance();
|
1387
|
+
sre.NemethRules.defineRule_=goog.bind(sre.NemethRules.mathStore.defineRule,sre.NemethRules.mathStore);sre.NemethRules.defineRuleAlias_=goog.bind(sre.NemethRules.mathStore.defineRulesAlias,sre.NemethRules.mathStore);sre.NemethRules.defineSpecialisedRule_=goog.bind(sre.NemethRules.mathStore.defineSpecialisedRule,sre.NemethRules.mathStore);sre.NemethRules.addContextFunction_=goog.bind(sre.NemethRules.mathStore.contextFunctions.add,sre.NemethRules.mathStore.contextFunctions);
|
1388
|
+
sre.NemethRules.addCustomQuery_=goog.bind(sre.NemethRules.mathStore.customQueries.add,sre.NemethRules.mathStore.customQueries);sre.NemethRules.addCustomString_=goog.bind(sre.NemethRules.mathStore.customStrings.add,sre.NemethRules.mathStore.customStrings);sre.NemethRules.addAnnotators_=function(){sre.SemanticAnnotations.getInstance().register(sre.NemethUtil.numberIndicator())};
|
1389
|
+
sre.NemethRules.initCustomFunctions_=function(){(0,sre.NemethRules.addCustomQuery_)("CQFspaceoutNumber",sre.MathspeakUtil.spaceoutNumber);(0,sre.NemethRules.addCustomQuery_)("CQFspaceoutIdentifier",sre.MathspeakUtil.spaceoutIdentifier);(0,sre.NemethRules.addCustomString_)("CSFspaceoutText",sre.MathspeakUtil.spaceoutText);(0,sre.NemethRules.addCustomString_)("CSFopenFraction",sre.NemethUtil.openingFraction);(0,sre.NemethRules.addCustomString_)("CSFcloseFraction",sre.NemethUtil.closingFraction);(0,sre.NemethRules.addCustomString_)("CSFoverFraction",
|
1390
|
+
sre.NemethUtil.overFraction);(0,sre.NemethRules.addCustomString_)("CSFvulgarFraction",sre.NumbersUtil.vulgarFraction);(0,sre.NemethRules.addCustomQuery_)("CQFvulgarFractionSmall",sre.MathspeakUtil.isSmallVulgarFraction);(0,sre.NemethRules.addCustomString_)("CSFopenRadicalVerbose",sre.NemethUtil.openingRadical);(0,sre.NemethRules.addCustomString_)("CSFcloseRadicalVerbose",sre.NemethUtil.closingRadical);(0,sre.NemethRules.addCustomString_)("CSFindexRadicalVerbose",sre.NemethUtil.indexRadical);(0,sre.NemethRules.addCustomString_)("CSFsuperscriptVerbose",
|
1391
|
+
sre.MathspeakUtil.superscriptVerbose);(0,sre.NemethRules.addCustomString_)("CSFsubscriptVerbose",sre.MathspeakUtil.subscriptVerbose);(0,sre.NemethRules.addCustomString_)("CSFbaselineVerbose",sre.MathspeakUtil.baselineVerbose);(0,sre.NemethRules.addCustomString_)("CSFunderscript",sre.MathspeakUtil.nestedUnderscore);(0,sre.NemethRules.addCustomString_)("CSFoverscript",sre.MathspeakUtil.nestedOverscore);(0,sre.NemethRules.addContextFunction_)("CTXFordinalCounter",sre.NumbersUtil.ordinalCounter);(0,sre.NemethRules.addContextFunction_)("CTXFcontentIterator",
|
1392
|
+
sre.MathmlStoreUtil.contentIterator);(0,sre.NemethRules.addCustomQuery_)("CQFdetIsSimple",sre.MathspeakUtil.determinantIsSimple);(0,sre.NemethRules.addCustomString_)("CSFRemoveParens",sre.MathspeakUtil.removeParens);(0,sre.NemethRules.addCustomQuery_)("CQFresetNesting",sre.MathspeakUtil.resetNestingDepth)};
|
1393
|
+
sre.NemethRules.initNemethRules_=function(){(0,sre.NemethRules.defineRule_)("stree","default.default","[n] ./*[1]","self::stree","CQFresetNesting");(0,sre.NemethRules.defineRule_)("unknown","default.default","[n] text()","self::unknown");(0,sre.NemethRules.defineRule_)("protected","default.default","[t] text()","self::*",'@role="protected"');(0,sre.NemethRules.defineRule_)("omit-empty","default.default","[p] (pause:100)","self::empty");(0,sre.NemethRules.defineRule_)("blank-empty","default.default",
|
1394
|
+
'[t] "\u2800"',"self::empty","count(../*)=1",'name(../..)="cell" or name(../..)="line"');(0,sre.NemethRules.defineRule_)("font","default.default","[t] @font (grammar:localFont); [n] . (grammar:ignoreFont=@font)","self::*","@font",'not(contains(@grammar, "ignoreFont"))','@font!="normal"');(0,sre.NemethRules.defineRule_)("font-identifier-short","default.default","[t] @font (grammar:localFont); [n] . (grammar:ignoreFont=@font)","self::identifier","string-length(text())=1","@font",'not(contains(@grammar, "ignoreFont"))',
|
1395
|
+
'@font="normal"','""=translate(text(), "abcdefghijklmnopqrstuvwxyz\u03b1\u03b2\u03b3\u03b4\u03b5\u03b6\u03b7\u03b8\u03b9\u03ba\u03bb\u03bc\u03bd\u03be\u03bf\u03c0\u03c1\u03c2\u03c3\u03c4\u03c5\u03c6\u03c7\u03c8\u03c9ABCDEFGHIJKLMNOPQRSTUVWXYZ\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039a\u039b\u039c\u039d\u039e\u039f\u03a0\u03a1\u03a3\u03a3\u03a4\u03a5\u03a6\u03a7\u03a8\u03a9", "")','@role!="unit"');(0,sre.NemethRules.defineRule_)("font-identifier","default.default","[t] @font (grammar:localFont); [n] . (grammar:ignoreFont=@font)",
|
1396
|
+
"self::identifier","string-length(text())=1","@font",'@font="normal"','not(contains(@grammar, "ignoreFont"))','@role!="unit"');(0,sre.NemethRules.defineRule_)("omit-font","default.default","[n] . (grammar:ignoreFont=@font)","self::identifier","string-length(text())=1","@font",'@role!="greekletter"','not(contains(@grammar, "ignoreFont"))','@font="italic"');(0,sre.NemethRules.defineRule_)("number-indicator","default.default",'[t] "\u283c"; [n] text() (pause:10)',"self::number",'contains(@annotation, "nemeth:number")');
|
1397
|
+
(0,sre.NemethRules.defineRule_)("number","default.default","[n] text()","self::number");(0,sre.NemethRules.defineRule_)("mixed-number","default.default",'[n] children/*[1]; [t] "\u2838\u2839"; [n] children/*[2]; [t] "\u2838\u283c"',"self::number",'@role="mixed"');(0,sre.NemethRules.defineRule_)("number-with-chars","default.default",'[t] "\u283c"; [m] CQFspaceoutNumber',"self::number",'"" != translate(text(), "0123456789.,", "")','text() != translate(text(), "0123456789.,", "")');(0,sre.NemethRules.defineSpecialisedRule_)("number-with-chars",
|
1398
|
+
"default.default","default.brief",'[t] "\u283c"; [m] CQFspaceoutNumber');(0,sre.NemethRules.defineSpecialisedRule_)("number-with-chars","default.brief","default.sbrief");(0,sre.NemethRules.defineRule_)("number-as-upper-word","default.default",'[t] "UpperWord"; [t] CSFspaceoutText',"self::number","string-length(text())>1",'text()=translate(text(), "abcdefghijklmnopqrstuvwxyz\u03b1\u03b2\u03b3\u03b4\u03b5\u03b6\u03b7\u03b8\u03b9\u03ba\u03bb\u03bc\u03bd\u03be\u03bf\u03c0\u03c1\u03c2\u03c3\u03c4\u03c5\u03c6\u03c7\u03c8\u03c9", "ABCDEFGHIJKLMNOPQRSTUVWXYZ\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039a\u039b\u039c\u039d\u039e\u039f\u03a0\u03a1\u03a3\u03a3\u03a4\u03a5\u03a6\u03a7\u03a8\u03a9")',
|
1399
|
+
'""=translate(text(), "ABCDEFGHIJKLMNOPQRSTUVWXYZ\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039a\u039b\u039c\u039d\u039e\u039f\u03a0\u03a1\u03a3\u03a3\u03a4\u03a5\u03a6\u03a7\u03a8\u03a9","")');(0,sre.NemethRules.defineRule_)("number-baseline","default.default",'[t] "Baseline"; [n] text()',"self::number",'not(contains(@grammar, "ignoreFont"))',"preceding-sibling::identifier",'preceding-sibling::*[1][@role="latinletter" or @role="greekletter" or @role="otherletter"]','parent::*/parent::infixop[@role="implicit"]');
|
1400
|
+
(0,sre.NemethRules.defineSpecialisedRule_)("number-baseline","default.default","default.brief",'[t] "Base"; [n] text()');(0,sre.NemethRules.defineSpecialisedRule_)("number-baseline","default.brief","default.sbrief");(0,sre.NemethRules.defineRule_)("number-baseline-font","default.default",'[t] "Baseline"; [t] @font; [n] . (grammar:ignoreFont=@font)',"self::number","@font",'not(contains(@grammar, "ignoreFont"))','@font!="normal"',"preceding-sibling::identifier",'preceding-sibling::*[@role="latinletter" or @role="greekletter" or @role="otherletter"]',
|
1401
|
+
'parent::*/parent::infixop[@role="implicit"]');(0,sre.NemethRules.defineSpecialisedRule_)("number-baseline-font","default.default","default.brief",'[t] "Base"; [n] text()');(0,sre.NemethRules.defineSpecialisedRule_)("number-baseline-font","default.brief","default.sbrief");(0,sre.NemethRules.defineRule_)("identifier","default.default","[n] text()","self::identifier",'@role="protected"');(0,sre.NemethRules.defineRule_)("negative","default.default",'[t] "\u2824"; [n] children/*[1]',"self::prefixop",
|
1402
|
+
'@role="negative"');(0,sre.NemethRules.defineRule_)("prefix","default.default","[n] text(); [n] children/*[1]","self::prefixop");(0,sre.NemethRules.defineRule_)("postfix","default.default","[n] children/*[1]; [n] text()","self::postfixop");(0,sre.NemethRules.defineRule_)("binary-operation","default.default","[m] children/* (sepFunc:CTXFcontentIterator);","self::infixop");(0,sre.NemethRules.defineRule_)("implicit","default.default","[m] children/*","self::infixop",'@role="implicit"');(0,sre.NemethRules.defineRuleAlias_)("implicit",
|
1403
|
+
"self::infixop",'@role="leftsuper" or @role="leftsub" or @role="rightsuper" or @role="rightsub"');(0,sre.NemethRules.defineRule_)("function-named","default.default",'[n] children/*[1]; [t] "\u2800"; [n] children/*[2]',"self::appl");(0,sre.NemethRules.defineRule_)("function-prefix","default.default",'[n] content/*[1]; [t] "\u2800"; [n] children/*[1]',"self::prefixop",'content/*[1][@role="infix function"]');(0,sre.NemethRules.defineRule_)("function-infix","default.default",'[n] children/*[1]; [n] content/*[1]; [t] "\u2800"; [n] children/*[2]',
|
1404
|
+
"self::infixop",'@role="infix function"');(0,sre.NemethRules.defineRule_)("function-simple","default.default","[n] children/*[1]; [n] children/*[2]","self::appl",'children/*[1][@role="simple function"]');(0,sre.NemethRules.defineRule_)("fences-open-close","default.default","[n] content/*[1]; [n] children/*[1]; [n] content/*[2]","self::fenced");(0,sre.NemethRules.defineRule_)("fences-neutral","default.default","[n] content/*[1]; [n] children/*[1]; [n] content/*[2]","self::fenced",'@role="neutral"');
|
1405
|
+
(0,sre.NemethRules.defineRule_)("text","default.default","[n] text()","self::text");(0,sre.NemethRules.defineRule_)("factorial","default.default",'[t] "\u282f"',"self::punctuation",'text()="!"','name(preceding-sibling::*[1])!="text"');(0,sre.NemethRules.defineRule_)("single-prime","default.default",'[t] "\u2804"',"self::punctuated",'@role="prime"',"count(children/*)=1");(0,sre.NemethRules.defineRule_)("double-prime","default.default",'[t] "\u2804\u2804"',"self::punctuated",'@role="prime"',"count(children/*)=2");
|
1406
|
+
(0,sre.NemethRules.defineRule_)("triple-prime","default.default",'[t] "\u2804\u2804\u2804"',"self::punctuated",'@role="prime"',"count(children/*)=3");(0,sre.NemethRules.defineRule_)("quadruple-prime","default.default",'[t] "\u2804\u2804\u2804\u2804"',"self::punctuated",'@role="prime"',"count(children/*)=4");(0,sre.NemethRules.defineRule_)("fraction","default.default","[t] CSFopenFraction; [n] children/*[1]; [t] CSFoverFraction; [n] children/*[2]; [t] CSFcloseFraction","self::fraction");(0,sre.NemethRules.defineRule_)("fraction",
|
1407
|
+
"default.brief","[t] CSFopenFracBrief; [n] children/*[1]; [t] CSFoverFraction; [n] children/*[2]; [t] CSFcloseFracBrief","self::fraction");(0,sre.NemethRules.defineRule_)("fraction","default.sbrief","[t] CSFopenFracSbrief; [n] children/*[1]; [t] CSFoverFracSbrief; [n] children/*[2]; [t] CSFcloseFracSbrief","self::fraction");(0,sre.NemethRules.defineRule_)("continued-fraction-outer","default.default",'[t] "ContinuedFraction"; [n] children/*[1];[t] "Over"; [n] children/*[2]',"self::fraction","not(ancestor::fraction)",
|
1408
|
+
'children/*[2]/descendant-or-self::*[@role="ellipsis" and not(following-sibling::*)]');(0,sre.NemethRules.defineSpecialisedRule_)("continued-fraction-outer","default.default","default.brief",'[t] "ContinuedFrac"; [n] children/*[1];[t] "Over"; [n] children/*[2]');(0,sre.NemethRules.defineSpecialisedRule_)("continued-fraction-outer","default.brief","default.sbrief");(0,sre.NemethRules.defineRule_)("continued-fraction-inner","default.default",'[t] "StartFraction"; [n] children/*[1];[t] "Over"; [n] children/*[2]',
|
1409
|
+
"self::fraction","ancestor::fraction",'children/*[2]/descendant-or-self::*[@role="ellipsis" and not(following-sibling::*)]');(0,sre.NemethRules.defineSpecialisedRule_)("continued-fraction-inner","default.default","default.brief",'[t] "StartFrac"; [n] children/*[1];[t] "Over"; [n] children/*[2]');(0,sre.NemethRules.defineSpecialisedRule_)("continued-fraction-inner","default.brief","default.sbrief",'[t] "Frac"; [n] children/*[1];[t] "Over"; [n] children/*[2]');(0,sre.NemethRules.defineRule_)("sqrt",
|
1410
|
+
"default.default","[t] CSFopenRadicalVerbose; [n] children/*[1]; [t] CSFcloseRadicalVerbose","self::sqrt");(0,sre.NemethRules.defineRule_)("root","default.default",'[t] CSFindexRadicalVerbose; [n] children/*[1];[t] "\u281c"; [n] children/*[2]; [t] CSFcloseRadicalVerbose',"self::root");(0,sre.NemethRules.defineRule_)("root","default.brief","[t] CSFindexRadicalBrief; [n] children/*[1];[t] CSFopenRadicalBrief; [n] children/*[2]; [t] CSFcloseRadicalBrief","self::root");(0,sre.NemethRules.defineRule_)("root",
|
1411
|
+
"default.sbrief","[t] CSFindexRadicalSbrief; [n] children/*[1];[t] CSFopenRadicalSbrief; [n] children/*[2]; [t] CSFcloseRadicalBrief","self::root");(0,sre.NemethRules.defineRule_)("limboth","default.default",'[t] "\u2810"; [n] children/*[1]; [t] CSFunderscript; [n] children/*[2];[t] CSFoverscript; [n] children/*[3]',"self::limboth",'name(../..)="underscore" or name(../..)="overscore"','following-sibling::*[@role!="underaccent" and @role!="overaccent"]');(0,sre.NemethRules.defineRule_)("limlower",
|
1412
|
+
"default.default",'[t] "\u2810"; [n] children/*[1]; [t] CSFunderscript; [n] children/*[2];',"self::limlower",'name(../..)="underscore" or name(../..)="overscore"','following-sibling::*[@role!="underaccent" and @role!="overaccent"]');(0,sre.NemethRules.defineRule_)("limupper","default.default",'[t] "\u2810"; [n] children/*[1]; [t] CSFoverscript; [n] children/*[2];',"self::limupper",'name(../..)="underscore" or name(../..)="overscore"','following-sibling::*[@role!="underaccent" and @role!="overaccent"]');
|
1413
|
+
(0,sre.NemethRules.defineRuleAlias_)("limlower","self::underscore",'@role="limit function"','name(../..)="underscore" or name(../..)="overscore"','following-sibling::*[@role!="underaccent" and @role!="overaccent"]');(0,sre.NemethRules.defineRuleAlias_)("limlower","self::underscore",'children/*[2][@role!="underaccent"]','name(../..)="underscore" or name(../..)="overscore"','following-sibling::*[@role!="underaccent" and @role!="overaccent"]');(0,sre.NemethRules.defineRuleAlias_)("limupper","self::overscore",
|
1414
|
+
'children/*[2][@role!="overaccent"]','name(../..)="underscore" or name(../..)="overscore"','following-sibling::*[@role!="underaccent" and @role!="overaccent"]');(0,sre.NemethRules.defineRule_)("limboth-end","default.default",'[t] "\u2810"; [n] children/*[1]; [t] CSFunderscript; [n] children/*[2];[t] CSFoverscript; [n] children/*[3]; [t] "\u283b"',"self::limboth");(0,sre.NemethRules.defineRule_)("limlower-end","default.default",'[t] "\u2810"; [n] children/*[1]; [t] CSFunderscript; [n] children/*[2]; [t] "\u283b"',
|
1415
|
+
"self::limlower");(0,sre.NemethRules.defineRule_)("limupper-end","default.default",'[t] "\u2810"; [n] children/*[1]; [t] CSFoverscript; [n] children/*[2]; [t] "\u283b"',"self::limupper");(0,sre.NemethRules.defineRuleAlias_)("limlower-end","self::underscore",'@role="limit function"');(0,sre.NemethRules.defineRuleAlias_)("limlower-end","self::underscore");(0,sre.NemethRules.defineRuleAlias_)("limupper-end","self::overscore");(0,sre.NemethRules.defineRule_)("integral","default.default","[n] children/*[1]; [n] children/*[2]; [n] children/*[3];",
|
1416
|
+
"self::integral");(0,sre.NemethRules.defineRule_)("integral","default.default",'[n] children/*[1]; [t] "Subscript"; [n] children/*[2];[t] "Superscript"; [n] children/*[3]; [t] "Baseline";',"self::limboth",'@role="integral"');(0,sre.NemethRules.defineSpecialisedRule_)("integral","default.default","default.brief",'[n] children/*[1]; [t] "Sub"; [n] children/*[2];[t] "Sup"; [n] children/*[3]; [t] "Base";');(0,sre.NemethRules.defineSpecialisedRule_)("integral","default.brief","default.sbrief");(0,sre.NemethRules.defineRule_)("bigop",
|
1417
|
+
"default.default","[n] children/*[1]; [n] children/*[2];","self::bigop");(0,sre.NemethRules.defineRule_)("relseq","default.default","[m] children/* (sepFunc:CTXFcontentIterator)","self::relseq");(0,sre.NemethRules.defineRule_)("equality","default.default","[n] children/*[1]; [n] content/*[1]; [n] children/*[2]","self::relseq",'@role="equality"',"count(./children/*)=2");(0,sre.NemethRules.defineRule_)("multi-equality","default.default","[m] children/* (sepFunc:CTXFcontentIterator)","self::relseq",
|
1418
|
+
'@role="equality"',"count(./children/*)>2");(0,sre.NemethRules.defineRule_)("multrel","default.default","[m] children/* (sepFunc:CTXFcontentIterator)","self::multirel");(0,sre.NemethRules.defineRule_)("subscript","default.default","[n] children/*[1]; [t] CSFsubscriptVerbose; [n] children/*[2]","self::subscript");(0,sre.NemethRules.defineRule_)("subscript","default.brief","[n] children/*[1]; [t] CSFsubscriptBrief; [n] children/*[2]","self::subscript");(0,sre.NemethRules.defineSpecialisedRule_)("subscript",
|
1419
|
+
"default.brief","default.sbrief");(0,sre.NemethRules.defineRule_)("subscript-simple","default.default","[n] children/*[1]; [n] children/*[2]","self::subscript",'name(./children/*[1])="identifier"','name(./children/*[2])="number"','./children/*[2][@role!="mixed"]','./children/*[2][@role!="othernumber"]');(0,sre.NemethRules.defineSpecialisedRule_)("subscript-simple","default.default","default.brief");(0,sre.NemethRules.defineSpecialisedRule_)("subscript-simple","default.default","default.sbrief");(0,sre.NemethRules.defineRule_)("subscript-baseline",
|
1420
|
+
"default.default","[n] children/*[1]; [t] CSFsubscriptVerbose; [n] children/*[2]; [t] CSFbaselineVerbose","self::subscript","following-sibling::*",'not(name(following-sibling::subscript/children/*[1])="empty" or (name(following-sibling::infixop[@role="implicit"]/children/*[1])="subscript" and name(following-sibling::*/children/*[1]/children/*[1])="empty")) and @role!="subsup"','not(following-sibling::*[@role="rightsuper" or @role="rightsub" or @role="leftsub" or @role="leftsub"])');(0,sre.NemethRules.defineSpecialisedRule_)("subscript-baseline",
|
1421
|
+
"default.default","default.brief","[n] children/*[1]; [t] CSFsubscriptBrief; [n] children/*[2]; [t] CSFbaselineBrief");(0,sre.NemethRules.defineSpecialisedRule_)("subscript-baseline","default.brief","default.sbrief");(0,sre.NemethRules.defineRuleAlias_)("subscript-baseline","self::subscript","not(following-sibling::*)","ancestor::fenced|ancestor::root|ancestor::sqrt|ancestor::punctuated|ancestor::fraction",'not(ancestor::punctuated[@role="leftsuper" or @role="rightsub" or @role="rightsuper" or @role="rightsub"])');
|
1422
|
+
(0,sre.NemethRules.defineRuleAlias_)("subscript-baseline","self::subscript","not(following-sibling::*)","ancestor::relseq|ancestor::multirel",sre.MathspeakUtil.generateBaselineConstraint());(0,sre.NemethRules.defineRuleAlias_)("subscript-baseline","self::subscript","not(following-sibling::*)","@embellished");(0,sre.NemethRules.defineRule_)("subscript-empty-sup","default.default","[n] children/*[1]; [n] children/*[2]","self::subscript",'name(children/*[2])="infixop"','name(children/*[2][@role="implicit"]/children/*[1])="superscript"',
|
1423
|
+
'name(children/*[2]/children/*[1]/children/*[1])="empty"');(0,sre.NemethRules.defineSpecialisedRule_)("subscript-empty-sup","default.default","default.brief");(0,sre.NemethRules.defineSpecialisedRule_)("subscript-empty-sup","default.brief","default.sbrief");(0,sre.NemethRules.defineRuleAlias_)("subscript-empty-sup","self::subscript",'name(children/*[2])="superscript"','name(children/*[2]/children/*[1])="empty"');(0,sre.NemethRules.defineRule_)("superscript","default.default","[n] children/*[1]; [t] CSFsuperscriptVerbose; [n] children/*[2]",
|
1424
|
+
"self::superscript");(0,sre.NemethRules.defineSpecialisedRule_)("superscript","default.default","default.brief","[n] children/*[1]; [t] CSFsuperscriptBrief; [n] children/*[2]");(0,sre.NemethRules.defineSpecialisedRule_)("superscript","default.brief","default.sbrief");(0,sre.NemethRules.defineRule_)("superscript-baseline","default.default","[n] children/*[1]; [t] CSFsuperscriptVerbose; [n] children/*[2];[t] CSFbaselineVerbose","self::superscript","following-sibling::*",'not(name(following-sibling::superscript/children/*[1])="empty" or (name(following-sibling::infixop[@role="implicit"]/children/*[1])="superscript" and name(following-sibling::*/children/*[1]/children/*[1])="empty")) and not(following-sibling::*[@role="rightsuper" or @role="rightsub" or @role="leftsub" or @role="leftsub"])');
|
1425
|
+
(0,sre.NemethRules.defineSpecialisedRule_)("superscript-baseline","default.default","default.brief","[n] children/*[1]; [t] CSFsuperscriptBrief; [n] children/*[2];[t] CSFbaselineBrief");(0,sre.NemethRules.defineSpecialisedRule_)("superscript-baseline","default.brief","default.sbrief");(0,sre.NemethRules.defineRuleAlias_)("superscript-baseline","self::superscript","not(following-sibling::*)","ancestor::punctuated",'ancestor::*/following-sibling::* and not(ancestor::punctuated[@role="leftsuper" or @role="rightsub" or @role="rightsuper" or @role="rightsub"])');
|
1426
|
+
(0,sre.NemethRules.defineRuleAlias_)("superscript-baseline","self::superscript","not(following-sibling::*)","ancestor::fraction|ancestor::fenced|ancestor::root|ancestor::sqrt");(0,sre.NemethRules.defineRuleAlias_)("superscript-baseline","self::superscript","not(following-sibling::*)","ancestor::relseq|ancestor::multirel","not(@embellished)",sre.MathspeakUtil.generateBaselineConstraint());(0,sre.NemethRules.defineRuleAlias_)("superscript-baseline","self::superscript","not(following-sibling::*)","@embellished",
|
1427
|
+
'not(children/*[2][@role="prime"])');(0,sre.NemethRules.defineRule_)("superscript-empty-sub","default.default","[n] children/*[1]; [n] children/*[2]","self::superscript",'name(children/*[2])="infixop"','name(children/*[2][@role="implicit"]/children/*[1])="subscript"','name(children/*[2]/children/*[1]/children/*[1])="empty"');(0,sre.NemethRules.defineSpecialisedRule_)("superscript-empty-sub","default.default","default.brief");(0,sre.NemethRules.defineSpecialisedRule_)("superscript-empty-sub","default.brief",
|
1428
|
+
"default.sbrief");(0,sre.NemethRules.defineRuleAlias_)("superscript-empty-sub","self::superscript",'name(children/*[2])="subscript"','name(children/*[2]/children/*[1])="empty"');(0,sre.NemethRules.defineRule_)("prime","default.default","[n] children/*[1]; [n] children/*[2]","self::superscript","children/*[2]",'children/*[2][@role="prime"]');(0,sre.NemethRules.defineSpecialisedRule_)("prime","default.default","default.brief");(0,sre.NemethRules.defineSpecialisedRule_)("prime","default.default","default.sbrief");
|
1429
|
+
(0,sre.NemethRules.defineRule_)("prime-subscript","default.default","[n] children/*[1]/children/*[1]; [n] children/*[2]; [t] CSFsubscriptVerbose; [n] children/*[1]/children/*[2]","self::superscript",'children/*[2][@role="prime"]','name(children/*[1])="subscript"',"not(following-sibling::*)");(0,sre.NemethRules.defineSpecialisedRule_)("prime-subscript","default.default","default.brief","[n] children/*[1]/children/*[1]; [n] children/*[2]; [t] CSFsubscriptBrief; [n] children/*[1]/children/*[2]");(0,sre.NemethRules.defineSpecialisedRule_)("prime-subscript",
|
1430
|
+
"default.brief","default.sbrief");(0,sre.NemethRules.defineRule_)("prime-subscript-baseline","default.default","[n] children/*[1]/children/*[1]; [n] children/*[2]; [t] CSFsubscriptVerbose; [n] children/*[1]/children/*[2]; [t] CSFbaselineVerbose","self::superscript",'children/*[2][@role="prime"]','name(children/*[1])="subscript"',"following-sibling::*");(0,sre.NemethRules.defineSpecialisedRule_)("prime-subscript-baseline","default.default","default.brief","[n] children/*[1]/children/*[1]; [n] children/*[2]; [t] CSFsubscriptBrief; [n] children/*[1]/children/*[2]; [t] CSFbaselineBrief");
|
1431
|
+
(0,sre.NemethRules.defineSpecialisedRule_)("prime-subscript-baseline","default.brief","default.sbrief");(0,sre.NemethRules.defineRuleAlias_)("prime-subscript-baseline","self::superscript",'children/*[2][@role="prime"]','name(children/*[1])="subscript"',"not(following-sibling::*)","@embellished");(0,sre.NemethRules.defineRule_)("prime-subscript-simple","default.default","[n] children/*[1]/children/*[1]; [n] children/*[2];[n] children/*[1]/children/*[2]","self::superscript",'children/*[2][@role="prime"]',
|
1432
|
+
'name(children/*[1])="subscript"','name(children/*[1]/children/*[1])="identifier"','name(children/*[1]/children/*[2])="number"','children/*[1]/children/*[2][@role!="mixed"]','children/*[1]/children/*[2][@role!="othernumber"]');(0,sre.NemethRules.defineSpecialisedRule_)("prime-subscript-simple","default.default","default.brief");(0,sre.NemethRules.defineSpecialisedRule_)("prime-subscript-simple","default.default","default.sbrief");(0,sre.NemethRules.defineRule_)("overscore","default.default",'[t] "\u2810"; [n] children/*[1]; [t] "\u2823"; [n] children/*[2]; [t] "\u283b"',
|
1433
|
+
"self::overscore",'children/*[2][@role="overaccent"]');(0,sre.NemethRules.defineRule_)("overscore","default.default",'[n] children/*[1]; [t] "\u2823"; [n] children/*[2]',"self::overscore",'children/*[2][@role="overaccent"]','contains(@grammar, "modified")');(0,sre.NemethRules.defineSpecialisedRule_)("overscore","default.default","default.brief",'[t] "ModAbove"; [n] children/*[1]; [t] "With"; [n] children/*[2]');(0,sre.NemethRules.defineSpecialisedRule_)("overscore","default.brief","default.sbrief");
|
1434
|
+
(0,sre.NemethRules.defineRule_)("double-overscore","default.default",'[t] "\u2810"; [n] children/*[1] (grammar:"modified"); [t] "\u2823"; [n] children/*[2]; [t] "\u283b"',"self::overscore",'children/*[2][@role="overaccent"]','name(children/*[1])="overscore"','children/*[1]/children/*[2][@role="overaccent"]');(0,sre.NemethRules.defineSpecialisedRule_)("double-overscore","default.default","default.brief",'[t] "ModAbove Above"; [n] children/*[1]; [t] "With"; [n] children/*[2]');(0,sre.NemethRules.defineSpecialisedRule_)("double-overscore",
|
1435
|
+
"default.brief","default.sbrief");(0,sre.NemethRules.defineRule_)("underscore","default.default",'[t] "\u2810"; [n] children/*[1]; [t] "\u2829"; [n] children/*[2]; [t] "\u283b"',"self::underscore",'children/*[2][@role="underaccent"]');(0,sre.NemethRules.defineRule_)("underscore","default.default",'[n] children/*[1]; [t] "\u2829"; [n] children/*[2]',"self::underscore",'children/*[2][@role="underaccent"]','contains(@grammar, "modified")');(0,sre.NemethRules.defineSpecialisedRule_)("underscore","default.default",
|
1436
|
+
"default.brief",'[t] "ModBelow"; [n] children/*[1]; [t] "With"; [n] children/*[2]');(0,sre.NemethRules.defineSpecialisedRule_)("underscore","default.brief","default.sbrief");(0,sre.NemethRules.defineRule_)("double-underscore","default.default",'[t] "\u2810"; [n] children/*[1] (grammar:"modified"); [t] "\u2829"; [n] children/*[2]; [t] "\u283b"',"self::underscore",'children/*[2][@role="underaccent"]','name(children/*[1])="underscore"','children/*[1]/children/*[2][@role="underaccent"]');(0,sre.NemethRules.defineSpecialisedRule_)("double-underscore",
|
1437
|
+
"default.default","default.brief",'[t] "ModBelow Below"; [n] children/*[1]; [t] "With"; [n] children/*[2]');(0,sre.NemethRules.defineSpecialisedRule_)("double-underscore","default.brief","default.sbrief");(0,sre.NemethRules.defineRule_)("matrix-fence","default.default","[n] children/*[1];","self::fenced","count(children/*)=1",'name(children/*[1])="matrix"');(0,sre.NemethRules.defineRule_)("matrix","default.default",'[m] children/* (separator:"\u2800", join:"");',"self::matrix");(0,sre.NemethRules.defineRuleAlias_)("matrix",
|
1438
|
+
"self::vector");(0,sre.NemethRules.defineRule_)("matrix-row","default.default",'[n] ../../content/*[1] (grammar:enlargeFence); [m] children/* (separator:"\u2800"); [n] ../../content/*[2] (grammar:enlargeFence); ',"self::row");(0,sre.NemethRules.defineRule_)("row-with-label","default.default",'[t] "with Label"; [n] content/*[1]; [t] "EndLabel"(pause: 200); [m] children/* (ctxtFunc:CTXFordinalCounter,context:"Column")',"self::row","content");(0,sre.NemethRules.defineRule_)("row-with-label","default.brief",
|
1439
|
+
'[t] "Label"; [n] content/*[1]; [m] children/* (ctxtFunc:CTXFordinalCounter,context:"Column")',"self::row","content");(0,sre.NemethRules.defineSpecialisedRule_)("row-with-label","default.brief","default.sbrief");(0,sre.NemethRules.defineRule_)("row-with-text-label","default.sbrief",'[t] "Label"; [t] CSFRemoveParens;[m] children/* (ctxtFunc:CTXFordinalCounter,context:"Column")',"self::row","content",'name(content/cell/children/*[1])="text"');(0,sre.NemethRules.defineRule_)("empty-row","default.default",
|
1440
|
+
'[t] "\u2800" (pause:300)',"self::row","count(children/*)=0");(0,sre.NemethRules.defineRule_)("matrix-cell","default.default","[n] children/*[1]","self::cell");(0,sre.NemethRules.defineRule_)("empty-cell","default.default",'[t] "\u2800" (pause: 300)',"self::cell","count(children/*)=0");(0,sre.NemethRules.defineRule_)("layout","default.default",'[t] "StartLayout"; [m] children/* (ctxtFunc:CTXFordinalCounter,context:"Row "); [t] "EndLayout"',"self::table");(0,sre.NemethRules.defineRule_)("layout","default.sbrief",
|
1441
|
+
'[t] "Layout"; [m] children/* (ctxtFunc:CTXFordinalCounter,context:"Row "); [t] "EndLayout"',"self::table");(0,sre.NemethRules.defineRule_)("cases","default.default",'[t] "StartLayout"; [t] "Enlarged"; [n] content/*[1];[m] children/* (ctxtFunc:CTXFordinalCounter,context:"Row "); [t] "EndLayout"',"self::cases");(0,sre.NemethRules.defineRule_)("cases","default.sbrief",'[t] "Layout"; [t] "Enlarged"; [n] content/*[1];[m] children/* (ctxtFunc:CTXFordinalCounter,context:"Row "); [t] "EndLayout"',"self::cases");
|
1442
|
+
(0,sre.NemethRules.defineRuleAlias_)("layout","self::multiline");(0,sre.NemethRules.defineRule_)("line","default.default","[m] children/*","self::line");(0,sre.NemethRules.defineRule_)("line-with-label","default.default",'[t] "with Label"; [n] content/*[1]; [t] "EndLabel" (pause: 200); [m] children/*',"self::line","content");(0,sre.NemethRules.defineSpecialisedRule_)("line-with-label","default.default","default.brief",'[t] "Label"; [n] content/*[1] (pause: 200); [m] children/*');(0,sre.NemethRules.defineSpecialisedRule_)("line-with-label",
|
1443
|
+
"default.brief","default.sbrief");(0,sre.NemethRules.defineRule_)("line-with-text-label","default.sbrief",'[t] "Label"; [t] CSFRemoveParens; [m] children/*',"self::line","content",'name(content/cell/children/*[1])="text"');(0,sre.NemethRules.defineRule_)("empty-line","default.default",'[t] "Blank"',"self::line","count(children/*)=0","not(content)");(0,sre.NemethRules.defineSpecialisedRule_)("empty-line","default.default","default.brief");(0,sre.NemethRules.defineSpecialisedRule_)("empty-line","default.brief",
|
1444
|
+
"default.sbrief");(0,sre.NemethRules.defineRule_)("empty-line-with-label","default.default",'[t] "with Label"; [n] content/*[1]; [t] "EndLabel"(pause: 200); [t] "Blank"',"self::line","count(children/*)=0","content");(0,sre.NemethRules.defineSpecialisedRule_)("empty-line-with-label","default.default","default.brief",'[t] "Label"; [n] content/*[1] (pause: 200); [t] "Blank"');(0,sre.NemethRules.defineSpecialisedRule_)("empty-line-with-label","default.brief","default.sbrief");(0,sre.NemethRules.defineRule_)("enclose",
|
1445
|
+
"default.default",'[t] "StartEnclose"; [t] @role (grammar:localEnclose); [n] children/*[1]; [t] "EndEnclose"',"self::enclose");(0,sre.NemethRules.defineRule_)("overbar","default.default",'[t] "\u2810"; [n] children/*[1]; [t] "\u2823\u2831\u283b"',"self::enclose",'@role="top"');(0,sre.NemethRules.defineRule_)("underbar","default.default",'[t] "\u2810"; [n] children/*[1]; [t] "\u2829\u2831\u283b"',"self::enclose",'@role="bottom"');(0,sre.NemethRules.defineRule_)("leftbar","default.default",'[t] "\u2833"; [n] children/*[1]',
|
1446
|
+
"self::enclose",'@role="left"');(0,sre.NemethRules.defineRule_)("rightbar","default.default",'[n] children/*[1]; [t] "\u2833"',"self::enclose",'@role="right"');(0,sre.NemethRules.defineRule_)("crossout","default.default",'[t] "\u282a"; [n] children/*[1]; [t] "\u283b"',"self::enclose",'@role="updiagonalstrike" or @role="downdiagonalstrike" or @role="horizontalstrike"');(0,sre.NemethRules.defineRule_)("cancel","default.default",'[t] "\u282a"; [n] children/*[1]/children/*[1]; [t] "\u282a"; [n] children/*[2]; [t] "\u283b"',
|
1447
|
+
"self::overscore",'@role="updiagonalstrike" or @role="downdiagonalstrike" or @role="horizontalstrike"');(0,sre.NemethRules.defineSpecialisedRule_)("cancel","default.default","default.brief");(0,sre.NemethRules.defineSpecialisedRule_)("cancel","default.default","default.sbrief");(0,sre.NemethRules.defineRuleAlias_)("cancel","self::underscore",'@role="updiagonalstrike" or @role="downdiagonalstrike" or @role="horizontalstrike"');(0,sre.NemethRules.defineRule_)("cancel-reverse","default.default",'[t] "\u282a"; [n] children/*[2]/children/*[1]; [t] "\u282a"; [n] children/*[1]; [t] "\u283b"',
|
1448
|
+
"self::overscore",'name(children/*[2])="enclose"','children/*[2][@role="updiagonalstrike" or @role="downdiagonalstrike" or @role="horizontalstrike"]');(0,sre.NemethRules.defineSpecialisedRule_)("cancel-reverse","default.default","default.brief");(0,sre.NemethRules.defineSpecialisedRule_)("cancel-reverse","default.default","default.sbrief");(0,sre.NemethRules.defineRuleAlias_)("cancel-reverse","self::underscore",'name(children/*[2])="enclose"','children/*[2][@role="updiagonalstrike" or @role="downdiagonalstrike" or @role="horizontalstrike"]');
|
1449
|
+
(0,sre.NemethRules.defineRule_)("end-punct","default.default","[m] children/*","self::punctuated",'@role="endpunct"');(0,sre.NemethRules.defineRule_)("start-punct","default.default","[n] content/*[1]; [m] children/*[position()>1]","self::punctuated",'@role="startpunct"');(0,sre.NemethRules.defineRule_)("integral-punct","default.default","[n] children/*[1]; [n] children/*[3]","self::punctuated",'@role="integral"');(0,sre.NemethRules.defineRule_)("punctuated","default.default","[m] children/*","self::punctuated");
|
1450
|
+
(0,sre.NemethRules.defineRule_)("unit","default.default",'[t] text() (grammar:annotation="unit":translate)',"self::identifier",'@role="unit"');(0,sre.NemethRules.defineRule_)("unit-square","default.default",'[t] "square"; [n] children/*[1]',"self::superscript",'@role="unit"',"children/*[2][text()=2]",'name(children/*[1])="identifier"');(0,sre.NemethRules.defineRule_)("unit-cubic","default.default",'[t] "cubic"; [n] children/*[1]',"self::superscript",'@role="unit"',"children/*[2][text()=3]",'name(children/*[1])="identifier"');
|
1451
|
+
(0,sre.NemethRules.defineRule_)("reciprocal","default.default",'[t] "reciprocal"; [n] children/*[1]',"self::superscript",'@role="unit"','name(children/*[1])="identifier"','name(children/*[2])="prefixop"','children/*[2][@role="negative"]',"children/*[2]/children/*[1][text()=1]",'count(preceding-sibling::*)=0 or preceding-sibling::*[@role!="unit"]');(0,sre.NemethRules.defineRule_)("reciprocal","default.default",'[t] "per"; [n] children/*[1]',"self::superscript",'@role="unit"','name(children/*[1])="identifier"',
|
1452
|
+
'name(children/*[2])="prefixop"','children/*[2][@role="negative"]',"children/*[2]/children/*[1][text()=1]",'preceding-sibling::*[@role="unit"]');(0,sre.NemethRules.defineRule_)("unit-combine","default.default","[m] children/*","self::infixop",'@role="unit"');(0,sre.NemethRules.defineRule_)("unit-divide","default.default",'[n] children/*[1]; [t] "per"; [n] children/*[2]',"self::fraction",'@role="unit"');(0,sre.NemethRules.defineRule_)("reference-sign","default.default","[n] children/*[1]; [n] children/*[2]",
|
1453
|
+
"self::superscript",'name(children/*[1])="text" or (name(children/*[1])="punctuated" and children/*[1][@role="text"])','name(children/*[2])="operator" or name(children/*[2])="punctuation"');(0,sre.NemethRules.defineRule_)("reference-number","default.default",'[n] children/*[1]; [t] "\u2808\u283b"; [n] children/*[2]; [t] "\u2810"',"self::superscript",'name(children/*[1])="text" or (name(children/*[1])="punctuated" and children/*[1][@role="text"])','name(children/*[2])="number"','children/*[2][@role="integer"]')};
|
1454
|
+
sre.NemethRules.componentString_={2:"CSFbaseline",1:"CSFsubscript",0:"CSFsuperscript"};sre.NemethRules.childNumber_={4:2,3:3,2:1,1:4,0:5};sre.NemethRules.generateTensorRuleStrings_=function(a){var b=[],c="",d="";a=parseInt(a,2);for(var e=0;5>e;e++){var f="children/*["+sre.NemethRules.childNumber_[e]+"]";if(a&1){var g=sre.NemethRules.componentString_[e%3];c="[t] "+g+"Verbose; [n] "+f+";"+c;d="[t] "+g+"Brief; [n] "+f+";"+d}else b.unshift("name("+f+')="empty"');a>>=1}b.push(c);b.push(d);return b};
|
1455
|
+
sre.NemethRules.generateNemethTensorRules_=function(){for(var a="11111 11110 11101 11100 10111 10110 10101 10100 01111 01110 01101 01100".split(" "),b=0,c;c=a[b];b++){var d="tensor"+c;c=sre.NemethRules.generateTensorRuleStrings_(c);var e=c.pop(),f=c.pop(),g=[d,"default.default",f,"self::tensor"].concat(c),h=[d,"default.brief",e,"self::tensor"].concat(c);sre.NemethRules.defineRule_.apply(null,g);sre.NemethRules.defineRule_.apply(null,h);(0,sre.NemethRules.defineSpecialisedRule_)(d,"default.brief",
|
1456
|
+
"default.sbrief");g=sre.NemethRules.componentString_[2];f+="; [t]"+g+"Verbose";e+="; [t]"+g+"Brief";d+="-baseline";g=[d,"default.default",f,"self::tensor","following-sibling::*"].concat(c);h=[d,"default.brief",e,"self::tensor","following-sibling::*"].concat(c);sre.NemethRules.defineRule_.apply(null,g);sre.NemethRules.defineRule_.apply(null,h);(0,sre.NemethRules.defineSpecialisedRule_)(d,"default.brief","default.sbrief");d=[d,"self::tensor","not(following-sibling::*)","ancestor::fraction|ancestor::punctuated|ancestor::fenced|ancestor::root|ancestor::sqrt|ancestor::relseq|ancestor::multirel|@embellished"].concat(c);
|
1457
|
+
sre.NemethRules.defineRuleAlias_.apply(null,d)}};sre.NemethRules.getInstance().initializer=[sre.NemethRules.initCustomFunctions_,sre.NemethRules.initNemethRules_,sre.NemethRules.generateNemethTensorRules_,sre.NemethRules.addAnnotators_];sre.PrefixFrench=function(){sre.MathStore.call(this);this.locale="fr";this.modality="prefix"};goog.inherits(sre.PrefixFrench,sre.MathStore);goog.addSingletonGetter(sre.PrefixFrench);sre.PrefixFrench.mathStore=sre.PrefixFrench.getInstance();sre.PrefixFrench.defineRule_=goog.bind(sre.PrefixFrench.mathStore.defineRule,sre.PrefixFrench.mathStore);sre.PrefixFrench.defineRuleAlias_=goog.bind(sre.PrefixFrench.mathStore.defineRulesAlias,sre.PrefixFrench.mathStore);
|
1458
|
+
sre.PrefixFrench.addCustomString_=goog.bind(sre.PrefixFrench.mathStore.customStrings.add,sre.PrefixFrench.mathStore.customStrings);sre.PrefixFrench.initCustomFunctions_=function(){(0,sre.PrefixFrench.addCustomString_)("CSFordinalPosition",sre.NumbersUtil.ordinalPosition)};
|
1459
|
+
sre.PrefixFrench.initPrefixFrench_=function(){(0,sre.PrefixFrench.defineRule_)("numerator","default.default",'[t] "num\u00e9rateur"; [p] (pause:200)',"self::*",'name(../..)="fraction"',"count(preceding-sibling::*)=0");(0,sre.PrefixFrench.defineRule_)("denominator","default.default",'[t] "d\u00e9nominateur"; [p] (pause:200)',"self::*",'name(../..)="fraction"',"count(preceding-sibling::*)=1");(0,sre.PrefixFrench.defineRule_)("base","default.default",'[t] "base"; [p] (pause:200)',"self::*",'name(../..)="superscript" or name(../..)="subscript" or name(../..)="overscore" or name(../..)="underscore" or name(../..)="tensor" or name(../..)="limlower" or name(../..)="limupper"',
|
1460
|
+
"count(preceding-sibling::*)=0");(0,sre.PrefixFrench.defineRule_)("base-limit","default.default",'[t] "base"; [p] (pause:200)',"self::*",'name(../..)="limboth"');(0,sre.PrefixFrench.defineRule_)("exponent","default.default",'[t] "exposant"; [p] (pause:200)',"self::*",'name(../..)="superscript"',"count(preceding-sibling::*)=1");(0,sre.PrefixFrench.defineRule_)("subscript","default.default",'[t] "indice"; [p] (pause:200)',"self::*",'name(../..)="subscript"',"count(preceding-sibling::*)=1");(0,sre.PrefixFrench.defineRule_)("overscript",
|
1461
|
+
"default.default",'[t] "indice suscrit"; [p] (pause:200)',"self::*",'name(../..)="overscore" or name(../..)="limupper" or name(../..)="limboth"',"count(preceding-sibling::*)=1 or count(preceding-sibling::*)=2");(0,sre.PrefixFrench.defineRule_)("underscript","default.default",'[t] "indice souscrit"; [p] (pause:200)',"self::*",'name(../..)="underscore" or name(../..)="limlower" or name(../..)="limboth"',"count(preceding-sibling::*)=1");(0,sre.PrefixFrench.defineRule_)("radicand","default.default",'[t] "radicande"; [p] (pause:200)',
|
1462
|
+
"self::*",'name(../..)="sqrt"');(0,sre.PrefixFrench.defineRule_)("radicand","default.default",'[t] "radicande"; [p] (pause:200)',"self::*",'name(../..)="root"',"count(preceding-sibling::*)=1");(0,sre.PrefixFrench.defineRule_)("index","default.default",'[t] "indice"; [p] (pause:200)',"self::*",'name(../..)="root"',"count(preceding-sibling::*)=0");(0,sre.PrefixFrench.defineRule_)("leftsub","default.default",'[t] "indice inf\u00e9rieur gauche"; [p] (pause:200)',"self::*",'name(../..)="tensor"','@role="leftsub"');
|
1463
|
+
(0,sre.PrefixFrench.defineRule_)("leftsub","default.default",'[t] CSFordinalPosition (grammar:gender="male"); [t] "indice inf\u00e9rieur gauche"; [p] (pause:200)',"self::*",'name(../..)="punctuated"','name(../../../..)="tensor"','../../@role="leftsub"');(0,sre.PrefixFrench.defineRule_)("leftsuper","default.default",'[t] "indice sup\u00e9rieur gauche"; [p] (pause:200)',"self::*",'name(../..)="tensor"','@role="leftsuper"');(0,sre.PrefixFrench.defineRule_)("leftsuper","default.default",'[t] CSFordinalPosition (grammar:gender="male"); [t] "indice sup\u00e9rieur gauche"; [p] (pause:200)',
|
1464
|
+
"self::*",'name(../..)="punctuated"','name(../../../..)="tensor"','../../@role="leftsuper"');(0,sre.PrefixFrench.defineRule_)("rightsub","default.default",'[t] "indice inf\u00e9rieur droite"; [p] (pause:200)',"self::*",'name(../..)="tensor"','@role="rightsub"');(0,sre.PrefixFrench.defineRule_)("rightsub","default.default",'[t] CSFordinalPosition (grammar:gender="male"); [t] "indice inf\u00e9rieur droite"; [p] (pause:200)',"self::*",'name(../..)="punctuated"','name(../../../..)="tensor"','../../@role="rightsub"');
|
1465
|
+
(0,sre.PrefixFrench.defineRule_)("rightsuper","default.default",'[t] "indice sup\u00e9rieur droite"; [p] (pause:200)',"self::*",'name(../..)="tensor"','@role="rightsuper"');(0,sre.PrefixFrench.defineRule_)("rightsuper","default.default",'[t] CSFordinalPosition (grammar:gender="male"); [t] "indice sup\u00e9rieur droite"; [p] (pause:200)',"self::*",'name(../..)="punctuated"','name(../../../..)="tensor"','../../@role="rightsuper"');(0,sre.PrefixFrench.defineRule_)("choice","default.default",'[t] "nombre d\'\u00e9l\u00e9ments choisis"; [p] (pause:200)',
|
1466
|
+
"self::line",'@role="binomial"',"parent::*/parent::vector","count(preceding-sibling::*)=1");(0,sre.PrefixFrench.defineRule_)("select","default.default",'[t] "nombre d\'\u00e9l\u00e9ments disponibles"; [p] (pause:200)',"self::line",'@role="binomial"',"parent::*/parent::vector","count(preceding-sibling::*)=0");(0,sre.PrefixFrench.defineRule_)("row","default.default",'[t] CSFordinalPosition (grammar:gender="female"); [t] "rang\u00e9e"; [p] (pause:200)',"self::row");(0,sre.PrefixFrench.defineRuleAlias_)("row",
|
1467
|
+
"self::line");(0,sre.PrefixFrench.defineRule_)("cell","default.default",'[n] ../..; [t] CSFordinalPosition (grammar:gender="female"); [t] "colonne"; [p] (pause:200)',"self::cell",'contains(@grammar,"depth")');(0,sre.PrefixFrench.defineRule_)("cell","default.default",'[t] CSFordinalPosition (grammar:gender="female"); [t] "colonne"; [p] (pause:200)',"self::cell")};sre.PrefixFrench.getInstance().initializer=[sre.PrefixFrench.initCustomFunctions_,sre.PrefixFrench.initPrefixFrench_];sre.PrefixRules=function(){sre.MathStore.call(this);this.modality="prefix"};goog.inherits(sre.PrefixRules,sre.MathStore);goog.addSingletonGetter(sre.PrefixRules);sre.PrefixRules.mathStore=sre.PrefixRules.getInstance();sre.PrefixRules.defineRule_=goog.bind(sre.PrefixRules.mathStore.defineRule,sre.PrefixRules.mathStore);sre.PrefixRules.defineRuleAlias_=goog.bind(sre.PrefixRules.mathStore.defineRulesAlias,sre.PrefixRules.mathStore);
|
1468
|
+
sre.PrefixRules.addCustomString_=goog.bind(sre.PrefixRules.mathStore.customStrings.add,sre.PrefixRules.mathStore.customStrings);sre.PrefixRules.initCustomFunctions_=function(){(0,sre.PrefixRules.addCustomString_)("CSFordinalPosition",sre.NumbersUtil.ordinalPosition)};
|
1469
|
+
sre.PrefixRules.initPrefixRules_=function(){(0,sre.PrefixRules.defineRule_)("numerator","default.default",'[t] "Numerator"; [p] (pause:200)',"self::*",'name(../..)="fraction"',"count(preceding-sibling::*)=0");(0,sre.PrefixRules.defineRule_)("denominator","default.default",'[t] "Denominator"; [p] (pause:200)',"self::*",'name(../..)="fraction"',"count(preceding-sibling::*)=1");(0,sre.PrefixRules.defineRule_)("base","default.default",'[t] "Base"; [p] (pause:200)',"self::*",'name(../..)="superscript" or name(../..)="subscript" or name(../..)="overscore" or name(../..)="underscore" or name(../..)="tensor"',
|
1470
|
+
"count(preceding-sibling::*)=0");(0,sre.PrefixRules.defineRule_)("exponent","default.default",'[t] "Exponent"; [p] (pause:200)',"self::*",'name(../..)="superscript"',"count(preceding-sibling::*)=1");(0,sre.PrefixRules.defineRule_)("subscript","default.default",'[t] "Subscript"; [p] (pause:200)',"self::*",'name(../..)="subscript"',"count(preceding-sibling::*)=1");(0,sre.PrefixRules.defineRule_)("overscript","default.default",'[t] "Overscript"; [p] (pause:200)',"self::*",'name(../..)="overscore"',"count(preceding-sibling::*)=1");
|
1471
|
+
(0,sre.PrefixRules.defineRule_)("underscript","default.default",'[t] "Underscript"; [p] (pause:200)',"self::*",'name(../..)="underscore"',"count(preceding-sibling::*)=1");(0,sre.PrefixRules.defineRule_)("radicand","default.default",'[t] "Radicand"; [p] (pause:200)',"self::*",'name(../..)="sqrt"');(0,sre.PrefixRules.defineRule_)("radicand","default.default",'[t] "Radicand"; [p] (pause:200)',"self::*",'name(../..)="root"',"count(preceding-sibling::*)=1");(0,sre.PrefixRules.defineRule_)("index","default.default",
|
1472
|
+
'[t] "Index"; [p] (pause:200)',"self::*",'name(../..)="root"',"count(preceding-sibling::*)=0");(0,sre.PrefixRules.defineRule_)("leftsub","default.default",'[t] "Left Subscript"; [p] (pause:200)',"self::*",'name(../..)="tensor"','@role="leftsub"');(0,sre.PrefixRules.defineRule_)("leftsub","default.default",'[t] CSFordinalPosition; [t] "Left Subscript"; [p] (pause:200)',"self::*",'name(../..)="punctuated"','name(../../../..)="tensor"','../../@role="leftsub"');(0,sre.PrefixRules.defineRule_)("leftsuper",
|
1473
|
+
"default.default",'[t] "Left Superscript"; [p] (pause:200)',"self::*",'name(../..)="tensor"','@role="leftsuper"');(0,sre.PrefixRules.defineRule_)("leftsuper","default.default",'[t] CSFordinalPosition; [t] "Left Superscript"; [p] (pause:200)',"self::*",'name(../..)="punctuated"','name(../../../..)="tensor"','../../@role="leftsuper"');(0,sre.PrefixRules.defineRule_)("rightsub","default.default",'[t] "Right Subscript"; [p] (pause:200)',"self::*",'name(../..)="tensor"','@role="rightsub"');(0,sre.PrefixRules.defineRule_)("rightsub",
|
1474
|
+
"default.default",'[t] CSFordinalPosition; [t] "Right Subscript"; [p] (pause:200)',"self::*",'name(../..)="punctuated"','name(../../../..)="tensor"','../../@role="rightsub"');(0,sre.PrefixRules.defineRule_)("rightsuper","default.default",'[t] "Right Superscript"; [p] (pause:200)',"self::*",'name(../..)="tensor"','@role="rightsuper"');(0,sre.PrefixRules.defineRule_)("rightsuper","default.default",'[t] CSFordinalPosition; [t] "Right Superscript"; [p] (pause:200)',"self::*",'name(../..)="punctuated"',
|
1475
|
+
'name(../../../..)="tensor"','../../@role="rightsuper"');(0,sre.PrefixRules.defineRule_)("choice","default.default",'[t] "Choice Quantity"; [p] (pause:200)',"self::line",'@role="binomial"',"parent::*/parent::vector","count(preceding-sibling::*)=0");(0,sre.PrefixRules.defineRule_)("select","default.default",'[t] "Selection Quantity"; [p] (pause:200)',"self::line",'@role="binomial"',"parent::*/parent::vector","count(preceding-sibling::*)=1");(0,sre.PrefixRules.defineRule_)("row","default.default",'[t] CSFordinalPosition; [t] "Row"; [p] (pause:200)',
|
1476
|
+
"self::row");(0,sre.PrefixRules.defineRuleAlias_)("row","self::line");(0,sre.PrefixRules.defineRule_)("cell","default.default",'[n] ../..; [t] CSFordinalPosition; [t] "Column"; [p] (pause:200)',"self::cell",'contains(@grammar,"depth")');(0,sre.PrefixRules.defineRule_)("cell","default.default",'[t] CSFordinalPosition; [t] "Column"; [p] (pause:200)',"self::cell")};sre.PrefixRules.getInstance().initializer=[sre.PrefixRules.initCustomFunctions_,sre.PrefixRules.initPrefixRules_];sre.PrefixSpanish=function(){sre.MathStore.call(this);this.locale="es";this.modality="prefix"};goog.inherits(sre.PrefixSpanish,sre.MathStore);goog.addSingletonGetter(sre.PrefixSpanish);sre.PrefixSpanish.mathStore=sre.PrefixSpanish.getInstance();sre.PrefixSpanish.defineRule_=goog.bind(sre.PrefixSpanish.mathStore.defineRule,sre.PrefixSpanish.mathStore);sre.PrefixSpanish.defineRuleAlias_=goog.bind(sre.PrefixSpanish.mathStore.defineRulesAlias,sre.PrefixSpanish.mathStore);
|
1477
|
+
sre.PrefixSpanish.addCustomString_=goog.bind(sre.PrefixSpanish.mathStore.customStrings.add,sre.PrefixSpanish.mathStore.customStrings);sre.PrefixSpanish.initCustomFunctions_=function(){(0,sre.PrefixSpanish.addCustomString_)("CSFordinalPosition",sre.NumbersUtil.ordinalPosition)};
|
1478
|
+
sre.PrefixSpanish.initPrefixSpanish_=function(){(0,sre.PrefixSpanish.defineRule_)("numerator","default.default",'[t] "numerador"; [p] (pause:200)',"self::*",'name(../..)="fraction"',"count(preceding-sibling::*)=0");(0,sre.PrefixSpanish.defineRule_)("denominator","default.default",'[t] "denominador"; [p] (pause:200)',"self::*",'name(../..)="fraction"',"count(preceding-sibling::*)=1");(0,sre.PrefixSpanish.defineRule_)("base","default.default",'[t] "base"; [p] (pause:200)',"self::*",'name(../..)="superscript" or name(../..)="subscript" or name(../..)="overscore" or name(../..)="underscore" or name(../..)="tensor"',
|
1479
|
+
"count(preceding-sibling::*)=0");(0,sre.PrefixSpanish.defineRule_)("exponent","default.default",'[t] "exponente"; [p] (pause:200)',"self::*",'name(../..)="superscript"',"count(preceding-sibling::*)=1");(0,sre.PrefixSpanish.defineRule_)("subscript","default.default",'[t] "sub\u00edndice"; [p] (pause:200)',"self::*",'name(../..)="subscript"',"count(preceding-sibling::*)=1");(0,sre.PrefixSpanish.defineRule_)("overscript","default.default",'[t] "sobre\u00edndice"; [p] (pause:200)',"self::*",'name(../..)="overscore"',
|
1480
|
+
"count(preceding-sibling::*)=1");(0,sre.PrefixSpanish.defineRule_)("underscript","default.default",'[t] "bajo\u00edndice"; [p] (pause:200)',"self::*",'name(../..)="underscore"',"count(preceding-sibling::*)=1");(0,sre.PrefixSpanish.defineRule_)("radicand","default.default",'[t] "radicand"; [p] (pause:200)',"self::*",'name(../..)="sqrt"');(0,sre.PrefixSpanish.defineRule_)("radicand","default.default",'[t] "radicand"; [p] (pause:200)',"self::*",'name(../..)="root"',"count(preceding-sibling::*)=1");(0,sre.PrefixSpanish.defineRule_)("index",
|
1481
|
+
"default.default",'[t] "\u00edndice"; [p] (pause:200)',"self::*",'name(../..)="root"',"count(preceding-sibling::*)=0");(0,sre.PrefixSpanish.defineRule_)("leftsub","default.default",'[t] "sub\u00edndice izquierdo"; [p] (pause:200)',"self::*",'name(../..)="tensor"','@role="leftsub"');(0,sre.PrefixSpanish.defineRule_)("leftsub","default.default",'[t] CSFordinalPosition (grammar:gender="male"); [t] "sub\u00edndice izquierdo"; [p] (pause:200)',"self::*",'name(../..)="punctuated"','name(../../../..)="tensor"',
|
1482
|
+
'../../@role="leftsub"');(0,sre.PrefixSpanish.defineRule_)("leftsuper","default.default",'[t] "super\u00edndice izquierdo"; [p] (pause:200)',"self::*",'name(../..)="tensor"','@role="leftsuper"');(0,sre.PrefixSpanish.defineRule_)("leftsuper","default.default",'[t] CSFordinalPosition (grammar:gender="male"); [t] "super\u00edndice izquierdo"; [p] (pause:200)',"self::*",'name(../..)="punctuated"','name(../../../..)="tensor"','../../@role="leftsuper"');(0,sre.PrefixSpanish.defineRule_)("rightsub","default.default",
|
1483
|
+
'[t] "sub\u00edndice derecho"; [p] (pause:200)',"self::*",'name(../..)="tensor"','@role="rightsub"');(0,sre.PrefixSpanish.defineRule_)("rightsub","default.default",'[t] CSFordinalPosition (grammar:gender="male"); [t] "sub\u00edndice derecho"; [p] (pause:200)',"self::*",'name(../..)="punctuated"','name(../../../..)="tensor"','../../@role="rightsub"');(0,sre.PrefixSpanish.defineRule_)("rightsuper","default.default",'[t] "super\u00edndice derecho"; [p] (pause:200)',"self::*",'name(../..)="tensor"','@role="rightsuper"');
|
1484
|
+
(0,sre.PrefixSpanish.defineRule_)("rightsuper","default.default",'[t] CSFordinalPosition (grammar:gender="male"); [t] "super\u00edndice derecho"; [p] (pause:200)',"self::*",'name(../..)="punctuated"','name(../../../..)="tensor"','../../@role="rightsuper"');(0,sre.PrefixSpanish.defineRule_)("choice","default.default",'[t] "cantidad de elecci\u00f3n"; [p] (pause:200)',"self::line",'@role="binomial"',"parent::*/parent::vector","count(preceding-sibling::*)=0");(0,sre.PrefixSpanish.defineRule_)("select",
|
1485
|
+
"default.default",'[t] "cantidad de selecci\u00f3n"; [p] (pause:200)',"self::line",'@role="binomial"',"parent::*/parent::vector","count(preceding-sibling::*)=1");(0,sre.PrefixSpanish.defineRule_)("row","default.default",'[t] CSFordinalPosition (grammar:gender="female"); [t] "fila"; [p] (pause:200)',"self::row");(0,sre.PrefixSpanish.defineRuleAlias_)("row","self::line");(0,sre.PrefixSpanish.defineRule_)("cell","default.default",'[n] ../..; [t] CSFordinalPosition (grammar:gender="female"); [t] "columna"; [p] (pause:200)',
|
1486
|
+
"self::cell",'contains(@grammar,"depth")');(0,sre.PrefixSpanish.defineRule_)("cell","default.default",'[t] CSFordinalPosition (grammar:gender="female"); [t] "columna"; [p] (pause:200)',"self::cell")};sre.PrefixSpanish.getInstance().initializer=[sre.PrefixSpanish.initCustomFunctions_,sre.PrefixSpanish.initPrefixSpanish_];sre.SemanticTreeRules=function(){sre.MathStore.call(this)};goog.inherits(sre.SemanticTreeRules,sre.MathStore);goog.addSingletonGetter(sre.SemanticTreeRules);sre.SemanticTreeRules.mathStore=sre.SemanticTreeRules.getInstance();sre.SemanticTreeRules.defineRule_=goog.bind(sre.SemanticTreeRules.mathStore.defineRule,sre.SemanticTreeRules.mathStore);sre.SemanticTreeRules.defineRuleAlias_=goog.bind(sre.SemanticTreeRules.mathStore.defineRuleAlias,sre.SemanticTreeRules.mathStore);
|
1487
|
+
sre.SemanticTreeRules.addContextFunction_=goog.bind(sre.SemanticTreeRules.mathStore.contextFunctions.add,sre.SemanticTreeRules.mathStore.contextFunctions);sre.SemanticTreeRules.initCustomFunctions_=function(){(0,sre.SemanticTreeRules.addContextFunction_)("CTXFnodeCounter",sre.StoreUtil.nodeCounter);(0,sre.SemanticTreeRules.addContextFunction_)("CTXFcontentIterator",sre.MathmlStoreUtil.contentIterator)};
|
1488
|
+
sre.SemanticTreeRules.initSemanticRules_=function(){(0,sre.SemanticTreeRules.defineRule_)("collapsed","default.default",'[t] "collapsed"; [n] . (engine:modality=summary,grammar:collapsed)',"self::*","@alternative",'not(contains(@grammar, "collapsed"))',"self::*","self::*","self::*","self::*","self::*");(0,sre.SemanticTreeRules.defineRule_)("stree","default.default","[n] ./*[1]","self::stree");(0,sre.SemanticTreeRules.defineRule_)("factorial","default.default",'[t] "factorial"',"self::punctuation",
|
1489
|
+
'text()="!"','name(preceding-sibling::*[1])!="text"');(0,sre.SemanticTreeRules.defineRule_)("multrel","default.default",'[t] "multirelation"; [m] children/* (sepFunc:CTXFcontentIterator)',"self::multirel");(0,sre.SemanticTreeRules.defineRule_)("variable-equality","default.default",'[t] "equation sequence"; [m] children/* (context:"part",ctxtFunc:CTXFnodeCounter,sepFunc:CTXFcontentIterator)','self::relseq[@role="equality"]',"count(./children/*)>2",'./children/punctuation[@role="ellipsis"]');(0,sre.SemanticTreeRules.defineRule_)("multi-equality",
|
1490
|
+
"default.default",'[t] "equation sequence"; [m] children/* (context:"part",ctxtFunc:CTXFnodeCounter,sepFunc:CTXFcontentIterator)','self::relseq[@role="equality"]',"count(./children/*)>2");(0,sre.SemanticTreeRules.defineRule_)("equality","default.default","[n] children/*[1]; [p] (pause:200); [n] content/*[1] (pause:200);[n] children/*[2]",'self::relseq[@role="equality"]',"count(./children/*)=2");(0,sre.SemanticTreeRules.defineRule_)("simple-equality","default.default","[n] children/*[1]; [p] (pause:200); [n] content/*[1] (pause:200);[n] children/*[2]",
|
1491
|
+
'self::relseq[@role="equality"]',"count(./children/*)=2","./children/identifier or ./children/number");(0,sre.SemanticTreeRules.defineRule_)("simple-equality2","default.default","[n] children/*[1]; [p] (pause:200); [n] content/*[1] (pause:200);[n] children/*[2]",'self::relseq[@role="equality"]',"count(./children/*)=2","./children/function or ./children/appl");(0,sre.SemanticTreeRules.defineRule_)("relseq","default.default","[m] children/* (sepFunc:CTXFcontentIterator)","self::relseq");(0,sre.SemanticTreeRules.defineRule_)("binary-operation",
|
1492
|
+
"default.default","[m] children/* (sepFunc:CTXFcontentIterator);","self::infixop");(0,sre.SemanticTreeRules.defineRule_)("variable-addition","default.default",'[t] "sum with variable number of summands";[p] (pause:400); [m] children/* (sepFunc:CTXFcontentIterator)','self::infixop[@role="addition"]',"count(children/*)>2",'children/punctuation[@role="ellipsis"]');(0,sre.SemanticTreeRules.defineRule_)("multi-addition","default.default",'[t] "sum with"; [t] count(./children/*); [t] "summands";[p] (pause:400); [m] children/* (sepFunc:CTXFcontentIterator)',
|
1493
|
+
'self::infixop[@role="addition"]',"count(./children/*)>2");(0,sre.SemanticTreeRules.defineRule_)("prefix","default.default",'[t] "prefix"; [m] content/* (pause 150);[n] children/*[1]',"self::prefixop");(0,sre.SemanticTreeRules.defineRule_)("negative","default.default",'[t] "negative"; [n] children/*[1]',"self::prefixop",'self::prefixop[@role="negative"]');(0,sre.SemanticTreeRules.defineRule_)("postfix","default.default",'[n] children/*[1]; [t] "postfix"; [m] content/* (pause 300)',"self::postfixop");
|
1494
|
+
(0,sre.SemanticTreeRules.defineRule_)("identifier","default.default","[n] text()","self::identifier");(0,sre.SemanticTreeRules.defineRule_)("number","default.default","[n] text()","self::number");(0,sre.SemanticTreeRules.defineRule_)("mixed-number","default.default",'[n] children/*[1]; [t] "and"; [n] children/*[2]; ',"self::number",'@role="mixed"');(0,sre.SemanticTreeRules.defineRule_)("font","default.default","[t] @font (grammar:localFont); [n] . (grammar:ignoreFont=@font)","self::*","@font",'not(contains(@grammar, "ignoreFont"))',
|
1495
|
+
'@font!="normal"');(0,sre.SemanticTreeRules.defineRule_)("font-identifier-short","default.default","[t] @font (grammar:localFont); [n] . (grammar:ignoreFont=@font)","self::identifier","string-length(text())=1","@font",'not(contains(@grammar, "ignoreFont"))','@font="normal"','""=translate(text(), "abcdefghijklmnopqrstuvwxyz\u03b1\u03b2\u03b3\u03b4\u03b5\u03b6\u03b7\u03b8\u03b9\u03ba\u03bb\u03bc\u03bd\u03be\u03bf\u03c0\u03c1\u03c2\u03c3\u03c4\u03c5\u03c6\u03c7\u03c8\u03c9ABCDEFGHIJKLMNOPQRSTUVWXYZ\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039a\u039b\u039c\u039d\u039e\u039f\u03a0\u03a1\u03a3\u03a3\u03a4\u03a5\u03a6\u03a7\u03a8\u03a9", "")',
|
1496
|
+
'@role!="unit"');(0,sre.SemanticTreeRules.defineRule_)("font-identifier","default.default","[t] @font (grammar:localFont); [n] . (grammar:ignoreFont=@font)","self::identifier","string-length(text())=1","@font",'@font="normal"','not(contains(@grammar, "ignoreFont"))','@role!="unit"');(0,sre.SemanticTreeRules.defineRule_)("omit-font","default.default","[n] . (grammar:ignoreFont=@font)","self::identifier","string-length(text())=1","@font",'not(contains(@grammar, "ignoreFont"))','@font="italic"');(0,sre.SemanticTreeRules.defineRule_)("fraction",
|
1497
|
+
"default.default",'[p] (pause:250); [n] children/*[1] (rate:0.35); [p] (pause:250); [t] "divided by"; [n] children/*[2] (rate:-0.35); [p] (pause:400)',"self::fraction");(0,sre.SemanticTreeRules.defineRule_)("superscript","default.default",'[n] children/*[1]; [t] "super"; [n] children/*[2] (pitch:0.35);[p] (pause:300)',"self::superscript");(0,sre.SemanticTreeRules.defineRule_)("subscript","default.default",'[n] children/*[1]; [t] "sub"; [n] children/*[2] (pitch:-0.35);[p] (pause:300)',"self::subscript");
|
1498
|
+
(0,sre.SemanticTreeRules.defineRule_)("ellipsis","default.default",'[p] (pause:200); [t] "ellipsis"; [p] (pause:300)',"self::punctuation",'self::punctuation[@role="ellipsis"]');(0,sre.SemanticTreeRules.defineRule_)("fence-single","default.default","[n] text()","self::punctuation",'self::punctuation[@role="openfence"]');(0,sre.SemanticTreeRules.defineRuleAlias_)("fence-single","self::punctuation",'self::punctuation[@role="closefence"]');(0,sre.SemanticTreeRules.defineRuleAlias_)("fence-single","self::punctuation",
|
1499
|
+
'self::punctuation[@role="vbar"]');(0,sre.SemanticTreeRules.defineRuleAlias_)("fence-single","self::punctuation",'self::punctuation[@role="application"]');(0,sre.SemanticTreeRules.defineRule_)("omit-empty","default.default","[p] (pause:100)","self::empty");(0,sre.SemanticTreeRules.defineRule_)("fences-open-close","default.default","[p] (pause:100); [n] content/*[1]; [n] children/*[1]; [n] content/*[2]; [p] (pause:100)","self::fenced",'@role="leftright"');(0,sre.SemanticTreeRules.defineRule_)("fences-open-close-in-appl",
|
1500
|
+
"default.default","[p] (pause:200); [n] children/*[1]; [p] (pause:200);",'self::fenced[@role="leftright"]',"./parent::children/parent::appl");(0,sre.SemanticTreeRules.defineRule_)("fences-neutral","default.default",'[p] (pause:100); [t] "absolute value of"; [n] children/*[1];[p] (pause:350);',"self::fenced",'self::fenced[@role="neutral"]');(0,sre.SemanticTreeRules.defineRule_)("omit-fences","default.default","[p] (pause:500); [n] children/*[1]; [p] (pause:200);","self::fenced");(0,sre.SemanticTreeRules.defineRule_)("matrix",
|
1501
|
+
"default.default",'[t] "matrix"; [m] children/* (ctxtFunc:CTXFnodeCounter,context:"row",pause:100)',"self::matrix");(0,sre.SemanticTreeRules.defineRule_)("matrix-row","default.default",'[m] children/* (ctxtFunc:CTXFnodeCounter,context:"column",pause:100)','self::row[@role="matrix"]');(0,sre.SemanticTreeRules.defineRule_)("matrix-cell","default.default","[n] children/*[1]",'self::cell[@role="matrix"]');(0,sre.SemanticTreeRules.defineRule_)("vector","default.default",'[t] "vector"; [m] children/* (ctxtFunc:CTXFnodeCounter,context:"element",pause:100)',
|
1502
|
+
"self::vector");(0,sre.SemanticTreeRules.defineRule_)("cases","default.default",'[t] "case statement"; [m] children/* (ctxtFunc:CTXFnodeCounter,context:"case",pause:100)',"self::cases");(0,sre.SemanticTreeRules.defineRule_)("cases-row","default.default","[m] children/*",'self::row[@role="cases"]');(0,sre.SemanticTreeRules.defineRule_)("cases-cell","default.default","[n] children/*[1]",'self::cell[@role="cases"]');(0,sre.SemanticTreeRules.defineRule_)("row","default.default",'[m] ./* (ctxtFunc:CTXFnodeCounter,context:"column",pause:100)',
|
1503
|
+
"self::row");(0,sre.SemanticTreeRules.defineRule_)("cases-end","default.default",'[t] "case statement"; [m] children/* (ctxtFunc:CTXFnodeCounter,context:"case",pause:100);[t] "end cases"',"self::cases","following-sibling::*");(0,sre.SemanticTreeRules.defineRule_)("multiline","default.default",'[t] "multiline equation";[m] children/* (ctxtFunc:CTXFnodeCounter,context:"line",pause:100)',"self::multiline");(0,sre.SemanticTreeRules.defineRule_)("multiline-ineq","default.default",'[t] "multiline inequality";[m] children/* (ctxtFunc:CTXFnodeCounter,context:"row",pause:100)',
|
1504
|
+
"self::multiline",'@role="inequality"');(0,sre.SemanticTreeRules.defineRule_)("line","default.default","[m] children/*","self::line");(0,sre.SemanticTreeRules.defineRule_)("table","default.default",'[t] "multiline equation";[m] children/* (ctxtFunc:CTXFnodeCounter,context:"row",pause:200)',"self::table");(0,sre.SemanticTreeRules.defineRule_)("table-ineq","default.default",'[t] "multiline inequality";[m] children/* (ctxtFunc:CTXFnodeCounter,context:"row",pause:200)',"self::table",'@role="inequality"');
|
1505
|
+
(0,sre.SemanticTreeRules.defineRule_)("table-row","default.default","[m] children/* (pause:100)",'self::row[@role="table"]');(0,sre.SemanticTreeRules.defineRuleAlias_)("cases-cell",'self::cell[@role="table"]');(0,sre.SemanticTreeRules.defineRule_)("empty-cell","default.default",'[t] "Blank"',"self::cell","count(children/*)=0");(0,sre.SemanticTreeRules.defineRule_)("end-punct","default.default","[m] children/*; [p] (pause:300)","self::punctuated",'@role="endpunct"');(0,sre.SemanticTreeRules.defineRule_)("start-punct",
|
1506
|
+
"default.default","[n] content/*[1]; [p] (pause:200); [m] children/*[position()>1]","self::punctuated",'@role="startpunct"');(0,sre.SemanticTreeRules.defineRule_)("integral-punct","default.default","[n] children/*[1] (rate:0.2); [n] children/*[3] (rate:0.2)","self::punctuated",'@role="integral"');(0,sre.SemanticTreeRules.defineRule_)("punctuated","default.default","[m] children/* (pause:100)","self::punctuated");(0,sre.SemanticTreeRules.defineRule_)("function","default.default","[n] text()","self::function");
|
1507
|
+
(0,sre.SemanticTreeRules.defineRule_)("appl","default.default","[n] children/*[1]; [n] content/*[1]; [n] children/*[2]","self::appl");(0,sre.SemanticTreeRules.defineRule_)("sum-only","default.default",'[n] children/*[1]; [t] "from"; [n] children/*[2]; [t] "to";[n] children/*[3]',"self::limboth",'self::limboth[@role="sum"]');(0,sre.SemanticTreeRules.defineRule_)("limboth","default.default",'[n] children/*[1]; [p] (pause 100); [t] "over"; [n] children/*[2];[t] "under"; [n] children/*[3]; [p] (pause 250);',
|
1508
|
+
"self::limboth");(0,sre.SemanticTreeRules.defineRule_)("limlower","default.default",'[n] children/*[1]; [t] "over"; [n] children/*[2];',"self::limlower");(0,sre.SemanticTreeRules.defineRule_)("limupper","default.default",'[n] children/*[1]; [t] "under"; [n] children/*[2];',"self::limupper");(0,sre.SemanticTreeRules.defineRule_)("largeop","default.default","[n] text()","self::largeop");(0,sre.SemanticTreeRules.defineRule_)("bigop","default.default",'[n] children/*[1]; [p] (pause 100); [t] "over"; [n] children/*[2];[p] (pause 250);',
|
1509
|
+
"self::bigop");(0,sre.SemanticTreeRules.defineRule_)("integral","default.default","[n] children/*[1]; [p] (pause 100); [n] children/*[2];[p] (pause 200); [n] children/*[3] (rate:0.35);","self::integral");(0,sre.SemanticTreeRules.defineRule_)("sqrt","default.default",'[t] "Square root of"; [n] children/*[1] (rate:0.35); [p] (pause:400)',"self::sqrt");(0,sre.SemanticTreeRules.defineRule_)("square","default.default",'[n] children/*[1]; [t] "squared" (pitch:0.35); [p] (pause:300)',"self::superscript",
|
1510
|
+
"children/*[2][text()=2]",'name(./children/*[1])!="text"');(0,sre.SemanticTreeRules.defineRule_)("cube","default.default",'[n] children/*[1]; [t] "cubed" (pitch:0.35); [p] (pause:300)',"self::superscript","children/*[2][text()=3]",'name(./children/*[1])!="text"');(0,sre.SemanticTreeRules.defineRule_)("root","default.default",'[t] "root of order"; [n] children/*[1];[t] "over"; [n] children/*[1] (rate:0.35); [p] (pause:400)',"self::root");(0,sre.SemanticTreeRules.defineRule_)("text","default.default",
|
1511
|
+
"[n] text(); [p] (pause:200)","self::text");(0,sre.SemanticTreeRules.defineRule_)("unit","default.default",'[t] text() (grammar:annotation="unit":translate:plural)',"self::identifier",'@role="unit"');(0,sre.SemanticTreeRules.defineRule_)("unit-square","default.default",'[t] "square"; [n] children/*[1]',"self::superscript",'@role="unit"',"children/*[2][text()=2]",'name(children/*[1])="identifier"');(0,sre.SemanticTreeRules.defineRule_)("unit-cubic","default.default",'[t] "cubic"; [n] children/*[1]',
|
1512
|
+
"self::superscript",'@role="unit"',"children/*[2][text()=3]",'name(children/*[1])="identifier"');(0,sre.SemanticTreeRules.defineRule_)("reciprocal","default.default",'[t] "reciprocal"; [n] children/*[1]',"self::superscript",'@role="unit"','name(children/*[1])="identifier"','name(children/*[2])="prefixop"','children/*[2][@role="negative"]',"children/*[2]/children/*[1][text()=1]",'count(preceding-sibling::*)=0 or preceding-sibling::*[@role!="unit"]');(0,sre.SemanticTreeRules.defineRule_)("reciprocal",
|
1513
|
+
"default.default",'[t] "per"; [n] children/*[1]',"self::superscript",'@role="unit"','name(children/*[1])="identifier"','name(children/*[2])="prefixop"','children/*[2][@role="negative"]',"children/*[2]/children/*[1][text()=1]",'preceding-sibling::*[@role="unit"]');(0,sre.SemanticTreeRules.defineRule_)("unit-combine","default.default","[m] children/*","self::infixop",'@role="unit"');(0,sre.SemanticTreeRules.defineRule_)("unit-divide","default.default",'[n] children/*[1] (pitch:0.3); [t] "per"; [n] children/*[2] (pitch:-0.3)',
|
1514
|
+
"self::fraction",'@role="unit"')};sre.SemanticTreeRules.getInstance().initializer=[sre.SemanticTreeRules.initCustomFunctions_,sre.SemanticTreeRules.initSemanticRules_];sre.SummaryFrench=function(){sre.MathStore.call(this);this.locale="fr";this.modality="summary"};goog.inherits(sre.SummaryFrench,sre.MathStore);goog.addSingletonGetter(sre.SummaryFrench);sre.SummaryFrench.mathStore=sre.SummaryFrench.getInstance();sre.SummaryFrench.defineRule_=goog.bind(sre.SummaryFrench.mathStore.defineRule,sre.SummaryFrench.mathStore);sre.SummaryFrench.defineRuleAlias_=goog.bind(sre.SummaryFrench.mathStore.defineRulesAlias,sre.SummaryFrench.mathStore);
|
1515
|
+
sre.SummaryFrench.defineSpecialisedRule_=goog.bind(sre.SummaryFrench.mathStore.defineSpecialisedRule,sre.SummaryFrench.mathStore);sre.SummaryFrench.defineUniqueRuleAlias_=goog.bind(sre.SummaryFrench.mathStore.defineUniqueRuleAlias,sre.SummaryFrench.mathStore);
|
1516
|
+
sre.SummaryFrench.initSummaryFrench_=function(){(0,sre.SummaryFrench.defineRule_)("collapsed-masculine","default.masculine",'[t] "compress\u00e9"','contains(@grammar, "collapsed")');(0,sre.SummaryFrench.defineRule_)("collapsed-feminine","default.feminine",'[t] "compress\u00e9e"','contains(@grammar, "collapsed")');(0,sre.SummaryFrench.defineRule_)("no-collapsed","default.masculine",'[t] ""','not(contains(@grammar, "collapsed"))');(0,sre.SummaryFrench.defineRule_)("no-collapsed","default.feminine",
|
1517
|
+
'[t] ""','not(contains(@grammar, "collapsed"))');(0,sre.SummaryFrench.defineRule_)("stree","default.default","[n] ./*[1]","self::stree");(0,sre.SummaryFrench.defineRule_)("abstr-identifier","default.default",'[t] "identifiant long"; [n] . (engine:style=masculine)',"self::identifier",'contains(@grammar, "collapsed")');(0,sre.SummaryFrench.defineRule_)("abstr-identifier","default.default",'[t] "identifiant"; [n] . (engine:style=masculine)',"self::identifier");(0,sre.SummaryFrench.defineRule_)("abstr-number",
|
1518
|
+
"default.default",'[t] "nombre long"; [n] . (engine:style=masculine)',"self::number",'contains(@grammar, "collapsed")');(0,sre.SummaryFrench.defineRule_)("abstr-number","default.default",'[t] "nombre"; [n] . (engine:style=masculine)',"self::number");(0,sre.SummaryFrench.defineRule_)("abstr-mixed-number","default.default",'[t] "nombre fractionnaire long"; [n] . (engine:style=masculine)',"self::number",'@role="mixed"','contains(@grammar, "collapsed")');(0,sre.SummaryFrench.defineRule_)("abstr-mixed-number",
|
1519
|
+
"default.default",'[t] "nombre fractionnaire"; [n] . (engine:style=masculine)',"self::number",'@role="mixed"');(0,sre.SummaryFrench.defineRule_)("abstr-text","default.default",'[t] "texte"; [n] . (engine:style=masculine)',"self::text");(0,sre.SummaryFrench.defineRule_)("abstr-function","default.default",'[t] "expression fonctionnelle"; [n] . (engine:style=feminine)',"self::function");(0,sre.SummaryFrench.defineRule_)("abstr-function","mathspeak.brief",'[t] "fonction"; [n] . (engine:style=feminine)',
|
1520
|
+
"self::function");(0,sre.SummaryFrench.defineSpecialisedRule_)("abstr-function","mathspeak.brief","mathspeak.sbrief");(0,sre.SummaryFrench.defineRule_)("abstr-lim","default.default",'[t] "fonction de limitation"; [n] . (engine:style=feminine)',"self::function",'@role="limit function"');(0,sre.SummaryFrench.defineRule_)("abstr-lim","mathspeak.brief",'[t] "lim"; [n] . (engine:style=feminine)',"self::function",'@role="limit function"');(0,sre.SummaryFrench.defineSpecialisedRule_)("abstr-lim","mathspeak.brief",
|
1521
|
+
"mathspeak.sbrief");(0,sre.SummaryFrench.defineRule_)("abstr-fraction","default.default",'[t] "fraction"; [n] . (engine:style=feminine)',"self::fraction");(0,sre.SummaryFrench.defineRule_)("abstr-fraction","mathspeak.brief",'[t] "frac"; [n] . (engine:style=feminine)',"self::fraction");(0,sre.SummaryFrench.defineSpecialisedRule_)("abstr-fraction","mathspeak.brief","mathspeak.sbrief");(0,sre.SummaryFrench.defineRule_)("abstr-continued-fraction","default.default",'[t] "fraction continue"; [n] . (engine:style=feminine)',
|
1522
|
+
"self::fraction",'children/*[2]/descendant-or-self::*[@role="ellipsis"]');(0,sre.SummaryFrench.defineRule_)("abstr-continued-fraction","mathspeak.brief",'[t] "frac continue"; [n] . (engine:style=feminine)',"self::fraction",'children/*[2]/descendant-or-self::*[@role="ellipsis"]');(0,sre.SummaryFrench.defineSpecialisedRule_)("abstr-continued-fraction","mathspeak.brief","mathspeak.sbrief");(0,sre.SummaryFrench.defineRule_)("abstr-sqrt","default.default",'[t] "racine carr\u00e9e"; [n] . (engine:style=feminine)',
|
1523
|
+
"self::sqrt");(0,sre.SummaryFrench.defineRule_)("abstr-sqrt-nested","default.default",'[t] "racine carr\u00e9e imbriqu\u00e9e"; [n] . (engine:style=feminine)',"self::sqrt","children/*/descendant-or-self::sqrt or children/*/descendant-or-self::root");(0,sre.SummaryFrench.defineRule_)("abstr-root","default.default",'[t] "racine d\'indice"; [n] children/*[1] (engine:modality="speech"); [t] "fin indice"; [n] . (engine:style=feminine);',"self::root",'contains(@grammar, "collapsed")',"following-sibling::* or ancestor::*/following-sibling::*");
|
1524
|
+
(0,sre.SummaryFrench.defineRule_)("abstr-root","default.default",'[t] "racine d\'indice";[n] children/*[1] (engine:modality=speech); [n] . (engine:style=feminine)',"self::root");(0,sre.SummaryFrench.defineRule_)("abstr-root","mathspeak.brief",'[t] "racine"; [n] . (engine:style=feminine)',"self::root");(0,sre.SummaryFrench.defineSpecialisedRule_)("abstr-root","mathspeak.brief","mathspeak.sbrief");(0,sre.SummaryFrench.defineRule_)("abstr-root-nested","default.default",'[t] "racine imbriqu\u00e9e d\'indice"; [n] children/*[1] (engine:modality=speech); [t] "fin indice"; [n] . (engine:style=feminine);',
|
1525
|
+
"self::root",'contains(@grammar, "collapsed")',"children/*/descendant-or-self::sqrt or children/*/descendant-or-self::root","following-sibling::* or ancestor::*/following-sibling::*");(0,sre.SummaryFrench.defineRule_)("abstr-root-nested","default.default",'[t] "racine imbriqu\u00e9e d\'indice"; [n] children/*[1] (engine:modality=speech); [n] . (engine:style=feminine)',"self::root","children/*/descendant-or-self::sqrt or children/*/descendant-or-self::root");(0,sre.SummaryFrench.defineRule_)("abstr-root-nested",
|
1526
|
+
"mathspeak.brief",'[t] "racine imbriqu\u00e9e"; [n] . (engine:style=feminine)',"self::root","children/*/descendant-or-self::sqrt or children/*/descendant-or-self::root");(0,sre.SummaryFrench.defineSpecialisedRule_)("abstr-root-nested","mathspeak.brief","mathspeak.sbrief");(0,sre.SummaryFrench.defineRule_)("abstr-superscript","default.default",'[t] "puissance"; [n] . (engine:style=feminine)',"self::superscript");(0,sre.SummaryFrench.defineRule_)("abstr-subscript","default.default",'[t] "indice"; [n] . (engine:style=masculine)',
|
1527
|
+
"self::subscript");(0,sre.SummaryFrench.defineRule_)("abstr-subsup","default.default",'[t] "puissance avec index"; [n] . (engine:style=feminine)',"self::superscript",'name(children/*[1])="subscript"');(0,sre.SummaryFrench.defineRule_)("abstr-infixop","default.default",'[t] @role (grammar:localRole); [t] "avec"; [t] count(./children/*); [t] "\u00e9l\u00e9ments"; [n] . (engine:style=masculine)',"self::infixop");(0,sre.SummaryFrench.defineRule_)("abstr-infixop","default.default",'[t] @role (grammar:localRole); [t] "avec un nombre d\'\u00e9l\u00e9ments variable"; [n] . (engine:style=masculine)',
|
1528
|
+
"self::infixop","count(./children/*)>2",'./children/punctuation[@role="ellipsis"]');(0,sre.SummaryFrench.defineRule_)("abstr-infixop","mathspeak.brief","[t] @role (grammar:localRole); [n] . (engine:style=masculine)","self::infixop");(0,sre.SummaryFrench.defineSpecialisedRule_)("abstr-infixop","mathspeak.brief","mathspeak.sbrief");(0,sre.SummaryFrench.defineRule_)("abstr-addition","default.default",'[t] "somme avec"; [t] count(./children/*); [t] "op\u00e9randes"; [n] . (engine:style=feminine)',"self::infixop",
|
1529
|
+
'@role="addition"');(0,sre.SummaryFrench.defineRule_)("abstr-addition","mathspeak.brief",'[t] "somme"; [n] . (engine:style=feminine)',"self::infixop",'@role="addition"');(0,sre.SummaryFrench.defineSpecialisedRule_)("abstr-addition","mathspeak.brief","mathspeak.sbrief");(0,sre.SummaryFrench.defineRule_)("abstr-var-addition","default.default",'[t] "somme avec un nombre variable d\'op\u00e9randes"; [n] . (engine:style=feminine)',"self::infixop",'@role="addition"',"count(./children/*)>2",'./children/punctuation[@role="ellipsis"]');
|
1530
|
+
(0,sre.SummaryFrench.defineRule_)("abstr-multiplication","default.default",'[t] "produit avec"; [t] count(./children/*); [t] "facteurs"; [n] . (engine:style=masculine);',"self::infixop",'@role="multiplication"');(0,sre.SummaryFrench.defineRule_)("abstr-multiplication","mathspeak.brief",'[t] "produit"; [n] . (engine:style=masculine)',"self::infixop",'@role="multiplication"');(0,sre.SummaryFrench.defineSpecialisedRule_)("abstr-multiplication","mathspeak.brief","mathspeak.sbrief");(0,sre.SummaryFrench.defineRuleAlias_)("abstr-multiplication",
|
1531
|
+
"self::infixop",'@role="implicit"');(0,sre.SummaryFrench.defineRule_)("abstr-var-multiplication","default.default",'[t] "produit avec un nombre de facteurs variable"; [n] . (engine:style=masculine)',"self::infixop",'@role="multiplication"',"count(./children/*)>2",'./children/punctuation[@role="ellipsis"]');(0,sre.SummaryFrench.defineRuleAlias_)("abstr-var-multiplication","self::infixop",'@role="implicit"',"count(./children/*)>2",'./children/punctuation[@role="ellipsis"]');(0,sre.SummaryFrench.defineRule_)("abstr-vector",
|
1532
|
+
"default.default",'[t] "vecteur de dimension"; [t] count(./children/*); [n] . (engine:style=masculine)',"self::vector");(0,sre.SummaryFrench.defineRule_)("abstr-vector","mathspeak.brief",'[t] "vecteur"; [n] . (engine:style=masculine)',"self::vector");(0,sre.SummaryFrench.defineSpecialisedRule_)("abstr-vector","mathspeak.brief","mathspeak.sbrief");(0,sre.SummaryFrench.defineRule_)("abstr-var-vector","default.default",'[t] "vecteur colonne de dimension n"; [n] . (engine:style=masculine)',"self::vector",
|
1533
|
+
'./children/*/children/punctuation[@role="ellipsis"]');(0,sre.SummaryFrench.defineRule_)("abstr-binomial","default.default",'[t] "binomial"; [n] . (engine:style=masculine)',"self::vector",'@role="binomial"');(0,sre.SummaryFrench.defineSpecialisedRule_)("abstr-binomial","default.default","mathspeak.brief");(0,sre.SummaryFrench.defineSpecialisedRule_)("abstr-binomial","default.default","mathspeak.sbrief");(0,sre.SummaryFrench.defineRule_)("abstr-determinant","default.default",'[t] "d\u00e9terminant de dimension"; [t] count(./children/*); [n] . (engine:style=masculine)',
|
1534
|
+
"self::matrix",'@role="determinant"');(0,sre.SummaryFrench.defineRule_)("abstr-determinant","mathspeak.brief",'[t] "d\u00e9terminant"; [n] . (engine:style=masculine)',"self::matrix",'@role="determinant"');(0,sre.SummaryFrench.defineSpecialisedRule_)("abstr-determinant","mathspeak.brief","mathspeak.sbrief");(0,sre.SummaryFrench.defineRule_)("abstr-var-determinant","default.default",'[t] "d\u00e9terminant de dimension n"; [n] . (engine:style=masculine)',"self::matrix",'@role="determinant"','./children/*/children/*/children/punctuation[@role="ellipsis"]');
|
1535
|
+
(0,sre.SummaryFrench.defineRule_)("abstr-squarematrix","default.default",'[t] "matrice carr\u00e9e de dimension"; [t] count(./children/*); [n] . (engine:style=feminine)',"self::matrix",'@role="squarematrix"');(0,sre.SummaryFrench.defineRule_)("abstr-squarematrix","mathspeak.brief",'[t] "matrice carr\u00e9e"; [n] . (engine:style=feminine)',"self::matrix",'@role="squarematrix"');(0,sre.SummaryFrench.defineSpecialisedRule_)("abstr-squarematrix","mathspeak.brief","mathspeak.sbrief");(0,sre.SummaryFrench.defineRule_)("abstr-rowvector",
|
1536
|
+
"default.default",'[t] "vecteur ligne de dimension"; [t] count(./children/row/children/*); [n] . (engine:style=masculine)',"self::matrix",'@role="rowvector"');(0,sre.SummaryFrench.defineRule_)("abstr-rowvector","mathspeak.brief",'[t] "vecteur ligne"; [n] . (engine:style=masculine)',"self::matrix",'@role="rowvector"');(0,sre.SummaryFrench.defineSpecialisedRule_)("abstr-rowvector","mathspeak.brief","mathspeak.sbrief");(0,sre.SummaryFrench.defineRule_)("abstr-var-matrix","default.default",'[t] "vecteur ligne de dimension n"',
|
1537
|
+
"self::matrix",'@role="rowvector"','./children/*/children/*/children/punctuation[@role="ellipsis"]');(0,sre.SummaryFrench.defineRule_)("abstr-matrix","default.default",'[t] "matrice"; [t] count(children/*); [t] "par";[t] count(children/*[1]/children/*); [n] . (engine:style=feminine)',"self::matrix");(0,sre.SummaryFrench.defineRule_)("abstr-matrix","mathspeak.brief",'[t] "matrice"; [n] . (engine:style=feminine)',"self::matrix");(0,sre.SummaryFrench.defineSpecialisedRule_)("abstr-matrix","mathspeak.brief",
|
1538
|
+
"mathspeak.sbrief");(0,sre.SummaryFrench.defineRule_)("abstr-var-matrix","default.default",'[t] "matrice de dimension n par m"; [n] . (engine:style=feminine)',"self::matrix",'./children/*/children/*/children/punctuation[@role="ellipsis"]');(0,sre.SummaryFrench.defineRule_)("abstr-cases","default.default",'[t] "d\u00e9claration de cas";[t] "avec"; [t] count(children/*); [t] "cas"; [n] . (engine:style=feminine)',"self::cases");(0,sre.SummaryFrench.defineRule_)("abstr-cases","mathspeak.brief",'[t] "d\u00e9claration de cas"; [n] . (engine:style=feminine)',
|
1539
|
+
"self::cases");(0,sre.SummaryFrench.defineSpecialisedRule_)("abstr-cases","mathspeak.brief","mathspeak.sbrief");(0,sre.SummaryFrench.defineRule_)("abstr-var-cases","default.default",'[t] "d\u00e9claration de cas variable"; [n] . (engine:style=feminine)',"self::cases",'./children/row/children/cell/children/punctuation[@role="ellipsis"]or ./children/line/children/punctuation[@role="ellipsis"]');(0,sre.SummaryFrench.defineRule_)("abstr-punctuated","default.default",'[t] "liste de longueur"; [t] count(children/*) - count(content/*); [t] "s\u00e9par\u00e9e par des"; [n] content/*[1] (join:""); [t] "s"; [n] . (engine:style=feminine)',
|
1540
|
+
"self::punctuated");(0,sre.SummaryFrench.defineRule_)("abstr-punctuated","mathspeak.brief",'[t] "liste s\u00e9par\u00e9e par des"; [n] content/*[1] (join:""); [t] "s"; [n] . (engine:style=feminine)',"self::punctuated");(0,sre.SummaryFrench.defineSpecialisedRule_)("abstr-punctuated","mathspeak.brief","mathspeak.sbrief");(0,sre.SummaryFrench.defineRule_)("abstr-var-punctuated","default.default",'[t] "liste de longueur variable s\u00e9par\u00e9e par des"; [n] content/*[1] (join:""); [t] "s"; [n] . (engine:style=feminine)',
|
1541
|
+
"self::punctuated",'./children/punctuation[@role="ellipsis"]');(0,sre.SummaryFrench.defineRule_)("abstr-bigop","default.default","[n] content/*[1]; [n] . (engine:style=masculine)","self::bigop");(0,sre.SummaryFrench.defineRule_)("abstr-integral","default.default",'[t] "int\u00e9grale"; [n] . (engine:style=feminine)','@role="integral"');(0,sre.SummaryFrench.defineRule_)("abstr-relation","default.default","[t] @role (grammar:localRole); [n] . (engine:style=masculine);","self::relseq","count(./children/*)=2");
|
1542
|
+
(0,sre.SummaryFrench.defineRule_)("abstr-relation-seq","default.default",'[t] @role (grammar:localRole); [t] "s\u00e9quence"; [t] "avec"; [t] count(./children/*); [t] "\u00e9l\u00e9ments"; [n] . (engine:style=feminine)',"self::relseq","count(./children/*)>2");(0,sre.SummaryFrench.defineRule_)("abstr-relation-seq","mathspeak.brief",'[t] @role (grammar:localRole); [t] "s\u00e9quence"; [n] . (engine:style=feminine)',"self::relseq","count(./children/*)>2");(0,sre.SummaryFrench.defineSpecialisedRule_)("abstr-relation-seq",
|
1543
|
+
"mathspeak.brief","mathspeak.sbrief");(0,sre.SummaryFrench.defineRule_)("abstr-var-relation","default.default",'[t] @role (grammar:localRole); [t] "s\u00e9quence"; [t] "avec un nombre de \u00e9l\u00e9ments variable"; [n] . (engine:style=feminine)',"self::relseq","count(./children/*)>2",'./children/punctuation[@role="ellipsis"]');(0,sre.SummaryFrench.defineUniqueRuleAlias_)("abstr-relation","default.default","self::multirel",'@role!="unknown"',"count(./children/*)>2");(0,sre.SummaryFrench.defineRuleAlias_)("abstr-var-relation",
|
1544
|
+
"self::multirel",'@role!="unknown"',"count(./children/*)>2",'./children/punctuation[@role="ellipsis"]');(0,sre.SummaryFrench.defineRule_)("abstr-multirel","default.default",'[t] "s\u00e9quence de relation"; [t] "avec"; [t] count(./children/*); [t] "\u00e9l\u00e9ments"; [n] . (engine:style=feminine)',"self::multirel","count(./children/*)>2");(0,sre.SummaryFrench.defineRule_)("abstr-multirel","mathspeak.brief",'[t] "s\u00e9quence de relation"; [n] . (engine:style=feminine)',"self::multirel","count(./children/*)>2");
|
1545
|
+
(0,sre.SummaryFrench.defineSpecialisedRule_)("abstr-multirel","mathspeak.brief","mathspeak.sbrief");(0,sre.SummaryFrench.defineRule_)("abstr-var-multirel","default.default",'[t] "s\u00e9quence de relation avec un nombre de \u00e9l\u00e9ments variable"; [n] . (engine:style=feminine)',"self::multirel","count(./children/*)>2",'./children/punctuation[@role="ellipsis"]');(0,sre.SummaryFrench.defineRule_)("abstr-table","default.default",'[t] "table avec"; [t] count(children/*); [t] "lignes et";[t] count(children/*[1]/children/*); [t] "colonnes"; [n] . (engine:style=feminine);',
|
1546
|
+
"self::table");(0,sre.SummaryFrench.defineRule_)("abstr-line","default.default",'[t] "dans"; [t] @role (grammar:localRole); [n] . (engine:style=masculine)',"self::line");(0,sre.SummaryFrench.defineRule_)("abstr-row","default.default",'[t] "dans"; [t] @role (grammar:localRole);[t] count(preceding-sibling::..); [t] "avec";[t] count(children/*); [t] "colonnes"; [n] . (engine:style=feminine)',"self::row");(0,sre.SummaryFrench.defineRule_)("abstr-cell","default.default",'[t] "dans"; [t] @role (grammar:localRole); [n] . (engine:style=feminine);',
|
1547
|
+
"self::cell")};sre.SummaryFrench.getInstance().initializer=[sre.SummaryFrench.initSummaryFrench_];sre.SummaryRules=function(){sre.MathStore.call(this);this.modality="summary"};goog.inherits(sre.SummaryRules,sre.MathStore);goog.addSingletonGetter(sre.SummaryRules);sre.SummaryRules.mathStore=sre.SummaryRules.getInstance();sre.SummaryRules.defineRule_=goog.bind(sre.SummaryRules.mathStore.defineRule,sre.SummaryRules.mathStore);sre.SummaryRules.defineRuleAlias_=goog.bind(sre.SummaryRules.mathStore.defineRulesAlias,sre.SummaryRules.mathStore);
|
1548
|
+
sre.SummaryRules.defineSpecialisedRule_=goog.bind(sre.SummaryRules.mathStore.defineSpecialisedRule,sre.SummaryRules.mathStore);sre.SummaryRules.defineUniqueRuleAlias_=goog.bind(sre.SummaryRules.mathStore.defineUniqueRuleAlias,sre.SummaryRules.mathStore);
|
1549
|
+
sre.SummaryRules.initSummaryRules_=function(){(0,sre.SummaryRules.defineRule_)("abstr-identifier","default.default",'[t] "long identifier"',"self::identifier",'contains(@grammar, "collapsed")');(0,sre.SummaryRules.defineRule_)("abstr-identifier","default.default",'[t] "identifier"',"self::identifier");(0,sre.SummaryRules.defineRule_)("abstr-number","default.default",'[t] "long number"',"self::number",'contains(@grammar, "collapsed")');(0,sre.SummaryRules.defineRule_)("abstr-number","default.default",
|
1550
|
+
'[t] "number"',"self::number");(0,sre.SummaryRules.defineRule_)("abstr-mixed-number","default.default",'[t] "long mixed number"',"self::number",'@role="mixed"','contains(@grammar, "collapsed")');(0,sre.SummaryRules.defineRule_)("abstr-mixed-number","default.default",'[t] "mixed number"',"self::number",'@role="mixed"');(0,sre.SummaryRules.defineRule_)("abstr-text","default.default",'[t] "text"',"self::text");(0,sre.SummaryRules.defineRule_)("abstr-function","default.default",'[t] "functional expression"',
|
1551
|
+
"self::function");(0,sre.SummaryRules.defineRule_)("abstr-function","mathspeak.brief",'[t] "function"',"self::function");(0,sre.SummaryRules.defineSpecialisedRule_)("abstr-function","mathspeak.brief","mathspeak.sbrief");(0,sre.SummaryRules.defineRule_)("abstr-lim","default.default",'[t] "limit function"',"self::function",'@role="limit function"');(0,sre.SummaryRules.defineRule_)("abstr-lim","mathspeak.brief",'[t] "lim"',"self::function",'@role="limit function"');(0,sre.SummaryRules.defineSpecialisedRule_)("abstr-lim",
|
1552
|
+
"mathspeak.brief","mathspeak.sbrief");(0,sre.SummaryRules.defineRule_)("abstr-fraction","default.default",'[t] "fraction"',"self::fraction");(0,sre.SummaryRules.defineRule_)("abstr-fraction","mathspeak.brief",'[t] "frac"',"self::fraction");(0,sre.SummaryRules.defineSpecialisedRule_)("abstr-fraction","mathspeak.brief","mathspeak.sbrief");(0,sre.SummaryRules.defineRule_)("abstr-continued-fraction","default.default",'[t] "continued fraction"',"self::fraction",'children/*[2]/descendant-or-self::*[@role="ellipsis"]');
|
1553
|
+
(0,sre.SummaryRules.defineRule_)("abstr-continued-fraction","mathspeak.brief",'[t] "continued frac"',"self::fraction",'children/*[2]/descendant-or-self::*[@role="ellipsis"]');(0,sre.SummaryRules.defineSpecialisedRule_)("abstr-continued-fraction","mathspeak.brief","mathspeak.sbrief");(0,sre.SummaryRules.defineRule_)("abstr-sqrt","default.default",'[t] "square root"',"self::sqrt");(0,sre.SummaryRules.defineRule_)("abstr-sqrt-nested","default.default",'[t] "nested square root"',"self::sqrt","children/*/descendant-or-self::sqrt or children/*/descendant-or-self::root");
|
1554
|
+
(0,sre.SummaryRules.defineRule_)("abstr-root","default.default",'[t] "root of index"; [n] children/*[1] (engine:modality="speech"); [t] "endindex"',"self::root",'contains(@grammar, "collapsed")',"following-sibling::* or ancestor::*/following-sibling::*");(0,sre.SummaryRules.defineRule_)("abstr-root","default.default",'[t] "root of index"; [n] children/*[1] (engine:modality=speech)',"self::root");(0,sre.SummaryRules.defineRule_)("abstr-root","mathspeak.brief",'[t] "root"',"self::root");(0,sre.SummaryRules.defineSpecialisedRule_)("abstr-root",
|
1555
|
+
"mathspeak.brief","mathspeak.sbrief");(0,sre.SummaryRules.defineRule_)("abstr-root-nested","default.default",'[t] "nested root of index"; [n] children/*[1] (engine:modality="speech"); [t] "endindex"',"self::root",'contains(@grammar, "collapsed")',"children/*/descendant-or-self::sqrt or children/*/descendant-or-self::root","following-sibling::* or ancestor::*/following-sibling::*");(0,sre.SummaryRules.defineRule_)("abstr-root-nested","default.default",'[t] "nested root of index"; [n] children/*[1] (engine:modality="speech")',
|
1556
|
+
"self::root","children/*/descendant-or-self::sqrt or children/*/descendant-or-self::root");(0,sre.SummaryRules.defineRule_)("abstr-root-nested","mathspeak.brief",'[t] "nested root"',"self::root","children/*/descendant-or-self::sqrt or children/*/descendant-or-self::root");(0,sre.SummaryRules.defineSpecialisedRule_)("abstr-root-nested","mathspeak.brief","mathspeak.sbrief");(0,sre.SummaryRules.defineRule_)("abstr-superscript","default.default",'[t] "power"',"self::superscript");(0,sre.SummaryRules.defineRule_)("abstr-subscript",
|
1557
|
+
"default.default",'[t] "subscript"',"self::subscript");(0,sre.SummaryRules.defineRule_)("abstr-subsup","default.default",'[t] "power with subscript"',"self::superscript",'name(children/*[1])="subscript"');(0,sre.SummaryRules.defineRule_)("abstr-infixop","default.default",'[t] @role (grammar:localRole); [t] "with"; [t] count(./children/*); [t] "elements"',"self::infixop");(0,sre.SummaryRules.defineRule_)("abstr-infixop","default.default",'[t] @role (grammar:localRole); [t] "with variable number of elements"',
|
1558
|
+
"self::infixop","count(./children/*)>2",'./children/punctuation[@role="ellipsis"]');(0,sre.SummaryRules.defineRule_)("abstr-infixop","mathspeak.brief","[t] @role (grammar:localRole)","self::infixop");(0,sre.SummaryRules.defineSpecialisedRule_)("abstr-infixop","mathspeak.brief","mathspeak.sbrief");(0,sre.SummaryRules.defineRule_)("abstr-addition","default.default",'[t] "sum with"; [t] count(./children/*); [t] "summands"',"self::infixop",'@role="addition"');(0,sre.SummaryRules.defineRule_)("abstr-addition",
|
1559
|
+
"mathspeak.brief",'[t] "sum"',"self::infixop",'@role="addition"');(0,sre.SummaryRules.defineSpecialisedRule_)("abstr-addition","mathspeak.brief","mathspeak.sbrief");(0,sre.SummaryRules.defineRule_)("abstr-var-addition","default.default",'[t] "sum with variable number of summands"',"self::infixop",'@role="addition"',"count(./children/*)>2",'./children/punctuation[@role="ellipsis"]');(0,sre.SummaryRules.defineRule_)("abstr-multiplication","default.default",'[t] "product with"; [t] count(./children/*); [t] "factors"',
|
1560
|
+
"self::infixop",'@role="multiplication"');(0,sre.SummaryRules.defineRule_)("abstr-multiplication","mathspeak.brief",'[t] "product"',"self::infixop",'@role="multiplication"');(0,sre.SummaryRules.defineSpecialisedRule_)("abstr-multiplication","mathspeak.brief","mathspeak.sbrief");(0,sre.SummaryRules.defineRuleAlias_)("abstr-multiplication","self::infixop",'@role="implicit"');(0,sre.SummaryRules.defineRule_)("abstr-var-multiplication","default.default",'[t] "product with variable number of factors"',
|
1561
|
+
"self::infixop",'@role="multiplication"',"count(./children/*)>2",'./children/punctuation[@role="ellipsis"]');(0,sre.SummaryRules.defineRuleAlias_)("abstr-var-multiplication","self::infixop",'@role="implicit"',"count(./children/*)>2",'./children/punctuation[@role="ellipsis"]');(0,sre.SummaryRules.defineRule_)("abstr-vector","default.default",'[t] count(./children/*) ; [t] "dimensional vector"',"self::vector");(0,sre.SummaryRules.defineRule_)("abstr-vector","mathspeak.brief",'[t] "vector"',"self::vector");
|
1562
|
+
(0,sre.SummaryRules.defineSpecialisedRule_)("abstr-vector","mathspeak.brief","mathspeak.sbrief");(0,sre.SummaryRules.defineRule_)("abstr-var-vector","default.default",'[t] "n dimensional vector"',"self::vector",'./children/*/children/punctuation[@role="ellipsis"]');(0,sre.SummaryRules.defineRule_)("abstr-binomial","default.default",'[t] "binomial"',"self::vector",'@role="binomial"');(0,sre.SummaryRules.defineSpecialisedRule_)("abstr-binomial","default.default","mathspeak.brief");(0,sre.SummaryRules.defineSpecialisedRule_)("abstr-binomial",
|
1563
|
+
"default.default","mathspeak.sbrief");(0,sre.SummaryRules.defineRule_)("abstr-determinant","default.default",'[t] count(./children/*); [t] "dimensional determinant"',"self::matrix",'@role="determinant"');(0,sre.SummaryRules.defineRule_)("abstr-determinant","mathspeak.brief",'[t] "determinant"',"self::matrix",'@role="determinant"');(0,sre.SummaryRules.defineSpecialisedRule_)("abstr-determinant","mathspeak.brief","mathspeak.sbrief");(0,sre.SummaryRules.defineRule_)("abstr-var-determinant","default.default",
|
1564
|
+
'[t] "n dimensional determinant"',"self::matrix",'@role="determinant"','./children/*/children/*/children/punctuation[@role="ellipsis"]');(0,sre.SummaryRules.defineRule_)("abstr-squarematrix","default.default",'[t] count(./children/*); [t] "dimensional square matrix"',"self::matrix",'@role="squarematrix"');(0,sre.SummaryRules.defineRule_)("abstr-squarematrix","mathspeak.brief",'[t] "square matrix"',"self::matrix",'@role="squarematrix"');(0,sre.SummaryRules.defineSpecialisedRule_)("abstr-squarematrix",
|
1565
|
+
"mathspeak.brief","mathspeak.sbrief");(0,sre.SummaryRules.defineRule_)("abstr-rowvector","default.default",'[t] count(./children/row/children/*); [t] "dimensional row vector"',"self::matrix",'@role="rowvector"');(0,sre.SummaryRules.defineRule_)("abstr-rowvector","mathspeak.brief",'[t] "row vector"',"self::matrix",'@role="rowvector"');(0,sre.SummaryRules.defineSpecialisedRule_)("abstr-rowvector","mathspeak.brief","mathspeak.sbrief");(0,sre.SummaryRules.defineRule_)("abstr-var-matrix","default.default",
|
1566
|
+
'[t] "n dimensional row vector"',"self::matrix",'@role="rowvector"','./children/*/children/*/children/punctuation[@role="ellipsis"]');(0,sre.SummaryRules.defineRule_)("abstr-matrix","default.default",'[t] count(children/*); [t] "by";[t] count(children/*[1]/children/*); [t] "matrix"',"self::matrix");(0,sre.SummaryRules.defineRule_)("abstr-matrix","mathspeak.brief",'[t] "matrix"',"self::matrix");(0,sre.SummaryRules.defineSpecialisedRule_)("abstr-matrix","mathspeak.brief","mathspeak.sbrief");(0,sre.SummaryRules.defineRule_)("abstr-var-matrix",
|
1567
|
+
"default.default",'[t] "n by m dimensional matrix"',"self::matrix",'./children/*/children/*/children/punctuation[@role="ellipsis"]');(0,sre.SummaryRules.defineRule_)("abstr-cases","default.default",'[t] "case statement";[t] "with"; [t] count(children/*); [t] "cases"',"self::cases");(0,sre.SummaryRules.defineRule_)("abstr-cases","mathspeak.brief",'[t] "case statement"',"self::cases");(0,sre.SummaryRules.defineSpecialisedRule_)("abstr-cases","mathspeak.brief","mathspeak.sbrief");(0,sre.SummaryRules.defineRule_)("abstr-var-cases",
|
1568
|
+
"default.default",'[t] "case statement with variable number of cases"',"self::cases",'./children/row/children/cell/children/punctuation[@role="ellipsis"]or ./children/line/children/punctuation[@role="ellipsis"]');(0,sre.SummaryRules.defineRule_)("abstr-punctuated","default.default",'[n] content/*[1]; [t] "separated list"; [t] "of length"; [t] count(children/*) - count(content/*)',"self::punctuated");(0,sre.SummaryRules.defineRule_)("abstr-punctuated","mathspeak.brief",'[n] content/*[1]; [t] "separated list"',
|
1569
|
+
"self::punctuated");(0,sre.SummaryRules.defineSpecialisedRule_)("abstr-punctuated","mathspeak.brief","mathspeak.sbrief");(0,sre.SummaryRules.defineRule_)("abstr-var-punctuated","default.default",'[n] content/*[1]; [t] "separated list";[t] "of variable length"',"self::punctuated",'./children/punctuation[@role="ellipsis"]');(0,sre.SummaryRules.defineRule_)("abstr-bigop","default.default","[n] content/*[1]","self::bigop");(0,sre.SummaryRules.defineRule_)("abstr-integral","default.default",'[t] "integral"',
|
1570
|
+
'@role="integral"');(0,sre.SummaryRules.defineRule_)("abstr-relation","default.default","[t] @role (grammar:localRole);","self::relseq","count(./children/*)=2");(0,sre.SummaryRules.defineRule_)("abstr-relation-seq","default.default",'[t] @role (grammar:localRole); [t] "sequence"; [t] "with"; [t] count(./children/*); [t] "elements"',"self::relseq","count(./children/*)>2");(0,sre.SummaryRules.defineRule_)("abstr-relation-seq","mathspeak.brief",'[t] @role (grammar:localRole); [t] "sequence"',"self::relseq",
|
1571
|
+
"count(./children/*)>2");(0,sre.SummaryRules.defineSpecialisedRule_)("abstr-relation-seq","mathspeak.brief","mathspeak.sbrief");(0,sre.SummaryRules.defineRule_)("abstr-var-relation","default.default",'[t] @role (grammar:localRole); [t] "sequence"; [t] "with variable number of elements"',"self::relseq","count(./children/*)>2",'./children/punctuation[@role="ellipsis"]');(0,sre.SummaryRules.defineUniqueRuleAlias_)("abstr-relation","default.default","self::multirel",'@role!="unknown"',"count(./children/*)>2");
|
1572
|
+
(0,sre.SummaryRules.defineRuleAlias_)("abstr-var-relation","self::multirel",'@role!="unknown"',"count(./children/*)>2",'./children/punctuation[@role="ellipsis"]');(0,sre.SummaryRules.defineRule_)("abstr-multirel","default.default",'[t] "relation sequence"; [t] "with"; [t] count(./children/*); [t] "elements"',"self::multirel","count(./children/*)>2");(0,sre.SummaryRules.defineRule_)("abstr-multirel","mathspeak.brief",'[t] "relation sequence"',"self::multirel","count(./children/*)>2");(0,sre.SummaryRules.defineSpecialisedRule_)("abstr-multirel",
|
1573
|
+
"mathspeak.brief","mathspeak.sbrief");(0,sre.SummaryRules.defineRule_)("abstr-var-multirel","default.default",'[t] "relation sequence with variable number of elements"',"self::multirel","count(./children/*)>2",'./children/punctuation[@role="ellipsis"]');(0,sre.SummaryRules.defineRule_)("abstr-table","default.default",'[t] "table with"; [t] count(children/*); [t] "rows and";[t] count(children/*[1]/children/*); [t] "columns"',"self::table");(0,sre.SummaryRules.defineRule_)("abstr-line","default.default",
|
1574
|
+
'[t] "in"; [t] @role (grammar:localRole);',"self::line");(0,sre.SummaryRules.defineRule_)("abstr-row","default.default",'[t] "in"; [t] @role (grammar:localRole);[t] count(preceding-sibling::..); [t] "with";[t] count(children/*); [t] "columns"',"self::row");(0,sre.SummaryRules.defineRule_)("abstr-cell","default.default",'[t] "in"; [t] @role (grammar:localRole);',"self::cell")};sre.SummaryRules.getInstance().initializer=[sre.SummaryRules.initSummaryRules_];sre.SummarySpanish=function(){sre.MathStore.call(this);this.locale="es";this.modality="summary"};goog.inherits(sre.SummarySpanish,sre.MathStore);goog.addSingletonGetter(sre.SummarySpanish);sre.SummarySpanish.mathStore=sre.SummarySpanish.getInstance();sre.SummarySpanish.defineRule_=goog.bind(sre.SummarySpanish.mathStore.defineRule,sre.SummarySpanish.mathStore);sre.SummarySpanish.defineRuleAlias_=goog.bind(sre.SummarySpanish.mathStore.defineRulesAlias,sre.SummarySpanish.mathStore);
|
1575
|
+
sre.SummarySpanish.defineSpecialisedRule_=goog.bind(sre.SummarySpanish.mathStore.defineSpecialisedRule,sre.SummarySpanish.mathStore);sre.SummarySpanish.defineUniqueRuleAlias_=goog.bind(sre.SummarySpanish.mathStore.defineUniqueRuleAlias,sre.SummarySpanish.mathStore);
|
1576
|
+
sre.SummarySpanish.initSummarySpanish_=function(){(0,sre.SummarySpanish.defineRule_)("stree","default.default","[n] ./*[1]","self::stree");(0,sre.SummarySpanish.defineRule_)("abstr-identifier","default.default",'[t] "identificador largo"',"self::identifier",'contains(@grammar, "collapsed")');(0,sre.SummarySpanish.defineRule_)("abstr-identifier","default.default",'[t] "identificador"',"self::identifier");(0,sre.SummarySpanish.defineRule_)("abstr-number","default.default",'[t] "n\u00famero largo"',
|
1577
|
+
"self::number",'contains(@grammar, "collapsed")');(0,sre.SummarySpanish.defineRule_)("abstr-number","default.default",'[t] "n\u00famero"',"self::number");(0,sre.SummarySpanish.defineRule_)("abstr-mixed-number","default.default",'[t] "n\u00famero largo mixto"',"self::number",'@role="mixed"','contains(@grammar, "collapsed")');(0,sre.SummarySpanish.defineRule_)("abstr-mixed-number","default.default",'[t] "n\u00famero mixto"',"self::number",'@role="mixed"');(0,sre.SummarySpanish.defineRule_)("abstr-text",
|
1578
|
+
"default.default",'[t] "texto"',"self::text");(0,sre.SummarySpanish.defineRule_)("abstr-function","default.default",'[t] "expresi\u00f3n funcional"',"self::function");(0,sre.SummarySpanish.defineRule_)("abstr-function","mathspeak.brief",'[t] "funci\u00f3n"',"self::function");(0,sre.SummarySpanish.defineSpecialisedRule_)("abstr-function","mathspeak.brief","mathspeak.sbrief");(0,sre.SummarySpanish.defineRule_)("abstr-lim","default.default",'[t] "funci\u00f3n de l\u00edmite"',"self::function",'@role="limit function"');
|
1579
|
+
(0,sre.SummarySpanish.defineRule_)("abstr-lim","mathspeak.brief",'[t] "l\u00edmite"',"self::function",'@role="limit function"');(0,sre.SummarySpanish.defineSpecialisedRule_)("abstr-lim","mathspeak.brief","mathspeak.sbrief");(0,sre.SummarySpanish.defineRule_)("abstr-fraction","default.default",'[t] "fracci\u00f3n"',"self::fraction");(0,sre.SummarySpanish.defineRule_)("abstr-fraction","mathspeak.brief",'[t] "frac"',"self::fraction");(0,sre.SummarySpanish.defineSpecialisedRule_)("abstr-fraction","mathspeak.brief",
|
1580
|
+
"mathspeak.sbrief");(0,sre.SummarySpanish.defineRule_)("abstr-continued-fraction","default.default",'[t] "fracci\u00f3n continua"',"self::fraction",'children/*[2]/descendant-or-self::*[@role="ellipsis"]');(0,sre.SummarySpanish.defineRule_)("abstr-continued-fraction","mathspeak.brief",'[t] "frac continua"',"self::fraction",'children/*[2]/descendant-or-self::*[@role="ellipsis"]');(0,sre.SummarySpanish.defineSpecialisedRule_)("abstr-continued-fraction","mathspeak.brief","mathspeak.sbrief");(0,sre.SummarySpanish.defineRule_)("abstr-sqrt",
|
1581
|
+
"default.default",'[t] "ra\u00edz cuadrada"',"self::sqrt");(0,sre.SummarySpanish.defineRule_)("abstr-sqrt-nested","default.default",'[t] "ra\u00edz cuadrada anidada"',"self::sqrt","children/*/descendant-or-self::sqrt or children/*/descendant-or-self::root");(0,sre.SummarySpanish.defineRule_)("abstr-root","default.default",'[t] "ra\u00edz del \u00edndice"; [n] children/*[1] (engine:modality="speech"); [t] "finalizar de \u00edndice"',"self::root",'contains(@grammar, "collapsed")',"following-sibling::* or ancestor::*/following-sibling::*");
|
1582
|
+
(0,sre.SummarySpanish.defineRule_)("abstr-root","default.default",'[t] "ra\u00edz del \u00edndice"; [n] children/*[1] (engine:modality=speech)',"self::root");(0,sre.SummarySpanish.defineRule_)("abstr-root","mathspeak.brief",'[t] "ra\u00edz"',"self::root");(0,sre.SummarySpanish.defineSpecialisedRule_)("abstr-root","mathspeak.brief","mathspeak.sbrief");(0,sre.SummarySpanish.defineRule_)("abstr-root-nested","default.default",'[t] "ra\u00edz anidada del \u00edndice"; [n] children/*[1] (engine:modality="speech"); [t] "finalizar de \u00edndice"',
|
1583
|
+
"self::root",'contains(@grammar, "collapsed")',"children/*/descendant-or-self::sqrt or children/*/descendant-or-self::root","following-sibling::* or ancestor::*/following-sibling::*");(0,sre.SummarySpanish.defineRule_)("abstr-root-nested","default.default",'[t] "ra\u00edz anidada del \u00edndice"; [n] children/*[1] (engine:modality="speech")',"self::root","children/*/descendant-or-self::sqrt or children/*/descendant-or-self::root");(0,sre.SummarySpanish.defineRule_)("abstr-root-nested","mathspeak.brief",
|
1584
|
+
'[t] "ra\u00edz anidada"',"self::root","children/*/descendant-or-self::sqrt or children/*/descendant-or-self::root");(0,sre.SummarySpanish.defineSpecialisedRule_)("abstr-root-nested","mathspeak.brief","mathspeak.sbrief");(0,sre.SummarySpanish.defineRule_)("abstr-superscript","default.default",'[t] "potencia"',"self::superscript");(0,sre.SummarySpanish.defineRule_)("abstr-subscript","default.default",'[t] "sub\u00edndice"',"self::subscript");(0,sre.SummarySpanish.defineRule_)("abstr-subsup","default.default",
|
1585
|
+
'[t] "potencia con sub\u00edndice"',"self::superscript",'name(children/*[1])="subscript"');(0,sre.SummarySpanish.defineRule_)("abstr-infixop","default.default",'[t] @role (grammar:localRole); [t] "con"; [t] count(./children/*); [t] "elementos"',"self::infixop");(0,sre.SummarySpanish.defineRule_)("abstr-infixop","default.default",'[t] @role (grammar:localRole); [t] "con una cantidad variable de elementos"',"self::infixop","count(./children/*)>2",'./children/punctuation[@role="ellipsis"]');(0,sre.SummarySpanish.defineRule_)("abstr-infixop",
|
1586
|
+
"mathspeak.brief","[t] @role (grammar:localRole)","self::infixop");(0,sre.SummarySpanish.defineSpecialisedRule_)("abstr-infixop","mathspeak.brief","mathspeak.sbrief");(0,sre.SummarySpanish.defineRule_)("abstr-addition","default.default",'[t] "suma con"; [t] count(./children/*); [t] "sumandos"',"self::infixop",'@role="addition"');(0,sre.SummarySpanish.defineRule_)("abstr-addition","mathspeak.brief",'[t] "suma"',"self::infixop",'@role="addition"');(0,sre.SummarySpanish.defineSpecialisedRule_)("abstr-addition",
|
1587
|
+
"mathspeak.brief","mathspeak.sbrief");(0,sre.SummarySpanish.defineRule_)("abstr-var-addition","default.default",'[t] "suma con n\u00famero variable de sumandos"',"self::infixop",'@role="addition"',"count(./children/*)>2",'./children/punctuation[@role="ellipsis"]');(0,sre.SummarySpanish.defineRule_)("abstr-multiplication","default.default",'[t] "producto con"; [t] count(./children/*); [t] "factores"',"self::infixop",'@role="multiplication"');(0,sre.SummarySpanish.defineRule_)("abstr-multiplication",
|
1588
|
+
"mathspeak.brief",'[t] "producto"',"self::infixop",'@role="multiplication"');(0,sre.SummarySpanish.defineSpecialisedRule_)("abstr-multiplication","mathspeak.brief","mathspeak.sbrief");(0,sre.SummarySpanish.defineRuleAlias_)("abstr-multiplication","self::infixop",'@role="implicit"');(0,sre.SummarySpanish.defineRule_)("abstr-var-multiplication","default.default",'[t] "producto con una cantidad variable de factores"',"self::infixop",'@role="multiplication"',"count(./children/*)>2",'./children/punctuation[@role="ellipsis"]');
|
1589
|
+
(0,sre.SummarySpanish.defineRuleAlias_)("abstr-var-multiplication","self::infixop",'@role="implicit"',"count(./children/*)>2",'./children/punctuation[@role="ellipsis"]');(0,sre.SummarySpanish.defineRule_)("abstr-vector","default.default",'[t] "vector de dimensi\u00f3n"; [t] count(./children/*)',"self::vector");(0,sre.SummarySpanish.defineRule_)("abstr-vector","mathspeak.brief",'[t] "vector"',"self::vector");(0,sre.SummarySpanish.defineSpecialisedRule_)("abstr-vector","mathspeak.brief","mathspeak.sbrief");
|
1590
|
+
(0,sre.SummarySpanish.defineRule_)("abstr-var-vector","default.default",'[t] "vector de dimensi\u00f3n n"',"self::vector",'./children/*/children/punctuation[@role="ellipsis"]');(0,sre.SummarySpanish.defineRule_)("abstr-binomial","default.default",'[t] "binomio"',"self::vector",'@role="binomial"');(0,sre.SummarySpanish.defineSpecialisedRule_)("abstr-binomial","default.default","mathspeak.brief");(0,sre.SummarySpanish.defineSpecialisedRule_)("abstr-binomial","default.default","mathspeak.sbrief");(0,sre.SummarySpanish.defineRule_)("abstr-determinant",
|
1591
|
+
"default.default",'[t] "determinante de dimensi\u00f3n"; [t] count(./children/*)',"self::matrix",'@role="determinant"');(0,sre.SummarySpanish.defineRule_)("abstr-determinant","mathspeak.brief",'[t] "determinante"',"self::matrix",'@role="determinant"');(0,sre.SummarySpanish.defineSpecialisedRule_)("abstr-determinant","mathspeak.brief","mathspeak.sbrief");(0,sre.SummarySpanish.defineRule_)("abstr-var-determinant","default.default",'[t] "determinante de dimensi\u00f3n n"',"self::matrix",'@role="determinant"',
|
1592
|
+
'./children/*/children/*/children/punctuation[@role="ellipsis"]');(0,sre.SummarySpanish.defineRule_)("abstr-squarematrix","default.default",'[t] "matriz cuadrada de dimensi\u00f3n"; [t] count(./children/*)',"self::matrix",'@role="squarematrix"');(0,sre.SummarySpanish.defineRule_)("abstr-squarematrix","mathspeak.brief",'[t] "matriz cuadrada"',"self::matrix",'@role="squarematrix"');(0,sre.SummarySpanish.defineSpecialisedRule_)("abstr-squarematrix","mathspeak.brief","mathspeak.sbrief");(0,sre.SummarySpanish.defineRule_)("abstr-rowvector",
|
1593
|
+
"default.default",'[t] "vector fila de dimensi\u00f3n"; [t] count(./children/row/children/*)',"self::matrix",'@role="rowvector"');(0,sre.SummarySpanish.defineRule_)("abstr-rowvector","mathspeak.brief",'[t] "vector fila"',"self::matrix",'@role="rowvector"');(0,sre.SummarySpanish.defineSpecialisedRule_)("abstr-rowvector","mathspeak.brief","mathspeak.sbrief");(0,sre.SummarySpanish.defineRule_)("abstr-var-matrix","default.default",'[t] "vector fila de dimensi\u00f3n n"',"self::matrix",'@role="rowvector"',
|
1594
|
+
'./children/*/children/*/children/punctuation[@role="ellipsis"]');(0,sre.SummarySpanish.defineRule_)("abstr-matrix","default.default",'[t] count(children/*); [t] "por";[t] count(children/*[1]/children/*); [t] "matriz"',"self::matrix");(0,sre.SummarySpanish.defineRule_)("abstr-matrix","mathspeak.brief",'[t] "matriz"',"self::matrix");(0,sre.SummarySpanish.defineSpecialisedRule_)("abstr-matrix","mathspeak.brief","mathspeak.sbrief");(0,sre.SummarySpanish.defineRule_)("abstr-var-matrix","default.default",
|
1595
|
+
'[t] "matriz de dimensi\u00f3n n por m"',"self::matrix",'./children/*/children/*/children/punctuation[@role="ellipsis"]');(0,sre.SummarySpanish.defineRule_)("abstr-cases","default.default",'[t] "declaraci\u00f3n de caso";[t] "con"; [t] count(children/*); [t] "casos"',"self::cases");(0,sre.SummarySpanish.defineRule_)("abstr-cases","mathspeak.brief",'[t] "declaraci\u00f3n de caso"',"self::cases");(0,sre.SummarySpanish.defineSpecialisedRule_)("abstr-cases","mathspeak.brief","mathspeak.sbrief");(0,sre.SummarySpanish.defineRule_)("abstr-var-cases",
|
1596
|
+
"default.default",'[t] "declaraci\u00f3n de caso con n\u00famero variable de casos"',"self::cases",'./children/row/children/cell/children/punctuation[@role="ellipsis"]or ./children/line/children/punctuation[@role="ellipsis"]');(0,sre.SummarySpanish.defineRule_)("abstr-punctuated","default.default",'[t] "lista separada por"; [n] content/*[1]; [t] "de longitud"; [t] count(children/*) - count(content/*)',"self::punctuated");(0,sre.SummarySpanish.defineRule_)("abstr-punctuated","mathspeak.brief",'[t] "lista separada por"; [n] content/*[1]',
|
1597
|
+
"self::punctuated");(0,sre.SummarySpanish.defineSpecialisedRule_)("abstr-punctuated","mathspeak.brief","mathspeak.sbrief");(0,sre.SummarySpanish.defineRule_)("abstr-var-punctuated","default.default",'[t] "lista separada por"; [n] content/*[1]','[t] "de longitud variable"',"self::punctuated",'./children/punctuation[@role="ellipsis"]');(0,sre.SummarySpanish.defineRule_)("abstr-bigop","default.default","[n] content/*[1]","self::bigop");(0,sre.SummarySpanish.defineRule_)("abstr-integral","default.default",
|
1598
|
+
'[t] "integral"','@role="integral"');(0,sre.SummarySpanish.defineRule_)("abstr-relation","default.default","[t] @role (grammar:localRole);","self::relseq","count(./children/*)=2");(0,sre.SummarySpanish.defineRule_)("abstr-relation-seq","default.default",'[t] "secuencia de"; [t] @role (grammar:localRole); [t] "con"; [t] count(./children/*); [t] "elementos"',"self::relseq","count(./children/*)>2");(0,sre.SummarySpanish.defineRule_)("abstr-relation-seq","mathspeak.brief",'[t] "secuencia de"; [t] @role (grammar:localRole)',
|
1599
|
+
"self::relseq","count(./children/*)>2");(0,sre.SummarySpanish.defineSpecialisedRule_)("abstr-relation-seq","mathspeak.brief","mathspeak.sbrief");(0,sre.SummarySpanish.defineRule_)("abstr-var-relation","default.default",'[t] "secuencia de"; [t] @role (grammar:localRole); [t] "con una cantidad variable de elementos"',"self::relseq","count(./children/*)>2",'./children/punctuation[@role="ellipsis"]');(0,sre.SummarySpanish.defineUniqueRuleAlias_)("abstr-relation","default.default","self::multirel",'@role!="unknown"',
|
1600
|
+
"count(./children/*)>2");(0,sre.SummarySpanish.defineRuleAlias_)("abstr-var-relation","self::multirel",'@role!="unknown"',"count(./children/*)>2",'./children/punctuation[@role="ellipsis"]');(0,sre.SummarySpanish.defineRule_)("abstr-multirel","default.default",'[t] "secuencia de relaci\u00f3n"; [t] "con"; [t] count(./children/*); [t] "elementos"',"self::multirel","count(./children/*)>2");(0,sre.SummarySpanish.defineRule_)("abstr-multirel","mathspeak.brief",'[t] "secuencia de relaci\u00f3n"',"self::multirel",
|
1601
|
+
"count(./children/*)>2");(0,sre.SummarySpanish.defineSpecialisedRule_)("abstr-multirel","mathspeak.brief","mathspeak.sbrief");(0,sre.SummarySpanish.defineRule_)("abstr-var-multirel","default.default",'[t] "secuencia de relaci\u00f3n con n\u00famero variable de elementos"',"self::multirel","count(./children/*)>2",'./children/punctuation[@role="ellipsis"]');(0,sre.SummarySpanish.defineRule_)("abstr-table","default.default",'[t] "mesa con"; [t] count(children/*); [t] "filas y";[t] count(children/*[1]/children/*); [t] "columnas"',
|
1602
|
+
"self::table");(0,sre.SummarySpanish.defineRule_)("abstr-line","default.default",'[t] "en"; [t] @role (grammar:localRole);',"self::line");(0,sre.SummarySpanish.defineRule_)("abstr-row","default.default",'[t] "en"; [t] @role (grammar:localRole);[t] count(preceding-sibling::..); [t] "con";[t] count(children/*); [t] "columnas"',"self::row");(0,sre.SummarySpanish.defineRule_)("abstr-cell","default.default",'[t] "en"; [t] @role (grammar:localRole);',"self::cell")};
|
1603
|
+
sre.SummarySpanish.getInstance().initializer=[sre.SummarySpanish.initSummarySpanish_];sre.SpeechRuleStores={};
|
1604
|
+
sre.SpeechRuleStores.RULE_SETS_={MathmlStoreRules:sre.MathmlStoreRules,SemanticTreeRules:sre.SemanticTreeRules,MathspeakFrench:sre.MathspeakFrench,MathspeakRules:sre.MathspeakRules,MathspeakSpanish:sre.MathspeakSpanish,NemethRules:sre.NemethRules,ClearspeakFrench:sre.ClearspeakFrench,ClearspeakRules:sre.ClearspeakRules,EmacspeakRules:sre.EmacspeakRules,SummaryFrench:sre.SummaryFrench,SummaryRules:sre.SummaryRules,SummarySpanish:sre.SummarySpanish,PrefixFrench:sre.PrefixFrench,PrefixRules:sre.PrefixRules,
|
1605
|
+
PrefixSpanish:sre.PrefixSpanish};sre.SpeechRuleStores.availableSets=function(){return Object.keys(sre.SpeechRuleStores.RULE_SETS_)};sre.SpeechRuleStores.getConstructor=function(a){return(a=sre.SpeechRuleStores.RULE_SETS_[a])?a:null};sre.SpeechRuleEngine=function(){this.activeStore_=null;this.cache_={};this.ready_=!0;this.combinedStores_={};this.evaluators_={};sre.Engine.registerTest(goog.bind(function(a){return this.ready_},this))};goog.addSingletonGetter(sre.SpeechRuleEngine);sre.SpeechRuleEngine.prototype.parameterize=function(a){for(var b={},c=0,d=a.length;c<d;c++){var e=a[c],f=sre.SpeechRuleStores.getConstructor(e);f&&f.getInstance&&(b[e]=f.getInstance())}this.parameterize_(b)};
|
1606
|
+
sre.SpeechRuleEngine.prototype.parameterize_=function(a){try{this.activeStore_=this.combineStores_(a)}catch(b){if("StoreError"==b.name)console.error("Store Error:",b.message);else throw b;}this.updateEngine()};sre.SpeechRuleEngine.prototype.clearCache=function(){this.cache_={}};sre.SpeechRuleEngine.prototype.forCache=function(a){for(var b in this.cache_)a(b,this.cache_[b])};
|
1607
|
+
sre.SpeechRuleEngine.prototype.getCacheForNode_=function(a){if(!a||!a.getAttribute)return null;a=a.getAttribute("id");return"undefined"===a||""===a?null:this.getCache(a)};sre.SpeechRuleEngine.prototype.getCache=function(a){return(a=this.cache_[a])?this.cloneCache(a):a};sre.SpeechRuleEngine.prototype.cloneCache=function(a){return a.map(function(a){return a.clone()})};
|
1608
|
+
sre.SpeechRuleEngine.prototype.pushCache_=function(a,b){sre.Engine.getInstance().cache&&a.getAttribute&&(a=a.getAttribute("id"))&&(this.cache_[a]=this.cloneCache(b))};sre.SpeechRuleEngine.prototype.evaluateNode=function(a){var b=(new Date).getTime();a=this.evaluateNode_(a);var c=(new Date).getTime();sre.Debugger.getInstance().output("Time:",c-b);return a};sre.SpeechRuleEngine.prototype.evaluateNode_=function(a){if(!a)return[];this.updateConstraint_();return this.evaluateTree_(a)};
|
1609
|
+
sre.SpeechRuleEngine.prototype.evaluateTree_=function(a){var b=sre.Engine.getInstance();sre.Debugger.getInstance().output(b.mode!==sre.Engine.Mode.HTTP?a.toString():a);if(b.cache){var c=this.getCacheForNode_(a);if(c)return a.attributes&&this.addPersonality_(c,{},!1,a),c}sre.Grammar.getInstance().setAttribute(a);var d=this.activeStore_.lookupRule(a,b.dynamicCstr);if(!d){if(b.strict)return[];c=this.getEvaluator(b.locale,b.modality)(a);a.attributes&&this.addPersonality_(c,{},!1,a);this.pushCache_(a,
|
1610
|
+
c);return c}sre.Debugger.getInstance().generateOutput(goog.bind(function(){return["Apply Rule:",d.name,d.dynamicCstr.toString(),b.mode!==sre.Engine.Mode.HTTP?a.toString():a]},this));var e=d.context||this.activeStore_.context,f=d.action.components;c=[];for(var g=0,h;h=f[g];g++){var k=[],l=h.content||"",m=h.attributes||{},n=!1;h.grammar&&this.processGrammar(e,a,h.grammar);var p=null,q=null;if(m.engine){p=sre.Engine.getInstance().dynamicCstr.getComponents();var r=sre.Grammar.parseInput(m.engine);q=this.cache_;
|
1611
|
+
this.clearCache();sre.Engine.getInstance().setDynamicCstr(r)}switch(h.type){case sre.SpeechRule.Type.NODE:(l=e.applyQuery(a,l))&&(k=this.evaluateTree_(l));break;case sre.SpeechRule.Type.MULTI:n=!0;l=e.applySelector(a,l);0<l.length&&(k=this.evaluateNodeList_(e,l,m.sepFunc,e.constructString(a,m.separator),m.ctxtFunc,e.constructString(a,m.context)));break;case sre.SpeechRule.Type.TEXT:(l=e.constructString(a,l))&&(k=[sre.AuditoryDescription.create({text:l},{adjust:!0})]);break;default:k=[sre.AuditoryDescription.create({text:l})]}k[0]&&
|
1612
|
+
!n&&(m.context&&(k[0].context=e.constructString(a,m.context)+(k[0].context||"")),m.annotation&&(k[0].annotation=m.annotation));h.grammar&&sre.Grammar.getInstance().popState();c=c.concat(this.addPersonality_(k,m,n,a));p&&(this.cache_=q,sre.Engine.getInstance().setDynamicCstr(p))}this.pushCache_(a,c);return c};
|
1613
|
+
sre.SpeechRuleEngine.prototype.evaluateNodeList_=function(a,b,c,d,e,f){if(b==[])return[];var g=d||"",h=f||"";d=(d=a.contextFunctions.lookup(e))?d(b,h):function(){return h};a=(a=a.contextFunctions.lookup(c))?a(b,g):function(){return sre.AuditoryDescription.create({text:g},{translate:!0})};c=[];for(e=0;f=b[e];e++)f=this.evaluateTree_(f),0<f.length&&(f[0].context=d()+(f[0].context||""),c=c.concat(f),e<b.length-1&&(f=a(),c=c.concat(f)));return c};
|
1614
|
+
sre.SpeechRuleEngine.prototype.addPersonality_=function(a,b,c,d){var e={},f;for(f in sre.Engine.personalityProps){var g=b[sre.Engine.personalityProps[f]];if("undefined"!==typeof g){var h=parseFloat(g);e[sre.Engine.personalityProps[f]]=isNaN(h)?'"'==g.charAt(0)?g.slice(1,-1):g:h}}for(b=0;f=a[b];b++)this.addRelativePersonality_(f,e),this.addExternalAttributes_(f,d);c&&a.length&&delete a[a.length-1].personality[sre.Engine.personalityProps.JOIN];return a};
|
1615
|
+
sre.SpeechRuleEngine.prototype.addExternalAttributes_=function(a,b){if(b.hasAttributes()){b=b.attributes;for(var c=b.length-1;0<=c;c--){var d=b[c].name;!a.attributes[d]&&d.match(/^ext/)&&(a.attributes[d]=b[c].value)}}};sre.SpeechRuleEngine.prototype.addRelativePersonality_=function(a,b){if(!a.personality)return a.personality=b,a;var c=a.personality,d;for(d in b)c[d]=c[d]&&"number"==typeof c[d]&&"number"==typeof b[d]?c[d]+b[d]:b[d];return a};sre.SpeechRuleEngine.prototype.toString=function(){return this.activeStore_.findAllRules(function(a){return!0}).map(function(a){return a.toString()}).join("\n")};
|
1616
|
+
sre.SpeechRuleEngine.debugSpeechRule=function(a,b){var c=sre.SpeechRuleEngine.getInstance().activeStore_;c&&c.debugSpeechRule(a,b)};sre.SpeechRuleEngine.debugNamedSpeechRule=function(a,b){var c=sre.SpeechRuleEngine.getInstance().activeStore_;if(c)for(var d=c.findAllRules(function(b){return b.name==a}),e=0,f;f=d[e];e++)sre.Debugger.getInstance().output("Rule",a,"DynamicCstr:",f.dynamicCstr.toString(),"number",e),c.debugSpeechRule(f,b)};
|
1617
|
+
sre.SpeechRuleEngine.prototype.runInSetting=function(a,b){var c=sre.Engine.getInstance(),d={},e=null,f;for(f in a)"rules"===f?(e=this.activeStore_,c.ruleSets=a[f],this.parameterize(c.ruleSets)):(d[f]=c[f],c[f]=a[f]);c.setDynamicCstr();a=b();for(f in d)c[f]=d[f];e&&(this.activeStore_=e);c.setDynamicCstr();return a};
|
1618
|
+
sre.SpeechRuleEngine.prototype.combineStores_=function(a){var b=this.cachedStore_(a);if(b)return b;b=new sre.MathStore;for(var c in a){var d=a[c];d.initialize();d.getSpeechRules().forEach(function(a){b.trie.addRule(a)});this.addEvaluator(d)}b.setSpeechRules(b.trie.collectRules());return this.combinedStores_[this.combinedStoreName_(Object.keys(a))]=b};sre.SpeechRuleEngine.prototype.combinedStoreName_=function(a){return a.sort().join("-")};
|
1619
|
+
sre.SpeechRuleEngine.prototype.cachedStore_=function(a){var b=Object.keys(a);return b.some(function(b){return!a[b].initialized})?null:this.combinedStores_[this.combinedStoreName_(b)]};sre.SpeechRuleEngine.prototype.updateEngine=function(){this.ready_=!0;var a=sre.MathMap.getInstance();sre.Engine.isReady()?sre.Engine.getInstance().evaluator=goog.bind(a.store.lookupString,a.store):(this.ready_=!1,setTimeout(goog.bind(this.updateEngine,this),250))};
|
1620
|
+
sre.SpeechRuleEngine.prototype.processGrammar=function(a,b,c){var d={},e;for(e in c){var f=c[e];d[e]="string"===typeof f?a.constructString(b,f):f}sre.Grammar.getInstance().pushState(d)};
|
1621
|
+
sre.SpeechRuleEngine.prototype.updateConstraint_=function(){var a=sre.Engine.getInstance().dynamicCstr,b=sre.Engine.getInstance().strict,c=this.activeStore_.trie,d={},e=a.getValue(sre.DynamicCstr.Axis.LOCALE),f=a.getValue(sre.DynamicCstr.Axis.MODALITY),g=a.getValue(sre.DynamicCstr.Axis.DOMAIN);c.hasSubtrie([e,f,g])||(e=sre.DynamicCstr.DEFAULT_VALUES[sre.DynamicCstr.Axis.LOCALE],c.hasSubtrie([e,f,g])||(f=sre.DynamicCstr.DEFAULT_VALUES[sre.DynamicCstr.Axis.MODALITY],c.hasSubtrie([e,f,g])||(g=sre.DynamicCstr.DEFAULT_VALUES[sre.DynamicCstr.Axis.DOMAIN])));
|
1622
|
+
d[sre.DynamicCstr.Axis.LOCALE]=[e];d[sre.DynamicCstr.Axis.MODALITY]=["summary"!==f?f:sre.DynamicCstr.DEFAULT_VALUES[sre.DynamicCstr.Axis.MODALITY]];d[sre.DynamicCstr.Axis.DOMAIN]=["speech"!==f?sre.DynamicCstr.DEFAULT_VALUES[sre.DynamicCstr.Axis.DOMAIN]:g];c=a.getOrder();for(e=0;f=c[e];e++)if(!d[f]){g=a.getValue(f);var h=this.makeSet_(g,a.preference),k=sre.DynamicCstr.DEFAULT_VALUES[f];b||g===k||h.push(k);d[f]=h}a.updateProperties(d)};
|
1623
|
+
sre.SpeechRuleEngine.prototype.makeSet_=function(a,b){return b&&Object.keys(b).length?a.split(":"):[a]};sre.SpeechRuleEngine.prototype.addEvaluator=function(a){var b=goog.bind(a.evaluateDefault,a),c=this.evaluators_[a.locale];c?c[a.modality]=b:(c={},c[a.modality]=b,this.evaluators_[a.locale]=c)};sre.SpeechRuleEngine.prototype.getEvaluator=function(a,b){return(b=(a=this.evaluators_[a])?a[b]:null)?b:goog.bind(this.activeStore_.evaluateDefault,this.activeStore_)};
|
1624
|
+
sre.SpeechRuleEngine.prototype.enumerate=function(a){return this.activeStore_.trie.enumerate(a)};sre.SpeechGeneratorUtil={};sre.SpeechGeneratorUtil.computeSpeech=function(a){var b=sre.SpeechRuleEngine.getInstance();b.clearCache();return b.evaluateNode(a)};sre.SpeechGeneratorUtil.recomputeSpeech=function(a){a=sre.SemanticTree.fromNode(a);return sre.SpeechRuleEngine.getInstance().evaluateNode(a.xml())};
|
1625
|
+
sre.SpeechGeneratorUtil.computeSpeechWithoutCache=function(a){var b=sre.Engine.getInstance().cache;sre.Engine.getInstance().cache=!1;a=sre.SpeechRuleEngine.getInstance().evaluateNode(a);sre.Engine.getInstance().cache=b;return a};sre.SpeechGeneratorUtil.retrieveSpeech=function(a){var b=null;sre.Engine.getInstance().cache&&(b=sre.SpeechRuleEngine.getInstance().getCache(a.id.toString()));b||(b=sre.SpeechGeneratorUtil.recomputeSpeech(a));return sre.AuralRendering.getInstance().markup(b)};
|
1626
|
+
sre.SpeechGeneratorUtil.addSpeech=function(a,b,c){b=sre.SpeechGeneratorUtil.retrieveSpeech(b);a.setAttribute(c||sre.EnrichMathml.Attribute.SPEECH,b)};sre.SpeechGeneratorUtil.addPrefix=function(a,b){(b=sre.SpeechGeneratorUtil.retrievePrefix(b))&&a.setAttribute(sre.EnrichMathml.Attribute.PREFIX,b)};sre.SpeechGeneratorUtil.retrievePrefix=function(a){a=sre.SpeechGeneratorUtil.computePrefix_(a);return sre.AuralRendering.getInstance().markup(a)};
|
1627
|
+
sre.SpeechGeneratorUtil.computePrefix_=function(a){var b=sre.SemanticTree.fromRoot(a),c=sre.XpathUtil.evalXPath('.//*[@id="'+a.id+'"]',b.xml())[0];return c?sre.SpeechRuleEngine.getInstance().runInSetting({modality:"prefix",domain:"default",style:"default",strict:!0,cache:!1,speech:!0},function(){return sre.SpeechRuleEngine.getInstance().evaluateNode(c)}):[]};
|
1628
|
+
sre.SpeechGeneratorUtil.connectMactions=function(a,b,c){b=sre.DomUtil.querySelectorAll(b,"maction");for(var d=0,e;e=b[d];d++){var f=e.getAttribute("id");if(f=sre.DomUtil.querySelectorAllByAttrValue(a,"id",f)[0]){var g=e.childNodes[1];e=g.getAttribute(sre.EnrichMathml.Attribute.ID);var h=sre.WalkerUtil.getBySemanticId(a,e);h&&"dummy"!==h.getAttribute(sre.EnrichMathml.Attribute.TYPE)||(h=f.childNodes[0],h.getAttribute("sre-highlighter-added")||((f=g.getAttribute(sre.EnrichMathml.Attribute.PARENT))&&
|
1629
|
+
h.setAttribute(sre.EnrichMathml.Attribute.PARENT,f),h.setAttribute(sre.EnrichMathml.Attribute.TYPE,"dummy"),h.setAttribute(sre.EnrichMathml.Attribute.ID,e),sre.DomUtil.querySelectorAllByAttrValue(c,"id",e)[0].setAttribute("alternative",e)))}}};
|
1630
|
+
sre.SpeechGeneratorUtil.connectAllMactions=function(a,b){a=sre.DomUtil.querySelectorAll(a,"maction");for(var c=0,d;d=a[c];c++)d=d.childNodes[1].getAttribute(sre.EnrichMathml.Attribute.ID),sre.DomUtil.querySelectorAllByAttrValue(b,"id",d)[0].setAttribute("alternative",d)};sre.SpeechGeneratorUtil.retrieveSummary=function(a){a=sre.SpeechGeneratorUtil.computeSummary_(a);return sre.AuralRendering.getInstance().markup(a)};
|
1631
|
+
sre.SpeechGeneratorUtil.computeSummary_=function(a){return a?sre.SpeechRuleEngine.getInstance().runInSetting({modality:"summary",strict:!1,cache:!1,speech:!0},function(){return sre.SpeechRuleEngine.getInstance().evaluateNode(a)}):[]};sre.AbstractSpeechGenerator=function(){this.rebuilt_=null;this.options_={};this.modality=sre.EnrichMathml.addPrefix("speech")};sre.AbstractSpeechGenerator.prototype.getRebuilt=function(){return this.rebuilt_};sre.AbstractSpeechGenerator.prototype.setRebuilt=function(a){this.rebuilt_=a};sre.AbstractSpeechGenerator.prototype.setOptions=function(a){this.options_=a||{};this.modality=sre.EnrichMathml.addPrefix(this.options_.modality||"speech")};sre.AbstractSpeechGenerator.prototype.getOptions=function(){return this.options_};
|
1632
|
+
sre.AbstractSpeechGenerator.prototype.getSpeech=goog.abstractMethod;sre.AbstractSpeechGenerator.prototype.start=function(){};sre.AbstractSpeechGenerator.prototype.end=function(){};sre.AbstractSpeechGenerator.prototype.generateSpeech=function(a,b){this.rebuilt_||(this.rebuilt_=new sre.RebuildStree(b));sre.System.getInstance().setupEngine(this.options_);a=sre.SpeechGeneratorUtil.computeSpeech(this.getRebuilt().xml);return sre.AuralRendering.getInstance().markup(a)};sre.AdhocSpeechGenerator=function(){sre.AbstractSpeechGenerator.call(this)};goog.inherits(sre.AdhocSpeechGenerator,sre.AbstractSpeechGenerator);sre.AdhocSpeechGenerator.prototype.getSpeech=function(a,b){b=this.generateSpeech(a,b);a.setAttribute(this.modality,b);return b};sre.ColorGenerator=function(){sre.AbstractSpeechGenerator.call(this);this.modality=sre.EnrichMathml.addPrefix("foreground");this.contrast=new sre.ContrastPicker};goog.inherits(sre.ColorGenerator,sre.AbstractSpeechGenerator);sre.ColorGenerator.prototype.getSpeech=function(a,b){return sre.WalkerUtil.getAttribute(a,this.modality)};
|
1633
|
+
sre.ColorGenerator.prototype.generateSpeech=function(a,b){this.getRebuilt()||this.setRebuilt(new sre.RebuildStree(a));this.colorLeaves_(a);return sre.WalkerUtil.getAttribute(a,this.modality)};
|
1634
|
+
sre.ColorGenerator.prototype.colorLeaves_=function(a){var b=this,c=[];visitStree(this.getRebuilt().streeRoot,c,{});var d={};c=$jscomp.makeIterator(c);for(var e=c.next();!e.done;d={$jscomp$loop$prop$color$6:d.$jscomp$loop$prop$color$6},e=c.next()){e=e.value;d.$jscomp$loop$prop$color$6=this.contrast.generate();var f=!1;(f=Array.isArray(e)?e.map(function(c){return function(d){return b.colorLeave_(a,d,c.$jscomp$loop$prop$color$6)}}(d)).reduce(function(a,b){return a||b},!1):this.colorLeave_(a,e,d.$jscomp$loop$prop$color$6))&&
|
1635
|
+
this.contrast.increment()}};sre.ColorGenerator.prototype.colorLeave_=function(a,b,c){return(a=sre.WalkerUtil.getBySemanticId(a,b))?(a.setAttribute(this.modality,c),!0):!1};
|
1636
|
+
function visitStree(a,b,c){if(a.childNodes.length){if(a.contentNodes.length&&("punctuated"===a.type&&a.contentNodes.forEach(function(a){return c[a.id]=!0}),"implicit"!==a.role&&b.push(a.contentNodes.map(function(a){return a.id}))),a.childNodes.length)if("implicit"===a.role){var d=[],e=[];a=$jscomp.makeIterator(a.childNodes);for(var f=a.next();!f.done;f=a.next()){var g=[];visitStree(f.value,g,c);2>=g.length&&d.push(g.shift());e=e.concat(g)}b.push(d);e.forEach(function(a){return b.push(a)})}else a.childNodes.forEach(function(a){return visitStree(a,
|
1637
|
+
b,c)})}else c[a.id]||b.push(a.id)};sre.DirectSpeechGenerator=function(){sre.AbstractSpeechGenerator.call(this)};goog.inherits(sre.DirectSpeechGenerator,sre.AbstractSpeechGenerator);sre.DirectSpeechGenerator.prototype.getSpeech=function(a,b){return sre.WalkerUtil.getAttribute(a,this.modality)};sre.DummySpeechGenerator=function(){sre.AbstractSpeechGenerator.call(this)};goog.inherits(sre.DummySpeechGenerator,sre.AbstractSpeechGenerator);sre.DummySpeechGenerator.prototype.getSpeech=function(a,b){return""};sre.TreeSpeechGenerator=function(){sre.AbstractSpeechGenerator.call(this)};goog.inherits(sre.TreeSpeechGenerator,sre.AbstractSpeechGenerator);sre.TreeSpeechGenerator.prototype.getSpeech=function(a,b){var c=this.generateSpeech(a,b);a.setAttribute(this.modality,c);var d=this.getRebuilt().nodeDict,e;for(e in d){var f=d[e],g=sre.WalkerUtil.getBySemanticId(b,e),h=sre.WalkerUtil.getBySemanticId(a,e);g&&h&&(sre.SpeechGeneratorUtil.addSpeech(h,f,this.modality),sre.SpeechGeneratorUtil.addPrefix(h,f))}return c};sre.NodeSpeechGenerator=function(){sre.TreeSpeechGenerator.call(this)};goog.inherits(sre.NodeSpeechGenerator,sre.TreeSpeechGenerator);sre.NodeSpeechGenerator.prototype.getSpeech=function(a,b){var c=sre.WalkerUtil.getAttribute(a,this.modality);return c?c:sre.NodeSpeechGenerator.superClass_.getSpeech.call(this,a,b)};sre.SummarySpeechGenerator=function(){sre.AbstractSpeechGenerator.call(this)};goog.inherits(sre.SummarySpeechGenerator,sre.AbstractSpeechGenerator);sre.SummarySpeechGenerator.prototype.getSpeech=function(a,b){sre.SpeechGeneratorUtil.connectAllMactions(b,this.getRebuilt().xml);return this.generateSpeech(a,b)};sre.SpeechGeneratorFactory={};sre.SpeechGeneratorFactory.generator=function(a){return new (sre.SpeechGeneratorFactory.generatorMapping_[a]||sre.SpeechGeneratorFactory.generatorMapping_.Direct)};sre.SpeechGeneratorFactory.generatorMapping_={Adhoc:sre.AdhocSpeechGenerator,Color:sre.ColorGenerator,Direct:sre.DirectSpeechGenerator,Dummy:sre.DummySpeechGenerator,Node:sre.NodeSpeechGenerator,Summary:sre.SummarySpeechGenerator,Tree:sre.TreeSpeechGenerator};sre.EventUtil={};sre.EventUtil.KeyCode={ENTER:13,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,TAB:9,LESS:188,GREATER:190,DASH:189,0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90};
|
1638
|
+
sre.EventUtil.EventType={CLICK:"click",DBLCLICK:"dblclick",MOUSEDOWN:"mousedown",MOUSEUP:"mouseup",MOUSEOVER:"mouseover",MOUSEOUT:"mouseout",MOUSEMOVE:"mousemove",SELECTSTART:"selectstart",KEYPRESS:"keypress",KEYDOWN:"keydown",KEYUP:"keyup",TOUCHSTART:"touchstart",TOUCHMOVE:"touchmove",TOUCHEND:"touchend",TOUCHCANCEL:"touchcancel"};sre.EventUtil.Event=function(a,b,c){this.src=a;this.type=b;this.callback=c};sre.EventUtil.Event.prototype.add=function(){this.src.addEventListener(this.type,this.callback)};
|
1639
|
+
sre.EventUtil.Event.prototype.remove=function(){this.src.removeEventListener(this.type,this.callback)};sre.Focus=function(a,b){this.semanticNodes_=a;this.semanticPrimary_=b;this.domNodes_=[];this.domPrimary_=null;this.allNodes_=[]};sre.Focus.prototype.getSemanticPrimary=function(){return this.semanticPrimary_};sre.Focus.prototype.getSemanticNodes=function(){return this.semanticNodes_};sre.Focus.prototype.getNodes=function(){return this.allNodes_};sre.Focus.prototype.getDomNodes=function(){return this.domNodes_};sre.Focus.prototype.getDomPrimary=function(){return this.domPrimary_};
|
1640
|
+
sre.Focus.prototype.toString=function(){return"Primary:"+this.domPrimary_+" Nodes:"+this.domNodes_};sre.Focus.prototype.clone=function(){var a=new sre.Focus(this.semanticNodes_,this.semanticPrimary_);a.domNodes_=this.domNodes_;a.domPrimary_=this.domPrimary_;a.allNodes_=this.allNodes_;return a};
|
1641
|
+
sre.Focus.factory=function(a,b,c,d){var e=function(a){return sre.WalkerUtil.getBySemanticId(d,a)},f=c.nodeDict;c=e(a);e=b.map(e);var g=b.map(function(a){return f[a]});a=new sre.Focus(g,f[a]);a.domNodes_=e;a.domPrimary_=c;a.allNodes_=sre.Focus.generateAllVisibleNodes_(b,e,f,d);return a};
|
1642
|
+
sre.Focus.generateAllVisibleNodes_=function(a,b,c,d){for(var e=function(a){return sre.WalkerUtil.getBySemanticId(d,a)},f=[],g=0,h=a.length;g<h;g++)if(b[g])f.push(b[g]);else{var k=c[a[g]];if(k){k=k.childNodes.map(function(a){return a.id.toString()});var l=k.map(e);f=f.concat(sre.Focus.generateAllVisibleNodes_(k,l,c,d))}}return f};sre.Levels=function(){this.level_=[]};sre.Levels.prototype.push=function(a){this.level_.push(a)};sre.Levels.prototype.pop=function(){return this.level_.pop()};sre.Levels.prototype.peek=function(){return this.level_[this.level_.length-1]||null};sre.Levels.prototype.indexOf=function(a){var b=this.peek();return b?b.indexOf(a):null};sre.Levels.prototype.find=function(a){var b=this.peek();if(!b)return null;for(var c=0,d=b.length;c<d;c++)if(a(b[c]))return b[c];return null};
|
1643
|
+
sre.Levels.prototype.get=function(a){var b=this.peek();return!b||0>a||a>=b.length?null:b[a]};sre.Levels.prototype.depth=function(){return this.level_.length};sre.Levels.prototype.clone=function(){var a=new sre.Levels;a.level_=this.level_.slice(0);return a};sre.Levels.prototype.toString=function(){for(var a="",b=0,c;c=this.level_[b];b++)a+="\n"+c.map(function(a){return a.toString()});return a};sre.Walker=function(){};sre.Walker.prototype.isActive=function(){};sre.Walker.prototype.activate=function(){};sre.Walker.prototype.deactivate=function(){};sre.Walker.prototype.speech=function(){};sre.Walker.prototype.getRebuilt=function(){};sre.Walker.prototype.getFocus=function(a){};sre.Walker.prototype.setFocus=function(a){};sre.Walker.prototype.getDepth=function(){};sre.Walker.prototype.move=function(a){};sre.Walker.prototype.update=function(a){};
|
1644
|
+
sre.Walker.move={UP:"up",DOWN:"down",LEFT:"left",RIGHT:"right",REPEAT:"repeat",DEPTH:"depth",ENTER:"enter",EXPAND:"expand",HOME:"home",SUMMARY:"summary",DETAIL:"detail",ROW:"row",CELL:"cell"};sre.Walker.STATE_={};sre.Walker.resetState=function(a){delete sre.Walker.STATE_[a]};sre.Walker.setState=function(a,b){sre.Walker.STATE_[a]=b};sre.Walker.getState=function(a){return sre.Walker.STATE_[a]};sre.AbstractWalker=function(a,b,c,d){this.node=a;this.node.id?this.id=this.node.id:this.node.hasAttribute(sre.AbstractWalker.SRE_ID_ATTR)?this.id=this.node.getAttribute(sre.AbstractWalker.SRE_ID_ATTR):(this.node.setAttribute(sre.AbstractWalker.SRE_ID_ATTR,sre.AbstractWalker.ID_COUNTER),this.id=sre.AbstractWalker.ID_COUNTER++);this.generator=b;this.highlighter=c;this.rootNode=sre.WalkerUtil.getSemanticRoot(a);this.rootId=this.rootNode.getAttribute(sre.EnrichMathml.Attribute.ID);this.xml_=null;this.xmlString_=
|
1645
|
+
d;this.focus_=this.rebuilt_=null;this.keyMapping={};this.keyMapping[sre.EventUtil.KeyCode.UP]=goog.bind(this.up,this);this.keyMapping[sre.EventUtil.KeyCode.DOWN]=goog.bind(this.down,this);this.keyMapping[sre.EventUtil.KeyCode.RIGHT]=goog.bind(this.right,this);this.keyMapping[sre.EventUtil.KeyCode.LEFT]=goog.bind(this.left,this);this.keyMapping[sre.EventUtil.KeyCode.TAB]=goog.bind(this.repeat,this);this.keyMapping[sre.EventUtil.KeyCode.DASH]=goog.bind(this.expand,this);this.keyMapping[sre.EventUtil.KeyCode.SPACE]=
|
1646
|
+
goog.bind(this.depth,this);this.keyMapping[sre.EventUtil.KeyCode.HOME]=goog.bind(this.home,this);this.keyMapping[sre.EventUtil.KeyCode.X]=goog.bind(this.summary,this);this.keyMapping[sre.EventUtil.KeyCode.Z]=goog.bind(this.detail,this);this.keyMapping[sre.EventUtil.KeyCode.V]=goog.bind(this.virtualize,this);this.keyMapping[sre.EventUtil.KeyCode.P]=goog.bind(this.previous,this);this.keyMapping[sre.EventUtil.KeyCode.U]=goog.bind(this.undo,this);this.keyMapping[sre.EventUtil.KeyCode.LESS]=goog.bind(this.previousRules,
|
1647
|
+
this);this.keyMapping[sre.EventUtil.KeyCode.GREATER]=goog.bind(this.nextRules,this);this.active_=!1;this.moved=sre.Walker.move.ENTER;this.cursors=[]};sre.AbstractWalker.prototype.getXml=function(){this.xml_||(this.xml_=sre.DomUtil.parseInput(this.xmlString_));return this.xml_};sre.AbstractWalker.prototype.getRebuilt=function(){this.rebuilt_||(this.rebuilt_=this.rebuildStree());return this.rebuilt_};sre.AbstractWalker.ID_COUNTER=0;sre.AbstractWalker.SRE_ID_ATTR="sre-explorer-id";
|
1648
|
+
sre.AbstractWalker.prototype.isActive=function(){return this.active_};sre.AbstractWalker.prototype.toggleActive_=function(){this.active_=!this.active_};sre.AbstractWalker.prototype.activate=function(){this.isActive()||(this.generator.start(),this.toggleActive_())};sre.AbstractWalker.prototype.deactivate=function(){this.isActive()&&(sre.Walker.setState(this.id,this.primaryId()),this.generator.end(),this.toggleActive_())};
|
1649
|
+
sre.AbstractWalker.prototype.getFocus=function(a){this.focus_||(this.focus_=sre.Focus.factory(this.rootId,[this.rootId],this.getRebuilt(),this.node));a&&this.updateFocus();return this.focus_};sre.AbstractWalker.prototype.setFocus=function(a){this.focus_=a};sre.AbstractWalker.prototype.getDepth=function(){return this.levels.depth()-1};sre.AbstractWalker.prototype.isSpeech=function(){return this.generator.modality===sre.EnrichMathml.Attribute.SPEECH};
|
1650
|
+
sre.AbstractWalker.prototype.speech=function(){var a=this.getFocus().getDomNodes();if(!a.length)return"";var b=this.specialMove();if(null!==b)return b;switch(this.moved){case sre.Walker.move.DEPTH:return this.depth_();case sre.Walker.move.SUMMARY:return this.summary_();case sre.Walker.move.DETAIL:return this.detail_();default:b=[];for(var c=this.getFocus().getSemanticNodes(),d=0,e=a.length;d<e;d++){var f=a[d],g=c[d];b.push(f?this.generator.getSpeech(f,this.getXml()):sre.SpeechGeneratorUtil.retrieveSpeech(g))}return this.mergePrefix_(b)}};
|
1651
|
+
sre.AbstractWalker.prototype.mergePrefix_=function(a,b){b=b||[];var c=this.isSpeech()?this.prefix_():"",d=sre.AuralRendering.getInstance();c&&a.unshift(c);return d.finalize(d.merge(b.concat(a)))};sre.AbstractWalker.prototype.prefix_=function(){var a=this.getFocus().getDomNodes(),b=this.getFocus().getSemanticNodes();return a[0]?sre.WalkerUtil.getAttribute(a[0],sre.EnrichMathml.Attribute.PREFIX):sre.SpeechGeneratorUtil.retrievePrefix(b[0])};
|
1652
|
+
sre.AbstractWalker.prototype.move=function(a){a=this.keyMapping[a];if(!a)return null;a=a();if(!a||a===this.getFocus())return!1;this.setFocus(a);this.moved===sre.Walker.move.HOME&&(this.levels=this.initLevels());return!0};sre.AbstractWalker.prototype.up=function(){this.moved=sre.Walker.move.UP;return this.getFocus()};sre.AbstractWalker.prototype.down=function(){this.moved=sre.Walker.move.DOWN;return this.getFocus()};sre.AbstractWalker.prototype.left=function(){this.moved=sre.Walker.move.LEFT;return this.getFocus()};
|
1653
|
+
sre.AbstractWalker.prototype.right=function(){this.moved=sre.Walker.move.RIGHT;return this.getFocus()};sre.AbstractWalker.prototype.repeat=function(){this.moved=sre.Walker.move.REPEAT;return this.getFocus().clone()};sre.AbstractWalker.prototype.depth=function(){this.moved=this.isSpeech()?sre.Walker.move.DEPTH:sre.Walker.move.REPEAT;return this.getFocus().clone()};
|
1654
|
+
sre.AbstractWalker.prototype.depth_=function(){var a=sre.Grammar.getInstance().getParameter("depth");sre.Grammar.getInstance().setParameter("depth",!0);var b=this.getFocus().getDomPrimary();b=this.expandable(b)&&[sre.Messages.NAVIGATE.EXPANDABLE]||this.collapsible(b)&&[sre.Messages.NAVIGATE.COLLAPSIBLE]||[];var c=[sre.AuralRendering.getInstance().markup([new sre.AuditoryDescription({text:sre.Messages.NAVIGATE.LEVEL+" "+this.getDepth(),personality:{}})])],d=this.getFocus().getSemanticNodes();d=sre.SpeechGeneratorUtil.retrievePrefix(d[0]);
|
1655
|
+
var e=sre.AuralRendering.getInstance();d&&c.push(d);sre.Grammar.getInstance().setParameter("depth",a);return e.finalize(e.merge(c.concat(b)))};sre.AbstractWalker.prototype.home=function(){this.moved=sre.Walker.move.HOME;return sre.Focus.factory(this.rootId,[this.rootId],this.getRebuilt(),this.node)};sre.AbstractWalker.prototype.getBySemanticId=function(a){return sre.WalkerUtil.getBySemanticId(this.node,a)};sre.AbstractWalker.prototype.primaryId=function(){return this.getFocus().getSemanticPrimary().id.toString()};
|
1656
|
+
sre.AbstractWalker.prototype.expand=function(){var a=this.getFocus().getDomPrimary();a=this.actionable_(a);if(!a)return this.getFocus();this.moved=sre.Walker.move.EXPAND;a.dispatchEvent(new Event("click"));return this.getFocus().clone()};sre.AbstractWalker.prototype.actionable_=function(a){return a&&a.parentNode&&this.highlighter.isMactionNode(a.parentNode)?a.parentNode:null};sre.AbstractWalker.prototype.expandable=function(a){return!!this.actionable_(a)&&0===a.childNodes.length};
|
1657
|
+
sre.AbstractWalker.prototype.collapsible=function(a){return!!this.actionable_(a)&&0<a.childNodes.length};sre.AbstractWalker.prototype.restoreState=function(){if(this.highlighter){var a=sre.Walker.getState(this.id);if(a){var b=this.getRebuilt().nodeDict[a];for(a=[];b;)a.push(b.id),b=b.parent;for(a.pop();0<a.length;){this.down();b=a.pop();b=this.findFocusOnLevel(b);if(!b)break;this.setFocus(b)}this.moved=sre.Walker.move.ENTER}}};
|
1658
|
+
sre.AbstractWalker.prototype.updateFocus=function(){this.setFocus(sre.Focus.factory(this.getFocus().getSemanticPrimary().id.toString(),this.getFocus().getSemanticNodes().map(function(a){return a.id}),this.getRebuilt(),this.node))};sre.AbstractWalker.prototype.findFocusOnLevel=goog.abstractMethod;sre.AbstractWalker.prototype.initLevels=goog.abstractMethod;
|
1659
|
+
sre.AbstractWalker.prototype.rebuildStree=function(){var a=new sre.RebuildStree(this.getXml());this.rootId=a.stree.root.id.toString();this.generator.setRebuilt(a);this.focus_=sre.Focus.factory(this.rootId,[this.rootId],a,this.node);this.levels=this.initLevels();sre.SpeechGeneratorUtil.connectMactions(this.node,this.getXml(),a.xml);return a};
|
1660
|
+
sre.AbstractWalker.prototype.previousLevel=function(){var a=this.getFocus().getDomPrimary();return a?sre.WalkerUtil.getAttribute(a,sre.EnrichMathml.Attribute.PARENT):this.getFocus().getSemanticPrimary().parent.id.toString()};
|
1661
|
+
sre.AbstractWalker.prototype.nextLevel=function(){var a=this.getFocus().getDomPrimary();if(a){var b=sre.WalkerUtil.splitAttribute(sre.WalkerUtil.getAttribute(a,sre.EnrichMathml.Attribute.CHILDREN)),c=sre.WalkerUtil.splitAttribute(sre.WalkerUtil.getAttribute(a,sre.EnrichMathml.Attribute.CONTENT)),d=sre.WalkerUtil.getAttribute(a,sre.EnrichMathml.Attribute.TYPE);a=sre.WalkerUtil.getAttribute(a,sre.EnrichMathml.Attribute.ROLE);return this.combineContentChildren(d,a,c,b)}c=function(a){return a.id.toString()};
|
1662
|
+
d=this.getRebuilt().nodeDict[this.primaryId()];b=d.childNodes.map(c);c=d.contentNodes.map(c);return 0===b.length?[]:this.combineContentChildren(d.type,d.role,c,b)};sre.AbstractWalker.prototype.combineContentChildren=goog.abstractMethod;sre.AbstractWalker.prototype.singletonFocus=function(a){return this.focusFromId(a,[a])};sre.AbstractWalker.prototype.focusFromId=function(a,b){return sre.Focus.factory(a,b,this.getRebuilt(),this.node)};
|
1663
|
+
sre.AbstractWalker.prototype.summary=function(){this.moved=this.isSpeech()?sre.Walker.move.SUMMARY:sre.Walker.move.REPEAT;return this.getFocus().clone()};sre.AbstractWalker.prototype.summary_=function(){var a=this.getFocus().getSemanticPrimary().id.toString();a=this.getRebuilt().xml.getAttribute("id")===a?this.getRebuilt().xml:sre.DomUtil.querySelectorAllByAttrValue(this.getRebuilt().xml,"id",a)[0];a=sre.SpeechGeneratorUtil.retrieveSummary(a);return this.mergePrefix_([a])};
|
1664
|
+
sre.AbstractWalker.prototype.detail=function(){this.moved=this.isSpeech()?sre.Walker.move.DETAIL:sre.Walker.move.REPEAT;return this.getFocus().clone()};
|
1665
|
+
sre.AbstractWalker.prototype.detail_=function(){var a=this.getFocus().getSemanticPrimary().id.toString();a=this.getRebuilt().xml.getAttribute("id")===a?this.getRebuilt().xml:sre.DomUtil.querySelectorAllByAttrValue(this.getRebuilt().xml,"id",a)[0];var b=a.getAttribute("alternative");a.removeAttribute("alternative");var c=sre.SpeechGeneratorUtil.computeSpeechWithoutCache(a);c=sre.AuralRendering.getInstance().markup(c);c=this.mergePrefix_([c]);a.setAttribute("alternative",b);return c};
|
1666
|
+
sre.AbstractWalker.prototype.specialMove=function(){return null};sre.AbstractWalker.prototype.virtualize=function(a){this.cursors.push({focus:this.getFocus(),levels:this.levels,undo:a||!this.cursors.length});this.levels=this.levels.clone();return this.getFocus().clone()};sre.AbstractWalker.prototype.previous=function(){var a=this.cursors.pop();if(!a)return this.getFocus();this.levels=a.levels;return a.focus};
|
1667
|
+
sre.AbstractWalker.prototype.undo=function(){do var a=this.cursors.pop();while(a&&!a.undo);if(!a)return this.getFocus();this.levels=a.levels;return a.focus};sre.AbstractWalker.prototype.update=function(a){this.generator.setOptions(a);sre.System.getInstance().setupEngine(a);sre.SpeechGeneratorFactory.generator("Tree").getSpeech(this.node,this.getXml())};
|
1668
|
+
sre.AbstractWalker.prototype.nextRules=function(){var a=this.generator.getOptions();if("speech"!==a.modality)return this.getFocus();sre.Engine.DOMAIN_TO_STYLES[a.domain]=a.style;a.domain="mathspeak"===a.domain?"clearspeak":"mathspeak";a.style=sre.Engine.DOMAIN_TO_STYLES[a.domain];this.update(a);this.moved=sre.Walker.move.REPEAT;return this.getFocus().clone()};
|
1669
|
+
sre.AbstractWalker.prototype.nextStyle=function(a,b){if("mathspeak"===a){a=["default","brief","sbrief"];var c=a.indexOf(b);return-1===c?b:c>=a.length-1?a[0]:a[c+1]}if("clearspeak"===a){var d=sre.ClearspeakPreferences.getLocalePreferences().en;if(!d)return"default";a=sre.ClearspeakPreferences.relevantPreferences(this.getFocus().getSemanticPrimary());c=sre.ClearspeakPreferences.findPreference(b,a);d=d[a].map(function(a){return a.split("_")[1]});c=d.indexOf(c);return-1===c?b:sre.ClearspeakPreferences.addPreference(b,
|
1670
|
+
a,c>=d.length-1?d[0]:d[c+1])}return b};sre.AbstractWalker.prototype.previousRules=function(){var a=this.generator.getOptions();if("speech"!==a.modality)return this.getFocus();a.style=this.nextStyle(a.domain,a.style);this.update(a);this.moved=sre.Walker.move.REPEAT;return this.getFocus().clone()};sre.DummyWalker=function(a,b,c,d){sre.AbstractWalker.call(this,a,b,c,d)};goog.inherits(sre.DummyWalker,sre.AbstractWalker);sre.DummyWalker.prototype.up=function(){};sre.DummyWalker.prototype.down=function(){};sre.DummyWalker.prototype.left=function(){};sre.DummyWalker.prototype.right=function(){};sre.DummyWalker.prototype.repeat=function(){};sre.DummyWalker.prototype.depth=function(){};sre.DummyWalker.prototype.home=function(){};sre.DummyWalker.prototype.getDepth=function(){return 0};
|
1671
|
+
sre.DummyWalker.prototype.initLevels=function(){};sre.SemanticWalker=function(a,b,c,d){sre.AbstractWalker.call(this,a,b,c,d);this.levels=null;this.restoreState()};goog.inherits(sre.SemanticWalker,sre.AbstractWalker);sre.SemanticWalker.prototype.initLevels=function(){var a=new sre.Levels;a.push([this.getFocus()]);return a};
|
1672
|
+
sre.SemanticWalker.prototype.up=function(){sre.SemanticWalker.superClass_.up.call(this);var a=this.previousLevel();if(!a)return null;this.levels.pop();return this.levels.find(function(b){return b.getSemanticNodes().some(function(b){return b.id.toString()===a})})};sre.SemanticWalker.prototype.down=function(){sre.SemanticWalker.superClass_.down.call(this);var a=this.nextLevel();if(0===a.length)return null;this.levels.push(a);return a[0]};
|
1673
|
+
sre.SemanticWalker.prototype.combineContentChildren=function(a,b,c,d){switch(a){case sre.SemanticAttr.Type.RELSEQ:case sre.SemanticAttr.Type.INFIXOP:case sre.SemanticAttr.Type.MULTIREL:return this.makePairList(d,c);case sre.SemanticAttr.Type.PREFIXOP:return[this.focusFromId(d[0],c.concat(d))];case sre.SemanticAttr.Type.POSTFIXOP:return[this.focusFromId(d[0],d.concat(c))];case sre.SemanticAttr.Type.MATRIX:case sre.SemanticAttr.Type.VECTOR:case sre.SemanticAttr.Type.FENCED:return[this.focusFromId(d[0],
|
1674
|
+
[c[0],d[0],c[1]])];case sre.SemanticAttr.Type.CASES:return[this.focusFromId(d[0],[c[0],d[0]])];case sre.SemanticAttr.Type.PUNCTUATED:return b===sre.SemanticAttr.Role.TEXT?d.map(goog.bind(this.singletonFocus,this)):d.length===c.length?c.map(goog.bind(this.singletonFocus,this)):this.combinePunctuations(d,c,[],[]);case sre.SemanticAttr.Type.APPL:return[this.focusFromId(d[0],[d[0],c[0]]),this.singletonFocus(d[1])];case sre.SemanticAttr.Type.ROOT:return[this.singletonFocus(d[1]),this.singletonFocus(d[0])];
|
1675
|
+
default:return d.map(goog.bind(this.singletonFocus,this))}};sre.SemanticWalker.prototype.combinePunctuations=function(a,b,c,d){if(0===a.length)return d;var e=a.shift(),f=b.shift();if(e===f)return c.push(f),this.combinePunctuations(a,b,c,d);b.unshift(f);c.push(e);if(a.length===b.length)return d.push(this.focusFromId(e,c.concat(b))),d;d.push(this.focusFromId(e,c));return this.combinePunctuations(a,b,[],d)};
|
1676
|
+
sre.SemanticWalker.prototype.makePairList=function(a,b){if(0===a.length)return[];if(1===a.length)return[this.singletonFocus(a[0])];for(var c=[this.singletonFocus(a.shift())],d=0,e=a.length;d<e;d++)c.push(this.focusFromId(a[d],[b[d],a[d]]));return c};sre.SemanticWalker.prototype.left=function(){sre.SemanticWalker.superClass_.left.call(this);var a=this.levels.indexOf(this.getFocus());return null===a?null:(a=this.levels.get(a-1))?a:null};
|
1677
|
+
sre.SemanticWalker.prototype.right=function(){sre.SemanticWalker.superClass_.right.call(this);var a=this.levels.indexOf(this.getFocus());return null===a?null:(a=this.levels.get(a+1))?a:null};sre.SemanticWalker.prototype.findFocusOnLevel=function(a){return this.levels.find(function(b){return b.getSemanticPrimary().id===a})};sre.SyntaxWalker=function(a,b,c,d){sre.AbstractWalker.call(this,a,b,c,d);this.levels=null;this.restoreState()};goog.inherits(sre.SyntaxWalker,sre.AbstractWalker);sre.SyntaxWalker.prototype.initLevels=function(){var a=new sre.Levels;a.push([this.primaryId()]);return a};sre.SyntaxWalker.prototype.up=function(){sre.SyntaxWalker.superClass_.up.call(this);var a=this.previousLevel();if(!a)return null;this.levels.pop();return this.singletonFocus(a)};
|
1678
|
+
sre.SyntaxWalker.prototype.down=function(){sre.SyntaxWalker.superClass_.down.call(this);var a=this.nextLevel();if(0===a.length)return null;var b=this.singletonFocus(a[0]);b&&this.levels.push(a);return b};
|
1679
|
+
sre.SyntaxWalker.prototype.combineContentChildren=function(a,b,c,d){switch(a){case sre.SemanticAttr.Type.RELSEQ:case sre.SemanticAttr.Type.INFIXOP:case sre.SemanticAttr.Type.MULTIREL:return sre.BaseUtil.interleaveLists(d,c);case sre.SemanticAttr.Type.PREFIXOP:return c.concat(d);case sre.SemanticAttr.Type.POSTFIXOP:return d.concat(c);case sre.SemanticAttr.Type.MATRIX:case sre.SemanticAttr.Type.VECTOR:case sre.SemanticAttr.Type.FENCED:return d.unshift(c[0]),d.push(c[1]),d;case sre.SemanticAttr.Type.CASES:return d.unshift(c[0]),
|
1680
|
+
d;case sre.SemanticAttr.Type.PUNCTUATED:return b===sre.SemanticAttr.Role.TEXT?sre.BaseUtil.interleaveLists(d,c):d;case sre.SemanticAttr.Type.APPL:return[d[0],c[0],d[1]];case sre.SemanticAttr.Type.ROOT:return[d[1],d[0]];default:return d}};sre.SyntaxWalker.prototype.left=function(){sre.SyntaxWalker.superClass_.left.call(this);var a=this.levels.indexOf(this.primaryId());return null===a?null:(a=this.levels.get(a-1))?this.singletonFocus(a):null};
|
1681
|
+
sre.SyntaxWalker.prototype.right=function(){sre.SyntaxWalker.superClass_.right.call(this);var a=this.levels.indexOf(this.primaryId());return null===a?null:(a=this.levels.get(a+1))?this.singletonFocus(a):null};sre.SyntaxWalker.prototype.findFocusOnLevel=function(a){return this.singletonFocus(a.toString())};sre.TableWalker=function(a,b,c,d){sre.SyntaxWalker.call(this,a,b,c,d);this.modifier=!1;this.keyMapping[sre.EventUtil.KeyCode["0"]]=goog.bind(this.jumpCell,this);this.keyMapping[sre.EventUtil.KeyCode["1"]]=goog.bind(this.jumpCell,this);this.keyMapping[sre.EventUtil.KeyCode["2"]]=goog.bind(this.jumpCell,this);this.keyMapping[sre.EventUtil.KeyCode["3"]]=goog.bind(this.jumpCell,this);this.keyMapping[sre.EventUtil.KeyCode["4"]]=goog.bind(this.jumpCell,this);this.keyMapping[sre.EventUtil.KeyCode["5"]]=
|
1682
|
+
goog.bind(this.jumpCell,this);this.keyMapping[sre.EventUtil.KeyCode["6"]]=goog.bind(this.jumpCell,this);this.keyMapping[sre.EventUtil.KeyCode["7"]]=goog.bind(this.jumpCell,this);this.keyMapping[sre.EventUtil.KeyCode["8"]]=goog.bind(this.jumpCell,this);this.keyMapping[sre.EventUtil.KeyCode["9"]]=goog.bind(this.jumpCell,this);this.key_=null;this.row_=0;this.firstJump=this.currentTable_=null};goog.inherits(sre.TableWalker,sre.SyntaxWalker);
|
1683
|
+
sre.TableWalker.prototype.move=function(a){this.key_=a;a=sre.TableWalker.superClass_.move.call(this,a);this.modifier=!1;return a};sre.TableWalker.prototype.up=function(){this.moved=sre.Walker.move.UP;return this.eligibleCell_()?this.verticalMove_(!1):sre.TableWalker.superClass_.up.call(this)};sre.TableWalker.prototype.down=function(){this.moved=sre.Walker.move.DOWN;return this.eligibleCell_()?this.verticalMove_(!0):sre.TableWalker.superClass_.down.call(this)};
|
1684
|
+
sre.TableWalker.ELIGIBLE_CELL_ROLES=[sre.SemanticAttr.Role.DETERMINANT,sre.SemanticAttr.Role.ROWVECTOR,sre.SemanticAttr.Role.BINOMIAL,sre.SemanticAttr.Role.SQUAREMATRIX,sre.SemanticAttr.Role.MULTILINE,sre.SemanticAttr.Role.MATRIX,sre.SemanticAttr.Role.VECTOR,sre.SemanticAttr.Role.CASES,sre.SemanticAttr.Role.TABLE];sre.TableWalker.ELIGIBLE_TABLE_TYPES=[sre.SemanticAttr.Type.MULTILINE,sre.SemanticAttr.Type.MATRIX,sre.SemanticAttr.Type.VECTOR,sre.SemanticAttr.Type.CASES,sre.SemanticAttr.Type.TABLE];
|
1685
|
+
sre.TableWalker.prototype.eligibleCell_=function(){var a=this.getFocus().getSemanticPrimary();return this.modifier&&a.type===sre.SemanticAttr.Type.CELL&&-1!==sre.TableWalker.ELIGIBLE_CELL_ROLES.indexOf(a.role)};
|
1686
|
+
sre.TableWalker.prototype.verticalMove_=function(a){var b=this.previousLevel();if(!b)return null;var c=this.getFocus(),d=this.levels.indexOf(this.primaryId()),e=this.levels.pop();b=this.levels.indexOf(b);a=this.levels.get(a?b+1:b-1);if(!a)return this.levels.push(e),null;this.setFocus(this.singletonFocus(a));a=this.nextLevel();if(!a[d])return this.setFocus(c),this.levels.push(e),null;this.levels.push(a);return this.singletonFocus(a[d])};
|
1687
|
+
sre.TableWalker.prototype.jumpCell=function(){if(!this.isInTable_()||null===this.key_)return this.getFocus();if(this.moved===sre.Walker.move.ROW){this.moved=sre.Walker.move.CELL;var a=this.key_-sre.EventUtil.KeyCode["0"];return this.isLegalJump_(this.row_,a)?this.jumpCell_(this.row_,a):this.getFocus()}a=this.key_-sre.EventUtil.KeyCode["0"];if(a>this.currentTable_.childNodes.length)return this.getFocus();this.row_=a;this.moved=sre.Walker.move.ROW;return this.getFocus().clone()};
|
1688
|
+
sre.TableWalker.prototype.jumpCell_=function(a,b){this.firstJump?this.virtualize(!1):(this.firstJump=this.getFocus(),this.virtualize(!0));var c=this.currentTable_.id.toString();do var d=this.levels.pop();while(-1===d.indexOf(c));this.levels.push(d);this.setFocus(this.singletonFocus(c));this.levels.push(this.nextLevel());a=this.currentTable_.childNodes[a-1];this.setFocus(this.singletonFocus(a.id.toString()));this.levels.push(this.nextLevel());return this.singletonFocus(a.childNodes[b-1].id.toString())};
|
1689
|
+
sre.TableWalker.prototype.isLegalJump_=function(a,b){var c=sre.DomUtil.querySelectorAllByAttrValue(this.getRebuilt().xml,"id",this.currentTable_.id.toString())[0];if(!c||c.hasAttribute("alternative"))return!1;a=this.currentTable_.childNodes[a-1];if(!a)return!1;c=sre.DomUtil.querySelectorAllByAttrValue(c,"id",a.id.toString())[0];return!c||c.hasAttribute("alternative")?!1:!(!a||!a.childNodes[b-1])};
|
1690
|
+
sre.TableWalker.prototype.isInTable_=function(){for(var a=this.getFocus().getSemanticPrimary();a;){if(-1!==sre.TableWalker.ELIGIBLE_TABLE_TYPES.indexOf(a.type))return this.currentTable_=a,!0;a=a.parent}return!1};sre.TableWalker.prototype.undo=function(){var a=sre.TableWalker.superClass_.undo.call(this);a===this.firstJump&&(this.firstJump=null);return a};sre.WalkerFactory={};sre.WalkerFactory.walker=function(a,b,c,d,e){return new (sre.WalkerFactory.walkerMapping_[a.toLowerCase()]||sre.WalkerFactory.walkerMapping_.dummy)(b,c,d,e)};sre.WalkerFactory.walkerMapping_={dummy:sre.DummyWalker,semantic:sre.SemanticWalker,syntax:sre.SyntaxWalker,table:sre.TableWalker};sre.ProcessorFactory={};sre.ProcessorFactory.PROCESSORS_={};sre.ProcessorFactory.get_=function(a){var b=sre.ProcessorFactory.PROCESSORS_[a.toLowerCase()];if(!b)throw new sre.Engine.Error("Unknown processor "+a);return b};sre.ProcessorFactory.process=function(a,b){return sre.ProcessorFactory.get_(a).processor(b)};sre.ProcessorFactory.print=function(a,b){a=sre.ProcessorFactory.get_(a);return sre.Engine.getInstance().pprint?a.pprint(b):a.print(b)};
|
1691
|
+
sre.ProcessorFactory.output=function(a,b){a=sre.ProcessorFactory.get_(a);b=a.processor(b);return sre.Engine.getInstance().pprint?a.pprint(b):a.print(b)};sre.ProcessorFactory.keypress=function(a,b){a=sre.ProcessorFactory.get_(a);b=a.key?a.key(b):b;b=a.processor(b);return sre.Engine.getInstance().pprint?a.pprint(b):a.print(b)};
|
1692
|
+
sre.Processor=function(a,b){this.name=a;this.processor=b.processor;this.print=b.print||sre.Processor.stringify_;this.pprint=b.pprint||this.print;sre.ProcessorFactory.PROCESSORS_[this.name]=this};sre.KeyProcessor=function(a,b){sre.Processor.call(this,a,b);this.key=b.key||sre.KeyProcessor.getKey_};goog.inherits(sre.KeyProcessor,sre.Processor);sre.KeyProcessor.getKey_=function(a){return"string"===typeof a?sre.EventUtil.KeyCode[a.toUpperCase()]:a};
|
1693
|
+
sre.Processor.LocalState_={walker:null,speechGenerator:null,highlighter:null};sre.Processor.stringify_=function(a){return a?a.toString():a};new sre.Processor("semantic",{processor:function(a){a=sre.DomUtil.parseInput(a);return sre.Semantic.xmlTree(a)},pprint:function(a){return sre.DomUtil.formatXml(a.toString())}});
|
1694
|
+
new sre.Processor("speech",{processor:function(a){a=sre.DomUtil.parseInput(a);a=sre.Engine.getInstance().semantics?sre.Semantic.xmlTree(a):a;a=sre.SpeechGeneratorUtil.computeSpeech(a);var b=sre.AuralRendering.getInstance();return b.finalize(b.markup(a))},pprint:function(a){a=a.toString();return sre.AuralRendering.ofType(sre.XmlRenderer)?sre.DomUtil.formatXml(a):a}});
|
1695
|
+
new sre.Processor("json",{processor:function(a){a=sre.DomUtil.parseInput(a,sre.Engine.Error);return sre.Semantic.getTree(a).toJson()},print:function(a){return JSON.stringify(a)},pprint:function(a){return JSON.stringify(a,null,2)}});
|
1696
|
+
new sre.Processor("description",{processor:function(a){a=sre.DomUtil.parseInput(a);a=sre.Engine.getInstance().semantics?sre.Semantic.xmlTree(a):a;return sre.SpeechGeneratorUtil.computeSpeech(a)},print:function(a){return JSON.stringify(a)},pprint:function(a){return JSON.stringify(a,null,2)}});
|
1697
|
+
new sre.Processor("enriched",{processor:function(a){a=sre.Enrich.semanticMathmlSync(a);var b=sre.WalkerUtil.getSemanticRoot(a);switch(sre.Engine.getInstance().speech){case sre.Engine.Speech.SHALLOW:var c=sre.SpeechGeneratorFactory.generator("Adhoc");c.getSpeech(b,a);break;case sre.Engine.Speech.DEEP:c=sre.SpeechGeneratorFactory.generator("Tree"),c.getSpeech(b,a)}return a},pprint:function(a){return sre.DomUtil.formatXml(a.toString())}});
|
1698
|
+
new sre.Processor("walker",{processor:function(a){var b=sre.SpeechGeneratorFactory.generator("Node");sre.Processor.LocalState_.speechGenerator=b;sre.Processor.LocalState_.highlighter=sre.HighlighterFactory.highlighter({color:"black"},{color:"white"},{renderer:"NativeMML"});a=sre.ProcessorFactory.process("enriched",a);var c=sre.ProcessorFactory.print("enriched",a);sre.Processor.LocalState_.walker=sre.WalkerFactory.walker(sre.Engine.getInstance().walker,a,b,sre.Processor.LocalState_.highlighter,c);
|
1699
|
+
return sre.Processor.LocalState_.walker},print:function(a){return sre.Processor.LocalState_.walker.speech()}});new sre.KeyProcessor("move",{processor:function(a){return sre.Processor.LocalState_.walker?!1===sre.Processor.LocalState_.walker.move(a)?sre.AuralRendering.getInstance().error(a):sre.Processor.LocalState_.walker.speech():null}});sre.System=function(){this.version=sre.Variables.VERSION};goog.addSingletonGetter(sre.System);
|
1700
|
+
sre.System.prototype.setupEngine=function(a){var b=sre.Engine.getInstance(),c=function(c){b[c]=a[c]||b[c]};c("mode");sre.System.prototype.configBlocks_(a);sre.Engine.BINARY_FEATURES.forEach(function(c){"undefined"!==typeof a[c]&&(b[c]=!!a[c])});sre.Engine.STRING_FEATURES.forEach(c);a.json&&(sre.SystemExternal.jsonPath=sre.BaseUtil.makePath(a.json));a.xpath&&(sre.SystemExternal.WGXpath=a.xpath);b.setupBrowsers();b.ruleSets=a.rules?a.rules:sre.SpeechRuleStores.availableSets();sre.SpeechRuleEngine.getInstance().parameterize(b.ruleSets);
|
1701
|
+
b.setDynamicCstr();sre.L10n.setLocale()};sre.System.prototype.configBlocks_=function(a){if(!sre.Engine.getInstance().config&&sre.Engine.getInstance().mode===sre.Engine.Mode.HTTP){sre.Engine.getInstance().config=!0;for(var b=document.documentElement.querySelectorAll('script[type="text/x-sre-config"]'),c=0,d=b.length;c<d;c++)try{var e=b[c].innerHTML,f=JSON.parse(e),g;for(g in f)a[g]=f[g]}catch(h){sre.Debugger.getInstance().output("Illegal configuration ",e)}}};
|
1702
|
+
sre.System.setAsync=function(){sre.Engine.isReady()||setTimeout(sre.System.setAsync,500);sre.System.getInstance().setupEngine({mode:sre.Engine.Mode.ASYNC})};sre.System.prototype.engineSetup=function(){var a=["mode"].concat(sre.Engine.STRING_FEATURES,sre.Engine.BINARY_FEATURES),b=sre.Engine.getInstance(),c={};a.forEach(function(a){c[a]=b[a]});c.json=sre.SystemExternal.jsonPath;c.xpath=sre.SystemExternal.WGXpath;c.rules=b.ruleSets.slice();return c};sre.System.prototype.engineReady=function(){return sre.Engine.isReady()};
|
1703
|
+
sre.System.prototype.toSpeech=function(a){return sre.System.getInstance().processString("speech",a)};sre.System.prototype.processExpression=sre.System.prototype.toSpeech;sre.System.prototype.toSemantic=function(a){return sre.System.getInstance().processString("semantic",a)};sre.System.prototype.toJson=function(a){return sre.System.getInstance().processString("json",a)};sre.System.prototype.toDescription=function(a){return sre.System.getInstance().processString("description",a)};
|
1704
|
+
sre.System.prototype.toEnriched=function(a){return sre.System.getInstance().processString("enriched",a)};sre.System.prototype.processString=function(a,b){return sre.ProcessorFactory.process(a,b)};sre.System.prototype.fileToSpeech=function(a,b){sre.System.getInstance().processFile("speech",a,b)};sre.System.prototype.processFile=sre.System.prototype.fileToSpeech;sre.System.prototype.fileToSemantic=function(a,b){sre.System.getInstance().processFile("semantic",a,b)};
|
1705
|
+
sre.System.prototype.fileToJson=function(a,b){sre.System.getInstance().processFile("json",a,b)};sre.System.prototype.fileToDescription=function(a,b){sre.System.getInstance().processFile("description",a,b)};sre.System.prototype.fileToEnriched=function(a,b){sre.System.getInstance().processFile("enriched",a,b)};
|
1706
|
+
sre.System.prototype.processFile=function(a,b,c){sre.Engine.isReady()?sre.Engine.getInstance().mode===sre.Engine.Mode.SYNC?this.processFileSync_(a,b,c):this.processFileAsync_(a,b,c):setTimeout(goog.bind(function(){this.processFile(a,b,c)},this),100)};sre.System.prototype.inputFileSync_=function(a){try{var b=sre.SystemExternal.fs.readFileSync(a,{encoding:"utf8"})}catch(c){throw new sre.Engine.Error("Can not open file: "+a);}return b};
|
1707
|
+
sre.System.prototype.processFileSync_=function(a,b,c){b=sre.System.getInstance().inputFileSync_(b);a=sre.ProcessorFactory.output(a,b);if(c)try{sre.SystemExternal.fs.writeFileSync(c,a)}catch(d){throw new sre.Engine.Error("Can not write to file: "+c);}else console.info(a)};sre.System.prototype.inputFileAsync_=function(a,b){sre.SystemExternal.fs.readFile(a,{encoding:"utf8"},goog.bind(function(c,d){if(c)throw new sre.Engine.Error("Can not open file: "+a);b(d)},this))};
|
1708
|
+
sre.System.prototype.processFileAsync_=function(a,b,c){sre.System.getInstance().inputFileAsync_(b,goog.bind(function(b){b=sre.ProcessorFactory.output(a,b);c?sre.SystemExternal.fs.writeFile(c,b,function(a){if(a)throw new sre.Engine.Error("Can not write to file: "+c);}):console.info(b)},this))};sre.System.prototype.walk=function(a){return sre.ProcessorFactory.output("walker",a)};sre.System.prototype.move=function(a){return sre.ProcessorFactory.keypress("move",a)};sre.Browser={};sre.System.getInstance().setupEngine({mode:sre.Engine.Mode.HTTP,domain:"mathspeak",style:"default",semantics:!0});var SRE=sre.System.getInstance();
|
1709
|
+
|