<div dir="ltr">The tdl output is helpful to the extent that it shows people what the value of TRIGGER should<div>be, but that&#39;s about it.  It&#39;s particularly unhelpful when the trigger rules are actually there...  Also,</div><div>learning trigger rules from parsed/treebanked data sounds interesting, but won&#39;t help at all</div><div>in the case of starter grammars, which we *do* want to be able to generate.</div><div><br></div><div>Emily</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 10, 2016 at 3:00 PM, Ann Copestake <span dir="ltr">&lt;<a href="mailto:aac10@cam.ac.uk" target="_blank">aac10@cam.ac.uk</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    Hmm - does anyone find the TDL output for the trigger rules
    helpful?  because, having looked at the code, I would prefer to
    remove that facility completely unless it has support, since it&#39;s
    hardwiring type and feature names into the code.   i.e., I would
    rather go back to the original behaviour which meant that warning
    messages were output (if there were no appropriate existing trigger
    rules) without the TDL being suggested.  I believe oe may feel the
    same way.<br>
    <br>
    The trigger rule mechanism is a mess, in fact.  Learning trigger
    rules from parsed/treebanked data is feasible,  but too big a
    project for me to take on.  <br><span><font color="#888888">
    <br>
    Ann</font></span><div><div><br>
    <br>
    <div>On 10/02/2016 18:47, Dan Flickinger
      wrote:<br>
    </div>
    <blockquote type="cite">
      
      
      <div style="font-size:12pt;color:#000000;background-color:#ffffff;font-family:Calibri,Arial,Helvetica,sans-serif">
        <p>Hi Emily -</p>
        <p><br>
        </p>
        <p>I ran into this behavior too when doing the SWB-oriented
          grammars for the grammar engineering course I taught with Tom
          last quarter.  The culprit turns out to be the function
          index-lexicon(), which right at its end cheerfully emits those
          warning/advice messages for all semantically empty entries
          regardless of whether trigger rules have been defined.  Since
          the same shortcoming is repeated in the separate function
          reindex-lexicon(), it proved to be easier for me to correct
          this by changing the function make-trigger-tdl() which they
          both call, so that the global mt::*transfer-triggers* is
          checked before emitting the warning for each semantically
          empty lexical entry.  Here is the patched version of this
          function analogous to what I added to my grammars&#39;
          user-fns.lsp file:</p>
        <p><br>
        </p>
        <p>(defun make-trigger-tdl (empty-semantics-lexical-entries)<br>
            (let ((empty-no-trigger-entries <br>
               (loop for id in empty-semantics-lexical-entries<br>
                     unless (or #+:mt<br>
                        (gethash id mt::*transfer-triggers*)<br>
                        nil)<br>
                     collect id)))<br>
             (loop for x in empty-no-trigger-entries<br>
                do<br>
              (format t &quot;~%~%~a_gr := generator_rule &amp;<br>
          [ CONTEXT.RELS &lt;! [ PRED \&quot;non_existing_rel\&quot; ] !&gt;,<br>
            FLAGS.TRIGGER \&quot;~a\&quot; ].&quot; <br>
                  (string-downcase x) <br>
                  (string-downcase x)))))</p>
        <p><br>
        </p>
        <p>I expect that Ann or Stephan could see a more elegant way to
          achieve this effect, but this patch might be a useful
          temporary expedient.<br>
        </p>
        <br>
        <p>  Dan</p>
        <p><br>
        </p>
        <div style="color:rgb(0,0,0)">
          <hr style="display:inline-block;width:98%">
          <div dir="ltr"><font style="font-size:11pt" color="#000000" face="Calibri, sans-serif"><b>From:</b>
              <a href="mailto:developers-bounces@emmtee.net" target="_blank">developers-bounces@emmtee.net</a>
              <a href="mailto:developers-bounces@emmtee.net" target="_blank">&lt;developers-bounces@emmtee.net&gt;</a> on behalf of Emily
              M. Bender <a href="mailto:ebender@uw.edu" target="_blank">&lt;ebender@uw.edu&gt;</a><br>
              <b>Sent:</b> Wednesday, February 10, 2016 7:43 AM<br>
              <b>To:</b> developers<br>
              <b>Subject:</b> [developers] Trigger rules still being
              requested</font>
            <div> </div>
          </div>
          <div>
            <div dir="ltr">Dear all,
              <div><br>
              </div>
              <div>In the Matrix derived grammars, we have the following
                in  lkb/script:</div>
              <div><br>
              </div>
              <div>
                <div>;;;</div>
                <div>;;; SSH 2012-03-27 This invokes trigger rules for
                  semantically empty</div>
                <div>;;; lexical entries. The trigger rules themselves
                  should be in</div>
                <div>;;; trigger.mtr in the grammar directory. The
                  documentation on trigger</div>
                <div>;;; rules: <a href="http://moin.delph-in.net/LkbGeneration" target="_blank">
                    http://moin.delph-in.net/LkbGeneration</a></div>
                <div>;;;</div>
                <div>;;; SSH 2013-05-23 The semi.vpm file needs to be
                  loaded *before* the</div>
                <div>;;; trigger.mtr file in lkb/script for correct
                  interaction.</div>
                <div>;;;</div>
                <div><br>
                </div>
                <div>(mt:read-transfer-rules</div>
                <div> (list</div>
                <div>  (lkb-pathname (parent-directory) &quot;trigger.mtr&quot;))</div>
                <div>  &quot;Generation trigger rules&quot;</div>
                <div>  :filter nil :task :trigger :recurse nil :edges
                  200 :subsume nil)</div>
                <div><br>
                </div>
                <div>;;;</div>
                <div>;;; Matrix-derived grammars often have stable
                  enough semantic</div>
                <div>;;; representations that the grammar can usefully
                  be tested</div>
                <div>;;; by generating from them.  The function
                  index-for-generator()</div>
                <div>;;; must be called for generation to be enabled. 
                  In grammars with</div>
                <div>;;; small lexica, this takes a trivial amount of
                  time.  If</div>
                <div>;;; generation is not being used regularly, and the
                  indexing</div>
                <div>;;; is taking too long, comment out the following.
                   index-for-generator()</div>
                <div>;;; can also be run from the expanded LKB top menu,
                  under</div>
                <div>;;; Generate.</div>
                <div>;;;</div>
                <div><br>
                </div>
                <div>(index-for-generator)</div>
              </div>
              <div><br>
              </div>
              <div>It is my understanding that (index-for-generator) is
                what is behind the messages</div>
              <div>suggesting trigger rules for semantically empty
                lexical entries, but even though</div>
              <div>we call it after loading the trigger rules, we still
                get messages such as the following:</div>
              <div><br>
                <div class="gmail_quote">
                  <div style="margin:1em 0px 2em"><br>
                    <img alt=""><br>
                  </div>
                  Is there something else we&#39;re supposed to do so that
                  we only see those messages<br>
                  when an entry truly lacks a trigger rule?<br>
                  <br>
                  Thanks,<br>
                  Emily</div>
                <div class="gmail_quote"><br>
                </div>
                -- <br>
                <div>
                  <div dir="ltr">Emily M. Bender<br>
                    Professor, Department of Linguistics<br>
                    Check out CLMS on facebook! <a href="http://www.facebook.com/uwclma" target="_blank">
                      </a><a href="http://www.facebook.com/uwclma" target="_blank">http://www.facebook.com/uwclma</a><br>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
  </div></div></div>

</blockquote></div><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr">Emily M. Bender<br>Professor, Department of Linguistics<br>Check out CLMS on facebook! <a href="http://www.facebook.com/uwclma" target="_blank">http://www.facebook.com/uwclma</a><br></div></div>
</div></div>