Skip to content
Snippets Groups Projects
commands.jsgf 6.77 KiB
#JSGF V1.0;
grammar speechRecognition;

public <sentence> = ([could you | robot | tobi] [please] <VP1> [([and|then] <VP2>)] [([and|then] <VP3>)]);

<VP1> 		= (<VP_tritrans> | <VP_bitrans> | <VP_trans> );
<VP2> 		= (<VP_tritrans> | <VP_bitrans> | <VP_trans> );
<VP3> 		= (<VP_tritrans> | <VP_bitrans> | <VP_trans> );

<VP_trans> = <goToLoc> | <findObj> | <talkInfo> | <answerQuestion> | <findPrs> | <followPrs> | <meetName>;
<VP_bitrans> = <takeObjToPlcmt> | <placeObjOnPlcmt> | <bringMeObj> | <deliverObjToMe> | <findPrsInRoom> | <tellNoObjOnPlcmt> | <findObjInRoom> | <findCatInRoom> | <meetPrsAtBeac> | <followPrsToRoom> | <takeObjFromPlcmt> | <tellPrsInfoInLoc> | <tellNoPrsInRoom> | <tellObjPropOnPlcmt> | <guidePrsToBeacon>; 
<VP_tritrans> = <deliverObjToGestPrsInRoom> | <takeObjFromLocToPlcmt> | <deliverObjToNameAtBeac> | <talkInfoToGestPrsInRoom> | <answerToGestPrsInRoom> | <followNameFromBeacToRoom> | <guideNameFromBeacToBeac> | <bringMeObjFromPlcmt> | <tellCatPropOnPlcmt> | <guideNameToBeacFindAtBeac>;


<goToLoc> = <V_go> <toLocPrep> (<NP_room> | <NP_placement> | <NP_beacon>);
<findObj> = <V_find> <NP_object>;
<talkInfo> = <V_talk> <NP_talk>;
<answerQuestion> = <V_answer> <NP_answer>;
<findPrs> = <V_find> (<NP_gestperson> | <NP_genderperson> | <NP_poseperson>);
<followPrs> = <V_follow> <NP_personalpron>;
<meetName> = <V_meet> <NP_name>;


<takeObjToPlcmt>  = <V_take>  <NP_object> <deliverPrep> <NP_placement>;
<takeObjFromPlcmt> = <V_take>  <NP_object> <fromLocPrep> <NP_placement>;
<placeObjOnPlcmt> = <V_place> (<NP_object> | <NP_objectpron>) <placePrep>  <NP_placement>;
<bringMeObj>    = <V_bring> <NP_me> <NP_object>;
<deliverObjToMe> = <V_deliver> (<NP_object> | <NP_objectpron>) <deliverPrep> <NP_me>;
<findPrsInRoom> = <V_find> (<NP_gestperson> | <NP_genderperson> | <NP_poseperson>) <inLocPrep> <NP_room>;
<findObjInRoom> = <V_find> <NP_object> <inLocPrep> <NP_room>;
<findCatInRoom> = <V_find> <NP_category> <inLocPrep> <NP_room>;
<meetPrsAtBeac> = <V_meet> <NP_name> <atLocPrep> <NP_beacon>;
<followPrsToRoom> = <V_follow> <NP_personalpron> <toLocPrep> <NP_room>;
<guidePrsToBeacon> = <V_guide> <NP_personalpron> <toLocPrep> <NP_beacon>;
<tellNoObjOnPlcmt> = <V_tell> me how many (<NP_object> | <NP_category>) there are <placePrep> <NP_placement>;
<tellPrsInfoInLoc> = <V_tell> me <NP_personinfo> of the person <LocPrep> (<NP_room> | <NP_beacon>);
<tellNoPrsInRoom> = <V_tell> me how many people in <NP_room> <arePrep> (<NP_pose> | <NP_genderpersonplural>);
<tellObjPropOnPlcmt> = <V_tell> me ((what is) | whats) <NP_objectprop> object <onLocPrep> <NP_placement>;


<deliverObjToGestPrsInRoom> = <V_deliver> <NP_object> <deliverPrep> <NP_gestperson> <inLocPrep> <NP_room>;
<takeObjFromLocToPlcmt> = <V_take> <NP_object> <fromLocPrep> (<NP_room> | <NP_placement>) <toLocPrep> <NP_placementTwo>;
<deliverObjToNameAtBeac> = <V_deliver> <NP_objectpron> <deliverPrep> <NP_name> <atLocPrep> <NP_beacon>;
<talkInfoToGestPrsInRoom> = <V_talk> <NP_talk> <talkPrep> <NP_gestperson> <inLocPrep> <NP_room>;
<answerToGestPrsInRoom> = <V_answer> <NP_answer> <talkPrep> <NP_gestperson> <inLocPrep> <NP_room>;
<followNameFromBeacToRoom> = <V_follow> <NP_name> <fromLocPrep> <NP_beacon> <toLocPrep> <NP_room>;
<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 <atLocPrep> <NP_beacon>;
<bringMeObjFromPlcmt> = <V_bring> <NP_me> <NP_object> <fromLocPrep> <NP_placement>;
<tellCatPropOnPlcmt> = <V_tell> me ((what is) | whats) <NP_objectprop> <NP_category> <onLocPrep> <NP_placement>;


<V_take>    = bring | take | get | grasp | (pick up);
<V_place>   = put | place;
<V_deliver> = bring | give | deliver;
<V_bring> = bring | give;
<V_go> = go | navigate;
<V_find> = find | locate | (look for);
<V_talk> = tell | say;
<V_answer> = answer;
<V_follow> = follow | (go after) | (come after);
<V_meet> = meet;
<V_guide> = guide | escort | take | lead | accompany;
<V_tell> = tell;


<NP_object>    = (the <N_object>) | (a <N_object>) | (an <N_object>) | (<N_object>);
<NP_objectpron> = (<N_objectpron>);
<NP_category> = (the <N_category>) | <N_category>;
<NP_objectprop> = (the <N_objectprop>);
<NP_placement> = (the <N_placement>);
<NP_placementTwo> = (the <N_placementTwo>);
<NP_beacon> = (the <N_beacon>);
<NP_beaconTwo> = (the <N_beaconTwo>);
<NP_room> = (the <N_room>);
<NP_me>        = (<N_me>);
<NP_gestperson> = (the <N_gestperson>) | (a <N_gestperson>);
<NP_poseperson> = (a <N_poseperson>);
<NP_genderperson> = (a <N_genderperson>);
<NP_genderpersonplural> = (<N_genderpersonplural>);
<NP_name> = <N_name>;
<NP_talk> = <N_talk>;
<NP_answer> = <N_answer>;
<NP_personalpron> = <N_personalpron>;
<NP_personinfo> = (the <N_personinfo>);
<NP_pose> = <N_pose>;


<N_object> = shower gel | soap | toothpaste | sponge | wiper | box | tray | cacao | coke | malz | mixdrink | (orange juice) | (peppermint tea) | water | cookies | (fruit bar) | kinder | nuts  | apple | (green paprika) | kiwi | lemon | noodles | pepper | salt | (tomato [paste]);
<N_category> = care | drink | (cleaning stuff) | container | food | snack;
<N_room> = bedroom | (dining room) | kitchen | (living room);
<N_placement> = (tv table) | cupboard | (couch table) | desk | bookcase | (bedside table) | (kitchen table) | (kitchen cabinet) | bar | (dining table) | cabinet | (display case) | storage shelf;
<N_placementTwo> = (tv table) | cupboard | (couch table) | desk | bookcase | (bedside table) | (kitchen table) | (kitchen cabinet) | bar | (dining table) | cabinet | (display case) | storage shelf;
<N_beacon> = (couch table) | bed | bar | (dining table);
<N_beaconTwo> = (couch table) | bed | bar | (dining table);
<N_name> = angie | mary | amy | kimberly | lisa | melissa | michelle | jennifer | elizabeth | julie | brian | micheal | christopher | william | john | david | james | robert | scott | richard;
<N_objectpron> = it;
<N_objectprop> = biggest | largest | smallest | heaviest | lightest | thinnest;
<N_me>        = me;
<N_gestperson> = (waving person) | (rising (left|right) arm person) | (pointing to the (left|right) person) | (calling person);
<N_poseperson> = (sitting person) | (standing person) | (lying person);
<N_genderperson> = man | woman | boy | girl | (male person) | (female person);
<N_genderpersonplural> = men | women | boys | girls | male | female;
<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_personinfo> = name | gender | pose;
<N_pose> = sitting | standing | lying;


<deliverPrep> = to;
<placePrep> = on;
<inLocPrep> = in;
<fromLocPrep> = from;
<toLocPrep> = to;
<atLocPrep> = at;
<talkPrep> = to;
<LocPrep> = in | at;
<onLocPrep> = on;
<arePrep> = are;