CONSTRAINTS : Check Pragmatics

Overview

This is a new (to nl9701) and still largely experimental constraint for finding and triggering the repair of the syntactic u-model during semantic analysis. The constraint is currently only used to detect incorrect prepositional attachements in the u-model. When this constraint fails, a syntactic snip is carried out to remove the incorrect prepositional attachment, the s-model-constructor is terminated and a new u-model constructor is proposed in order to correct the u-model. Once this new u-constructor has been built the process returns to build the semantics.

Proposal

Three proposals are currently implemented one to check for each of the prepositions, with, in and on . Upon failure, instead of failing the operator under test, the fuse is replaced with a snip that removes the bad syntactic link. This snip is carried out straight away and the s-constructor is terminated so as the u-model can be rebuilt.

Implementation

Instead of passing and failing, the constraint can pass or be replaced. The productions for replacing are currently hacks which look for specific situations where the prepositional attachment is incorrect. When such a constraint is to be replaced, the annotation replaced is added to the constraint and the operator-checking is changed from the original fuse operator that is being checked to a syntactic snip which will cut the offending syntactic link. When the annotation replaced is detected on the constraint operator, various productions fire to change operator preferences so as the snip and only the snip is carried out before the s-model terminates and triggers a new u-model to be built (by removing the annotation u-model-success from the word in question.)

Examples

Sentences 36 , 37 and Sentences 38 from the regression corpora are examples of this mechansim.

For a more detailed example of how this repair model works we will examine the nl-soar trace for sentence 37 : 'The man dropped the book on the table'.

At decision cycle 353 the u-model has been built and the s-model is about to incorporate the word table . Note that the u-model has incorrectly attached the preposition on the table to book rather than dropped . NL-soar now attempts to build s-constructor36 to complete the s-model. At decision cycle 360 , nl-soar proposes a fuse to attach book to the internal role of on. This is the first time book has been semantically analysed and therefore the first opportunity there is to test the correctness of the u-model's choice of prepositional attachment. (If, for example the word C++ replaced table the syntactic choice would already be correct.) A constraint to check the prepostional attachment of on is proposed and is tested in cycle 366. (See constraints*propose-pragmatic-check*on ). Here the production constraints*implement-pragmatic-check-on*fail fires that indicates that the prepositional attachment is incorrect. The production places the annotation replaced on the constraint and replaces the operator-checking from the original fuse operator to a syntactic snip which will remove the book to on link. The replaced annotation causes the check-pragmatics operator to terminate ( constraints*check*terminate-with-replaced and a replaced operator to be proposed (constraints*check*propose-replaced ) The replaced operator works similarly to the constraints-success operator during normal constraint testing: an constraints-replaced annotation is placed on the generator operator (O280) (constraints*return-successful-result*replaced), this causes the constructed-operator to be added to the generator problem space S161 (generator*generate-operator*notice-replaced-operator) and then the constructed operator (which is the snip) is proposed in the s-construct space using the normal generator*propose-operator-in-x-construct-space production. The snip operator is then performed. The snip is implemented with the normal syntactic snip productions with an aditional production that places a annotation pragmatic-fail on the top-state. This annotation causes the exhausted operator to be proposed and the s-constructor is completed and fired in the top state. During the implementation of this s-constructor, the annotation pragmatic-fail is passed to the real top-state (S1) and this causes a production to fire that removes the annotation u-model-success from the last word (i.e. table ). This triggers nl-soar to rebuild the u-model by building another u-constructor (u-constructor37 ). In this u-constructor the prepostion on the table is correctly relinked as an adjoin to dropped . When u-constructor37 has completed, nl-soar returns to semantics and builds s-constructor42 . This s-constructor snips the book property on fuse, fuses dropped property on and then fuses on internal table . The final u-model and s-model are now as expected.

This page written by Mark H. Smith, April 1997.