Skip to content
Snippets Groups Projects
Commit f2ce4148 authored by lgraesner's avatar lgraesner Committed by Laurin Gräsner
Browse files

renamed new grammars, set default to 'gpsr23'

parent bdc6584b
No related branches found
No related tags found
1 merge request!9Merge GPSR changes
......@@ -9,7 +9,7 @@ alsadevice=sysdefault;
[pocketsphinxinstance]
name=Commands;
dict=../../../psGrammar/dictionary/tobiDic.dic;
jsgf=../../../psGrammar/tasks/gpsr/gpsr23alternate.jsgf;
jsgf=../../../psGrammar/tasks/gpsr/gpsr23.jsgf;
rsbscope=/speechrec/psa/commands;
bestpath=no;
autoload=yes;
......
#JSGF V1.0;
# This grammar tries to restrict task combinations by checking available and required references to places, items and persons. It doesn't work yet and is not worth continuing right now.
grammar speechRecognition;
public <sentence> = [could you | robot | tobi] [please] (<singleCommand> | <commandChain>)
= ([could you | robot | tobi] [please] <VP1> [([and|then] <VP2>)] [([and|then] <VP3>)]);
public <sentence> = [could you | robot | tobi] [please] <command>;
<singleCommand> = <standalone>;
<command> = (<cmdfndppl> | <cmdfndobj> | <cmdguide> | <cmdfollow> | <cmdfollowout> | <cmdincomplete> | <cmdman> | <complexman> | <cmdpartyhost>);
# There needs to be a better way to check what combinations are possible
# meetName and findPrsInRoom generate both
person and location references, but the commands that my follow are unique for each case
<commandChain> = (<genLoc> [and|then] <reqLocGenPrs> [and|then] <reqPrs>)
| (<genLoc> [and|then] <reqLocGenPrs> [and|then] <noReq>)
| (<genLoc> [and|then] <reqLocGenItem> [and|then] <reqItem>)
| (<meetPrsAtBeac> [and|then] <reqPrsMOVE> [and|then] <reqPrsMOVE>)
| (<meetPrsAtBeac> [and|then] <reqPrs> [[and|then] <noReq>)
| (<genLocPrs> [and|then] <reqPrs> [[and|then] <noReq>])
<cmdfndppl> = <tellPrsInfoInLoc> | <countPrsInRoom>;
<cmdfndobj> = <findObjInRoom> | <countObjOnPlcmt> | <tellCatPropOnPlcmt> | <tellObjPropOnPlcmt>;
<noReq> = (<genLoc> | <genPrs> | <genItem>);
<cmdguide> = <guideNameFromBeacToBeac> | (<meetPrsAtBeac> and <guidePrsToBeacon>) | (<goToLoc> <meetName> and <guidePrsToBeacon>);
<genLoc> = <goToLoc>;
<genPrs> =
<cmdfollow> = <followNameFromBeacToRoom> | (<meetPrsAtBeac> and (<followPrs> | <followPrsToRoom>)) | (<goToLoc> <meetName> and (<followPrs> | <followPrsToRoom>));
<genItem> = (<takeObjFromPlcmt> | <takeObj>);
<cmdfollowout> = <meetPrsAtBeac> <followPrs> and (<goToLoc> | <guidePrsBack>);
<genLocPrs> = (<meetPrsAtBeac> | <findPrsInRoom>);
<cmdincomplete> = skyler;
<reqLocGenPrs> = (<findPrs> | <meetName>);
<reqLocGenItem>= <findObj>;
<reqPrsMOVE> = (<followPrsToRoom> | <followPrs> | <guidePrsToBeacon>);
<reqPrsTALK> = (<answerQuestion> | <talkInfo>;
<reqLocPrs> = <guidePrsBack>;
<reqItem> = (<deliverObjPronToMe> | <placeObjPronOnPlcmt> | <placeObjOnPlcmt> | <deliverObjToNameAtBeac>)
<standalone> = <deliverObjToMe> | <deliverObjToGestPrsInRoom> | <countObjOnPlcmt> | <countPrsInRoom> | <tellPrsInfoInLoc> | <tellObjPropOnPlcmt> | | <followNameFromBeacToRoom> | <guideNameFromBeacToBeac> | <guideNameToBeacFindAtBeac> | <bringMeObj> | <bringMeObjFromPlcmt> | <tellCatPropOnPlcmt> | <findObjInRoom> | <talkInfoToGestPrsInRoom> | <answerToGestPrsInRoom>);
<cmdman> = <bringMeObjFromPlcmt> | (<takeObjFromPlcmt> and (<deliverObjPronToMe> | <deliverObjToNameAtBeac>)) | (<takeObjFromPlcmt> and <placeObjPronOnPlcmt>);
<complexman> = skyler;
<cmdpartyhost> = skyler;
<goToLoc> = <V_go> <toLocPrep> (<NP_room> | <NP_placement> | <NP_beacon>);
......@@ -79,7 +61,7 @@ public <sentence> = [could you | robot | tobi] [please] (<singleCommand> | <co
<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>;
<deliverObjToMe> = <V_deliver> <NP_object> <deliverPrep> <NP_me>;
<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>;
<deliverObjToNameAtBeac> = <V_deliver> <NP_objectpron> <deliverPrep> <NP_name> <atLocPrep> <NP_beaconTwo>;
......@@ -137,33 +119,25 @@ public <sentence> = [could you | robot | tobi] [please] (<singleCommand> | <co
<NP_personattribute> = (the <N_personattribute>);
<NP_posture> = <N_posture>;
<N_objectpron> = it;
<N_objectprop> = biggest | largest | smallest | heaviest | lightest | thinnest;
<N_me> = me;
<N_gestperson> = (person waving) | (person (raising | rising) [their] (left|right) arm) | (person pointing to the (left|right)) | (person calling);
<N_poseperson> = (person sitting) | (person standing) | (person lying down);
<N_genderperson> = man | woman | boy | girl | (male person) | (female person);
<N_objectpron> = it;
<N_objectprop> = biggest | largest | smallest | heaviest | lightest | thinnest;
<N_me> = me;
<N_gestperson> = (person waving) | (person (raising | rising) [their] (left|right) arm) | (person pointing to the (left|right)) | (person calling);
<N_poseperson> = (person sitting) | (person standing) | (person lying down);
<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_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_personattribute> = name | gender | pose;
<N_posture> = sitting | standing | lying down;
<N_object_old> = basket | cereals | cloth | (coconut milk) | coke | cornflakes | noodles | orange (juice | drink) | peas | plate | pringles | red bowl | salt | soap | sponge | (tomato paste) | water;
<N_object> = (chocolate milk) | milk | cola | (soap box) | (choco krispies) | bowl | plate | fork | knife | spoon | cup | lemon | banana | peach | pear;
<N_category_old> = care | drink | (cleaning stuff) | container | food | snack | cutlery;
<N_category> = fruits | cutlery | drinks | snacks | (pantry items);
<N_room_old> = corridor | (living room) | kitchen | (bath room);
<N_room> = kitchen | (living room) | hallway | bathroom | office;
<N_roomTwo> = corridor | (living room) | kitchen | (bath room);
<N_placement_old> = (living table) | (kitchen counter) | sink | stove | cabinet | bar;
<N_placementTwo_old> = (living table) | (kitchen counter) | sink | stove | cabinet | bar;
<N_placement> = (kitchen table) | desk | (side board) | (side table) | sink | (kitchen counter) | cabinet | workstation;
<N_placementTwo> = (kitchen table) | desk | (side board) | (side table) | sink | (kitchen counter) | cabinet | workstation;
<N_beacon_old> = (living table) | sink | bar | sofa | fridge | (comfy chair);
<N_beaconTwo_old> = (living table) | sink | bar | sofa | fridge | (comfy chair);
<N_beacon> = fridge | sink | dishwasher | (easy chair) | (arm chair) | (kitchen table) | workstation;
<N_beaconTwo> = fridge | sink | dishwasher | (easy chair) | (arm chair) | (kitchen table) | workstation;
<N_name_old> = emma | olivia | sophia | ava | isabella | mia | abigail | emily | charlotte | harper | noah | liam | mason | jacob | william | ethan | james | alexander | michael | benjamin;
<N_name> = amelia | angel | ava | charlie | charlotte | hunter | max | mia | olivia | parker | sam | jack | noah | oliver | thomas | william;
<N_posture> = sitting | standing | lying down;
<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_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);
<N_placement> = (small cabinet) | (side table) | (ikea table);
<N_placementTwo> = (small cabinet) | (side table) | (ikea table);
<N_beacon> = (seat one) | (seat two) | (seat three) | (seat four) | (seat five) | (seat six) | (small cabinet) | (side table) | (ikea table) | exit | entrance;
<N_beaconTwo> = (seat one) | (seat two) | (seat three) | (seat four) | (seat five) | (seat six) | (small cabinet) | (side table) | (ikea table) | exit | entrance;
<N_name> = alex | charlie | elizabeth | francis | jennifer | linda | mary | patricia | james | john | michael | robert | robin | skyler | william;
#JSGF V1.0;
grammar speechRecognition;
public <sentence> = [could you | robot | tobi] [please] <command>;
public <sentence> = [could you | robot | tobi] [please] (<singleCommand> | <commandChain>)
<command> = (<cmdfndppl> | <cmdfndobj> | <cmdguide> | <cmdfollow> | <cmdfollowout> | <cmdincomplete> | <cmdman> | <complexman> | <cmdpartyhost>);
<singleCommand> = <standalone>;
<cmdfndppl> = <tellPrsInfoInLoc> | <countPrsInRoom>;
<commandChain> = (<genLoc> [and|then] <reqLocGenPrs> [and|then] <reqPrs>)
| (<genLoc> [and|then] <reqLocGenPrs> [and|then] <noReq>)
| (<genLoc> [and|then] <reqLocGenItem> [and|then] <reqItem>)
| (<genLocPrs> [and|then] <reqPrs> [and|then] <reqPrsMOVE>)
| (<genLocPrs> [and|then] <reqPrs> [[and|then] <noReq>)
| (<genLocPrs> [and|then] <reqPrs> [[and|then] <noReq>])
<cmdfndobj> = <findObjInRoom> | <countObjOnPlcmt> | <tellCatPropOnPlcmt> | <tellObjPropOnPlcmt>;
<cmdguide> = <guideNameFromBeacToBeac> | (<meetPrsAtBeac> and <guidePrsToBeacon>) | (<goToLoc> <meetName> and <guidePrsToBeacon>);
<noReq> = (<genLoc> | <genPrs> | <genItem>);
<genLoc> = <goToLoc>;
<cmdfollow> = <followNameFromBeacToRoom> | (<meetPrsAtBeac> and (<followPrs> | <followPrsToRoom>)) | (<goToLoc> <meetName> and (<followPrs> | <followPrsToRoom>));
<genItem> = (<takeObjFromPlcmt> | <takeObj>);
<cmdfollowout> = <meetPrsAtBeac> <followPrs> and (<goToLoc> | <guidePrsBack>);
<genLocPrs> = (<meetPrsAtBeac> | <findPrsInRoom>);
<cmdincomplete> = skyler;
<reqLocGenPrs> = (<findPrs> | <meetName>);
<cmdman> = <bringMeObjFromPlcmt> | (<takeObjFromPlcmt> and (<deliverObjPronToMe> | <deliverObjToNameAtBeac>)) | (<takeObjFromPlcmt> and <placeObjPronOnPlcmt>);
<reqLocGenItem>= <findObj>;
<reqPrs> = (<followPrsToRoom> | <followPrs> | <guidePrsToBeacon> | <answerQuestion> | <talkInfo>;
<reqLocPrs> = <guidePrsBack>;
<reqItem> = (<deliverObjPronToMe> | <placeObjPronOnPlcmt> | <placeObjOnPlcmt> | <deliverObjToNameAtBeac>)
<standalone> = <deliverObjToMe> | <deliverObjToGestPrsInRoom> | <countObjOnPlcmt> | <countPrsInRoom> | <tellPrsInfoInLoc> | <tellObjPropOnPlcmt> | | <followNameFromBeacToRoom> | <guideNameFromBeacToBeac> | <guideNameToBeacFindAtBeac> | <bringMeObj> | <bringMeObjFromPlcmt> | <tellCatPropOnPlcmt> | <findObjInRoom> | <talkInfoToGestPrsInRoom> | <answerToGestPrsInRoom>);
<complexman> = skyler;
<cmdpartyhost> = skyler;
<goToLoc> = <V_go> <toLocPrep> (<NP_room> | <NP_placement> | <NP_beacon>);
......@@ -61,7 +72,7 @@ public <sentence> = [could you | robot | tobi] [please] <command>;
<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>;
<deliverObjToMe> = <V_deliver> (<NP_object> | <NP_category>) <deliverPrep> <NP_me>;
<deliverObjToMe> = <V_deliver> <NP_object> <deliverPrep> <NP_me>;
<deliverObjPronToMe> = <V_deliver> <NP_objectpron> <deliverPrep> <NP_me>;
<deliverObjToGestPrsInRoom> = <V_deliver> [<NP_objectpron>] <NP_object> <deliverPrep> <NP_gestperson> <inLocPrep> <NP_roomTwo>;
<deliverObjToNameAtBeac> = <V_deliver> <NP_objectpron> <deliverPrep> <NP_name> <atLocPrep> <NP_beaconTwo>;
......@@ -119,25 +130,33 @@ public <sentence> = [could you | robot | tobi] [please] <command>;
<NP_personattribute> = (the <N_personattribute>);
<NP_posture> = <N_posture>;
<N_objectpron> = it;
<N_objectprop> = biggest | largest | smallest | heaviest | lightest | thinnest;
<N_me> = me;
<N_gestperson> = (person waving) | (person (raising | rising) [their] (left|right) arm) | (person pointing to the (left|right)) | (person calling);
<N_poseperson> = (person sitting) | (person standing) | (person lying down);
<N_genderperson> = man | woman | boy | girl | (male person) | (female person);
<N_objectpron> = it;
<N_objectprop> = biggest | largest | smallest | heaviest | lightest | thinnest;
<N_me> = me;
<N_gestperson> = (person waving) | (person (raising | rising) [their] (left|right) arm) | (person pointing to the (left|right)) | (person calling);
<N_poseperson> = (person sitting) | (person standing) | (person lying down);
<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_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_personattribute> = name | gender | pose;
<N_posture> = sitting | standing | lying down;
<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_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);
<N_placement> = (small cabinet) | (side table) | (ikea table);
<N_placementTwo> = (small cabinet) | (side table) | (ikea table);
<N_beacon> = (seat one) | (seat two) | (seat three) | (seat four) | (seat five) | (seat six) | (small cabinet) | (side table) | (ikea table) | exit | entrance;
<N_beaconTwo> = (seat one) | (seat two) | (seat three) | (seat four) | (seat five) | (seat six) | (small cabinet) | (side table) | (ikea table) | exit | entrance;
<N_name> = alex | charlie | elizabeth | francis | jennifer | linda | mary | patricia | james | john | michael | robert | robin | skyler | william;
<N_posture> = sitting | standing | lying down;
<N_object_old> = basket | cereals | cloth | (coconut milk) | coke | cornflakes | noodles | orange (juice | drink) | peas | plate | pringles | red bowl | salt | soap | sponge | (tomato paste) | water;
<N_object> = (chocolate milk) | milk | cola | (soap box) | (choco krispies) | bowl | plate | fork | knife | spoon | cup | lemon | banana | peach | pear;
<N_category_old> = care | drink | (cleaning stuff) | container | food | snack | cutlery;
<N_category> = fruits | cutlery | drinks | snacks | (pantry items);
<N_room_old> = corridor | (living room) | kitchen | (bath room);
<N_room> = kitchen | (living room) | hallway | bathroom | office;
<N_roomTwo> = corridor | (living room) | kitchen | (bath room);
<N_placement_old> = (living table) | (kitchen counter) | sink | stove | cabinet | bar;
<N_placementTwo_old> = (living table) | (kitchen counter) | sink | stove | cabinet | bar;
<N_placement> = (kitchen table) | desk | (side board) | (side table) | sink | (kitchen counter) | cabinet | workstation;
<N_placementTwo> = (kitchen table) | desk | (side board) | (side table) | sink | (kitchen counter) | cabinet | workstation;
<N_beacon_old> = (living table) | sink | bar | sofa | fridge | (comfy chair);
<N_beaconTwo_old> = (living table) | sink | bar | sofa | fridge | (comfy chair);
<N_beacon> = fridge | sink | dishwasher | (easy chair) | (arm chair) | (kitchen table) | workstation;
<N_beaconTwo> = fridge | sink | dishwasher | (easy chair) | (arm chair) | (kitchen table) | workstation;
<N_name_old> = emma | olivia | sophia | ava | isabella | mia | abigail | emily | charlotte | harper | noah | liam | mason | jacob | william | ethan | james | alexander | michael | benjamin;
<N_name> = amelia | angel | ava | charlie | charlotte | hunter | max | mia | olivia | parker | sam | jack | noah | oliver | thomas | william;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment