Open anthorax1234 opened 4 years ago
[2] marks the edge to Global Node,y1+3 marks the orgin type edge, and y1+3+self.real.size marks the inversed type edge, they are just numbers and represent the directed edge with different type you can read the paper to know more about the Graph LEVI transfrom
maybe you can print the rel to see what it is exactly
Thanks!
Edit: I understood that they represent the directed edge with different type and have printed it before, so were the [2] and "+3" are just chosen arbitrarily?
p.s. Although the paper doesn't explicitly mention anything LEVI Graph transforms, the transform is implicitly one.
I understood that they represent the directed edge with different type and have printed it before, so were the [2] and "+3" are just chosen arbitrarily?
The rel root is specified in the REL
vocab. See that line
self.REL.special = ['<pad>','<unk>','ROOT']
in lastDataset
and hence [2] is the index to that root in the REL.special
list.
Hi, I am going over the input data code, particularly the mkGraphs function. I'm a bit confused on the rel matrix, where rel is the list. What exactly is this rel list? Why does it start with [2] and is further extended with ([y[1]+3,y[1]+3+self.REL.size]). Thanks!