Refer to node 0
I am struggling to handle dependencies where the head is 0.
my input file:
# sent_id = DW-s120
# text = Kay plazo pasa -pti -lla -n -mi qullqi -qa mana interés -niyuq hurqu -sqa ka -nman .
1 Kay _ DET Root PronType=Det 2 det _ Feats=PrnDem
2 plazo _ NOUN Root _ 3 subj _ Feats=NRootES
3 pasa _ VERB Root _ 15 sub _ Feats=VRootES
4 -pti _ NS NS 3 ns _ Feats=+DS
5 -lla _ Amb Amb _ 3 nmod _ _
6 -n _ NPers SUFFIX Person=3|Number=Sing|Poss=Yes 4 s.poss.subj _ Feats=+3.Sg.Poss
7 -mi _ Amb Amb Evident=DirE 15 ev _ Feats=+DirE
8 qullqi _ NOUN Root _ 15 subj _ Gloss=plata|Feats=NRoot
9 -qa _ Amb Amb Topic=Yes 8 topic _ Feats=+Top
10 mana _ Root Root _ 11 neg _ _
11 interés _ NOUN Root _ 12 s.arg _ Feats=NRootES
12 -niyuq _ NDeriv NDeriv Poss=Yes 13 nmod _ Feats=+Poss
13 hurqu _ VERB Root _ 15 pred _ Gloss=sacar|Feats=VRoot
14 -sqa _ NS NS Aspect=Perf 13 ns _ Feats=+Perf
15 ka _ VERB Root _ 0 ser _ Gloss=ser|Feats=VRoot
16 -nman _ VPers_Mod SUFFIX Person=3|Number=Sing 15 s.subj _ Feats=+3.Sg.Subj|+Pot
17 . _ PUNCT $. _ 0 punct _ _
I would like to change the relations on IDs 15 and 17. Their heads are 0. The documentation mentions that a node at position 0 was created for this purpose, and that identifying IDs can be done using position
.
I made a tiny test file to test using this on node 0:
rule zero{
pattern{
Zero [position=0];
P [upos=PUNCT];
Zero -[punct]-> P;
}commands{
del_edge Zero -[punct]-> P;
add_edge Zero -[ZERO]-> P;
}
}
strat main {Onf(zero)}
I would expect this to change the deprel of ID 17 to ZERO, but there is no change in the file (and no error). Is there another method I should be using to refer to the 0 node?