Modeling Language
Unit 1 Optional Project
In this project, you will create a program capable of creating more complicated language than the Gossip project.
- nouns (things)
- verbs (actions)
- adjectives (thing describers)
- adverbs (action describers)
- determiners (identifiers—tells you which thing)
- prepositions (relationship indicators)
-
It contains six reporters that each report a random word from a list of words in that category.
- Try out each block to see what it does. Then change these lists however you like to include your own nouns, verbs, etc.
-
Create a reporter called
simple sentencethat reports a simple sentence using therandom determiner,random noun, andrandom verbblocks.
-
More complicated sentences can be built up from multiple phrases. Create these phrase reporters:
-
should join words from two categories to make phrases like “the sandwich” or “a giraffe,” or from three categories to create phrases like “the little boy,” “a green giraffe,” or “our old sandwich.”
-
should combine a preposition with a noun phraseto create phrases like “near the little boy” or “over a wise pizza.” -
should report either just a verb like “jumps” or join a verb and an adverb to create combinations like “jumps sadly,” “naps quickly,” or “thinks sleepily.”
Using
noun phraseto defineprepositional phraseis a good example of abstraction. If you later changenoun phraseto include people’s names,prepositional phrasewill still work. -
-
Then, make a reporter
complicated sentencethat combines a noun phrase, a verb phrase, and a prepositional phrase.
These phrases will be grammatically correct, but they won’t necessarily make sense. For example, noun phrase might generate “a tired pizza.”
-
Occasionally, include people’s names instead of a
noun phrase. So, instead of something like “my silly elephant,” the program could sometimes use “Jamie” or other names. - Noun phrases don’t always have to have one adjective. They can have none, or two, or more. Add some variety.