[developers] minor LKB code changes

Berthold Crysmann crysmann at dfki.de
Tue Sep 6 14:32:09 CEST 2005


Ann Copestake wrote:

>Summary:
>
>change to interface for `Apply all lex rules'.  info re algebra code
>
>Details:
>
>I have changed the interface function `Apply all lex rules' that can be called
>from a display of a lexical entry.  Originally this produced separate windows
>for each new feature structure - a very bad idea with a reasonable number of
>lexical rules.  A couple of years ago, I changed it so it produced a summary of
>applications in a window with the format `lex-d + rule (+ rule)* = new orth'.
>It applied recursively and was controlled only by
>*maximal-lex-rule-applications*.  But this is also a bad idea for grammars such
>as the current ERG, which now have a rather large fanout of punctuation rules
>given that *maximal-lex-rule-applications* is set to 7 by default (and I
>believe that's fine for applying the morphology in the usual way).  So the
>interface now does not attempt recursive application, but the user can click on
>a result and manually call `Apply all lex rules' again, and can repeat this as
>often as desired. 
>
>Other changes checked in are interim changes to the algebra code, which I
>started working on last January but didn't get to a point where it was worth
>enabling.  This is intended to display MRSs for nodes in a parse tree in the
>algebra format - see Copestake et al Toulouse ACL paper - and allows one to
>check that the algebra is obeyed.  I am returning to it and attempting to make
>this work with non-trivial grammars.  I will announce it if I can get it to
>work with the ERG, but otherwise won't bother notifying this list of further
>changes to it. Meanwhile, I do not believe anyone should be inconvenienced by
>the various updates to MRS code but let me know if anything new breaks ...
>
>  
>
Dear Ann,

it seems last night's check-in breaks the equate-qeq, at least for the 
German grammar. Going back to the 5 Sep version solves the problem for me...

Let me know, if and what you need to track this down.

I'll do some testing with yesterday's version to check the morphology code.

Cheers,

Berthold


PS:

Ben: the semi_pred() problem is solved.

LKB(9): (lkb::generate-from-mrs-internal
   (mrs::extract-mrs (first lkb::*parse-record*)))
Error: Attempt to take the car of -103825854 which is not listp.
  [condition type: TYPE-ERROR]

Restart actions (select using :continue):
 0: Return to Top Level (an "abort" restart).
 1: Abort entirely from this (lisp) process.
[1] LKB(10): :zo
Evaluation stack:

   (ERROR TYPE-ERROR :DATUM ...)
 ->(MRS::EQUATE-QEQS -264903540
                     (#S(MRS::CHAR-REL :PRED "_schnarchen_v_rel" :FLIST 
(#S(MRS::FVPAIR :FEATURE ARG0 :VALUE #S(MRS::VAR :TYPE "e" :EXTRA 
(#S(MRS::EXTRAPAIR :FEATURE E.MOOD :VALUE INDICATIVE+SUBJUNCTIVE)
                                                                                                                                           
#S(MRS::EXTRAPAIR :FEATURE E.TENSE :VALUE PRESENT)
                                                                                                                                           
#S(MRS::EXTRAPAIR :FEATURE E.PERFECTIVE :VALUE -)
                                                                                                                                           
#S(MRS::EXTRAPAIR :FEATURE --TPC :VALUE TPC-SUBJ)) :ID 2))
                                                                         
#S(MRS::FVPAIR :FEATURE ARG1 :VALUE #S(MRS::VAR :TYPE "x" :EXTRA 
(#S(MRS::EXTRAPAIR :FEATURE MASS-UNIT :VALUE BOOL)
                                                                                                                                           
#S(MRS::EXTRAPAIR :FEATURE PNG :VALUE 1-S-G)) :ID 4))) :STR NIL :HANDEL 
#S(MRS::VAR :TYPE "h" :EXTRA NIL :ID 3) :PARAMETER-STRINGS NIL :EXTRA 
NIL :LINK NIL :CFROM -1 :CTO -1)
                      #S(MRS::CHAR-REL :PRED "prpstn_m_rel" :FLIST 
(#S(MRS::FVPAIR :FEATURE MARG :VALUE #S(MRS::VAR :TYPE "h" :EXTRA NIL 
:ID 5))
                                                                    
#S(MRS::FVPAIR :FEATURE TPC :VALUE #S(MRS::VAR :TYPE "x" :EXTRA 
(#S(MRS::EXTRAPAIR :FEATURE MASS-UNIT :VALUE BOOL)
                                                                                                                                     
#S(MRS::EXTRAPAIR :FEATURE PNG :VALUE 1-S-G)) :ID 4))) :STR NIL :HANDEL 
#S(MRS::VAR :TYPE "h" :EXTRA NIL :ID 1) :PARAMETER-STRINGS NIL :EXTRA 
NIL :LINK NIL :CFROM -1 :CTO -1)
                      #S(MRS::CHAR-REL :PRED "unspec_pron_rel" :FLIST 
(#S(MRS::FVPAIR :FEATURE ARG0 :VALUE #S(MRS::VAR :TYPE "x" :EXTRA 
(#S(MRS::EXTRAPAIR :FEATURE MASS-UNIT :VALUE BOOL)
                                                                                                                                         
#S(MRS::EXTRAPAIR :FEATURE PNG :VALUE 1-S-G)) :ID 4))) :STR NIL :HANDEL 
#S(MRS::VAR :TYPE "h" :EXTRA NIL :ID 6) :PARAMETER-STRINGS NIL :EXTRA 
NIL :LINK NIL :CFROM -1 :CTO -1)
                      ...))
   (MRS::EQUATE-ALL-QEQS
      #S(MRS::PSOA :TOP-H #S(MRS::VAR :TYPE "h" :EXTRA NIL :ID 1) :LISZT 
(#S(MRS::CHAR-REL :PRED "_schnarchen_v_rel" :FLIST (#S(MRS::FVPAIR 
:FEATURE ARG0 :VALUE #S(MRS::VAR :TYPE "e" :EXTRA (#S(MRS::EXTRAPAIR 
:FEATURE E.MOOD :VALUE INDICATIVE+SUBJUNCTIVE)
                                                                                                                                                                                               
#S(MRS::EXTRAPAIR :FEATURE E.TENSE :VALUE PRESENT)
                                                                                                                                                                                               
#S(MRS::EXTRAPAIR :FEATURE E.PERFECTIVE :VALUE -)
                                                                                                                                                                                               
#S(MRS::EXTRAPAIR :FEATURE --TPC :VALUE TPC-SUBJ)) :ID 2))
                                                                                                                             
#S(MRS::FVPAIR :FEATURE ARG1 :VALUE #S(MRS::VAR :TYPE "x" :EXTRA 
(#S(MRS::EXTRAPAIR :FEATURE MASS-UNIT :VALUE BOOL)
                                                                                                                                                                                               
#S(MRS::EXTRAPAIR :FEATURE PNG :VALUE 1-S-G)) :ID 4))) :STR NIL :HANDEL 
#S(MRS::VAR :TYPE "h" :EXTRA NIL :ID 3) :PARAMETER-STRINGS NIL :EXTRA 
NIL :LINK NIL :CFROM -1 :CTO -1)
                                                                          
#S(MRS::CHAR-REL :PRED "prpstn_m_rel" :FLIST (#S(MRS::FVPAIR :FEATURE 
MARG :VALUE #S(MRS::VAR :TYPE "h" :EXTRA NIL :ID 5))
                                                                                                                        
#S(MRS::FVPAIR :FEATURE TPC :VALUE #S(MRS::VAR :TYPE "x" :EXTRA 
(#S(MRS::EXTRAPAIR :FEATURE MASS-UNIT :VALUE BOOL)
                                                                                                                                                                                         
#S(MRS::EXTRAPAIR :FEATURE PNG :VALUE 1-S-G)) :ID 4))) :STR NIL :HANDEL 
#S(MRS::VAR :TYPE "h" :EXTRA NIL :ID 1) :PARAMETER-STRINGS NIL :EXTRA 
NIL :LINK NIL :CFROM -1 :CTO -1)
                                                                          
#S(MRS::CHAR-REL :PRED "unspec_pron_rel" :FLIST (#S(MRS::FVPAIR :FEATURE 
ARG0 :VALUE #S(MRS::VAR :TYPE "x" :EXTRA (#S(MRS::EXTRAPAIR :FEATURE 
MASS-UNIT :VALUE BOOL)
                                                                                                                                                                                             
#S(MRS::EXTRAPAIR :FEATURE PNG :VALUE 1-S-G)) :ID 4))) :STR NIL :HANDEL 
#S(MRS::VAR :TYPE "h" :EXTRA NIL :ID 6) :PARAMETER-STRINGS NIL :EXTRA 
NIL :LINK NIL :CFROM -1 :CTO -1)
                                                                          
#S(MRS::CHAR-REL :PRED "pronoun_q_rel" :FLIST (#S(MRS::FVPAIR :FEATURE 
ARG0 :VALUE #S(MRS::VAR :TYPE "x" :EXTRA (#S(MRS::EXTRAPAIR :FEATURE 
MASS-UNIT :VALUE BOOL)
                                                                                                                                                                                           
#S(MRS::EXTRAPAIR :FEATURE PNG :VALUE 1-S-G)) :ID 4))
                                                                                                                         
#S(MRS::FVPAIR :FEATURE RSTR :VALUE #S(MRS::VAR :TYPE "h" :EXTRA NIL :ID 8))
                                                                                                                         
#S(MRS::FVPAIR :FEATURE BODY :VALUE #S(MRS::VAR :TYPE "h" :EXTRA NIL :ID 
9))) :STR NIL :HANDEL #S(MRS::VAR :TYPE "h" :EXTRA NIL :ID 7) 
:PARAMETER-STRINGS NIL :EXTRA NIL :LINK NIL :CFROM -1 :CTO -1)) :H-CONS 
(#S(MRS::HCONS :RELATION "qeq" :SCARG #S(MRS::VAR :TYPE "h" :EXTRA NIL 
:ID 5) :OUTSCPD #S(MRS::VAR :TYPE "h" :EXTRA NIL :ID 3))
                                                                                                                                                                                                                                                                                                                                         
#S(MRS::HCONS :RELATION "qeq" :SCARG #S(MRS::VAR :TYPE "h" :EXTRA NIL 
:ID 8) :OUTSCPD #S(MRS::VAR :TYPE "h" :EXTRA NIL :ID 6))) :A-CONS NIL 
:INDEX #S(MRS::VAR :TYPE "e" :EXTRA (#S(MRS::EXTRAPAIR :FEATURE E.MOOD 
:VALUE INDICATIVE+SUBJUNCTIVE)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
#S(MRS::EXTRAPAIR :FEATURE E.TENSE :VALUE PRESENT)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
#S(MRS::EXTRAPAIR :FEATURE E.PERFECTIVE :VALUE -)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
#S(MRS::EXTRAPAIR :FEATURE --TPC :VALUE TPC-SUBJ)) :ID 2)))
   (GENERATE-FROM-MRS-INTERNAL
      #S(MRS::PSOA :TOP-H #S(MRS::VAR :TYPE "h" :EXTRA NIL :ID 1) :LISZT 
(#S(MRS::CHAR-REL :PRED "_schnarchen_v_rel" :FLIST (#S(MRS::FVPAIR 
:FEATURE ARG0 :VALUE #S(MRS::VAR :TYPE "e" :EXTRA (#S(MRS::EXTRAPAIR 
:FEATURE E.MOOD :VALUE INDICATIVE+SUBJUNCTIVE)
                                                                                                                                                                                               
#S(MRS::EXTRAPAIR :FEATURE E.TENSE :VALUE PRESENT)
                                                                                                                                                                                               
#S(MRS::EXTRAPAIR :FEATURE E.PERFECTIVE :VALUE -)
                                                                                                                                                                                               
#S(MRS::EXTRAPAIR :FEATURE --TPC :VALUE TPC-SUBJ)) :ID 2))
                                                                                                                             
#S(MRS::FVPAIR :FEATURE ARG1 :VALUE #S(MRS::VAR :TYPE "x" :EXTRA 
(#S(MRS::EXTRAPAIR :FEATURE MASS-UNIT :VALUE BOOL)
                                                                                                                                                                                               
#S(MRS::EXTRAPAIR :FEATURE PNG :VALUE 1-S-G)) :ID 4))) :STR NIL :HANDEL 
#S(MRS::VAR :TYPE "h" :EXTRA NIL :ID 3) :PARAMETER-STRINGS NIL :EXTRA 
NIL :LINK NIL :CFROM -1 :CTO -1)
                                                                          
#S(MRS::CHAR-REL :PRED "prpstn_m_rel" :FLIST (#S(MRS::FVPAIR :FEATURE 
MARG :VALUE #S(MRS::VAR :TYPE "h" :EXTRA NIL :ID 5))
                                                                                                                        
#S(MRS::FVPAIR :FEATURE TPC :VALUE #S(MRS::VAR :TYPE "x" :EXTRA 
(#S(MRS::EXTRAPAIR :FEATURE MASS-UNIT :VALUE BOOL)
                                                                                                                                                                                         
#S(MRS::EXTRAPAIR :FEATURE PNG :VALUE 1-S-G)) :ID 4))) :STR NIL :HANDEL 
#S(MRS::VAR :TYPE "h" :EXTRA NIL :ID 1) :PARAMETER-STRINGS NIL :EXTRA 
NIL :LINK NIL :CFROM -1 :CTO -1)
                                                                          
#S(MRS::CHAR-REL :PRED "unspec_pron_rel" :FLIST (#S(MRS::FVPAIR :FEATURE 
ARG0 :VALUE #S(MRS::VAR :TYPE "x" :EXTRA (#S(MRS::EXTRAPAIR :FEATURE 
MASS-UNIT :VALUE BOOL)
                                                                                                                                                                                             
#S(MRS::EXTRAPAIR :FEATURE PNG :VALUE 1-S-G)) :ID 4))) :STR NIL :HANDEL 
#S(MRS::VAR :TYPE "h" :EXTRA NIL :ID 6) :PARAMETER-STRINGS NIL :EXTRA 
NIL :LINK NIL :CFROM -1 :CTO -1)
                                                                          
#S(MRS::CHAR-REL :PRED "pronoun_q_rel" :FLIST (#S(MRS::FVPAIR :FEATURE 
ARG0 :VALUE #S(MRS::VAR :TYPE "x" :EXTRA (#S(MRS::EXTRAPAIR :FEATURE 
MASS-UNIT :VALUE BOOL)
                                                                                                                                                                                           
#S(MRS::EXTRAPAIR :FEATURE PNG :VALUE 1-S-G)) :ID 4))
                                                                                                                         
#S(MRS::FVPAIR :FEATURE RSTR :VALUE #S(MRS::VAR :TYPE "h" :EXTRA NIL :ID 8))
                                                                                                                         
#S(MRS::FVPAIR :FEATURE BODY :VALUE #S(MRS::VAR :TYPE "h" :EXTRA NIL :ID 
9))) :STR NIL :HANDEL #S(MRS::VAR :TYPE "h" :EXTRA NIL :ID 7) 
:PARAMETER-STRINGS NIL :EXTRA NIL :LINK NIL :CFROM -1 :CTO -1)) :H-CONS 
(#S(MRS::HCONS :RELATION "qeq" :SCARG #S(MRS::VAR :TYPE "h" :EXTRA NIL 
:ID 5) :OUTSCPD #S(MRS::VAR :TYPE "h" :EXTRA NIL :ID 3))
                                                                                                                                                                                                                                                                                                                                         
#S(MRS::HCONS :RELATION "qeq" :SCARG #S(MRS::VAR :TYPE "h" :EXTRA NIL 
:ID 8) :OUTSCPD #S(MRS::VAR :TYPE "h" :EXTRA NIL :ID 6))) :A-CONS NIL 
:INDEX #S(MRS::VAR :TYPE "e" :EXTRA (#S(MRS::EXTRAPAIR :FEATURE E.MOOD 
:VALUE INDICATIVE+SUBJUNCTIVE)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
#S(MRS::EXTRAPAIR :FEATURE E.TENSE :VALUE PRESENT)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
#S(MRS::EXTRAPAIR :FEATURE E.PERFECTIVE :VALUE -)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
#S(MRS::EXTRAPAIR :FEATURE --TPC :VALUE TPC-SUBJ)) :ID 2)))
   [... EXCL::%EVAL ]
   (EVAL (GENERATE-FROM-MRS-INTERNAL #))
   (TPL:TOP-LEVEL-READ-EVAL-PRINT-LOOP)
   (TPL:START-INTERACTIVE-TOP-LEVEL
      #<EXCL:TERMINAL-SIMPLE-STREAM [initial terminal io] fd 0/1 @ 
#x820fe42>
      #<Function TOP-LEVEL-READ-EVAL-PRINT-LOOP> ...)



More information about the developers mailing list