Grammar Writing: Week 2: Difference between revisions
Line 136: | Line 136: | ||
<span style="color: blue>Task 1</span> | <span style="color: blue>Task 1</span> | ||
Add the types ''word'' and ''syntax'' as subtypes of bot. | Add the types ''word'' and ''syntax'' as subtypes of ''bot''. | ||
<span style="color: blue>Task 2</span> | <span style="color: blue>Task 2</span> | ||
Line 147: | Line 147: | ||
<span style="color: blue>Task 4</span> | <span style="color: blue>Task 4</span> | ||
Add all the words from examples (22)-(28) to your grammar. Give each word the SYNTAX value that will correctly predict the data in (1)-(22) in accordance with Case Principles 1 and 2! Give only a single lexical entry to words like ''Lilly'' and ''it''. Leave their CASE value unspecified. | |||
Revision as of 07:48, 26 October 2017
A Grammar for Cars
Defining a Car Type Hierarchy
Task 1
Load an empty signature.
In DesktopTrale, click on: Type Hierarchy -> Load TRALE Signature -> select the "signature" file in the directory grammars/dd-00-empty-signature. The type "bot" should appear. (You can center the visualization by right-clicking on the panel.)
Task 2
Add subtypes to "bot".
In DesktopTrale, expand and right-click the "bot" node in the TypeHierarchy tree navigation on lefthand side. Add appropriate subtypes. Note that only lower case letters and the underscore (_) are allowed as valid characters.
Task 3
Add features to the type car for fuel consumption and acceleration.
In DesktopTrale, add appropriate types for extent and speed as shown in the visualization. Add features, by clicking on "Edit TH". The focused type should be car(!).
Click on +feature, and select type extent. Name the feature fuel_consumption.
Click on +feature, and select type speed. Name the feature acceleration.
Click on the "Type Hierarchy" node in the "Your Grammar" tab. Your visualization should look like the one above.
The Grammar dt-01-FirstWords
You received a grammar with the name above. When you open the grammar, you will see that it just contains one type in the type hierarchy, namely the type bot. This is the most general type in all of grammars All other types that we define are its subtypes. The only purpose of bot is to allow us to define our own more specific subtypes that do some real work for us.
The goal of the first grammar is to write lexical entries for the two words lilly and smokes. All this grammar will then do is to recognize the two strings lilly and smokes and tell us that they represent words.
Before, we can write lexical entries or add anything else to a grammar, we first need to define the type hierarchy! We will do this together.
Task 1
Add the type word as a subtype of bot.
Now we have a first type in the grammar that we can do something useful with.
Task 2
Add the two words lilly and smokes!
Here, you can check what your grammar can do at this point: it recognises lilly and smokes and says that they are words. No more and no less!
If everything went well, then you have just successfully written your first grammar. Congratulations!
The Grammar dt-02-FirstFeature
Task 1
Add the types word and syntax as subtypes of bot.
Task 2
# Add the types noun and verb as subtypes of syntax.
# To the type word, add the feature SYNTAX of type syntax.
Task 3
Add the two words lilly and smokes. Give them the SYNTAX value that is appropriate for them.
The Grammar dt-03-POSFeatures
So far, your grammar treats all nouns alike. It says about every one of them that it is [SYNTAX noun]. But not all nouns behave alike. For instance, some can function as subjects, but not all of them can, as you can see below:
Subjects:
(1) Lilly danced.
(2) She danced.
(3) *Her danced.
(4) I danced.
(5) *Me danced.
(6) *Him danced.
(7) It danced.
We see that the following words can act as subjects: Lilly, she, I, it.
Let us now test what happens when we try to use these words as direct objects and objects of prepositions:
Direct objects:
(8) Fido likes Lilly.
(9) *Fido likes she.
(10) Fido likes her.
(11) *Fido likes I.
(12) Fido likes me.
(13) Fido likes him.
(14) Fido likes it.
Objects of prepositions:
(15) Fido talks about Lilly.
(16) *Fido talks about she.
(17) Fido talks about her.
(18) *Fido talks about I.
(19) Fido talks about me.
(20) Fido talks about him.
(21) Fido talks about it.
This data shows that the following words can act as objects: Lilly, her, me, him, it.
So we see that not all nouns behave alike. Some can occur only in subject position (I, he, she), some only in object position (her, him, me), and a third group can serve both as subject and as object (Lilly, it). When we look at contrasting pairs such as I-me, he-him, she-her, it is clear that the form of the word decides its use in sentences: the first form in each pair can act only as a subject and the second one only as an object. Following traditional grammar, we will account for this as follows:
Case Principle 1 English nouns belong to one of two grammatical cases: nominative and accusative.
Case Principle 2 Only nominative nouns can act as subjects and only accusative nouns can act as objects.
This accounts for the words that can only serve in one function. But what about the words like Lilly and it which can equally well act as subjects and objects? The answer is simple. We will say that these words can be both nominative and accusative!
Another noteworthy aspect of the observations above is that they only apply to words of part of speech noun. For verbs, adjectives, etc. it simply makes no sense to ask what grammatical case they carry.
This discussion leads us to introduce the concept of a part of speech features and their possible values. We will say that the part of speech noun has the feature CASE with the possible values nom(inactive) and acc(usative). Moreover, we will require that whenever a word belongs to part of speech noun, it must have the feature CASE and the feature must have one of the possible case values. words we tested above as follows:
(22) Lilly, noun,[CASE case]
(23) she, noun, [CASE nom]
(24) her, noun, [CASE acc]
(25) I, noun, [CASE nom]
(26) me, noun, [CASE acc]
(27) him, noun, [CASE acc]
(28) it, noun, [CASE case]
Example (24) can be used to illustrate how each of these lines is to be understood. It says three things: a. the word under discussion is her, b. the word belongs to the part of speech noun and c. for the noun feature CASE the word carries the value acc. The other words where the value of the feature is either nom or acc are interpreted in the same way. This leaves the words Lilly and it in (22) and (28): [CASE case] is our way of saying that a word is compatible with any possible specific case in English. Since there are only the two cases nom and acc, this means that (22) is a short way of writing the following two lines instead:
(22a) Lilly, noun,[CASE nom]
(22a) Lilly, noun,[CASE acc].
Exercise
Task 1
Add the types word and syntax as subtypes of bot.
Task 2
1. Add the types noun and verb as subtypes of syntax.
2. To the type word, add the feature SYNTAX of type syntax.
Task 3
1. To the type noun, add the feature CASE of type case.
2. Add the types nom and acc as subtypes of case.
Task 4
Add all the words from examples (22)-(28) to your grammar. Give each word the SYNTAX value that will correctly predict the data in (1)-(22) in accordance with Case Principles 1 and 2! Give only a single lexical entry to words like Lilly and it. Leave their CASE value unspecified.
Navigation:
Main Page Week 2 Week 3 Week 4 Week 5 Week 6 Week 7 Week 8