sinantie / NeuralAmr

Sequence-to-sequence models for AMR parsing and generation
http://www.ikonstas.net/code
69 stars 17 forks source link

Not able to generate text from AMR #13

Closed ritwikmishra closed 5 years ago

ritwikmishra commented 5 years ago

I installed every requirement correctly. Checked multiple times. But when I try to generate text from the (full) sample example (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")))

(by saving it in input_file and running $ ./generate_amr.sh input_file full)

I get the following error:

full    
/home/<user-name>/torch/install/bin/luajit: evaluate.lua:9: src_file does not exist
stack traceback:
    [C]: in function 'assert'
    evaluate.lua:9: in function 'main'
    evaluate.lua:208: in main chunk
    [C]: in function 'dofile'
    ...dent/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
    [C]: at 0x00405d50

when I use standard AMR format in input_file. I get the following error (on the command $ ./generate_amr.sh input_file) Contents of input_file

# ::id 1
# ::snt As long as what is in your bowl  is SexCereal, that is – or so its makers claim.
# ::tok As long as what is in your bowl  is SexCereal , that is – or so its makers claim .
(x19 / claim-01
    :ARG1 (x15 / or
        :op1 (x10 / sexcereal
            :ARG1 (x8 / bowl))
        :op1 (x16 / so))
    :ARG1 (x18 / make-01))

ERROR

resources/sample-data/sample-amr.txt    
Couldn't get I/O for the connection to: localhost
resources/sample-data/sample-amr.txt.anonymized 
/home/student/torch/install/bin/luajit: evaluate.lua:22: attempt to index local 'file' (a nil value)
stack traceback:
    evaluate.lua:22: in function 'main'
    evaluate.lua:208: in main chunk
    [C]: in function 'dofile'
    ...dent/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
    [C]: at 0x00405d50

How to proceed?

antonionetoo commented 5 years ago

I had the same error as you when I tried execute.

You executed like this

./generate_amr.sh input_file full

But the correct way to run is:

./generate_amr.sh full input_file

ritwikmishra commented 5 years ago

Solved Thank you @antonionetoo