Speech-Rule-Engine / speech-rule-engine

Generating speech descriptions for XML structures
https://zorkow.github.io/speech-rule-engine/
Apache License 2.0
75 stars 39 forks source link

Nemeth -- Rule 19, Incorrect braille for division (divided by) sign #663

Closed brichwin closed 1 month ago

brichwin commented 2 years ago

Describe the bug

The Nemeth braille output for the division (divided by) sign appears to be incorrect. SRE 4.0.6 outputs dots 4, dots 3-4 instead of dots 4-6, dots 3-4.

Relevant context

Steps to reproduce

Feeding the following MathML

<math xmlns="http://www.w3.org/1998/Math/MathML">
  <mrow>
    <mrow>
      <mo fence="true">(</mo>
      <mi>s</mi>
      <mo>+</mo>
      <mi>t</mi>
      <mo fence="true">)</mo>
    </mrow>
    <mo>&#xF7;<--Divide--></mo>
    <mn>2</mn>
  </mrow>
</math>

into SRE 4.0.6 via node:

function getSreResults(mathML) {
    return new Promise(resolve => {
        sre.setupEngine({
            locale: 'en',
            modality: 'speech',
            domain: 'mathspeak',
            style: 'default'
        }).then(()=>{
            const mathSpeak =sre.toSpeech(mathML)
            sre.setupEngine({
                locale: 'nemeth',
                modality: 'braille',
                domain: 'default',
                style: 'default'
            }).then(()=>{
                const sreBraille = sre.toSpeech(mathML)
                resolve({ "mathSpeak": mathSpeak, "sreBraille": sreBraille})
            })
        })
    })
}

resulted in:

⠷⠎⠬⠞⠾⠈⠌⠆

when we expected:

⠷⠎⠬⠞⠾⠨⠌⠆
brichwin commented 1 month ago

Verified that this is fixed using MathJax version: 4.0.0-beta.6