delph-in / delphin-viz

JavaScript visualizations of various DELPH-IN structures.

Home Page:http://delph-in.github.io/delphin-viz/demo/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mrsData.variables[varName] is undefined

goodmami opened this issue · comments

The following error occurs when parsing "Adi tahu bahwa hujan sudah turun." with INDRA:

mrsData.variables[varName] is undefined

This appears to be because every EP has an argument CARDIN bool, which seems to be a bug in the grammar (at least, the MRS is ill-formed), and bool is not a valid variable name.

The problem is that this error causes the DMRS to fail to be displayed, although it does display if the MRS box is unchecked (it appears to just ignore the rogue roles). The MRS layout function could be a bit more robust for bad inputs like this.

Note, the issue no longer shows up since I updated INDRA because the grammar bug was fixed, but the problem occurred around here:

delphin-viz/viz/mrs.js

Lines 329 to 335 in 1d48c20

).filter(function (){
// only draw tooltip for variables of type e and x probably should
// be doing the test against whether corresponding mrs variable
// object has "properties" field or not.
var varName = $(this).data('var');
return mrsData.variables[varName].hasOwnProperty("properties");
}).tooltip({