Assignment 8: javaKARMA
Assigned Thursday, April 17th
Due Thursday, April 24th, by 11:59pm - submit electronically.
This assignment involves the use of Srini Narayanan's model for metaphoric interpretation. Please read O6 in your reader before starting this assignment. You should also allow yourself plenty of time in the lab to complete the assignment.
Briefly describe the frame
semantics of the concept Journey:
Additional tip: see here for an example
frame.
Event Structure Metaphor
Here is the locative version
of the basic event structure metaphor (ESM):
Target Domain (event structure) |
Source Domain (physical space) |
States |
Locations (interiors of
bounded regions in space) |
Changes |
Movements (into or out of
bounded regions) |
Causes |
Forces |
Causation |
Forced Movement (from one
location to another) |
Actions |
Self-propelled Movements |
Purposes |
Destinations |
Means |
Paths |
Difficulties |
Impediments to Motion |
Freedom of Action |
Lack of Impediments to
Motion |
External Events |
Large, Moving Objects (that
exert force) |
Long-term Purposeful
Activities |
Journeys |
2. Running the KARMA demo
Getting Started
gtar
xzf met.tar.gz
or unzip met.zip
cd
met
to get to the right
directory.java -jar met.jar
met-rep
to start the program. (met-rep is the network we
will be working on)Note: if at some point in the process you get a message saying that you are over the disk quota, you should erase some of your previous files from the account, such as the .netscape/cache files.
Basic
operation
Sometimes the javabayes window doesn't update
after you issue a command through the console, so just minimize and then restore
the window to see the updates (especially important if you don't see anything
happening after you run the inference).
If you survived the installation, you will see two windows, one that displays the net you will be using (labeled "JavaBayes Editor") and the other that is a console for interaction and help (labeled "KARMA Console"). The network window will henceforth be referred to as the Network and the text window as the Console.
You will be mainly working in the Console window and observing color changes in the Network window. You are of course welcome to play in the Network window, with the understanding that if you modify the network, you will be responsible for recreating the original; make sure you copy the network file to a backup if you decide to play around with the network. See here for some other options.
In the Network window, you will notice a bunch of columns of nodes:
If you know the POLICY (Liberalization) of a Government, you know the GOAL (Unregulated_freetrade) of the policy.
This knowledge is represented as the link between the POLICY and GOAL variables in the target domain network. Note that there are links between nodes in different time slices of the target domain network. Many of these correspond to temporal persistence links. All links are quantified by conditional probabilities as explained in class.
In the Console window, you will need to use only two of the menus shown across the top:
The main point of interaction will be the Input F-struct menu. The Input F-struct menu has options that correspond to the semantic features and values of the linguistic input. For instance, the input sentence (or headline) Indian government stumbling in liberalization plan has features and values:
Actor -> Indian Government
Source Domain Schema Name and Parameters ->
Event = Stumble -> Stumble Aspect -> Progressive (be + Stumbling)
Source Domain Schema Name and Parameters ->
Event = Stumble -> Stumble Path -> in Liberalization Plan
Similarly the input sentence US Economy Crawling has features and values:
Actor -> US Economy
Source Domain Schema Name and Parameters ->
Event = Self Propelled Motion -> Motion Type/Manner -> Motion = Crawl
Source Domain Schema Name and Parameters ->
Event = Self Propelled Motion -> Motion Aspect -> Progressive
While you input this information, you may notice some text on the Console that informs you of the program's response to your input. You will also notice that some of the nodes in the Network have changed color from their rather staid yellow to a bright blue or green, and yet others have turned completely red! Not to worry. This is the result of x-schema executions and metaphor projections to the belief network.
The conventions on node color are as follows:
· Nodes that are not affected in the current context are shown in Yellow.
· Direct input (such as Actor = Indian Government, or Event = Fall) are shown in Blue.
· Active metaphors (such as FALL_IS_FAIL) are shown in Cyan.
· Metaphoric inferences (such as "stumble" implying the presence of an obstacle that is projected to a target domain difficulty) are shown in Green.
· Target domain nodes whose probability changes as a result of metaphoric inference are shown in red. For example, the inference corresponding to the Outcome at time 2 (OUTCOME(2), when a difficulty is asserted at time 1 (DIFF(1)) is shown in red.
After staring at the colors for a suitable length of time, you can go to the Console and select "Inference -> Do Inference" from the menu bar. This will print the direct input (blue node) values and direct metaphoric projections (green node) values to the Console, along with the best estimates of indirect inference values (red nodes). If you want to save your session at any time to a file, just use the "Saving the Session -> Save Console to File" option.
If you want to examine the probability of a node not in the above set (not required for the assignment), just select Options -> Individual Node Probabilities from the Console menu and then select Query in the Network window. Click on any node from the Network window to get the posterior probability distribution for this specific variable.
Each of the following problems involves experimentation with some example inputs. In each case, you should:
· For most questions, you must reset the network after every example using Network Options -> Reset Network. For problem 3.3, you will not reset the network.
·
Enter the F-struct
by selecting appropriate items from the Input F-struct menu. You must use your understanding of the
sentence to derive the correct F-struct, as we did
above in the examples about the Indian government and the
· Examine the Network window to see what nodes have been affected (noting in particular any green nodes indicating metaphoric inferences; you can check these values by clicking on the appropriate node while in the "Observe" mode in that window.
· Run the inference query (Inference -> Do Inference) and note any additional inferences that have been made (these correspond to values of the red nodes and are displayed in the Console).
· Answer the corresponding questions. Try to give explanations in terms of the model, making use of the results of your experimentation as appropriate.
a. What is the (linguistic) difference between
How does the KARMA program capture this difference?
b. What is the (linguistic) difference between
a. The following sentences differ only in the manner of motion expressed:
o
The
o
The
o
The
What feature in the target domain is most affected by the specific manner of motion involved? How do the metaphoric inferences differ for these sentences? How does the KARMA program capture this difference?
b. What is the (linguistic) difference between
For this problem, you will process multiple inputs (two of them *). The only change from the previous instructions is that you SHOULD NOT reset the network between the two inputs. After the two inputs have been entered you should do Inference -> Do Inference and save the session if you want as before. Then select Network Options -> Reset Network... to process the next sequence of events.
· US Economy was at a standstill, but it is now sprinting.
·
For each sentence, briefly describe the metaphoric inferences made by the system.
3.4 New metaphors
Consider the following :
·
· The Economy is healthy again.
· Free trade is the best therapy.
These sentences all involve extending the KARMA demo system.
1. Identify the metaphor used in these sentences, and give a systematic list of the mappings in terms of frame semantics.
2. Suppose you wanted to modify the KARMA system to handle these sentences and make inferences about them. What X-Schema's would have to be added?
3. Show how you would extend the Bayes net for the target domain (i.e. economics) to add any variables needed for reasoning about the "health" of an economy. You do not need to give the actual probability tables, but you should show the structure of the network, and the possible values that the variables take.
4. What would be the mappings between the X-Schema's from part 2) and the Bayes net from part 3)?
This section is not part of the assignment; some additional input sentences/headlines you may wish to explore are included here.
· German economy continues to crawl.
·
· Indian government making giant strides toward liberalization
Reader: O6
To reload the network from scratch for any reason (without quitting the program), click on the "Network Options -> Open ..." option, and this will open up a file dialog box. Select (or type) the filename "met-rep" into the dialog, and this will reload the original network. The menu item entitled "Options" allows you to play with various options. You can look at an individual node and its probability distribution, or find the best posterior explanation for all the nodes. For the assignment, you will probably not need this menu at all. However, you are welcome to experiment with it and may in fact find some of the other inference options helpful for understanding how the system works. You can save your entire session to a file by selecting "Saving The Session -> Save Console to file", which opens up a file dialog box and sends the contents of the console to the selected/typed file.
*Note: Unfortuantely, memory and class-specific constraints allow for only two inputs, but you should be able to visualize how a larger sequence can be handled. Potentially a fairly long dependency chain can be established during the course of a narrative, and such an ability to use the current state as context for the next input turns out to be vital.