This tutorial helps understand the snip operator in NL-Soar.

Note: This tutorial assumes you know how to run NL-Soar, and that you know about syntactic operators and how the system learns them.
 

  1. Start up the WordNet-plus version of NL-Soar and turn off semantics by typing the following:

  2.    nosem

  3. Enter the following sentence into the system:

  4.     sentence> those catchers throw baseballs with ragged seams to the pitcher.

  5. Decide about the syntactic linking of the constituents, particularly the prepositional phrases with ragged seams and to the pitcher.

  6. Run the sentence. Notice that with was initially joined to the verb throw, but that it is later "snipped" so that to can joined to throw, while with is joined to baseballs. The system chooses to do this because WordNet indicates that the verb throw can take an object and a prepositional phrase headed by to.

  7. Now, clear the previous run by typing:

  8.     init-soar

  9. Run the sentence again, but this time paying attention to the operators implemented by NL-Soar.  Run NL-Soar run through the first 180 decisions cycles or so for this sentence. Then step one decision cycle at a time and stop when you see output like this:

  10.        185:                O: O141 generate-operator(link(throw.v--comp2-->with.p)
       186:                ==>S: S165 (operator no-change)
       187:                   O: C277 (check subcat)
       188:                   O: C275 (check receiver-follows)
       189:                   O: C273 (check not-duplicate-relation)
       190:                   O: O145 (constraint-success)
       191:             O: C269 link(throw.v--comp2-->with.p)

 
This means that the operator C269 has linked the prepositional phrase with ragged seams as a second complement of the verb throws.  This is an incorrect linkage; the system remedies this shortly.  Continue for another 110 decision cycles or so.  Then watch as the following processing takes place:
       306:       O: A469 (access word: 'to' spkr: user)
       307:       O: O226 (learn-language)
       308:       ==>S: S241 (operator no-change)
       309:          O: O232 (install-initial-state)
       310:          O: O229 (u-constructor579)
       311:          ==>S: S255 (operator no-change)
       312:             ==>S: S256 (state no-change)
       313:                O: O236 generate-operator(link(seams.v--comp-->to.p)
       314:                ==>S: S257 (operator no-change)
       315:                   O: C458 (check form)
       316:                   O: C456 (check subcat-feature)
       317:                   O: C454 (check subcat)
       318:                O: O237 generate-operator(link(throw.v--comp2-->to.p)
       319:                ==>S: S258 (operator no-change)
       320:                   O: C467 (check subcat)
       321:                   O: C465 (check receiver-follows)
       322:                   O: C469 (check duplicate-relation)
       323:                   O: O246 (constraint-success)
       324:             O: C444 link(throw.v--comp2-->to.p)
       325:             O: O247 snip(with)
       326:             ==>S: S261 (state no-change)
       327:                O: O250 generate-operator(link(baseballs.n--adjoin-->with.p)
       328:                ==>S: S262 (operator no-change)
       329:                   O: C482 (check dummy-constraint)
       330:                   O: C480 (check subcat-bead)
       331:                   O: C478 (check receiver-follows)
       332:                   O: O251 (constraint-success)
       333:             O: C477 link(baseballs.n--adjoin-->with.p)
       334:             ==>S: S263 (state no-change)
       335:                O: O253 (exhausted)
       336:          O: O254 (return-operator)
       337:       O: O229 (u-constructor579)
       338:       ==>S: S266 (operator no-change)
       339:          O: O256 (completed)
       340:       O: W1406 (wait)
       341:       O: W1406 (wait)
     
  1. Note what happens: after the word to is accessed, NL-Soar learns what to do with this preposition. The steps in this process include the following: