-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Examples of MRS/ERS in PENMAN format? #130
Comments
Yes, i'll try to give some examples below. Note: I haven't worked out a PENMAN representation of MRS, as its ability for an argument to select a node or a scope (which is a set of nodes, thus requiring hyperedges) is difficult to represent as a simple DAG, but I do have a working representation for two dependency-based representations of MRS (EDS and DMRS), which avoid being hypergraphs by select a "representative node" out of a scope. EDSI parse a sentence, e.g., "Kim gave Sandy the book", with ACE and the 1214 version of the ERG then convert using PyDelphin as follows: goodmami@tpy:~/repos/pydelphin$ ace -g ~/grammars/erg-1214-x86-64-0.9.25.dat <<< "Kim gave Sandy the book." -Tq1 | ./delphin.sh convert --to eds-penman --no-properties The result is: (e2 / _give_v_1
:lnk "<4:8>"
:ARG1 (x3 / named
:lnk "<0:3>"
:carg "Kim"
:BV-of (_1 / proper_q
:lnk "<0:3>"))
:ARG2 (x9 / _book_n_of
:lnk "<19:24>"
:BV-of (_3 / _the_q
:lnk "<15:18>"))
:ARG3 (x10 / named
:lnk "<9:14>"
:carg "Sandy"
:BV-of (_2 / proper_q
:lnk "<9:14>"))) I turned off properties, like Note: the PyDelphin conversion to EDS does not use all EDS features, but the results should still be valid. Also see http://moin.delph-in.net/EdsTop#Alternative_Serializations for Stephan Oepen's version; his (using the LKB instead of ACE, and with support for all EDS features) is available via the web-API, e.g.:
(sorry, no frontend for it right now). Here's a few more examples from PyDelphin: ; "The cheerful children wanted to sing and dance."
(e2 / _want_v_1
:lnk "<22:28>"
:ARG1 (x3 / _child_n_1
:lnk "<13:21>"
:BV-of (_1 / _the_q
:lnk "<0:3>")
:ARG1-of (e8 / _cheerful_a_1
:lnk "<4:12>"))
:ARG2 (e14 / _and_c
:lnk "<37:40>"
:L-INDEX (e11 / _sing_v_1
:lnk "<32:36>"
:ARG1 x3)
:R-INDEX (e15 / _dance_v_1
:lnk "<41:47>"
:ARG1 x3)
:L-HNDL e11
:R-HNDL e15))
; "This technique is impossible to apply."
(e2 / _impossible_a_for
:lnk "<18:28>"
:ARG1 (e11 / _apply_v_2
:lnk "<32:38>"
:ARG2 (x3 / _technique_n_1
:lnk "<5:14>"
:BV-of (_1 / _this_q_dem
:lnk "<0:4>"))))
; "All dogs chased a cat."
(e2 / _chase_v_1
:lnk "<9:15>"
:ARG1 (x3 / _dog_n_1
:lnk "<4:8>"
:BV-of (_1 / _all_q
:lnk "<0:3>"))
:ARG2 (x8 / _cat_n_1
:lnk "<18:22>"
:BV-of (_2 / _a_q
:lnk "<16:17>"))) DMRSDMRS is very similar to EDS but retains scope information through secondary edge labels. Here are the same examples (just change the ; "Kim gave Sandy the book."
(10002 / _give_v_1
:lnk "<4:8>"
:ARG1-NEQ (10001 / named
:lnk "<0:3>"
:carg "Kim"
:RSTR-H-of (10000 / proper_q
:lnk "<0:3>"))
:ARG3-NEQ (10004 / named
:lnk "<9:14>"
:carg "Sandy"
:RSTR-H-of (10003 / proper_q
:lnk "<9:14>"))
:ARG2-NEQ (10006 / _book_n_of
:lnk "<19:24>"
:RSTR-H-of (10005 / _the_q
:lnk "<15:18>")))
; "The cheerful children wanted to sing and dance."
(10003 / _want_v_1
:lnk "<22:28>"
:ARG1-NEQ (10002 / _child_n_1
:lnk "<13:21>"
:RSTR-H-of (10000 / _the_q
:lnk "<0:3>")
:ARG1-EQ-of (10001 / _cheerful_a_1
:lnk "<4:12>"))
:ARG2-H (10005 / _and_c
:lnk "<37:40>"
:L-HNDL-HEQ (10004 / _sing_v_1
:lnk "<32:36>"
:ARG1-NEQ 10002)
:L-INDEX-NEQ 10004
:R-HNDL-HEQ (10006 / _dance_v_1
:lnk "<41:47>"
:ARG1-NEQ 10002)
:R-INDEX-NEQ 10006))
; "This technique is impossible to apply."
(10002 / _impossible_a_for
:lnk "<18:28>"
:ARG1-H (10003 / _apply_v_2
:lnk "<32:38>"
:ARG2-NEQ (10001 / _technique_n_1
:lnk "<5:14>"
:RSTR-H-of (10000 / _this_q_dem
:lnk "<0:4>"))))
; "All dogs chased a cat."
(10002 / _chase_v_1
:lnk "<9:15>"
:ARG1-NEQ (10001 / _dog_n_1
:lnk "<4:8>"
:RSTR-H-of (10000 / _all_q
:lnk "<0:3>"))
:ARG2-NEQ (10004 / _cat_n_1
:lnk "<18:22>"
:RSTR-H-of (10003 / _a_q
:lnk "<16:17>"))) Sadly, DMRS is not available via Stephan's server. Also see this utility I created for some experiments doing neural generation from PENMAN-serialized DMRS. We used the utility to convert the Redwoods corpus. |
@nschneid is this what you're looking for? Or can I help you with something else? |
Closing this issue. Please reopen if I didn't answer your question. Thanks |
@goodmami, thanks, this gives me a flavor of ERS. The DMRS variant is still a mystery to me, but I haven't got around to watching Emily's tutorial. |
Thanks for responding. I should have mentioned that the ; "All dogs chased a cat." (EDS version)
(e2 / _chase_v_1
:ARG1 (x3 / _dog_n_1
:BV-of (_1 / _all_q))
:ARG2 (x8 / _cat_n_1
:BV-of (_2 / _a_q)))
; "All dogs chased a cat." (DMRS version)
(e2 / _chase_v_1
:ARG1-NEQ (x3 / _dog_n_1
:RSTR-H-of (_1 / _all_q))
:ARG2-NEQ (x8 / _cat_n_1
:RSTR-H-of (_2 / _a_q))) |
Hi, I am trying to convert the MRS/EDS of sdp2015 into penman style. I found some of the sentences could not be converted though they are not disconnected. Here is an example: sentence: MRS: EDS: the graph: When I run the conversion code in pydelphin, the error occurred as |
@PKUzilin I think this should be in a separate issue. Please follow #156 instead. Thanks! |
I gather from https://github.com/delph-in/pydelphin/wiki/delphin.mrs.penman that MRS structures can be displayed in PENMAN notation. For those of us who are familiar with that notation, can some examples be shown in that notation, e.g. the ones from http://moin.delph-in.net/ErgSemantics/Essence?
The text was updated successfully, but these errors were encountered: