ufal / perl-pmltq

Query engine and query language for trees in PML format
3 stars 2 forks source link

Sibling relation in Treex treebanks #6

Open m1ch4ls opened 10 years ago

m1ch4ls commented 10 years ago

Node $prepspecwhr should have $prep as a left sibling. Sometimes it works sometimes it doesn't.

a-node $prepspecwhr := 
[ sibling{-1,-1} a-node $prep := 
     [ lemma !in {"whereas", "while", "because", "hence", "therefore", "thus", "that", "if", "whether"}, sons() = 0 ] ];

image

The problem here is the ordering of the nodes inside of the document. Treex sorts nodes by #ORDER attribute, but PML-TQ seems to ignore that completely a takes the order as the nodes were saved, which is not always in the order.

To solve this:

  1. Is this Treex only issue or can this happen for other treebanks as well?
  2. IF 1. : Either hack PML-TQ so i behaves differently for Treex treebanks or hack Treex to save the nodes in order
  3. ELSE: Develop proper fix so ordering is always taken into account
choroba commented 10 years ago

As far as I remember, this problem existed already before Treex in TrEd.