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

missing visualisation of sentences with no matching node with optional selector #80

Closed Ansa211 closed 7 years ago

Ansa211 commented 7 years ago

Compare the output of the following two queries - they differ by a single dot on the third line of the query: http://hdl.handle.net/11346/PMLTQ-6UJY http://hdl.handle.net/11346/PMLTQ-5D3K

With the second query, the tree corresponding to the found sentence is not displayed.

matyaskopp commented 7 years ago

Problem occurs when optional selector is used

http://hdl.handle.net/11346/PMLTQ-L7VX

{  
   "nodes":[  
      [ "a", "t-node" ],
      [ "b", "t-node" ],
      [ "g", "a-node" ]
   ],
   "results":[  
      [  
         "353\/t-node@t-cmpr9410-019-p10s2w8",
         "356\/t-node@t-cmpr9410-019-p10s2w11",
         "430\/a-node@a-cmpr9410-019-p10s2w9"
      ],
      [  
         "869\/t-node@t-cmpr9410-019-p26s2w24",
         "870\/t-node@t-cmpr9410-019-p26s2w23",
         null
      ],
...
   ]
}

and no node is matched (second result: null). Function parseNodeName(name) with parameter name=null craches and no tree is rendered (the tree of previous result is used).

matyaskopp commented 7 years ago

fixed with bf2e50e