amrisi / amr-guidelines

246 stars 87 forks source link

AMR in AMR #271

Closed flipz357 closed 10 months ago

flipz357 commented 10 months ago

How would I best parse the sentence: "The cat runs is represented by the AMR "(r / run-01 :arg0 (c / cat))"...

Something like

(r / represent-01
     :arg0 (r / run-01
                     :arg0 (c / cat))
     :arg1 r
     :arg2 (m / meaning))

or

(r / represent-01
     :arg0 (r / run-01
                     :arg0 (c / cat))
     :arg1 (r2 / run-01
                     :arg0 (c2 / cat))
     :arg2 (m / meaning))

or rather

(r / represent-01
     :arg0 (s / string-entitiy
                     :op1 "(r / run-01 :arg0 (c / cat))")
     :arg1 (r2 / run-01
                     :arg0 (c2 / cat))
     :arg2 (m / meaning))

Maybe some version of the last approach is preferable?

nschneid commented 10 months ago

My gut feeling is that it's a string entity, because AMR notation is external to the language being annotated (English), or indeed, any natural language.

flipz357 commented 10 months ago

Yes that was my gut feel as well, thx!

flipz357 commented 9 months ago

@nschneid At least.... it's a fun challenge for a sota parser:

# This is a so-called abstract meaning representation for the sentence "The cat runs":  "(r / run-01 :arg0 (c / cat))"
(r / representation-02
   :ARG0 (t / this)
   :ARG1 (s / sentence
            :wiki -
            :name (n / name
                     :op1 "The"
                     :op2 "cat"
                     :op3 "run"))
   :mod (a / abstract)
   :mod (s2 / so-called)
   :ARG1-of (m / mean-01
               :ARG2 (s3 / string-entity
                         :value "avar0"
                         :ARG1-of (m2 / mean-01
                                      :ARG2 (s4 / string-entity
                                                :value "c")))))

(needed to sligthly adjust the example sentence since the other example sentence didn't work at all)

jheinecke commented 6 months ago

@nschneid, in case of taking

(r / represent-01
     :arg0 (s / string-entitiy
                     :op1 "(r / run-01 :arg0 (c / cat))")
     :arg1 (r2 / run-01
                     :arg0 (c2 / cat))
     :arg2 (m / meaning))

as the correct representation, are white spaces allowed in :op1 or should we split the string into

:op1 "(r/run-01" :arg0 (c / cat))")
:op2 ":arg0")
:op3 "(c/cat))"

or any other split or way to avoid spaces ?

The AMR guidelines are not explicit about spaces, but all examples in the guidelines (and in the LDC data) use :op1 ... :opN for strings instead of spaces

nschneid commented 6 months ago

Representing symbolic notation in AMR is uncharted territory AFAIK.

That said, the string-entity docs here only show an :op1 and it can contain spaces within the double quotes. As long as it's all on one line I think it should be fine.