ASCIIMath semantic input widget demo
This demo presents a little "widget" for inputting the kind of simple maths we might expect from a 16-18 year-old student in the UK. It uses ASCIIMathML as an input syntax and attempts to "make sense" of the input and provide useful feedback while the student types. This type of approach might be useful in assessment systems.
(This is a more specialised version of the ASCIIMath simple input with MathJax demo. That demo focuses only on the input on display of mathematics; this demo additionallly tries to apply semantics to it.)
Try it
Enter some ASCIIMath in the box below. Feedback will be shown while you type to the right of the input box. Some additional technical details will appear below that may be interesting to some people...
Technical implementation details
The ASCIIMath input syntax is converted to ASCIIMath's version of Presentation MathML via client-side JavaScript on each keystroke in the input box. This live output is shown here:
This raw output then sent (after a short delay) to a simple AJAX web service that runs the SnuggleTeX semantic enrichment process on it to see if it can be converted to Content MathML (and Maxima input syntax). It also converts it to a special "bracketed" version of Presentation MathML, which is shown next to the input box above, using MathJax for rendering so that it works in most modern browsers. This bracketed MathML is useful as it allows the student to check that the input is being interpreted as she intended, giving her the ability to adjust her input by adding extra brackets, or making other changes. The results of this process are sent back to the browser, which updates the page as appropriate.
MathML experts may be interested in the live information below.
Raw Presentation MathML generated by ASCIIMath
This is the raw MathML generated by ASCIIMath before it gets passed to the web service for munging. Note that there can be some oddities in its output, which are fixed up by the web service.
Semantic Presentation MathML generated by SnuggleTeX
This shows the result of the first part of the SnuggleTeX semantic enrichment process, which restructures the raw Presentation MathML to emphasise the underlying semantics and make it more amenable for further processing.
Bracketed Presentation MathML generated SnuggleTeX
This is the source of the MathML that is shown to the student, emphasising where inferred groupings and bracketings have been made.
Resulting Content MathML source
This is the resulting Content MathML, created by the web service. Being able to generate this is criteria we use here for "making sense of the input".
Resulting Maxima code
This is the resulting Maxima input syntax, created by the web service from the Content MathML. This will not always succeed as some supported Content MathML constructs can't be turned into Maxima equivalents.



