ufal / perl-pmltq-web

Simple web build on the top of the PML Tree Query server
https://lindat.mff.cuni.cz/services/pmltq/
0 stars 0 forks source link

query turns into gibberish upon executing #89

Closed Ansa211 closed 6 years ago

Ansa211 commented 7 years ago

Whenever I try to run the following query:

# count instances of productively derived nouns
# with a lemma among those that appear with the CPHR functor
# an instance is counted as many times as there are eparents
t-node $a := [ 
  a/lex.rf a-node $aa := [],
  t_lemma ~ "^(napomenutí|podnikání|usnesení|překvapení|oznámení|utahování|psaní|léčení|napětí|povolení|odhodlání|vyjednávání|zdání|rozčarování|podezření|řešení|uzdravování|zpoždění|hodnocení|opatření|tažení|uplatnění|obsazení|oprávnění|stíhání|zmocnění|barvení|omezení|spojení|doporučení|potěšení|pověření|nadšení|ubytování|vyšetření|pobouření|tvrzení|uhrazení|odvolání|pohoršení|vypovídání|použití|obvinění|prohlášení|znárodnění|přesvědčení|znepokojení|řízení|uspokojení|vysvětlení|přání|tušení|rozhodnutí|čtení|jednání|ohledání|ujištění)$",
  #val_frame.rf v-frame $vf := [ id ~ "^(v-w3564f1|v-w5367f1|v-w6361f3|v-w5868f2|v-w9667f1|v-w1991f2|v-w5868f1|v-w120f1|v-w1670f1|v-w4992f1|v-w3326f2|v-w7982f1|v-w1078f1|v-w4131f1|v-w9645f1|v-w5636f1|v-w9806f2|v-w2960f3|v-w3600f1|v-w3683f1|v-w6954f1|v-w7479f2|v-w4165f2|v-w7364f1|v-w4662f3|v-w6941f1|v-w4861f2|v-w5886f3|v-w6979f1|v-w3564f2|v-w1322f1|v-w2582f1|v-w3111f1|v-w4146f1|v-w6793f1|v-w7313f1|v-w9700f1|v-w6522f2|v-w4355f1|v-w7211f2|v-w2563f3|v-w353f1|v-w8417f1|v-w3149f3|v-w4069f1|v-w668f1|v-w5572f1|v-w2582f2|v-w8231f1|v-w7050f1|v-w3326f3|v-w2993f1|v-w3075f1|v-w2150f1|v-w2714f1|v-w1991f1|v-w2126f1|v-w4662f1|v-w3506f1|v-w4069f2|v-w9373f1|v-w4165f1|v-w8434f1|v-w7323f1|v-w7083f1)$",],
  eparent t-node $p := [ ],
];

>> for if($a.functor="CPHR" and $p.gram/sempos ~ '^v' and $p.t_lemma != "být","verbal","nominal"), $a.t_lemma give $1, $2, count()
>> distinct $1, sum($3 over $1), count(over $1)&" lemmas" sort $1

I get a correct result, but the content of the query window changes to gibberish: saved query

(Any permanent link to the query also contains the same gibberish.)

matyaskopp commented 7 years ago

I have found even shorter query that cause the same error

#val
a-node []

problem is in javascript lz-string library. The query is compressed according to it

matyaskopp commented 7 years ago

fixed with https://github.com/ufal/perl-pmltq-web/commit/74e53de898b146245c6c6e83d6bfcfc2a63d4107

matyaskopp commented 6 years ago

Dear Lindat people,   When entering the query:   terminal[form='what']   in PTB Brown, it correctly executes but the query changes into   헫犋헫헫犋犋诰犋诰헫헫€햡   This happens both in Firefox and in Chrome, on a Windows (7) machine.   What is happening? Overenthousiastic character encoding detection which misfires completely? I compared the hexadecimal  codes of both strings but can’t see an easy relation between them.   Thanks Jan

matyaskopp commented 6 years ago

8ff45a21d4ae033888716246b5938f4ca6489b0a