Skip to content
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

Export to Prolog #8

Closed
1 of 4 tasks
goodmami opened this issue Sep 2, 2013 · 2 comments
Closed
1 of 4 tasks

Export to Prolog #8

goodmami opened this issue Sep 2, 2013 · 2 comments

Comments

@goodmami
Copy link
Member

goodmami commented Sep 2, 2013

MRSs can fairly easily be exported to Prolog, but it is a lossy conversion, so it is not easy (or possible?) to map from Prolog to MRS. Write an Prolog encoder.

  • Find the formatting schematics (possibly in LOGON Lisp code)
  • Get some examples to test against
  • Write the exporter
  • Test against examples
@goodmami
Copy link
Member Author

goodmami commented Sep 7, 2016

I found this example from http://www.coli.uni-saarland.de/projects/chorus/utool/docs/3.1.1/manual/0005.html#toc15:

psoa(h1,e2,
  [ rel('prop-or-ques_m',h1,
        [ attrval('ARG0',e2),
          attrval('MARG',h3),
          attrval('PSV',u4),
          attrval('TPC',u5) ]),
    rel('_every_q',h6,
        [ attrval('ARG0',x7),
          attrval('RSTR',h9),
          attrval('BODY',h8) ]),
    rel('_dog_n_1',h10,
        [ attrval('ARG0',x7) ]),
    rel('_bark_v_1',h11,
        [ attrval('ARG0',e2),
          attrval('ARG1',x7) ]) ],
  hcons([ qeq(h3,h11), qeq(h9,h10) ]))

There's another example here: http://qtleap.eu/wp-content/uploads/2015/11/QTLEAP-2015-D4.10.pdf

It actually looks a lot like SimpleMrs except it doesn't have variable properties. I haven't seen a good example of constants, and I doubt anyone has put ICONS in one, but I can guess at how this would be done.

And there is lisp code in $LOGON/lingo/lkb/src/mrs/basemrs.lisp, but it's easier to read the examples linked above.

@goodmami goodmami modified the milestone: v0.6.0 Jan 4, 2017
@goodmami goodmami modified the milestones: v0.6.0, v0.7.0 Jan 19, 2017
@goodmami
Copy link
Member Author

From the LKB, here's one with a CARG:

psoa(h1,e3,
  [ rel('proper_q',h4,[attrval('ARG0',x6),attrval('RSTR',h5),attrval('BODY',h7)]),
    rel('named',h8,[attrval('ARG0',x6),attrval('CARG','Abrams')]),
    rel('_sleep_v_1',h2,[attrval('ARG0',e3),attrval('ARG1',x6)])],
  hcons([qeq(h1,h2),qeq(h5,h8)]))

(note: i retyped that because the LKB window didn't allow selecting and copying... formatting is my own, and there may be errors)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant