ufal / perl-pmltq

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

index different types of nodes separately #50

Open Ansa211 opened 6 years ago

Ansa211 commented 6 years ago

querying for t-root [ a-node [ t-node [ a-node [] ] ] ] really should not match anything internal indexes are the same for nodes of different kinds: PMLTQ-NROU

SELECT DISTINCT
  "t"."#idx" AS "t.#idx",
  "realchild"."#idx" AS "realchild.#idx",
  "falsechild"."#idx" AS "falsechild.#idx"
FROM
  "t-root" "t"
   JOIN "t-node" "realchild" ON "t"."#idx"="realchild"."#parent_idx"
   JOIN "a-node" "falsechild" ON "t"."#idx"="falsechild"."#parent_idx"
) "#qnodes"
) "#count" LIMIT 1000;
matyaskopp commented 6 years ago

test query: 78292e6f2ef3eec6e431b75bb404553ad032ac2f