Commit fc69cb58 authored by Bruno Guillaume's avatar Bruno Guillaume

example “flat”

parent e78975c2
# Transformation of single-headed structure into a chained structure
:information_source: You can download files used in this page:
[rules.grs](/examples/flat/rules.grs),
[SH6.conll](/examples/flat/SH6.conll)
There are two basic ways to represent *flat* structures:
1. a single-headed structure: for instance the graph `SH6` below on the left for a 6 words flat structure
1. a chained stucture: for instance the graph `C6` below on the right for the same 6 words flat structure
| | |
|:---:|:---:|
| SH6 | C6 |
| ![SH6](/examples/flat/img/SH6.svg) | ![alt C6](/examples/flat/img/C6.svg) |
We will see how to convert from one to the other with Graph Rewriting.
## From single-headed to chained
Of course, this will be a iterative process able to deal with an arbitrary number of items.
The simplest rule we can think of is:
```grew
rule sh2c_1 {
pattern {
H -[fixed]-> N1;
e:H -[fixed]-> N2;
}
commands {
del_edge e;
add_edge N1 -[fixed]-> N2;
}
}
```
This rule searches for two nodes `N1` and `N2` with the same head `H` through the `fixed` relation.
But this rule applied iteratively on `GH6`:
`grew transform -grs rules.grs -strat "Iter (sh2c_1)" -i SH6.conll -o C6_120.conll`
Output 120 normal forms! For instance:
![C6_120_example](/examples/flat/img/C6_120_example.svg)
Our rule is not strict enough. We have to put more restriction in the pattern part.
If we require that `N1`and `N2`are two consecutive words, the rule is:
```grew
rule sh2c_2 {
pattern {
H -[fixed]-> N1;
e:H -[fixed]-> N2;
N1 < N2;
}
commands {
del_edge e;
add_edge N1 -[fixed]-> N2;
}
}
```
`grew transform -grs rules.grs -strat "Iter (sh2c_2)" -i SH6.conll -o C6_5.conll`
Now, the command above produces 5 normal forms, one on which is:
![C6_5_example](/examples/flat/img/C6_5_example.svg)
The rule was first applied with on nodes `w2` and `w3`.
After that, the nodes `w3` and `w4` don't have the same governor and the rule cannot be applied.
The rule must be stricter.
We want to impose that the rightmost nodes are chosen first.
This can be done using a `without` clause: the rule must be applied to `N1` and `N2` only if there is no node `N3` on the right of `N2` with a `fixed` link from `H` to `N3`.
In **Grew**, this is written:
```grew
rule sh2c {
pattern {
H -[fixed]-> N1;
e:H -[fixed]-> N2;
N1 < N2;
}
without {
H -[fixed]-> N3;
N2 < N3;
}
commands {
del_edge e;
add_edge N1 -[fixed]-> N2;
}
}
```
`grew transform -grs rules.grs -strat "Iter (sh2c)" -i SH6.conll -o C6.conll`
Finally, we get only the expected normal form:
![alt C6](/examples/flat/img/C6.svg)
The last rule can be applied only on the nodes `w5` and `w6` of the graph `SH6`;
in the next step, it can be applied only on the nodes `w4` and `w5`;
etc.
## From chained to single-headed
In the other way, again we can solve our problem by iterating the application of a single rule:
```grew
rule c2sh {
pattern {
H -[fixed]-> N1;
e: N1 -[fixed]-> N2;
}
commands {
del_edge e;
add_edge H -[fixed]-> N2;
}
}
```
`grew transform -grs rules.grs -strat "Iter (c2sh)" -i C6.conll -o SH6_auto.conll`
The output is called `SH6_auto.conll` to avoid replacing the file `SH6.conll` given at the beginning.
And `SH6_auto.conll` contains only one normal form which is equals to `SH6`.
So it seems that the first try is the good one! Well, it's not so simple, as often with Graph Rewriting!
The rewriting of `C6` is tricky, let's look at `C4`.
It can be rewritten to 6 different graphs:
![C4_reducts](/examples/flat/img/C4_reducts.svg)
| | |
|:---:|:------------------:|
| C4 | ![G0](/examples/flat/img/G0.svg) |
| G1 | ![G1](/examples/flat/img/G1.svg) |
| G2 | ![G2](/examples/flat/img/G2.svg) |
| G3 | ![G3](/examples/flat/img/G3.svg) |
| G4 | ![G4](/examples/flat/img/G4.svg) |
| SH4 | ![G5](/examples/flat/img/G5.svg) |
And all graphs are computed by the previous command before producing the normal form.
There are (n-1)! such graphs for `Cn`.
So, what can we do to avoid this huge and useless computation?
### Solution 1: compute only one normal form
The rule `c2sh` is called a **confluent** rule.
This means that they will always be exactly one normal form when the rule is iterated.
If we know that the rule is confluent, we can ask **Grew** to compute only one normal form with the strategy `Onf (c2sh)`:
`grew transform -grs rules.grs -strat "Onf (c2sh)" -i C6.conll -o SH6_auto.conll`
For instance, on `G10`, the `Iter` strategy takes 25s to compute the normal form and the `Onf` takes 4ms.
### Solution 2: write a stricter rule
As before, we can add a `without` clause to force the application order of command:
```grew
rule c2sh_strict {
pattern {
H -[fixed]-> N1;
e: N1 -[fixed]-> N2;
}
without {
* -[fixed]-> H;
}
commands {
del_edge e;
add_edge H -[fixed]-> N2;
}
}
```
At each step, we ensure that the node `H` of the pattern is matched to the word `head` of the graph.
POStoSSQ=/Users/guillaum/gitlab/grew/POStoSSQ
SSQtoDSQ=/Users/guillaum/gitlab/grew/SSQtoDSQ
sequoia_proj.grs=/Users/guillaum/gitlab/deep-sequoia/tools/sequoia_proj.grs
selfdoc:
@echo "make run"
@echo "make img"
run:
ln -s /Users/guillaum/gitlab/grew/POStoSSQ
ln -s /Users/guillaum/gitlab/grew/SSQtoDSQ
ln -s /Users/guillaum/gitlab/deep-sequoia/tools/sequoia.dom
ln -s /Users/guillaum/gitlab/deep-sequoia/tools/sequoia_proj.grs
echo "La souris a été mangée par le chat." | MElt -L -T > test.melt
grew transform -grs POStoSSQ/grs/surf_synt_main.grs -i test.melt -o test.surf.conll
grew transform -grs SSQtoDSQ/grs/main_dsq.grs -i test.surf.conll -o test.deep_and_surf.conll
grew transform -grs sequoia_proj.grs -strat deep -i test.deep_and_surf.conll -o test.deep.conll
rm -f POStoSSQ SSQtoDSQ sequoia.dom sequoia_proj.grs
grew transform -grs $(POStoSSQ)/grs/surf_synt_main.grs -i test.melt -o test.surf.conll
grew transform -grs $(SSQtoDSQ)/grs/main_dsq.grs -i test.surf.conll -o test.deep_and_surf.conll
grew transform -grs $(sequoia_proj.grs) -strat deep -i test.deep_and_surf.conll -o test.deep.conll
img: figures
purge:
@make clean
rm -f test.* POStoSSQ SSQtoDSQ sequoia.dom sequoia_proj.grs
rm -f test.*
include ../Makefile
\ No newline at end of file
1 head _ X _ _ 0 root _ _
2 w2 _ X _ _ 1 fixed _ _
3 w3 _ X _ _ 1 fixed _ _
4 w4 _ X _ _ 1 fixed _ _
1 head _ X _ _ 0 root _ _
2 w2 _ X _ _ 1 fixed _ _
3 w3 _ X _ _ 1 fixed _ _
4 w4 _ X _ _ 1 fixed _ _
5 w5 _ X _ _ 1 fixed _ _
6 w6 _ X _ _ 1 fixed _ _
digraph G {
rankdir=LR
node [shape=none]
C4 -> {G1; G2}
G2 -> {G3; G4}
{G1; G3; G4} -> CH4
}
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.40.1 (20161225.0304)
-->
<!-- Title: G Pages: 1 -->
<svg width="332pt" height="144pt"
viewBox="0.00 0.00 332.00 144.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 140)">
<title>G</title>
<polygon fill="#ffffff" stroke="transparent" points="-4,4 -4,-140 328,-140 328,4 -4,4"/>
<!-- C4 -->
<g id="node1" class="node">
<title>C4</title>
<text text-anchor="middle" x="27" y="-87.3" font-family="Times,serif" font-size="14.00" fill="#000000">C4</text>
</g>
<!-- G1 -->
<g id="node2" class="node">
<title>G1</title>
<text text-anchor="middle" x="117" y="-114.3" font-family="Times,serif" font-size="14.00" fill="#000000">G1</text>
</g>
<!-- C4&#45;&gt;G1 -->
<g id="edge1" class="edge">
<title>C4&#45;&gt;G1</title>
<path fill="none" stroke="#000000" d="M54.003,-99.1009C62.204,-101.5612 71.3599,-104.308 80.095,-106.9285"/>
<polygon fill="#000000" stroke="#000000" points="79.121,-110.2904 89.705,-109.8115 81.1325,-103.5856 79.121,-110.2904"/>
</g>
<!-- G2 -->
<g id="node3" class="node">
<title>G2</title>
<text text-anchor="middle" x="117" y="-60.3" font-family="Times,serif" font-size="14.00" fill="#000000">G2</text>
</g>
<!-- C4&#45;&gt;G2 -->
<g id="edge2" class="edge">
<title>C4&#45;&gt;G2</title>
<path fill="none" stroke="#000000" d="M54.003,-82.8991C62.204,-80.4388 71.3599,-77.692 80.095,-75.0715"/>
<polygon fill="#000000" stroke="#000000" points="81.1325,-78.4144 89.705,-72.1885 79.121,-71.7096 81.1325,-78.4144"/>
</g>
<!-- CH4 -->
<g id="node6" class="node">
<title>CH4</title>
<text text-anchor="middle" x="297" y="-68.3" font-family="Times,serif" font-size="14.00" fill="#000000">CH4</text>
</g>
<!-- G1&#45;&gt;CH4 -->
<g id="edge5" class="edge">
<title>G1&#45;&gt;CH4</title>
<path fill="none" stroke="#000000" d="M144.3685,-115.4642C168.3489,-112.7935 203.9642,-107.7326 234,-99 242.8002,-96.4414 252.0073,-92.9787 260.5801,-89.3873"/>
<polygon fill="#000000" stroke="#000000" points="262.1596,-92.5171 269.9339,-85.3192 259.3678,-86.0979 262.1596,-92.5171"/>
</g>
<!-- G3 -->
<g id="node4" class="node">
<title>G3</title>
<text text-anchor="middle" x="207" y="-68.3" font-family="Times,serif" font-size="14.00" fill="#000000">G3</text>
</g>
<!-- G2&#45;&gt;G3 -->
<g id="edge3" class="edge">
<title>G2&#45;&gt;G3</title>
<path fill="none" stroke="#000000" d="M144.003,-66.4003C152.0277,-67.1136 160.9665,-67.9081 169.5309,-68.6694"/>
<polygon fill="#000000" stroke="#000000" points="169.4344,-72.1745 179.705,-69.5738 170.0542,-65.202 169.4344,-72.1745"/>
</g>
<!-- G4 -->
<g id="node5" class="node">
<title>G4</title>
<text text-anchor="middle" x="207" y="-14.3" font-family="Times,serif" font-size="14.00" fill="#000000">G4</text>
</g>
<!-- G2&#45;&gt;G4 -->
<g id="edge4" class="edge">
<title>G2&#45;&gt;G4</title>
<path fill="none" stroke="#000000" d="M144.003,-50.1985C152.3804,-45.9167 161.7541,-41.1257 170.6579,-36.5748"/>
<polygon fill="#000000" stroke="#000000" points="172.3936,-39.6185 179.705,-31.9508 169.2078,-33.3854 172.3936,-39.6185"/>
</g>
<!-- G3&#45;&gt;CH4 -->
<g id="edge6" class="edge">
<title>G3&#45;&gt;CH4</title>
<path fill="none" stroke="#000000" d="M234.003,-72C242.0277,-72 250.9665,-72 259.5309,-72"/>
<polygon fill="#000000" stroke="#000000" points="259.7051,-75.5001 269.705,-72 259.705,-68.5001 259.7051,-75.5001"/>
</g>
<!-- G4&#45;&gt;CH4 -->
<g id="edge7" class="edge">
<title>G4&#45;&gt;CH4</title>
<path fill="none" stroke="#000000" d="M234.003,-34.2018C242.4686,-39.2812 251.9516,-44.971 260.9389,-50.3634"/>
<polygon fill="#000000" stroke="#000000" points="259.3293,-53.4792 269.705,-55.623 262.9308,-47.4768 259.3293,-53.4792"/>
</g>
</g>
</svg>
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Created with dep2pict 2.30.2 -->
<svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="441.54297" height="120.53906">
<rect x="0" y="0" width="441.54297" height="120.53906" style="fill:white;fill-opacity:1;" />
<g transform="translate(0,74.89844) scale(2,2)">
<text id="word__N_1" x="22.5186" y="-14.4062" font-style="normal" font-weight="normal" fill="black" font-size="12" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="22.5186" dy="12.8633">head</tspan>
</text>
<text id="subword__N_1" x="22.5186" y="-1.54297" fill="black" font-size="7" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="22.5186" dy="8.33691">X</tspan>
</text>
<text id="word__N_2" x="62.373" y="-14.4062" font-style="normal" font-weight="normal" fill="black" font-size="12" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="62.373" dy="12.8633">w2</tspan>
</text>
<text id="subword__N_2" x="62.373" y="-1.54297" fill="black" font-size="7" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="62.373" dy="8.33691">X</tspan>
</text>
<text id="word__N_3" x="97.0889" y="-14.4062" font-style="normal" font-weight="normal" fill="black" font-size="12" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="97.0889" dy="12.8633">w3</tspan>
</text>
<text id="subword__N_3" x="97.0889" y="-1.54297" fill="black" font-size="7" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="97.0889" dy="8.33691">X</tspan>
</text>
<text id="word__N_4" x="131.831" y="-14.4062" font-style="normal" font-weight="normal" fill="black" font-size="12" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="131.831" dy="12.8633">w4</tspan>
</text>
<text id="subword__N_4" x="131.831" y="-1.54297" fill="black" font-size="7" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="131.831" dy="8.33691">X</tspan>
</text>
<text id="word__N_5" x="166.605" y="-14.4062" font-style="normal" font-weight="normal" fill="black" font-size="12" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="166.605" dy="12.8633">w5</tspan>
</text>
<text id="subword__N_5" x="166.605" y="-1.54297" fill="black" font-size="7" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="166.605" dy="8.33691">X</tspan>
</text>
<text id="word__N_6" x="201.395" y="-14.4062" font-style="normal" font-weight="normal" fill="black" font-size="12" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="201.395" dy="12.8633">w6</tspan>
</text>
<text id="subword__N_6" x="201.395" y="-1.54297" fill="black" font-size="7" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="201.395" dy="8.33691">X</tspan>
</text>
<marker id="markerendword_0" markerWidth="5" markerHeight="5" markerUnits="userSpaceOnUse" orient="auto" refX="2" refY="2">
<path d="M0,0 l4,2 l-4,2 z" style="fill:black;"/>
</marker>
<text id="label__N_1__N_2__fixed" x="41.01855" y="-24.40625" style="fill:black;font-size:5px;font-family:Arial;text-anchor:middle;text-align:center" >fixed</text>
<path style="marker-end:url(#markerendword_0);" stroke="black" fill="none" d="M 22.51855,-13.40625 22.51855,-18.40625 A 3 3 0 0 1 25.51855,-21.40625 L 56.87305,-21.40625 A 3 3 0 0 1 59.87305,-18.40625 L 59.87305,-13.40625" ></path>
<marker id="markerendword_1" markerWidth="5" markerHeight="5" markerUnits="userSpaceOnUse" orient="auto" refX="2" refY="2">
<path d="M0,0 l4,2 l-4,2 z" style="fill:black;"/>
</marker>
<text id="label__N_2__N_3__fixed" x="79.37305" y="-24.40625" style="fill:black;font-size:5px;font-family:Arial;text-anchor:middle;text-align:center" >fixed</text>
<path style="marker-end:url(#markerendword_1);" stroke="black" fill="none" d="M 64.87305,-13.40625 64.87305,-18.40625 A 3 3 0 0 1 67.87305,-21.40625 L 91.58887,-21.40625 A 3 3 0 0 1 94.58887,-18.40625 L 94.58887,-13.40625" ></path>
<marker id="markerendword_2" markerWidth="5" markerHeight="5" markerUnits="userSpaceOnUse" orient="auto" refX="2" refY="2">
<path d="M0,0 l4,2 l-4,2 z" style="fill:black;"/>
</marker>
<text id="label__N_3__N_4__fixed" x="114.08887" y="-24.40625" style="fill:black;font-size:5px;font-family:Arial;text-anchor:middle;text-align:center" >fixed</text>
<path style="marker-end:url(#markerendword_2);" stroke="black" fill="none" d="M 99.58887,-13.40625 99.58887,-18.40625 A 3 3 0 0 1 102.58887,-21.40625 L 126.33105,-21.40625 A 3 3 0 0 1 129.33105,-18.40625 L 129.33105,-13.40625" ></path>
<marker id="markerendword_3" markerWidth="5" markerHeight="5" markerUnits="userSpaceOnUse" orient="auto" refX="2" refY="2">
<path d="M0,0 l4,2 l-4,2 z" style="fill:black;"/>
</marker>
<text id="label__N_4__N_5__fixed" x="148.83105" y="-24.40625" style="fill:black;font-size:5px;font-family:Arial;text-anchor:middle;text-align:center" >fixed</text>
<path style="marker-end:url(#markerendword_3);" stroke="black" fill="none" d="M 134.33105,-13.40625 134.33105,-18.40625 A 3 3 0 0 1 137.33105,-21.40625 L 161.10547,-21.40625 A 3 3 0 0 1 164.10547,-18.40625 L 164.10547,-13.40625" ></path>
<marker id="markerendword_4" markerWidth="5" markerHeight="5" markerUnits="userSpaceOnUse" orient="auto" refX="2" refY="2">
<path d="M0,0 l4,2 l-4,2 z" style="fill:black;"/>
</marker>
<text id="label__N_5__N_6__fixed" x="185.10547" y="-24.40625" style="fill:black;font-size:5px;font-family:Arial;text-anchor:middle;text-align:center" >fixed</text>
<path style="marker-end:url(#markerendword_4);" stroke="black" fill="none" d="M 169.10547,-13.40625 169.10547,-18.40625 A 3 3 0 0 1 172.10547,-21.40625 L 198.39453,-21.40625 A 3 3 0 0 1 201.39453,-18.40625 L 201.39453,-13.40625" ></path>
</g>
</svg>
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Created with dep2pict 2.30.2 -->
<svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="441.54297" height="180.53906">
<rect x="0" y="0" width="441.54297" height="180.53906" style="fill:white;fill-opacity:1;" />
<g transform="translate(0,134.89844) scale(2,2)">
<text id="word__N_1" x="22.5186" y="-14.4062" font-style="normal" font-weight="normal" fill="black" font-size="12" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="22.5186" dy="12.8633">head</tspan>
</text>
<text id="subword__N_1" x="22.5186" y="-1.54297" fill="black" font-size="7" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="22.5186" dy="8.33691">X</tspan>
</text>
<text id="word__N_2" x="62.373" y="-14.4062" font-style="normal" font-weight="normal" fill="black" font-size="12" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="62.373" dy="12.8633">w2</tspan>
</text>
<text id="subword__N_2" x="62.373" y="-1.54297" fill="black" font-size="7" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="62.373" dy="8.33691">X</tspan>
</text>
<text id="word__N_3" x="97.0889" y="-14.4062" font-style="normal" font-weight="normal" fill="black" font-size="12" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="97.0889" dy="12.8633">w3</tspan>
</text>
<text id="subword__N_3" x="97.0889" y="-1.54297" fill="black" font-size="7" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="97.0889" dy="8.33691">X</tspan>
</text>
<text id="word__N_4" x="131.831" y="-14.4062" font-style="normal" font-weight="normal" fill="black" font-size="12" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="131.831" dy="12.8633">w4</tspan>
</text>
<text id="subword__N_4" x="131.831" y="-1.54297" fill="black" font-size="7" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="131.831" dy="8.33691">X</tspan>
</text>
<text id="word__N_5" x="166.605" y="-14.4062" font-style="normal" font-weight="normal" fill="black" font-size="12" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="166.605" dy="12.8633">w5</tspan>
</text>
<text id="subword__N_5" x="166.605" y="-1.54297" fill="black" font-size="7" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="166.605" dy="8.33691">X</tspan>
</text>
<text id="word__N_6" x="201.395" y="-14.4062" font-style="normal" font-weight="normal" fill="black" font-size="12" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="201.395" dy="12.8633">w6</tspan>
</text>
<text id="subword__N_6" x="201.395" y="-1.54297" fill="black" font-size="7" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="201.395" dy="8.33691">X</tspan>
</text>
<marker id="markerendword_2" markerWidth="5" markerHeight="5" markerUnits="userSpaceOnUse" orient="auto" refX="2" refY="2">
<path d="M0,0 l4,2 l-4,2 z" style="fill:black;"/>
</marker>
<text id="label__N_5__N_4__fixed" x="148.83105" y="-24.40625" style="fill:black;font-size:5px;font-family:Arial;text-anchor:middle;text-align:center" >fixed</text>
<path style="marker-end:url(#markerendword_2);" stroke="black" fill="none" d="M 164.10547,-13.40625 164.10547,-18.40625 A 3 3 0 0 0 161.10547,-21.40625 L 137.33105,-21.40625 A 3 3 0 0 0 134.33105,-18.40625 L 134.33105,-13.40625" ></path>
<marker id="markerendword_3" markerWidth="5" markerHeight="5" markerUnits="userSpaceOnUse" orient="auto" refX="2" refY="2">
<path d="M0,0 l4,2 l-4,2 z" style="fill:black;"/>
</marker>
<text id="label__N_3__N_5__fixed" x="134.08887" y="-34.40625" style="fill:black;font-size:5px;font-family:Arial;text-anchor:middle;text-align:center" >fixed</text>
<path style="marker-end:url(#markerendword_3);" stroke="black" fill="none" d="M 99.58887,-13.40625 99.58887,-28.40625 A 3 3 0 0 1 102.58887,-31.40625 L 166.10547,-31.40625 A 3 3 0 0 1 169.10547,-28.40625 L 169.10547,-13.40625" ></path>
<marker id="markerendword_0" markerWidth="5" markerHeight="5" markerUnits="userSpaceOnUse" orient="auto" refX="2" refY="2">
<path d="M0,0 l4,2 l-4,2 z" style="fill:black;"/>
</marker>
<text id="label__N_4__N_2__fixed" x="95.37305" y="-24.40625" style="fill:black;font-size:5px;font-family:Arial;text-anchor:middle;text-align:center" >fixed</text>
<path style="marker-end:url(#markerendword_0);" stroke="black" fill="none" d="M 129.33105,-13.40625 129.33105,-18.40625 A 3 3 0 0 0 126.33105,-21.40625 L 65.37305,-21.40625 A 3 3 0 0 0 62.37305,-18.40625 L 62.37305,-13.40625" ></path>
<marker id="markerendword_1" markerWidth="5" markerHeight="5" markerUnits="userSpaceOnUse" orient="auto" refX="2" refY="2">
<path d="M0,0 l4,2 l-4,2 z" style="fill:black;"/>
</marker>
<text id="label__N_6__N_3__fixed" x="146.58887" y="-44.40625" style="fill:black;font-size:5px;font-family:Arial;text-anchor:middle;text-align:center" >fixed</text>
<path style="marker-end:url(#markerendword_1);" stroke="black" fill="none" d="M 198.89453,-13.40625 198.89453,-38.40625 A 3 3 0 0 0 195.89453,-41.40625 L 97.58887,-41.40625 A 3 3 0 0 0 94.58887,-38.40625 L 94.58887,-13.40625" ></path>
<marker id="markerendword_4" markerWidth="5" markerHeight="5" markerUnits="userSpaceOnUse" orient="auto" refX="2" refY="2">
<path d="M0,0 l4,2 l-4,2 z" style="fill:black;"/>
</marker>
<text id="label__N_1__N_6__fixed" x="113.01855" y="-54.40625" style="fill:black;font-size:5px;font-family:Arial;text-anchor:middle;text-align:center" >fixed</text>
<path style="marker-end:url(#markerendword_4);" stroke="black" fill="none" d="M 22.51855,-13.40625 22.51855,-48.40625 A 3 3 0 0 1 25.51855,-51.40625 L 200.89453,-51.40625 A 3 3 0 0 1 203.89453,-48.40625 L 203.89453,-13.40625" ></path>
</g>
</svg>
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Created with dep2pict 2.30.2 -->
<svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="441.54297" height="140.53906">
<rect x="0" y="0" width="441.54297" height="140.53906" style="fill:white;fill-opacity:1;" />
<g transform="translate(0,94.89844) scale(2,2)">
<text id="word__N_1" x="22.5186" y="-14.4062" font-style="normal" font-weight="normal" fill="black" font-size="12" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="22.5186" dy="12.8633">head</tspan>
</text>
<text id="subword__N_1" x="22.5186" y="-1.54297" fill="black" font-size="7" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="22.5186" dy="8.33691">X</tspan>
</text>
<text id="word__N_2" x="62.373" y="-14.4062" font-style="normal" font-weight="normal" fill="black" font-size="12" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="62.373" dy="12.8633">w2</tspan>
</text>
<text id="subword__N_2" x="62.373" y="-1.54297" fill="black" font-size="7" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="62.373" dy="8.33691">X</tspan>
</text>
<text id="word__N_3" x="97.0889" y="-14.4062" font-style="normal" font-weight="normal" fill="black" font-size="12" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="97.0889" dy="12.8633">w3</tspan>
</text>
<text id="subword__N_3" x="97.0889" y="-1.54297" fill="black" font-size="7" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="97.0889" dy="8.33691">X</tspan>
</text>
<text id="word__N_4" x="131.831" y="-14.4062" font-style="normal" font-weight="normal" fill="black" font-size="12" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="131.831" dy="12.8633">w4</tspan>
</text>
<text id="subword__N_4" x="131.831" y="-1.54297" fill="black" font-size="7" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="131.831" dy="8.33691">X</tspan>
</text>
<text id="word__N_5" x="166.605" y="-14.4062" font-style="normal" font-weight="normal" fill="black" font-size="12" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="166.605" dy="12.8633">w5</tspan>
</text>
<text id="subword__N_5" x="166.605" y="-1.54297" fill="black" font-size="7" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="166.605" dy="8.33691">X</tspan>
</text>
<text id="word__N_6" x="201.395" y="-14.4062" font-style="normal" font-weight="normal" fill="black" font-size="12" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="201.395" dy="12.8633">w6</tspan>
</text>
<text id="subword__N_6" x="201.395" y="-1.54297" fill="black" font-size="7" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="201.395" dy="8.33691">X</tspan>
</text>
<marker id="markerendword_0" markerWidth="5" markerHeight="5" markerUnits="userSpaceOnUse" orient="auto" refX="2" refY="2">
<path d="M0,0 l4,2 l-4,2 z" style="fill:black;"/>
</marker>
<text id="label__N_1__N_2__fixed" x="42.01855" y="-24.40625" style="fill:black;font-size:5px;font-family:Arial;text-anchor:middle;text-align:center" >fixed</text>
<path style="marker-end:url(#markerendword_0);" stroke="black" fill="none" d="M 25.01855,-13.40625 25.01855,-18.40625 A 3 3 0 0 1 28.01855,-21.40625 L 56.87305,-21.40625 A 3 3 0 0 1 59.87305,-18.40625 L 59.87305,-13.40625" ></path>
<marker id="markerendword_1" markerWidth="5" markerHeight="5" markerUnits="userSpaceOnUse" orient="auto" refX="2" refY="2">
<path d="M0,0 l4,2 l-4,2 z" style="fill:black;"/>
</marker>
<text id="label__N_2__N_3__fixed" x="80.87305" y="-24.40625" style="fill:black;font-size:5px;font-family:Arial;text-anchor:middle;text-align:center" >fixed</text>
<path style="marker-end:url(#markerendword_1);" stroke="black" fill="none" d="M 64.87305,-13.40625 64.87305,-18.40625 A 3 3 0 0 1 67.87305,-21.40625 L 94.08887,-21.40625 A 3 3 0 0 1 97.08887,-18.40625 L 97.08887,-13.40625" ></path>
<marker id="markerendword_3" markerWidth="5" markerHeight="5" markerUnits="userSpaceOnUse" orient="auto" refX="2" refY="2">
<path d="M0,0 l4,2 l-4,2 z" style="fill:black;"/>
</marker>
<text id="label__N_4__N_5__fixed" x="148.83105" y="-24.40625" style="fill:black;font-size:5px;font-family:Arial;text-anchor:middle;text-align:center" >fixed</text>
<path style="marker-end:url(#markerendword_3);" stroke="black" fill="none" d="M 134.33105,-13.40625 134.33105,-18.40625 A 3 3 0 0 1 137.33105,-21.40625 L 161.10547,-21.40625 A 3 3 0 0 1 164.10547,-18.40625 L 164.10547,-13.40625" ></path>
<marker id="markerendword_4" markerWidth="5" markerHeight="5" markerUnits="userSpaceOnUse" orient="auto" refX="2" refY="2">
<path d="M0,0 l4,2 l-4,2 z" style="fill:black;"/>
</marker>
<text id="label__N_5__N_6__fixed" x="185.10547" y="-24.40625" style="fill:black;font-size:5px;font-family:Arial;text-anchor:middle;text-align:center" >fixed</text>
<path style="marker-end:url(#markerendword_4);" stroke="black" fill="none" d="M 169.10547,-13.40625 169.10547,-18.40625 A 3 3 0 0 1 172.10547,-21.40625 L 198.39453,-21.40625 A 3 3 0 0 1 201.39453,-18.40625 L 201.39453,-13.40625" ></path>
<marker id="markerendword_2" markerWidth="5" markerHeight="5" markerUnits="userSpaceOnUse" orient="auto" refX="2" refY="2">
<path d="M0,0 l4,2 l-4,2 z" style="fill:black;"/>
</marker>
<text id="label__N_1__N_4__fixed" x="74.51855" y="-34.40625" style="fill:black;font-size:5px;font-family:Arial;text-anchor:middle;text-align:center" >fixed</text>
<path style="marker-end:url(#markerendword_2);" stroke="black" fill="none" d="M 20.01855,-13.40625 20.01855,-28.40625 A 3 3 0 0 1 23.01855,-31.40625 L 126.33105,-31.40625 A 3 3 0 0 1 129.33105,-28.40625 L 129.33105,-13.40625" ></path>
</g>
</svg>
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Created with dep2pict 2.30.2 -->
<svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="302.38672" height="120.53906">
<rect x="0" y="0" width="302.38672" height="120.53906" style="fill:white;fill-opacity:1;" />
<g transform="translate(0,74.89844) scale(2,2)">
<text id="word__N_1" x="22.5186" y="-14.4062" font-style="normal" font-weight="normal" fill="black" font-size="12" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="22.5186" dy="12.8633">head</tspan>
</text>
<text id="subword__N_1" x="22.5186" y="-1.54297" fill="black" font-size="7" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="22.5186" dy="8.33691">X</tspan>
</text>
<text id="word__N_2" x="62.373" y="-14.4062" font-style="normal" font-weight="normal" fill="black" font-size="12" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="62.373" dy="12.8633">w2</tspan>
</text>
<text id="subword__N_2" x="62.373" y="-1.54297" fill="black" font-size="7" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="62.373" dy="8.33691">X</tspan>
</text>
<text id="word__N_3" x="97.0889" y="-14.4062" font-style="normal" font-weight="normal" fill="black" font-size="12" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="97.0889" dy="12.8633">w3</tspan>
</text>
<text id="subword__N_3" x="97.0889" y="-1.54297" fill="black" font-size="7" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="97.0889" dy="8.33691">X</tspan>
</text>
<text id="word__N_4" x="131.831" y="-14.4062" font-style="normal" font-weight="normal" fill="black" font-size="12" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="131.831" dy="12.8633">w4</tspan>
</text>
<text id="subword__N_4" x="131.831" y="-1.54297" fill="black" font-size="7" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="131.831" dy="8.33691">X</tspan>
</text>
<marker id="markerendword_0" markerWidth="5" markerHeight="5" markerUnits="userSpaceOnUse" orient="auto" refX="2" refY="2">
<path d="M0,0 l4,2 l-4,2 z" style="fill:black;"/>
</marker>
<text id="label__N_1__N_2__fixed" x="41.01855" y="-24.40625" style="fill:black;font-size:5px;font-family:Arial;text-anchor:middle;text-align:center" >fixed</text>
<path style="marker-end:url(#markerendword_0);" stroke="black" fill="none" d="M 22.51855,-13.40625 22.51855,-18.40625 A 3 3 0 0 1 25.51855,-21.40625 L 56.87305,-21.40625 A 3 3 0 0 1 59.87305,-18.40625 L 59.87305,-13.40625" ></path>
<marker id="markerendword_1" markerWidth="5" markerHeight="5" markerUnits="userSpaceOnUse" orient="auto" refX="2" refY="2">
<path d="M0,0 l4,2 l-4,2 z" style="fill:black;"/>
</marker>
<text id="label__N_2__N_3__fixed" x="79.37305" y="-24.40625" style="fill:black;font-size:5px;font-family:Arial;text-anchor:middle;text-align:center" >fixed</text>
<path style="marker-end:url(#markerendword_1);" stroke="black" fill="none" d="M 64.87305,-13.40625 64.87305,-18.40625 A 3 3 0 0 1 67.87305,-21.40625 L 91.58887,-21.40625 A 3 3 0 0 1 94.58887,-18.40625 L 94.58887,-13.40625" ></path>
<marker id="markerendword_2" markerWidth="5" markerHeight="5" markerUnits="userSpaceOnUse" orient="auto" refX="2" refY="2">
<path d="M0,0 l4,2 l-4,2 z" style="fill:black;"/>
</marker>
<text id="label__N_3__N_4__fixed" x="115.58887" y="-24.40625" style="fill:black;font-size:5px;font-family:Arial;text-anchor:middle;text-align:center" >fixed</text>
<path style="marker-end:url(#markerendword_2);" stroke="black" fill="none" d="M 99.58887,-13.40625 99.58887,-18.40625 A 3 3 0 0 1 102.58887,-21.40625 L 128.83105,-21.40625 A 3 3 0 0 1 131.83105,-18.40625 L 131.83105,-13.40625" ></path>
</g>
</svg>
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Created with dep2pict 2.30.2 -->
<svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="302.38672" height="140.53906">
<rect x="0" y="0" width="302.38672" height="140.53906" style="fill:white;fill-opacity:1;" />
<g transform="translate(0,94.89844) scale(2,2)">
<text id="word__N_1" x="22.5186" y="-14.4062" font-style="normal" font-weight="normal" fill="black" font-size="12" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="22.5186" dy="12.8633">head</tspan>
</text>
<text id="subword__N_1" x="22.5186" y="-1.54297" fill="black" font-size="7" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="22.5186" dy="8.33691">X</tspan>
</text>
<text id="word__N_2" x="62.373" y="-14.4062" font-style="normal" font-weight="normal" fill="black" font-size="12" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="62.373" dy="12.8633">w2</tspan>
</text>
<text id="subword__N_2" x="62.373" y="-1.54297" fill="black" font-size="7" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="62.373" dy="8.33691">X</tspan>
</text>
<text id="word__N_3" x="97.0889" y="-14.4062" font-style="normal" font-weight="normal" fill="black" font-size="12" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="97.0889" dy="12.8633">w3</tspan>
</text>
<text id="subword__N_3" x="97.0889" y="-1.54297" fill="black" font-size="7" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="97.0889" dy="8.33691">X</tspan>
</text>
<text id="word__N_4" x="131.831" y="-14.4062" font-style="normal" font-weight="normal" fill="black" font-size="12" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="131.831" dy="12.8633">w4</tspan>
</text>
<text id="subword__N_4" x="131.831" y="-1.54297" fill="black" font-size="7" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="131.831" dy="8.33691">X</tspan>
</text>
<marker id="markerendword_0" markerWidth="5" markerHeight="5" markerUnits="userSpaceOnUse" orient="auto" refX="2" refY="2">
<path d="M0,0 l4,2 l-4,2 z" style="fill:black;"/>
</marker>
<text id="label__N_1__N_2__fixed" x="43.51855" y="-24.40625" style="fill:black;font-size:5px;font-family:Arial;text-anchor:middle;text-align:center" >fixed</text>
<path style="marker-end:url(#markerendword_0);" stroke="black" fill="none" d="M 25.01855,-13.40625 25.01855,-18.40625 A 3 3 0 0 1 28.01855,-21.40625 L 59.37305,-21.40625 A 3 3 0 0 1 62.37305,-18.40625 L 62.37305,-13.40625" ></path>
<marker id="markerendword_2" markerWidth="5" markerHeight="5" markerUnits="userSpaceOnUse" orient="auto" refX="2" refY="2">
<path d="M0,0 l4,2 l-4,2 z" style="fill:black;"/>
</marker>
<text id="label__N_3__N_4__fixed" x="115.58887" y="-24.40625" style="fill:black;font-size:5px;font-family:Arial;text-anchor:middle;text-align:center" >fixed</text>
<path style="marker-end:url(#markerendword_2);" stroke="black" fill="none" d="M 99.58887,-13.40625 99.58887,-18.40625 A 3 3 0 0 1 102.58887,-21.40625 L 128.83105,-21.40625 A 3 3 0 0 1 131.83105,-18.40625 L 131.83105,-13.40625" ></path>
<marker id="markerendword_1" markerWidth="5" markerHeight="5" markerUnits="userSpaceOnUse" orient="auto" refX="2" refY="2">
<path d="M0,0 l4,2 l-4,2 z" style="fill:black;"/>
</marker>
<text id="label__N_1__N_3__fixed" x="57.01855" y="-34.40625" style="fill:black;font-size:5px;font-family:Arial;text-anchor:middle;text-align:center" >fixed</text>
<path style="marker-end:url(#markerendword_1);" stroke="black" fill="none" d="M 20.01855,-13.40625 20.01855,-28.40625 A 3 3 0 0 1 23.01855,-31.40625 L 91.58887,-31.40625 A 3 3 0 0 1 94.58887,-28.40625 L 94.58887,-13.40625" ></path>
</g>
</svg>
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Created with dep2pict 2.30.2 -->
<svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="303.04297" height="140.53906">
<rect x="0" y="0" width="303.04297" height="140.53906" style="fill:white;fill-opacity:1;" />
<g transform="translate(0,94.89844) scale(2,2)">
<text id="word__N_1" x="22.5186" y="-14.4062" font-style="normal" font-weight="normal" fill="black" font-size="12" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="22.5186" dy="12.8633">head</tspan>
</text>
<text id="subword__N_1" x="22.5186" y="-1.54297" fill="black" font-size="7" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="22.5186" dy="8.33691">X</tspan>
</text>
<text id="word__N_2" x="62.5371" y="-14.4062" font-style="normal" font-weight="normal" fill="black" font-size="12" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="62.5371" dy="12.8633">w2</tspan>
</text>
<text id="subword__N_2" x="62.5371" y="-1.54297" fill="black" font-size="7" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="62.5371" dy="8.33691">X</tspan>
</text>
<text id="word__N_3" x="97.417" y="-14.4062" font-style="normal" font-weight="normal" fill="black" font-size="12" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="97.417" dy="12.8633">w3</tspan>
</text>
<text id="subword__N_3" x="97.417" y="-1.54297" fill="black" font-size="7" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="97.417" dy="8.33691">X</tspan>
</text>
<text id="word__N_4" x="132.159" y="-14.4062" font-style="normal" font-weight="normal" fill="black" font-size="12" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="132.159" dy="12.8633">w4</tspan>
</text>
<text id="subword__N_4" x="132.159" y="-1.54297" fill="black" font-size="7" font-family="Arial" text-anchor="middle" text-align="center">
<tspan x="132.159" dy="8.33691">X</tspan>
</text>
<marker id="markerendword_0" markerWidth="5" markerHeight="5" markerUnits="userSpaceOnUse" orient="auto" refX="2" refY="2">
<path d="M0,0 l4,2 l-4,2 z" style="fill:black;"/>
</marker>
<text id="label__N_1__N_2__fixed" x="40.01855" y="-24.40625" style="fill:black;font-size:5px;font-family:Arial;text-anchor:middle;text-align:center" >fixed</text>
<path style="marker-end:url(#markerendword_0);" stroke="black" fill="none" d="M 22.51855,-13.40625 22.51855,-18.40625 A 3 3 0 0 1 25.51855,-21.40625 L 54.53711,-21.40625 A 3 3 0 0 1 57.53711,-18.40625 L 57.53711,-13.40625" ></path>
<marker id="markerendword_1" markerWidth="5" markerHeight="5" markerUnits="userSpaceOnUse" orient="auto" refX="2" refY="2">
<path d="M0,0 l4,2 l-4,2 z" style="fill:black;"/>
</marker>
<text id="label__N_2__N_3__fixed" x="82.03711" y="-24.40625" style="fill:black;font-size:5px;font-family:Arial;text-anchor:middle;text-align:center" >fixed</text>
<path style="marker-end:url(#markerendword_1);" stroke="black" fill="none" d="M 67.53711,-13.40625 67.53711,-18.40625 A 3 3 0 0 1 70.53711,-21.40625 L 94.41699,-21.40625 A 3 3 0 0 1 97.41699,-18.40625 L 97.41699,-13.40625" ></path>
<marker id="markerendword_2" markerWidth="5" markerHeight="5" markerUnits="userSpaceOnUse" orient="auto" refX="2" refY="2">
<path d="M0,0 l4,2 l-4,2 z" style="fill:black;"/>
</marker>
<text id="label__N_2__N_4__fixed" x="97.03711" y="-34.40625" style="fill:black;font-size:5px;font-family:Arial;text-anchor:middle;text-align:center" >fixed</text>
<path style="marker-end:url(#markerendword_2);" stroke="black" fill="none" d="M 62.53711,-13.40625 62.53711,-28.40625 A 3 3 0 0 1 65.53711,-31.40625 L 129.15918,-31.40625 A 3 3 0 0 1 132.15918,-28.40625 L 132.15918,-13.40625" ></path>