[developers] MRS in PET SVN with selective packing

Eric Nichols eric-n at is.naist.jp
Thu Nov 2 08:05:24 CET 2006


After a bit more prodding, Francis and I think we have found the source(s)
of our problems.

1) ECL couldn't access anything in rmrs/convert.lisp. Francis noticed that
there was another
    file named convert.lisp in the ppcre directory. ECL compiles both of
these into object files
    named convert.o. Both object files are them compiled into libmrs.a. This
has the effect that
    one of them becomes inaccessable. The fix for this problem is to rename
    to rmrs/rmrs-convert.lisp and change system/mrs.system to reflect this

2) Once ECL was able to find the mrs to rmrs conversion code, we encountered
another problem:
    When running cheap with -mrs=xml, ECL complains about not being able to
find the variable

eric at wsd-m:~/tmp [14:13:52] [5673]
:) cheap -mrs=xml /usr/share/delphin/grammars/erg/english
reading `/usr/share/delphin/grammars/erg/pet/english.set'... including
loading `/usr/share/delphin/grammars/erg/english.grm' (LinGO (18-Jul-06))
reading ME model `/usr/share/delphin/grammars/erg/jh.mem'... [31519
features] Unknown type/instance `v_nbar_idm_le' in feature #577
61364 types in 6 s
fish fish
(1) `fish fish' [0] --- 6 (0.00|0.01s) <16:84> (630.7K) [0.0s]
derivation[1] (0.9809):fish fish
The variable LKB::*TCHART* is unbound.
0 is an illegal frs index.
0 is an illegal frs index.
zsh: segmentation fault  cheap -mrs=xml

This call is made from the function mrs-to-rmrs which, of course, resides in
rmrs/convert.lisp --
the file causing problems in 1). If I understand the code correctly, it
appears that some changes
were made recently to try and correctly calculate cto and cfrom in RMRS for
the entire sentence.
Commenting out the lines that reference the variable tchart-edges (given in
red below) allows
cheap to produce RMRS again (albeit with cfrom and cto equal to -1 for the
sentence). This is
actually a line-by-line reversion of the CVS change introduced on 2006/7/27.

(defun mrs-to-rmrs (mrs)
  (if *rel-handel-path*
        (let ((lzt (psoa-liszt mrs))
              (new-lzt nil)
              (new-args nil)
              (label-recs nil)
              (ings nil)
              ;;(tchart-edges (lkb::get-edges lkb::*tchart*)) ;; [bmw] see
          (dolist (rel lzt)
            (multiple-value-bind (ep rmrs-args new-label-recs)
                (parsonify-rel rel label-recs)
              (push ep new-lzt)
              (setf new-args (append new-args rmrs-args))
              (setf label-recs new-label-recs)))
              (setf ings (construct-converted-in-groups label-recs))
          (make-rmrs   :top-h (psoa-top-h mrs)
                       :h-cons (construct-converted-hcons
                                (psoa-h-cons mrs) ings)
                       :liszt (nreverse new-lzt)
                       :in-groups ings
                       :rmrs-args new-args
                       ;; [bmw] hack to obtain standoff points
                       ;; (which are NOT provided by the input mrs...)
                       ;;:cfrom (lkb::get-min-edge-cfrom tchart-edges)
                       ;;:cto (lkb::get-max-edge-cto tchart-edges)
                       :origin :erg)))))

bindings aren't set, since the assumption is that all variable
equalities are known.  So the code simply has to walk down the list
of rels in the lzt, converting them to simple eps plus rmrs-args

Francis and I would be grateful if Ben (or someone else more familiar than
us with the inner workings
ofLKB's MRS code) would take a look at this problem and try to come up with
a more workable solution.

Thank you in advance,


On 11/1/06, Eric Nichols <eric-n at is.naist.jp> wrote:
> Hello again,
> Actually, the changes seem to have solved the problem for two out of four
> cases:
> -mrs=mrs and -mrs=mrx work fine.  However, -mrs=rmrs and -mrs=xml fail to
> work.
> Turning on debug gives the following output:
> 61364 types in 3.6 s
> fish fish.
> (1) `fish fish.' [0] --- 6 (0.00|0.01s) <16:87> (631.3K) [0.0s]
> derivation[1] (1.165):fish fish.
> The function MRS::MRS-TO-RMRS is undefined.
> 0 is an illegal frs index.
> ....
> 0 is an illegal frs index.
> zsh: segmentation fault  cheap -mrs=rmrs
> /usr/share/delphin/grammars/erg/english
> rrms/convert.lisp (where mrs-to-rmrs is defined) seems to be being
> compiled and linked OK.
> nm libmrs.a
> ...
> 0000006b t L2mrs_to_rmrs
> ...
> so it seens to be in there,  However, when I drop into ecl by killing
> cheap with ^C, mrs::mrs-to-rmrs is indeed undefined.
> Console interrupt.
> Top level.
> MT> (mrs::mrs-to-rms)
> The function MRS::MRS-TO-RMS is undefined.
> Broken at EVAL.
> MT>>
> I must admit I am baffled.
> --
> Francis Bond, writing as Eric Nichols

--Eric Nichols
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.delph-in.net/archives/developers/attachments/20061102/5f21844a/attachment.html>

More information about the developers mailing list