![]() |
Modern Grammar - Assignment 14 ![]() James Madison University |
INSTRUCTIONS: Do each of the questions below. Note that (except with very high resolution monitors) this assignment page looks best in a fully-expanded browser window. Your browser must handle JAVA to use this page, and there may be some differences in appearance and performance depending on which browser you use. [The assignment will be marked only as an acceptable or unacceptable effort.]
First, let's think about syntactic categories. Categories include the lexical categories (word classes) we've already discussed and the phrasal categories that can be built from lexical categories. Categories are the building blocks of sentence structure. The first step in writing the syntactic rules for a language is to determine what categories are needed. On the right is the LLAMA Category Editor. You enter categories by typing them in the small entry field near the bottom of the editor, and then clicking on the Add button.
Let's try adding some categories. Click on the entry field, type
S, and then click on Add. The category S should
appear at the top of the list. (If you make a mistake, click on the "tips
lightbulb" below to see how to fix it.) Now click to the right of the S,
hit the backspace key, type NP, and click on Add
again. Next, add each of the following in the same way: N, VP, V, det.
Once you've determined what categories you need, it's time to start thinking
about how they should combine into phrase structure rules. On the far right
is the LLAMA Rule Editor. You enter rules by typing a single category, the
lefthand side of the rule, into the first entry field (to the left of the
arrow), then typing a set of one or more categories, the righthand side of
the rule, into the second entry field (to the right of the arrow), and
finally, clicking on the Add button. LLAMA Rule Editor takes care of adding
the arrow. Try adding the rule S -> NP VP. Begin by clicking on the entry
field to the left of the arrow and typing S. Now click on the
entry field to the right of the arrow and type NP VP. (Note the space
in between NP and VP.) Finally, click on Add. The rule
should appear at the top of the rule list. (If you make a mistake, click on
the "tips lightbulb" below to see how to fix it.) Next add each of the
following rules in the same way:
If you want to see a "treelet"(piece of a tree structure built by a single rule),
you can do so by using the LLAMA Rule Drawer on the near right. Clicking on
the Draw Selected Rule button will draw the treelet for whichever rule is
highlighted in the Rule Editor. Try clicking on S -> NP VP and then
clicking on Draw Selected Rule. A small tree with S at
its top should appear in that window.
Of course, the actual full tree that you want to draw depends on the sentence
or other grammatical form that you want to represent. Since sentences are made out of words (lexical
items), you next need to give your little grammar a lexicon. You can do
this with the LLAMA Lexicon Editor. You enter lexical items by typing a
single word into the first entry field (on the left), then typing a category
for this word into the second entry field (on the right), and finally,
clicking on the Add button. Try adding the lexical entry for "rules". Begin
by clicking on the left entry field and typing rules. Now click on
the right entry field and type N. Finally, click on
Add. The lexical entry for the word "rules" should appear at
the top of the lexicon list. (If you make a mistake, click on
the "tips lightbulb" below to see how to fix it.) Next add each of
the following lexical entries in the same way: the determiner (det) "the",
the verb (V) "work".
Finally, it's time to test your grammar. You can do this with the LLAMA Parser on the
right. Parsing is the process of seeing if a string of words is a grammatical form (such
as a sentence) in a grammar and determining the tree structure of grammatical forms.
Right now, the parser is set to try to parse a sentence because, as you can see in the
top right entry field, it is going to try to build a tree that has "S" as its "top node".
If you have entered everything correctly so far, you should now be able to parse the
sentence "The rules work!". Click on the entry field near the bottom of the Parser and
type The rules work! Now click on Parse. The tree for the
sentence you typed should appear in the parser window. If not, you'll get a message
letting you know that your grammar can't handle what you're trying to parse, and you can
go back and look for mistakes. If you have any questions about the Parser, click on the
"tips lightbulb" below.
CONGRATULATIONS, you've built your first grammar. Now, let's see if you
can figure out how to add to it...
Turn in your answers for the following:
You'll know you have the right answer when you can reproduce this tree
in the Parser.
Tips on using the Category Editor
NP -> det N, VP -> V.
Tips on using the Rule Editor
Tips on using the Lexicon Editor
Tips on using the Parser