KorAP / Koral

:pencil: Translation of query languages to serialized KoralQuery protocol
BSD 2-Clause "Simplified" License
10 stars 4 forks source link

Serialization of Spans in Cosmas-II #29

Closed Akron closed 7 years ago

Akron commented 7 years ago

Currently #ELEM(base/s=s) is serialized as

"query": {
    "@type": "koral:span",
    "attr": {
      "@type": "koral:term",
      "foundry": "base",
      "key": "s",
      "layer": "s",
      "match": "match:eq"
    }
  }

instead of

 "query": {
    "@type": "koral:span",
    "wrap": {
      "@type": "koral:term",
      "foundry": "base",
      "key": "s",
      "layer": "s"
    }
  }

That's pretty bad, and means all #ELEM() queries fail.

Akron commented 7 years ago

This is especially annoying as we have the COSMAS II example query d* MORPH(mate/p=ADJA) $Baum #IN #ELEM(base/s=s)

Akron commented 7 years ago

Fixed in https://github.com/KorAP/Koral/commit/128ff61f358f73329613a3b86b30bf53c24b81ba (Although behaviour with multiple attributes is undefined).