Phrasebooks

OpenMath is an emerging standard for representing the semantics of mathematics. Thanks to this development, exercise editors are able to create highly interactive mathematics exercises. This also holds for the exercise editor in the exercise repository and for the multilingual exercise editor WExEd (being developed by RIACA for respectively the projects LeActiveMath and WebALT). When exercises created with these editors are played with the MathDox player, the player can read, understand, process and do calculations with the OpenMath answers provided to the MathDox player. This is realized by the use of phrasebooks.

When a student gives an answer to an exercise, he is presented with a mathematics editor that outputs an OpenMath object; the answer of the student is presented to the player in OpenMath format. To verify whether the student's answer is correct, e.g., whether the answer is equal to the correct answer as predefined by the author of the exercise, the answer has to be sent to and processed by a Computer Algebra System (CAS). Because a CAS cannot read OpenMath, the OpenMath should be translated into something that the CAS can read, e.g., the CAS' own language. This translation is done by phrasebooks.

RIACA developed phrasebooks for various CAS's like GAP, Mathematica, Maxima, Magma Wiris and Maple. The player uses these phrasebooks to translate the student's OpenMath answer into something the specified CAS can read. Apart from phrasebooks that translate OpenMath to a CAS language, RIACA developed a MathML phrasebook that does the translations between OpenMath and MathML. With the links below, you are directed to the phrasebooks for GAP, Magma, Mathematica and MathML.

To illustrate the use of phrasebooks, we give an example of the use of the Mathematica phrasebook to verify the correctness of the student's answer to an exercise question.

Example Mathematica Phrasebook

Suppose that the exercise question is "Calculate the greatest common divisor of 18 and 24." and the student's answer to this question is 5. The OpenMath object that we want to have verified by a CAS is the following:

<om:OMOBJ>
   <om:OMA>
      <om:OMS cd="relation1" name="eq"/>
      <om:OMI>5</om:OMI>
      <om:OMA>
         <om:OMS cd="arith1" name="gcd"/>
         <om:OMI>18</om:OMI>
         <om:OMI>24</om:OMI>
      </om:OMA>    
   </om:OMA>
</om:OMOBJ>    

Suppose that we want Mathematica to evaluate this OpenMath object. Then we use the Mathematica phrasebook which translates the OpenMath object into the following Mathematica code.

Equal[5, GCD[18, 24]]
		

Mathematica evaluates this code and produces the "False" command which is translated back to OpenMath by the Mathematica phrasebook. The resulting OpenMath object is given by

<om:OMOBJ>
   <om:OMS cd="logic1" name="false"/>
</om:OMOBJ>

The player reads this OpenMath object and draws the conclusion that the student's answer is false. Based on this result, the player can give the student certain feedback.

We note that phrasebooks are not only used for processing the student's answer but for instance also for generating the values of random variables or mathematical expressions.