The MOLTO mathematical grammar library


Jordi Saludes


The MOLTO mathematical grammar library aims to express simple mathematical drills at the level of high-school and freshmen algebra and calculus. 
This started as part of the webALT project and was continued in MOLTO where the library was made modular and brought up to date with current GF technology. 
At present, the library involves 13 natural languages (plus LaTeX) and contains circa 15,000 lines of code.

We will describe the structure of the library, the decisions adopted with respect to it and how this structure evolved in time.

  1. Scaffolding your application: Designing what your application would cover and at which level of detail.
    GF is a controlled language system. This means that you have to plan ahead what your application will be able to express.
    This is what is declared in the abstract modules of your grammar. At this stage you should decide too how many categories to use.

  2.  Populating your grammar: Start small and grow from there. Identify possible trouble early. Think globally.
    At this step you need to target a familiar language (or at least one you know how to use the corresponding GF resource grammar). Start coding a concrete module for this language and try to figure out which parts will probably be difficult. Bear in mind that what you are coding should be generalised to the other targeted languages.

  3. Extending to more languages: Tension between simplicity/unity and fluency/expressiveness. Bootstrapping a language.
    When dealing with several languages. It may be convenient to use functors to re-use code. There is a trade-off between what can be generalised and what should be hard-coded for each languages. The effort to put to achieve a more fluent expression should also be weighted regarding the application goals.
    If your application has a good deal of general code, it will be possible to add new languages by providing no much more than the application lexicon in this language: The result will be crude, but probably will be amenable to completion and refinement.

  4. Quality control: Treebanks for regression testing. How to create and maintain a treebank. How to measure your progress. In the MOLTO simple drill library we use treebanks to measure how far we are from the goal expressions. It works too as a way to ensure that you are progressing in the right direction.

  5. Other topics: Semantic actions. Stand-alone applications.
    Sometimes you will need to define transfers to make your expressions more intelligible. We will show the cases in the MOLTO library, related to the LaTeX concrete and the web interaction for the mathbar demo.

 Date and Time