sinantie/NeuralAmr

Error while using full format

Closed this issue · 1 comments

Hi,
I was trying to use the tool to generate sentences from an AMR.
When I used the stripped format for sentence generation. It worked fine I used the example as given in the README.md i.e. - 'hold :ARG0 ( person :ARG0-of ( have-org-role :ARG1 (country :name "United States") :ARG2 official)) :ARG1 (meet :ARG0 (person :ARG1-of expert :ARG2-of group)) :time (date-entity :year 2002 :month 1) :location (city :name "New York" )' this generated a sentence.

But when I tried the generation using full AMR for the example given in the README.md i.e. - '(h / hold-04 :ARG0 (p2 / person :ARG0-of (h2 / have-org-role-91 :ARG1 (c2 / country :name (n3 / name :op1 “United" op2: “States”)) :ARG2 (o / official))) :ARG1 (m / meet-03 :ARG0 (p / person :ARG1-of (e / expert-01) :ARG2-of (g / group-01))) :time (d2 / date-entity :year 2002 :month 1) :location (c / city :name (n / name :op1 “New" :op2 “York”)))', I got this error - 'Program should never enter here !' and 'Failed to parse.' but when I tried smaller full AMRs like - '(w / write :arg1 (s / something))' it worked fine and I got a sentence as an output.

So, my question is what is causing this error and how can we fix it ?

There are a couple of bugs in the full AMR of the example of the README.MD, which have now been fixed: the first 'op2:' is not a proper role, it should be : ':op2', and the double quotes before 'United', 'States', 'New' and 'York' are of the wrong type: “ instead of ".