snowblink14 / smatch

Smatch tool: evaluation of AMR semantic structures
MIT License
63 stars 25 forks source link

Support for ~e.2 etc. #17

Open cparjaszewski opened 5 years ago

cparjaszewski commented 5 years ago

Hello,

I've the following AMR format, but it raises a warning and error:

# ::tok Hallmark could make a fortune off of this guy .
# ::alignments 0-1.1.1.2.1 1-1 2-1.1 4-1.1.2 6-1.1.2.1.r 7-1.1.2.1.1 8-1.1.2.1
(p / possible-01~e.1 
      :ARG1 (m / make-05~e.2 
            :ARG0 (c / company :wiki "Hallmark_Cards" 
                  :name (n / name :op1 "Hallmark"~e.0)) 
            :ARG1 (f / fortune~e.4 
                  :source~e.6 (g / guy~e.8 
                        :mod (t / this~e.7)))))

These are the errors:

File 1 has error/warning message:
*** Line 3 - Ignoring unexpected tokens: (p / possible-01~e.1 
*** Line 4 - Ignoring unexpected token: :ARG1 
*** Line 4 - Ignoring unexpected tokens: (m / make-05~e.2 
*** Line 5 - Ignoring unexpected token: :ARG0 
*** Line 6 - Ignoring unexpected token: "Hallmark"~e.0 
*** Line 7 - Ignoring unexpected token: :ARG1 
*** Line 7 - Ignoring unexpected tokens: (f / fortune~e.4 
*** Line 8 - Ignoring unexpected token: :source~e.6 
*** Line 8 - Ignoring unexpected tokens: (g / guy~e.8 
*** Line 9 - Ignoring unexpected token: :mod 
*** Line 9 - Ignoring unexpected tokens: (t / this~e.7 
*** Line 9 - Non-matching close parenthesis. 
*** Line 9 - Non-matching close parenthesis. 
*** Line 9 - Non-matching close parenthesis. 
*** Line 9 - Non-matching close parenthesis. 
*** Line 9 - Non-matching close parenthesis. 
11 errors and 5 warnings in 9 lines. 

File 2 has error/warning message:
*** Line 3 - Ignoring unexpected tokens: (p / possible-01~e.1 
*** Line 4 - Ignoring unexpected token: :ARG1 
*** Line 4 - Ignoring unexpected tokens: (m / make-05~e.2 
*** Line 5 - Ignoring unexpected token: :ARG0 
*** Line 6 - Ignoring unexpected token: "Hallmark"~e.0 
*** Line 7 - Ignoring unexpected token: :ARG1 
*** Line 7 - Ignoring unexpected tokens: (f / fortune~e.4 
*** Line 8 - Ignoring unexpected token: :source~e.6 
*** Line 8 - Ignoring unexpected tokens: (g / guy~e.8 
*** Line 9 - Ignoring unexpected token: :mod 
*** Line 9 - Ignoring unexpected tokens: (t / this~e.7 
*** Line 9 - Non-matching close parenthesis. 
*** Line 9 - Non-matching close parenthesis. 
*** Line 9 - Non-matching close parenthesis. 
*** Line 9 - Non-matching close parenthesis. 
*** Line 9 - Non-matching close parenthesis. 
11 errors and 5 warnings in 9 lines. 

Is the AMR in the correct format? Is something missing within Smatch?

snowblink14 commented 5 years ago

~e.x is probably not supported in smatch right now. Is there any recent AMR guideline referring to this? If so, can you send the link?

nschneid commented 5 years ago

This is the output of the ISI aligner. I take it that smatch expects the plain AMR, without automatic alignments to words of the sentence. (The AMR data releases include both kinds.)

ramon-astudillo commented 2 years ago

Support for ISI alignments would be very welcome! as e.g. Penman does

https://penman.readthedocs.io/en/latest/api/penman.surface.html