The communication between speaker and hearer can be formalized with a dialogue grammar which contains of objects and actions. The grammar stores a language in a compact format. Possible sentences are:
- Put the clean plate on the table.
- Place the large bowl beside the sink.
- Move the blue cup to the counter.
- Cut the small red tomato.
- Wash the dirty pan.
- Open the cabinet.
- Take the bottle from the refrigerator.
- Put the whole apple into the bowl.
- Clean the empty sink.
- Please place the warm bread on the table.
- ----
- Peel the small yellow potato.
- Place the clean glass on the counter.
- Move the large pan to the stove.
- Put the red pepper into the bowl.
- Wash the dirty spoon in the sink.
- Take the cold bottle from the refrigerator.
- Chop the whole onion on the worktop.
- Open the white cabinet.
- Fill the empty cup with water.
- Please serve the warm bread on the table.
- ----
- Slice the green tomato.
- Put the round plate onto the table.
- Clean the large sink.
- Bring the blue cup to the counter.
- Place the sharp knife beside the cutting board.
- Mix the ingredients in the bowl.
- Close the open cabinet.
- Empty the full container into the pan.
- Dry the clean glass near the sink.
- Heat the cold soup on the stove.
All these sentences doesn't require the full English vocabulary and the standard grammar for English but the sentences are formulated as a mini language specified in the BNF grammar. Such a mini language can be implemented easier as a parser for robot.
<instruction> ::= <command>
| <sequence>
| <conditional-command>
<command> ::= <imperative>
| <polite-imperative>
<polite-imperative> ::= "please" <imperative>
<imperative> ::= <transitive-command>
| <intransitive-command>
| <movement-command>
| <placement-command>
| <cleaning-command>
<transitive-command> ::= <transitive-verb> <object-phrase>
<intransitive-command> ::= <intransitive-verb>
| <intransitive-verb> <location-phrase>
<movement-command> ::= <movement-verb> <location-phrase>
| <movement-verb> <object-phrase> <location-phrase>
<placement-command> ::= <placement-verb> <object-phrase>
| <placement-verb> <object-phrase> <location-phrase>
<cleaning-command> ::= <cleaning-verb> <object-phrase>
| <cleaning-verb> <location-phrase>
<sequence> ::= <command> "and then" <command>
| <command> "," <command>
| <command> "then" <command>
<conditional-command> ::= "if" <condition> "then" <command>
<condition> ::= <object-existence>
| <state-condition>
<object-existence> ::= "there is" <object-phrase>
| "there are" <object-phrase>
<state-condition> ::= <object-phrase> <state-adjective>
| <location-phrase> <state-adjective>
<object-phrase> ::= <determiner> <adjective-sequence> <object-noun>
| <determiner> <object-noun>
| <possessive> <adjective-sequence> <object-noun>
| <possessive> <object-noun>
<location-phrase> ::= <preposition> <determiner> <adjective-sequence> <location-noun>
| <preposition> <determiner> <location-noun>
| <preposition> <location-noun>
<adjective-sequence> ::= <adjective>
| <adjective> <adjective-sequence>
<transitive-verb> ::= "wash"
| "cut"
| "chop"
| "slice"
| "peel"
| "mix"
| "stir"
| "pour"
| "fill"
| "empty"
| "open"
| "close"
| "pick up"
| "put down"
| "take"
| "bring"
| "place"
| "move"
| "put"
| "heat"
| "cool"
| "serve"
<intransitive-verb> ::= "wait"
| "stop"
| "start"
| "continue"
| "turn"
| "pause"
<movement-verb> ::= "go to"
| "move to"
| "take"
| "bring"
| "carry"
<placement-verb> ::= "place"
| "put"
| "set"
| "leave"
<cleaning-verb> ::= "clean"
| "wash"
| "dry"
| "wipe"
<object-noun> ::= "apple"
| "banana"
| "tomato"
| "potato"
| "onion"
| "carrot"
| "pepper"
| "bread"
| "cheese"
| "egg"
| "plate"
| "bowl"
| "cup"
| "glass"
| "pan"
| "pot"
| "knife"
| "spoon"
| "fork"
| "bottle"
| "container"
| "ingredient"
| "food"
<location-noun> ::= "kitchen"
| "counter"
| "table"
| "sink"
| "stove"
| "oven"
| "refrigerator"
| "drawer"
| "cabinet"
| "shelf"
| "dishwasher"
| "cupboard"
| "floor"
| "worktop"
<adjective> ::= <color-adjective>
| <size-adjective>
| <state-adjective>
| <shape-adjective>
| <temperature-adjective>
| <quantity-adjective>
<color-adjective> ::= "red"
| "green"
| "yellow"
| "blue"
| "white"
| "black"
<size-adjective> ::= "small"
| "large"
| "big"
| "tiny"
| "deep"
| "shallow"
<state-adjective> ::= "clean"
| "dirty"
| "empty"
| "full"
| "open"
| "closed"
| "hot"
| "cold"
| "ready"
| "broken"
<shape-adjective> ::= "round"
| "square"
| "flat"
| "sharp"
<temperature-adjective> ::= "warm"
| "cool"
| "hot"
| "cold"
<quantity-adjective> ::= "single"
| "extra"
| "remaining"
| "whole"
| "half"
<determiner> ::= "the"
| "a"
| "an"
| "this"
| "that"
| "these"
| "those"
<possessive> ::= "my"
| "your"
| "the robot's"
<preposition> ::= "to"
| "from"
| "on"
| "in"
| "into"
| "onto"
| "under"
| "beside"
| "near"
| "behind"
| "inside"
| "out of"
No comments:
Post a Comment