<div dir="ltr">Yeah, unfortunately at least one case does lead to semantically empty<div>things combining fairly freely with just about anything: the argument composition</div><div>auxiliaries.  </div><div><br></div><div>Agreed that trigger rules aren&#39;t fun, but they can be useful, even in smalish</div><div>grammars.</div><div><br></div><div>I&#39;ve sent Dan&#39;s patch along to the students, so we&#39;re at least not seeing spurious</div><div>warnings now.</div><div><br></div><div>Emily</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 15, 2016 at 11:20 AM, Ann Copestake <span dir="ltr">&lt;<a href="mailto:aac10@cl.cam.ac.uk" target="_blank">aac10@cl.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">
    It&#39;s an expanded version of the mrscomp grammar which I&#39;ve just
    checked in to the LKB svn repo.  I created it to mirror the dmrscomp
    grammar and just thought I&#39;d check that it&#39;s still possible to avoid
    trigger rules since I wasn&#39;t sure whether the code still allowed
    it.  <br>
    <br>
    In terms of whether or not you need trigger rules for a particular
    grammar, I would suggest just trying it.  The additional edges will
    only explode the search space if the lexical items with null
    semantics can combine relatively freely with some of the
    semantically licensed edges.  Of course this can happen even if you
    have trigger rules, if they can&#39;t be defined tightly.  But I think
    of trigger rules as a particular form of nastiness that I would be
    happy not to inflict on grammar writers unless it&#39;s essential.  <br>
    <br>
    oe has offered to fix the warning messages <br><span class="HOEnZb"><font color="#888888">
    <br>
    Ann</font></span><div><div class="h5"><br>
    <br>
    <div>On 15/02/16 19:03, Emily M. Bender
      wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">Hi Ann,
        <div><br>
        </div>
        <div>What kind of small grammar though?  There are a few things
          (argument composition</div>
        <div>auxiliaries, free word order) that can drastically expand
          the search space for the generator.</div>
        <div>I haven&#39;t tested this, but I wouldn&#39;t be surprised if even
          right out of the customization</div>
        <div>system box I could come up with a place where trigger rules
          are needed.  But at any</div>
        <div>rate, I&#39;d be happy if the warnings that did show up were
          legitimate ones (and will</div>
        <div>try applying Dan&#39;s patch).</div>
        <div><br>
        </div>
        <div>Emily</div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Mon, Feb 15, 2016 at 12:57 PM, Ann
          Copestake <span dir="ltr">&lt;<a href="mailto:aac10@cl.cam.ac.uk" target="_blank">aac10@cl.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"> I just want to
              confirm that with a small grammar with a small number of
              null semantics entries (five of them), trigger rules are
              not required to generate with the LKB.  So I think that no
              warnings about the `missing&#39; trigger rules should be
              produced by default with small grammars, though I don&#39;t
              know what the criteria for switching on the warnings
              should be.<span><font color="#888888"><br>
                  <br>
                  Ann</font></span>
              <div>
                <div><br>
                  <br>
                  <div>On 11/02/16 00:05, Ann Copestake wrote:<br>
                  </div>
                  <blockquote type="cite"> The comment about
                    construction from corpora was really about big
                    grammars - i looked at the ERG trigger rules about a
                    year ago, and was a bit horrified ...  <br>
                    <br>
                    For small grammars, is it really hopelessly
                    inefficient to just run in the mode where all the
                    empty semantics items are added to the chart?  Does
                    it simply not work if you have no trigger rules?  (I
                    admit not having tried this for years.)  <br>
                    <br>
                    However, if not, it seems to me that the extract
                    from a corpus technique could work with small
                    grammars assuming you&#39;ve got a suitable set of test
                    sentences before you start to generate.  i.e., you&#39;d
                    parse those and accumulate trigger rules
                    automatically from the parsed set, repeating as you
                    expand the grammar.  It doesn&#39;t matter if the
                    trigger rules are very liberal, after all.<br>
                    <br>
                    Ann<br>
                    <br>
                    <div>On 10/02/2016 23:14, Emily M. Bender wrote:<br>
                    </div>
                    <blockquote type="cite">
                      <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"></a><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" face="Calibri, sans-serif" color="#000000"><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"></a><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"> </a><a href="http://moin.delph-in.net/LkbGeneration" target="_blank"></a><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"></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"></a><a href="http://www.facebook.com/uwclma" target="_blank">http://www.facebook.com/uwclma</a><br>
                            </div>
                          </div>
                        </div>
                      </div>
                    </blockquote>
                    <br>
                  </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>
    </blockquote>
    <br>
  </div></div></div>

</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><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>