Add a ranking module to LKB

View: New views
4 Messages — Rating Filter:   Alert me  

Add a ranking module to LKB

by jin norman :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi ALL,

I want to add a ranking module to select the "best" scoped MRS output. I'm not sure whether someone have done similar things before.
And, I want to use SBCL for this development, but there is little information about using LKB with SBCL -- I read through the mail-list archive and most pages in delph-in.net.
Any advice?

Thanks,
Norman

Re: Add a ranking module to LKB

by Francis Bond :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

G'day,

> I want to add a ranking module to select the "best" scoped MRS output. I'm
> not sure whether someone have done similar things before.

There is code that selects the best parse based on the same model used
by pet (i.e. looking at the derivation tree).
Take a look in (tsdb::parse-item).    You would have to ask Stephan
Oepen for more details.

> And, I want to use SBCL for this development, but there is little
> information about using LKB with SBCL -- I read through the mail-list
> archive and most pages in delph-in.net.
> Any advice?

Ben Waldron did some work on this --- enough so that the delphin
branch of the lkb will run using sbcl.

For example I can call the following:
sbcl --dynamic-space-size 2000 --load make-qc.lisp

and it works.   There are some errors doing this using the logon branch.

Ben also had some patches for [incr()  tsdb], which allowed you to do
more interesting batch processing using sbcl, (including running the
generator server) but they have not been merged upstream.


--
Francis Bond <http://www2.nict.go.jp/x/x161/en/member/bond/>
NICT Language Infrastructure Group

P.S. make-qc.lisp
;;;
;;; call with
;;;   time sbcl --dynamic-space-size 2000 --load make-qc.lisp
;;;   time env DISPLAY="" /home/bond/logon/franz/linux.x86.64/alisp -L
make-qc.lisp
;;;
;;;
;;; use more memory
;(setf (sb-ext:BYTES-CONSED-BETWEEN-GCS) 200000000)

(load "/home/bond/delphin/lkb/src/general/loadup")
;(load "/home/bond/delphin/lkb.cvs.good/src/general/loadup")
;(compile-system "lkb" :force t)
(compile-system "lkb")
(defparameter grm-dir "/home/bond/logon/dfki/jacy")
;;;
;;; load jacy, with tdl lexicon
;;;
;(setf *features* (remove :psql *features*))
(read-script-file-aux
 (format nil "~a/lkb/script" grm-dir))
(setf  lkb::*maximum-number-of-edges* '5000)
;;;
;;; create the check-path
;;;
(lkb::with-check-path-list-collection
 "/tmp/checkpaths"
 (lkb::parse-sentences
  (format  nil "~a/testsuites/kinou1.chasen.500" grm-dir)
  (format  nil "/tmp/kinou1.chasen.out" grm-dir)))

(format t "~%All Done!~%")
(quit)

Re: Add a ranking module to LKB

by Francis Bond :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

G'day,

> I want to add a ranking module to select the "best" scoped MRS output. I'm
> not sure whether someone have done similar things before.

There is code that selects the best parse based on the same model used
by pet (i.e. looking at the derivation tree).
Take a look in (tsdb::parse-item).    You would have to ask Stephan
Oepen for more details.

> And, I want to use SBCL for this development, but there is little
> information about using LKB with SBCL -- I read through the mail-list
> archive and most pages in delph-in.net.
> Any advice?

Ben Waldron did some work on this --- enough so that the delphin
branch of the lkb will run using sbcl.

For example I can call the following:
sbcl --dynamic-space-size 2000 --load make-qc.lisp

and it works.

There are some errors doing this using the logon branch.

Ben also had some patches for [incr()  tsdb] which allowed you to do
more interesting batch processing using sbcl (such as running the
generator server) but they have not been merged upstream.

--
Francis Bond <http://www2.nict.go.jp/x/x161/en/member/bond/>
NICT Language Infrastructure Group

P.S. make-qc.lisp
;;;
;;; call with
;;;   time sbcl --dynamic-space-size 2000 --load make-qc.lisp
;;;   time env DISPLAY="" /home/bond/logon/franz/linux.x86.64/alisp -L
make-qc.lisp
;;;
;;;
;;; use more memory
;(setf (sb-ext:BYTES-CONSED-BETWEEN-GCS) 200000000)

(load "/home/bond/delphin/lkb/src/general/loadup")
;(load "/home/bond/delphin/lkb.cvs.good/src/general/loadup")
;(compile-system "lkb" :force t)
(compile-system "lkb")
(defparameter grm-dir "/home/bond/logon/dfki/jacy")
;;;
;;; load jacy, with tdl lexicon
;;;
;(setf *features* (remove :psql *features*))
(read-script-file-aux
 (format nil "~a/lkb/script" grm-dir))
(setf  lkb::*maximum-number-of-edges* '5000)
;;;
;;; create the check-path
;;;
(lkb::with-check-path-list-collection
 "/tmp/checkpaths"
 (lkb::parse-sentences
  (format  nil "~a/testsuites/kinou1.chasen.500" grm-dir)
  (format  nil "/tmp/kinou1.chasen.out" grm-dir)))

(format t "~%All Done!~%")
(quit)

Re: Add a ranking module to LKB

by Stephan Oepen-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

hi norman (and francis),

> > I want to add a ranking module to select the "best" scoped MRS
> > output. I'm not sure whether someone have done similar things
> > before.

  [...]

> There is code that selects the best parse based on the same model used
> by pet (i.e. looking at the derivation tree).

there was a fair amount of MaxEnt parse selection work (using the ERG
and other DELPH-IN grammars).  the code to rank LKB results is part of
the [incr tsdb()] add-on system.  regrettably (unlike the LKB proper),
[incr tsdb()] is not supported in SBCL.

however, all previous parse selection work in this context (for all i
know) was disambiguating syntactic ambiguity, i.e. derivations trees
returned by the parser (or generator).  hence, the problem of ranking
among the (potentially numerous) scope-resolved MRSs corresponding to
a single derivation remains unsolved at large.  i would expect that a
discriminative model, using structural semantic features, might be a
suitable approach, but it would require scope-resolved training data
(which is not part of the standard Redwoods treebanks) ...  i guess i
would view this as a potentially rewarding but not trivial project.

                                                     all best  -  oe

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++ Universitetet i Oslo (IFI); Boks 1080 Blindern; 0316 Oslo; (+47) 2284 0125
+++     CSLI Stanford; Ventura Hall; Stanford, CA 94305; (+1 650) 723 0515
+++       --- oe@...; oe@...; stephan@... ---
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++