From 47c799dc3852d25c5df75c12d7b5ec2b7e8eb2a0 Mon Sep 17 00:00:00 2001 From: lgraesner <lgraesner@techfak.uni-bielefeld.de> Date: Thu, 29 Jun 2023 22:40:56 +0200 Subject: [PATCH] our grammar now understands every single possible command --- psGrammar/tasks/gpsr/gpsr23.jsgf | 80 +++++++++++++++++++++----------- 1 file changed, 52 insertions(+), 28 deletions(-) diff --git a/psGrammar/tasks/gpsr/gpsr23.jsgf b/psGrammar/tasks/gpsr/gpsr23.jsgf index 88db7859..8e590cd9 100644 --- a/psGrammar/tasks/gpsr/gpsr23.jsgf +++ b/psGrammar/tasks/gpsr/gpsr23.jsgf @@ -2,33 +2,34 @@ grammar speechRecognition; -public <sentence> = [could you | robot | tobi] [please] <command>; +public <sentence> = [could you | robot | tobi | tiago] [please] <command>; <command> = (<cmdfndppl> | <cmdfndobj> | <cmdguide> | <cmdfollow> | <cmdfollowout> | <cmdincomplete> | <cmdman> | <complexman> | <cmdpartyhost>); -<cmdfndppl> = <tellPrsInfoInLoc> | <countPrsInRoom> | <talkInfoToGestPrsInRoom> | (<findPrsInRoom> and <answerQuestion>) | (<goToLoc> <findPrs> and <answerQuestion>); +<cmdfndppl> = <tellPrsInfoInLoc> | <countPrsInRoom> | <talkInfoToGestPrsInRoom> | (<findPrsInRoom> and <answerQuestion>) | (<goToLoc> <findPrs> and (<answerQuestion> | <talkInfo>)) | (<answerToGestPrsInRoom>); -<cmdfndobj> = <findObjInRoom> | <countObjOnPlcmt> | <tellCatPropOnPlcmt> | <tellObjPropOnPlcmt>; +<cmdfndobj> = <findObjInRoom> | <countObjOnPlcmt> | <tellCatPropOnPlcmt> | <tellObjPropOnPlcmt> | <findThreeObjInRoom>; -<cmdguide> = <guideNameFromBeacToBeac> | (<meetPrsAtBeac> and <guidePrsToBeacon>) | (<goToLoc> <meetName> and <guidePrsToBeacon>); +<cmdguide> = <guideNameFromBeacToBeac> | (<meetPrsAtBeac> and <guidePronToBeacon>) | (<goToLoc> <meetName> and <guidePronToBeacon>) | <guideNameToBeacFindAtBeac>; <cmdfollow> = <followNameFromBeacToRoom> | (<meetPrsAtBeac> and (<followPrs> | <followPrsToRoom>)) | (<goToLoc> <meetName> and (<followPrs> | <followPrsToRoom>)); -<cmdfollowout> = <meetPrsAtBeac> <followPrs> and (<goToLoc> | <guidePrsBack>); +<cmdfollowout> = <meetPrsAtBeac> <followPrs> and (<goToLoc> | <guidePronBack>); -<cmdincomplete> = <followName> | <deliverObjToMe> | <guidePrsToBeacon> | (<goToLoc> <meetName> and <guidePrsIncomplete>); +<cmdincomplete> = <followName> | <deliverObjToMe> | <guideNameToBeacon> | ([<goToLoc>] <meetName> and <guidePronIncomplete>); -<cmdman> = <bringMeObjFromPlcmt> | (<takeObjFromPlcmt> and (<deliverObjPronToMe> | <deliverObjToNameAtBeac>)) | (<takeObjFromPlcmt> and <placeObjPronOnPlcmt>); +<cmdman> = <bringMeObjFromPlcmt> | (<takeObjFromPlcmt> and (<deliverObjPronToMe> | <deliverObjToNameAtBeac>)) | ((<takeObjFromPlcmt> | <takeObj>) and <placeObjPronOnPlcmt>) | <deliverObjToGestPrsInRoom> | <bringToTaxi> | <bringMeObj> | (<goToLoc> <findObj> and (<deliverObjPronToMe> | <placeObjPronOnPlcmt>)) | <placeObjOnPlcmt> | <bringObjFromRoomToPlcmt>; -<complexman> = skyler; +<complexman> = <deliverObjToPlacement> | <bringMeRelObjFromPlcmt> | <bringMeShapedObjFromPlcmt> | <cleanRoom> | <takeOutTheGarabage>; -<cmdpartyhost> = <serveDrinks> | (<meetPrsAtBeac>| <meetprsAtDoor> and <introduce>) | (<meetPrsAtBeac> and <requestleave>) | (<meetPrsAtBeac> and <guidePrsToTaxi>); +<cmdpartyhost> = <serveDrinks> | ((<meetPrsAtBeac>| <meetprsAtDoor>) and <introduce>) | (<meetPrsAtBeac> and <requestleave>) | (<meetPrsAtBeac> and <guidePrsToTaxi>); <goToLoc> = <V_go> <toLocPrep> (<NP_room> | <NP_placement> | <NP_beacon>); <findObj> = <V_find> <NP_object>; <findObjInRoom> = <V_find> (<NP_object> | <NP_category>) <inLocPrep> <NP_room>; +<findThreeObjInRoom> = <V_find> <N_three> <NP_category> <inLocPrep> <NP_room>; <takeObj> = <V_take> <NP_object>; <takeObjFromPlcmt> = <V_take> <NP_object> <fromLocPrep> (<NP_room> | <NP_placement>); @@ -48,37 +49,48 @@ public <sentence> = [could you | robot | tobi] [please] <command>; <followPrs> = <V_follow> <NP_personalpron>; <followPrsToRoom> = <V_follow> <NP_personalpron> <toLocPrep> <NP_roomTwo>; <followName> = <V_follow> <NP_name>; -<followNameFromBeacToRoom> = <V_follow> <NP_name> <fromLocPrep> <NP_beacon> <toLocPrep> <NP_roomTwo>; +<followNameFromBeacToRoom> = <V_follow> <NP_name> <fromLocPrep> (<NP_beacon> | <NP_room>) <toLocPrep> <NP_roomTwo>; <meetName> = <V_meet> <NP_name>; <meetPrsAtBeac> = <V_meet> <NP_name> <atLocPrep> <NP_beacon>; <meetprsAtDoor> = <V_meet> <NP_name> <atLocPrep> <NP_door>; + +<bringObjFromRoomToPlcmt> = <V_take> <NP_object> <fromLocPrep> <NP_room> <toLocPrep> <NP_placement>; +<bringMeObj> = <V_bring> <NP_me> (<NP_object> | <NP_category>); +<bringMeObjFromPlcmt> = <V_bring> <NP_me> (<NP_object> | <NP_absobject>) <fromLocPrep> <NP_placement>; +<bringMeRelObjFromPlcmt> = <V_bring> <NP_me> <NP_relObject> <NP_object> <fromLocPrep> <NP_placement>; +<bringMeShapedObjFromPlcmt> = <V_bring> <NP_me> <NP_shapeObjectCat> <fromLocPrep> <NP_placement>; -<bringMeObj> = <V_bring> <NP_me> <NP_object>; -<bringMeObjFromPlcmt> = <V_bring> <NP_me> <NP_object> <fromLocPrep> <NP_placement>; <countObjOnPlcmt> = <V_count> (<NP_object> | <NP_category>) there are <placePrep> <NP_placement>; <countPrsInRoom> = <V_count> people in <NP_room> <arePrep> (<NP_posture> | <NP_genderpersonplural>); <tellPrsInfoInLoc> = <V_tell> me <NP_personattribute> of the person <LocPrep> (<NP_room> | <NP_beacon>); -<tellObjPropOnPlcmt> = <V_tell> me ((what is) | whats) <NP_objectprop> object <onLocPrep> <NP_placement>; -<tellCatPropOnPlcmt> = <V_tell> me ((what is) | whats) <NP_objectprop> <NP_category> <onLocPrep> <NP_placement>; +<tellObjPropOnPlcmt> = <V_tell> me ((what is) | whats | (which are)) <NP_objectprop> (object | objects) <onLocPrep> <NP_placement>; +<tellCatPropOnPlcmt> = <V_tell> me ((what is) | whats | (which are)) <NP_objectprop> <NP_category> <onLocPrep> <NP_placement>; <deliverObjToMe> = <V_deliver> (<NP_object> | <NP_category>) <deliverPrep> <NP_me>; <deliverObjPronToMe> = <V_deliver> <NP_objectpron> <deliverPrep> <NP_me>; -<deliverObjToGestPrsInRoom> = <V_deliver> [<NP_objectpron>] <NP_object> <deliverPrep> <NP_gestperson> <inLocPrep> <NP_roomTwo>; +<deliverObjToGestPrsInRoom> = <V_deliver> (<NP_object> | <NP_category>) <deliverPrep> <NP_gestperson> <inLocPrep> <NP_roomTwo>; <deliverObjToNameAtBeac> = <V_deliver> <NP_objectpron> <deliverPrep> <NP_name> <atLocPrep> <NP_beaconTwo>; +<deliverObjToPlacement> = <V_take> <NP_object> <deliverPrep> <NP_placement>; -<guidePrsIncomplete> = <V_guide> <NP_personalpron>; -<guidePrsBack> = <V_guide> <NP_personalpron> back; -<guidePrsToBeacon> = <V_guide> <NP_personalpron> <toLocPrep> <NP_beaconTwo>; +<guidePronIncomplete> = <V_guide> <NP_personalpron>; +<guidePronBack> = <V_guide> <NP_personalpron> back; +<guidePronToBeacon> = <V_guide> <NP_personalpron> <toLocPrep> <NP_beaconTwo>; +<guideNameToBeacon> = <V_guide> <NP_name> <toLocPrep> <NP_beaconTwo>; <guideNameFromBeacToBeac> = <V_guide> <NP_name> <fromLocPrep> <NP_beacon> <toLocPrep> <NP_beaconTwo>; <guideNameToBeacFindAtBeac> = <V_guide> <NP_name> <toLocPrep> <NP_beaconTwo> you (may | can | will) find (them | him | her) <atLocPrep> <NP_beacon>; -<serveDrinks> = <V_serve> <NP_partyfood> to ((everyone | everybody) | (all the <NP_agegenderpersonplural>)) in the <N_room>; -<introduce> = <V_introduce> <NP_personalpron> to <NP_agegenderpersonplural> | (<NP_name> <LocPrep> <NP_beaconTwo>); +<serveDrinks> = <V_serve> <NP_partyfood> to (((everyone | everybody) | (all the <NP_agegenderpersonplural>)) | <NP_gestperson> in <NP_room>); +<introduce> = <V_introduce> <NP_personalpron> to ((((everyone | everybody) | (all the <NP_agegenderpersonplural>)) <LocPrep> <NP_room>) | (<NP_name> <LocPrep> <NP_beacon>)); <requestleave> = <V_ask> <NP_personalpron> to <V_leave>; -<guidePrsToTaxi> = <V_guide> <NP_personalpron> <toLocPrep> <NP_taxi>; +<guidePrsToTaxi> = <V_guide> <NP_personalpron> <toLocPrep> [<NP_personalpron>] <NP_taxi>; + +<cleanRoom> = <V_clean> <NP_room>; +<takeOutTheGarabage> = <V_dump> <NP_garbage>; + +<bringToTaxi> = <V_take> my <N_luggage> <toLocPrep> <NP_taxi>; <deliverPrep> = to; @@ -91,6 +103,11 @@ public <sentence> = [could you | robot | tobi] [please] <command>; <LocPrep> = in | at; <onLocPrep> = on; <arePrep> = are; +<absPrep> = <direction> most; +<relPrep> = (at the <direction> of ) | <position>; +<direction> = left | right; +<position> = above | behind | under | (on top of); +<shape> = biggest | largest | smallest | heaviest | lightest | thinnest; <V_take> = bring | take | get | grasp | (pick up); <V_place> = put | place; @@ -101,7 +118,7 @@ public <sentence> = [could you | robot | tobi] [please] <command>; <V_talk> = tell | say; <V_answer> = answer; <V_follow> = follow; -<V_meet> = meet | face | contact; +<V_meet> = meet | face | contact | greet | find; <V_guide> = guide | escort | take | lead | accompany; <V_tell> = tell; <V_count> = tell me how many; @@ -109,12 +126,17 @@ public <sentence> = [could you | robot | tobi] [please] <command>; <V_introduce> = introduce; <V_ask> = ask; <V_leave> = leave; +<V_clean> = (clean out) | (clean up) | (tidy (up | op)) | order; +<V_dump> = (take out) | dump; <NP_object> = (the <N_object>) | (a <N_object>) | (an <N_object>) | (<N_object>); +<NP_absobject> = (the <absPrep> object); +<NP_relObject> = (the object <relPrep>); +<NP_shapeObjectCat> = (the <shape> (object | <N_category>)); <NP_objectpron> = (<N_objectpron>); <NP_category> = (the <N_category>) | <N_category>; -<NP_objectprop> = (the <N_objectprop>); +<NP_objectprop> = (the [<N_three>] <N_objectprop>); <NP_placement> = (the <N_placement>); <NP_placementTwo> = (the <N_placementTwo>); <NP_beacon> = (the <N_beacon>); @@ -133,9 +155,10 @@ public <sentence> = [could you | robot | tobi] [please] <command>; <NP_personalpron> = <N_personalpron>; <NP_personattribute> = (the <N_personattribute>); <NP_posture> = <N_posture>; -<NP_taxi> = (the <N_taxi>); +<NP_taxi> = ([the] <N_taxi>); <NP_partyfood> = <N_partyfood>; <NP_door> = (the <N_door>); +<NP_garbage> = (the <N_garbage>); <N_objectpron> = it; <N_objectprop> = biggest | largest | smallest | heaviest | lightest | thinnest; @@ -147,11 +170,12 @@ public <sentence> = [could you | robot | tobi] [please] <command>; <N_agegenderpersonplural> = people | men | women | guests | elders | children; <N_talk> = (something about yourself) | (the time) | (what day is (today | tomorrow)) | (your teams (name | country | affiliation)) | (the day of the (week | month)) | (a joke); <N_answer> = (a question); -<N_personalpron> = them | her | him; +<N_personalpron> = them | her | his | him | it; <N_personattribute> = name | gender | pose; <N_posture> = sitting | standing | lying down; +<N_three> = three; -<N_object> = bleach | (dishwasher tab) | (tray) | (basket) | (bag) | (fork) | (knife) | spoon | plate | bowl | cup | milk | coke | milo | banana | pear | orange | peach | mustard | spam | sugar | pringles | crackers | cornflakes; +<N_object> = bleach | (dishwasher tab) | (tray) | (basket) | (bag) | (fork) | (knife) | spoon | plate | bowl | cup | milk | coke | milo | banana | pear | orange | peach | mustard | spam | sugar | pringles | crackers | cornflakes | cloth; <N_category> = (cleaning supplies) | containers | cutlery | drinks | fruits | (pantry items) | snacks; <N_room> = kitchen | (living room) | bedroom | (dining room); <N_roomTwo> = kitchen | (living room) | bedroom | (dining room); @@ -164,5 +188,5 @@ public <sentence> = [could you | robot | tobi] [please] <command>; <N_partyfood> = snacks | drinks; <N_door> = ( front | back | main | rear ) (entrance | door); <N_garbage> = litter | garbage | trash | waste | debris | junk; -<N_luggage> = bag | baggage | valise | suitcase | trolley; - +<N_luggage> = bag | baggage | suitcase | trolley; +<N_garbage> = litter | garbage | trash | waste | debris | junk; -- GitLab