Assignment 9: Construction Grammar Learning
Assigned Tuesday, April 24th
Due Tuesday, May 1st, in class.

This assignment involves two parts. The first is to get you familiar with the sentence analysis process, and the second to understand the grammar learning algorithm. You will be using a construction grammar analyzer to analyze sentences using a simple grammar written in ECG (Embodied Construction Grammar). You will then be asked to predict the result of grammar learning by examining sets of input tokens.

Please read O8, O9, Book Ch 25 before beginning this assignment.


Using the Analyzer

Run the program
Either download ECGL.jar (which is an older, clunkier version) or ECGLnew.jar (which is a newer version that requires java1.5). Unfortunately, the gui doesn't play well with remote execution, so I recommend using the newer version if you are in the labs or have java1.5 installed on your home machine. You can check which java you have by typing "java -version" at the prompt. Also if you follow the instructions for the newer version and get an "UnsupportedClassVersionError", you know that you don't have java1.5.

Additionally, you need to download the grammar files a9.ecg and nomi.ecg to your local directory. In the directory within which you downloaded the appropriate jar file:

If you are using ECGLnew.jar (the newer version), run the analyzer/gui by typing:

java -jar ECGLnew.jar

This will start the gui up. Additionally, under the Setting->Set parameters menu item, don't forget to set the "maximum skipped items" to 1.

If you are using ECGL.jar (the older version), run the analyzer/gui by typing:

jar xf ECGL.jar
java -classpath classes ecgs.ECGL -s

The older version of the gui is much more of a work in progress, so a lot of the menus aren't yet fully functional. There are a few bugs as well. So: please follow the directions closely. You can feel free to poke around, of course, but be patient with non-functional or buggy stuff if you do.

Load a grammar
To load in a grammar, go to File > Load Grammar, and select the grammar file you want to use. As an example, load in a9.ecg.

You'll see that the CONSTRUCTIONS pane has been filled in with a hierarchical tree. These are the constructions available in this (very limited) grammar, corresponding to early (~12 mo.) in a child's linguistic development. The SCHEMAS pane has also generated a hierarchy of the schemas for this grammar. Clicking on any of the constructions or schemas in these two panes will display the corresponding construction or schema in the adjacent panes.

Analyze some sentences
To analyze a sentence, type it into the text field labeled "Enter sentence to analyze" and hit enter. Note: the analyzer does not accept punctuation. Try analyzing I will bring the cup .

The CHART pane will then generate a table which displays the parsing of the sentence according to the known constructions. So, for example, bring is labeled with the "Bring" construction (Bring-Cn1). Notice that the analyzer only understands some of the words; "will" and "the" are not labeled because it does not know these words (i.e., they are not in the grammar). Sometimes the grammar will also find constructions which it doesn't use in its final parsing; these will show up in the CHART but will be left unshaded.

Note also that the CHART is hierarchical: lower level (level 0, in fact: see the lefthand column) constructions have been found for the individual words I, bring, and cup; and a sentence-long Transitive construction has been found to span the aforementioned ones (level 2--don't worry about the numbering for now but, roughly, higher numbers correspond to constructions which span more words). In finding the spanning construction, the analyzer skipped the words it didn't recognize--hence the "Skipped: 1 3" in the Transitive-Cn1 box. This indicates that the first and third words have been skipped (I is the zeroth word). You can change the number of words the analyzer will skip by pulling down the Settings > Set learning parameters menu and adjusting the appropriate meter (the default is 1).

Clicking on any one of the constructions that do appear will display its associated Semantic Specification (SemSpec). So, for example, if you click on the Transitive construction, its SemSpec will be displayed, showing (inter alia) three schemas: Referent1 (Speaker), CauseMove, and Referent2 (Cup). Check to see that the speaker is correctly identified with the causer and agent, and that the cup is correctly identified with the mover.

Finally, try typing in the sentence Bring the cup. Notice that the analyzer fails to find a construction which spans the sentence--only single-word constructions appear in the CHART. Check this against the grammar: the transitive construction requires three constituents, the agent, the verb and the object. We know of course that the sentence is grammatically well-formed, but this grammar has not yet learned the imperative-mood form of bring.


Supplementary Notes

Note 1: For more info about ECG from its creators, NTL people all, see the webpages of Nancy Chang, Johno Bryant, and Eva Mok.

Note 2: Recall that schemas represent non-linguistic conceptual knowledge, whereas constructions are pairings of form and meaning. For more info, see chapters 23 and 24 of Prof. Feldman's book.

Note 3: Recall that the SemSpec is our way of representing links or bindings among schemas. Again, consult the chapters cited in Note 2 for more info.

Note 4: A transitive verb takes a subject and a (direct) object; an intransitive verb takes no object; and a ditransitive verb takes a subject and two objects (one direct, the other indirect).

Part I: Analysis

Using a9.ecg, analyze the following sentences:

(a) I will bring you the cup

What is the difference between this analysis and the one for I will bring the cup? How is this difference captured in the grammar?

(b) I will bring the cup here

Does the analyzer find a spanning analysis? Why or why not? How does the analysis account for the destination of the bring action, if at all?

(c) * Nomi give I the ball

Does the analyzer find a spanning analysis here? If it does not, explain why. If it does, propose a change to the grammar that will exclude this sentence from being admitted as grammatical.


Part II: Learning

Now load in nomi.ecg. The file is identical to a9.ecg except it does not contain the following two constructions: the transitive construction and the ditransitive construction. It contains a number of basic schemas and mostly lexical constructions (and a phrase red ball). This approximates the single-word stage in child language acquisition.

Assume that this is the initial grammar that the child learner (Nomi) is using at the beginning of a play time one day. Remember that when a child acquires language, she has a lot of background knowledge as well as contextual knowledge at her disposal. Below is a pictorial description of the scene in which the utterances were said. In the learning system code, this scene will be encoded as a number of schemas linked together. The scene includes the following descriptive knowledge:

Over the course of interacting with her parents and playing with toys, Nomi hears the following six utterances from her parents, accompanied by some context:

  1. (Father) I will bring you some juice - Father went and retrieved the jug of orange juice from the dinning table.
  2. (Father) I will get a cup for you Nomi - Father brought over the cup for Nomi.
  3. (Mother) Nomi you can get a book and bring it back here - Mother also gestured at the books and then made a familiar "come here" gesture.
  4. (Mother) now get the red ball Nomi - Mother shifts her attention to the red ball that is sitting among Nomi's toys.
  5. (Father) would you get that and give it to me please - Father reiterated Mother's request for the red ball while pointing to the red ball.
  6. (Mother) get the baby and bring her to bed - Mother got up and waved for Nomi to come along to the bedroom.

Assume that Nomi is a linguistically precocious child, so that she hypothesizes new constructions (albeit lexically specific ones) with every utterance she hears. According to the verb-island hypothesis, children tend first to learn verb-specific constructions (e.g. get-ball construction, or throw-block construction) and then later on to generalize across verbs. Based on this principle, as well as the three learning mechanism we discussed in lecture (relational mapping, merging, composing), simulate by hand what Nomi might learn from these sentences.

  1. For each utterance listed above,

    1. analyze the sentence using nomi.ecg, and compare the SemSpec against what is available in the context,
    2. state any relational mapping operations that may be performed and write down the new construction (if any) in ECG notation (i.e., as it appears in the analyzer). Focus on verb island constructions combining 2 or 3 words.
    3. To help make this clearer, here is one construction that might be learned from sentence 1. Note that it is essentially a mapping of the CauseMove that Nomi observed onto the sentence she heard (which she partially understood).
      construction Bring-Juice-Cn
      level 1
      constructional constituents
      bring: Bring-Cn
      juice: Juice-Cn
      form constraints
      bringf before juicef
      meaning
      evokes Father as father
      evokes Nomi as nomi
      constraints
      bringm.agent <-> father
      bringm.direction <-> nomi
      bringm.patient <-> juicem
  2. At the end of the six utterances, state two learning by merging operations that can be performed on the new sets of constructions Nomi just acquired.

Readings:
O8, O9, Book Ch 25