|
|
Some simple examples of embedded semantic tree. Note that for readability the attributes have been abbreviated
|
|
|
|
|
|
Original MathML:
|
|
|
```html
|
|
|
<math>
|
|
|
<mi>a</mi>
|
|
|
<mo>+</mo>
|
|
|
<mi>b</mi>
|
|
|
<mo>+</mo>
|
|
|
<mi>c</mi>
|
|
|
</math>
|
|
|
|
|
|
```
|
|
|
|
|
|
Semantic Tree:
|
|
|
```html
|
|
|
<stree>
|
|
|
<infixop role="addition" id="5">
|
|
|
+
|
|
|
<content>
|
|
|
<operator role="addition" id="1">+</operator>
|
|
|
<operator role="addition" id="3">+</operator>
|
|
|
</content>
|
|
|
<children>
|
|
|
<identifier role="latinletter" font="italic" id="0">a</identifier>
|
|
|
<identifier role="latinletter" font="italic" id="2">b</identifier>
|
|
|
<identifier role="latinletter" font="italic" id="4">c</identifier>
|
|
|
</children>
|
|
|
</infixop>
|
|
|
</stree>
|
|
|
|
|
|
```
|
|
|
|
|
|
Semantically enriched MathML:
|
|
|
```html
|
|
|
<math>
|
|
|
<mrow semantic-type="infixop" semantic-role="addition" id="5" semantic-content="1,3" semantic-children="0,2,4">
|
|
|
<mi semantic-type="identifier" semantic-role="latinletter" id="0" semantic-parent="0">a</mi>
|
|
|
<mo semantic-type="operator" semantic-role="addition" id="1" semantic-operator="infixop,+" semantic-parent="1">+</mo>
|
|
|
<mi semantic-type="identifier" semantic-role="latinletter" id="2" semantic-parent="2">b</mi>
|
|
|
<mo semantic-type="operator" semantic-role="addition" id="3" semantic-operator="infixop,+" semantic-parent="3">+</mo>
|
|
|
<mi semantic-type="identifier" semantic-role="latinletter" id="4" semantic-parent="4">c</mi>
|
|
|
</mrow>
|
|
|
</math>
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
Original MathML:
|
|
|
```html
|
|
|
<math>
|
... | ... | |