|
|
Some simple examples of embedded semantic tree. Note that for readability the attributes have been abbreviated
|
|
|
|
|
|
Original MathML:
|
|
|
```html
|
|
|
<math>
|
|
|
<mn>5</mn>
|
|
|
<mo>=</mo>
|
|
|
<mn>3</mn>
|
|
|
<mo>+</mo>
|
|
|
<mn>2</mn>
|
|
|
</math>
|
|
|
```
|
|
|
|
|
|
Semantically enriched MathML:
|
|
|
```html
|
|
|
<math>
|
|
|
<mrow semantic-type="relseq" semantic-role="equality" id="6" semantic-content="1" semantic-children="0,5">
|
|
|
<mn semantic-type="number" semantic-role="integer" id="0" semantic-parent="0">5</mn>
|
|
|
<mo semantic-type="relation" semantic-role="equality" id="1" semantic-operator="relseq,=" semantic-parent="1">=</mo>
|
|
|
<mrow semantic-type="infixop" semantic-role="addition" id="5" semantic-content="3" semantic-children="2,4" semantic-parent="5">
|
|
|
<mn semantic-type="number" semantic-role="integer" id="2" semantic-parent="2">3</mn>
|
|
|
<mo semantic-type="operator" semantic-role="addition" id="3" semantic-operator="infixop,+" semantic-parent="3">+</mo>
|
|
|
<mn semantic-type="number" semantic-role="integer" id="4" semantic-parent="4">2</mn>
|
|
|
</mrow>
|
|
|
</mrow>
|
|
|
</math>
|
|
|
```
|
|
|
|
|
|
Observe that for the semantic interpretation the original MathML tags are pretty irrelevant. E.g., writing numbers as identifiers still yields the same semantic markup.
|
|
|
|
|
|
Original MathML:
|
|
|
```html
|
|
|
<math>
|
... | ... | |