Giter Site home page Giter Site logo

delphin's Introduction

delphin's People

Contributors

arademaker avatar

Stargazers

Guilherme Lima avatar  avatar

Watchers

 avatar

delphin's Issues

parsing Ace Output

I need a parser to parse the Ace Output evoking the parseMRS (ace -g .. -T) but eventually also capable in the future to process the whole derivation (ace with no -T)

scope resolution

I know that LKB has a scope resolution code. See also https://aclanthology.org/P04-1032.pdf. It may not be as efficient as https://github.com/coli-saar/utool, but it can be a starting point.

LKB> (let* ((sentence "every boy loves a woman.")
	    (user-input (lkb::split-into-words sentence)))
       (lkb::parse user-input nil)
       (when *parse-record*
	 (let* ((edges *parse-record*)
		(mrs (mrs::extract-mrs (car edges))))
	   (setf mrs::*canonical-bindings* nil)
	   (format t "mrs: ~a~%" mrs)
	   (let* ((binding-sets (mrs::make-scoped-mrs mrs)))
	     (loop for binding in binding-sets
		      do (setf mrs::*canonical-bindings* (mrs::canonical-bindings binding))
			 (let* ((gq-exp (mrs::output-gq-mrs mrs))
				; (fol (mrs::convert-gq-to-fol-top gq-exp))
				)
			   (format t "~%~%~A ~%~A ~%~A ~%~A" 
				   sentence binding-sets mrs::*canonical-bindings* gq-exp)))))))
mrs: h1:e3:{ h4:"_every_q"(x6 h7 h5) h8:"_boy_n_1"(x6) h2:"_love_v_1"(e3 x6 x9) h10:"_a_q"(x9 h12 h11) h13:"_woman_n_1"(x9) }{ h1 qeq h2, h7 qeq h8, h12 qeq h13 }


every boy loves a woman. 
(((13 12 13) (10 5 10) (2 11 2) (8 7 8) (4 1 4) (1 1 4) (11 11 2) (12 12 13) (5 5 10) (7 7 8)) ((13 12 13) (10 1 10) (2 5 2) (8 7 8) (4 11 4) (1 1 10) (11 11 4) (12 12 13) (5 5) (7 7 8))) 
((4 . 4) (1 . 4) (8 . 8) (7 . 8) (2 . 2) (11 . 2) (10 . 10) (5 . 10) (13 . 13) (12 . 13)) 
(_EVERY_Q ?X6 (_BOY_N_1 ?X6) (_A_Q ?X9 (_WOMAN_N_1 ?X9) (_LOVE_V_1 ?E3 ?X6 ?X9)))

every boy loves a woman. 
(((13 12 13) (10 5 10) (2 11 2) (8 7 8) (4 1 4) (1 1 4) (11 11 2) (12 12 13) (5 5 10) (7 7 8)) ((13 12 13) (10 1 10) (2 5 2) (8 7 8) (4 11 4) (1 1 10) (11 11 4) (12 12 13) (5 5) (7 7 8))) 
((4 . 4) (11 . 4) (8 . 8) (7 . 8) (2 . 2) (5 . 2) (10 . 10) (1 . 10) (13 . 13) (12 . 13)) 
(_A_Q ?X9 (_WOMAN_N_1 ?X9) (_EVERY_Q ?X6 (_BOY_N_1 ?X6) (_LOVE_V_1 ?E3 ?X6 ?X9)))

In the Utool documentation, these bindings are the plugging-lkb format! But the docs do not describe these triples.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.