MathCAT icon indicating copy to clipboard operation
MathCAT copied to clipboard

Add MathSpeak translation

Open NSoiffer opened this issue 2 years ago • 0 comments

MathSpeak is a speech style that corresponds very closely to Nemeth Braille. There is already a Nemeth braille translation, so starting with those rules is a possible place to start. Obviously, the text t: ... output needs to be English words, not braille symbols. On the other hand, the Nemeth braille doesn't make use of intent (since Nemeth is almost always syntactic) and it seems that MathSpeak has added some semantic interpretation such as "absolute value and set".

MathSpeak has Verbose, Brief, and Superbrief modes that should be mapped to MathCAT's Verbose, Medium, and Terse verbosity settings.

Some pages of the MathSpeak spec mention Verbosity, Semantic Interpretation, and Explicitly options although the grammar rule pages only show verbosity settings. It appears that the grammar rules use a "Medium" semantics setting. Potentially it might be sense to have a MathSpeak setting Semantics similar to ClearSpeak settings that would be tested with something like $MathSpeak_Semantics = 'Medium'.

The MathSpeak "specification" can be found at https://www.seewritehear.com/accessible-mathml/mathspeak/examples/grammar-rules/ and also https://www.seewritehear.com/accessible-mathml/mathspeak/examples/NemethBook/ (many of the later are broken and I've sent a bug report in).

The new rules would be called MathSpeak_Rules.yaml and go in MathCAT/Rules/Languages/en

In addition to writing the speech rules, tests for the speech need to be written also. They go into a new directory MathCAT/tests/en/MathSpeak and could be broken up into multiple files if appropriate (one per grammar rule?).

SRE has ~1800 MathSpeak tests at sre-tests\output\en\MathspeakEnglish.html. I believe one of scripts in MathCAT/PythonScripts can harvest those and create a Rust test file (I did that for some of the Nemeth tests). It probably needs to be tweaked so the proper verbosity setting is used/set in the Rust test. If someone starts on this project, contact me as it is probably easiest if I generate the test file. Whomever works on this needs to verify the tests as it is possible there are errors in the tests (run them and if there is an error, determine if it is a MathCAT error or an SRE test error based on the MathSpeak grammar rules above).

Note: I did a MathSpeak version for MathPlayer maybe 15 years ago. At the time, I ran into many missing cases. I spoke with the people working on the MathSpeak spec and incorporated their answers into MathPlayer, but there remained many open questions. I don't know if they updated the grammar rules. If you run into some missing case, consulting MathPlayer's rules/output is one place to look for answers.

NSoiffer avatar Nov 22 '22 05:11 NSoiffer