Data File Format
The mathematical expressions ink corresponding to each expression is saved in a INKML file. An INKML file mainly contains three kinds of information:
- the ink: a set of traces made of points;
- the symbol level ground truth: the segmentation and label information of each symbol of the expression;
- the mathematical ground truth: the MATHML structure of the expression.
The two ground truth information (at the symbol level, and the mathematical one) are entered manually. Furthermore, some general information is added in the file:
- the channels (here, X and Y);
- the writer information (identification, handedness, age,gender, etc.), if available;
- the LATEX ground truth (without any reference to the ink, to easily render it).
The INKML format enables to make references between the digital ink of the expression, its segmentation into symbols and its MATHML representation. Listing below shows an example of an INKML file for the expression a < b/c, containing 5 symbols for a total number of 6 strokes (two for the 'a', and one for the other symbols). It can be seen that the traceGroup with identifier xml:id="8" has references to the 2 corresponding strokes of symbol 'a', as well as to the MATHML part with identifier xml:id="A". Thus, the stroke segmentation of a symbol can be linked to its MATHML representation.
Some files samples are available to download here.
| Example of an INKML file for the expression a < b/c |
|
<ink xmlns="http://www.w3.org/2003/InkML"> <traceFormat> <channel name="X" type="decimal"/> <channel name="Y" type="decimal"/> </traceFormat> <annotation type="writer">w123</annotation> <annotation type="truth">$a<\frac{b}{c}$</annotation> <annotationXML type="truth" encoding="Content-MathML"> <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> <mi xml:id="A">a</mi> <mrow> <mo xml:id="B"><</mo> <mfrac xml:id="C"> <mi xml:id="D">b</mi> <mi xml:id="E">c</mi> </mfrac> </mrow> </mrow> </math> </annotationXML> <trace id="1">985 3317, ..., 1019 3340</trace> ... <trace id="6">1123 3308, ..., 1127 3365</trace> <traceGroup xml:id="7"> <annotation type="truth">Ground truth</annotation> <traceGroup xml:id="8"> <annotation type="truth">a</annotation> <annotationXML href="A"/> <traceView traceDataRef="1"/> <traceView traceDataRef="2"/> </traceGroup> ... </traceGroup> </ink> |