From ee7dcd16d4ba26a549c26c78d291436b3bf0b6d3 Mon Sep 17 00:00:00 2001
From: jkummert <jkummert@techfak.uni-bielefeld.de>
Date: Sun, 19 Mar 2017 14:04:47 +0100
Subject: [PATCH] added new gpsr grammar and config

---
 psConfig/tasks/gpsr.conf            | 23 ++++++++
 psGrammar/tasks/gpsr/gpsr_2017.jsgf | 92 +++++++++++++++++++++++++++++
 2 files changed, 115 insertions(+)
 create mode 100644 psConfig/tasks/gpsr.conf
 create mode 100644 psGrammar/tasks/gpsr/gpsr_2017.jsgf

diff --git a/psConfig/tasks/gpsr.conf b/psConfig/tasks/gpsr.conf
new file mode 100644
index 00000000..bf18e260
--- /dev/null
+++ b/psConfig/tasks/gpsr.conf
@@ -0,0 +1,23 @@
+[main]
+startdb=30;
+uttdb=35;
+silence=400;
+timeout=8;
+openDeviceDirectly=yes;
+alsadevice=sysdefault;
+
+[pocketsphinxinstance]
+name=Main;
+dict=../../../psGrammar/dictionary/tobiDic.dic;
+jsgf=../../../psGrammar/tasks/gpsr/gpsr_2017.jsgf;
+rsbscope=/speechrec/psa/gpsrMain;
+bestpath=no;
+autoload=yes;
+
+[pocketsphinxinstance]
+name=confirm;
+dict=../../../psGrammar/dictionary/tobiDic.dic;
+jsgf=../../../psGrammar/confirm/confirm.jsgf;
+rsbscope=/speechrec/psa/confirm;
+bestpath=no;
+autoload=yes;
diff --git a/psGrammar/tasks/gpsr/gpsr_2017.jsgf b/psGrammar/tasks/gpsr/gpsr_2017.jsgf
new file mode 100644
index 00000000..fded424e
--- /dev/null
+++ b/psGrammar/tasks/gpsr/gpsr_2017.jsgf
@@ -0,0 +1,92 @@
+#JSGF V1.0;
+grammar speechRecognition;
+
+public <sentence> = ([please | (could you) | (robot please) | (could you please) | tobi | (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> | <findPrs> | <speakInfo> | <answer> | <deliverMeObj>;
+<VP_bitrans> = <deliverObjToLoc> | <deliverObjToPrs> | <deliverMeObjfromLoc> | <takeObjFromLoc> | <placeObjOnLoc> | <findPrsInLoc> | <findObjInLoc> | <tellMeCountOfPrsInLoc> | <tellMePrsInfoInLoc> | <tellMeCountOfObjInLoc>;
+<VP_tritrans> = <deliverObjToPrsInLoc> | <takeObjFromLocToLoc> | <speakInfoToPrsInLoc> | <answerToPrsInLoc> | <tellMeObjInfoInLoc>;
+
+
+<gotoLoc> = <V_goto> <NP_place>;
+<findObj> = <V_find> (<NP_object> | <NP_objectpron>);
+<findPrs> = <V_find> (<NP_person> | <NP_personalpron>);
+<speakInfo> = <V_speak> <NP_talk>;
+<answer> = <V_answer> <NP_answer>;
+<deliverMeObj> = <V_deliver> me (<NP_object> | <NP_objectpron>);
+
+
+<deliverObjToLoc> = <V_deliver> (<NP_object> | <NP_objectpron>) <toLocPrep> <NP_place>;
+<deliverObjToPrs> = <V_deliver> (<NP_object> | <NP_objectpron>) <deliverPrep> (<NP_person> | <NP_personalpron>);
+<deliverMeObjfromLoc> = <V_deliver> me (<NP_object> | <NP_objectpron>) <fromLocPrep> <NP_place>;
+<takeObjFromLoc> = <V_take> (<NP_object> | <NP_objectpron>) <takePrep> <NP_place>;
+<placeObjOnLoc> = <V_place> (<NP_object> | <NP_objectpron>) <onLocPrep> <NP_place>;
+<findPrsInLoc> = <V_find> (<NP_person> | <NP_personalpron>) <prsInLocPrep> <NP_place>;
+<findObjInLoc> = <V_find> (<NP_object> | <NP_objectpron>) <objInLocPrep> <NP_place>;
+<tellMeCountOfPrsInLoc> = <V_tell> (me how many people in) <NP_place> are (<NP_pose> | <NP_sex>);
+<tellMePrsInfoInLoc> = <V_tell> me <NP_personinfo> of the person <prsInLocPrep> <NP_place>;
+<tellMeCountOfObjInLoc> = <V_tell> (me how many) <NP_object> there are <objInLocPrep> <NP_place>;
+
+
+<deliverObjToPrsInLoc> = <V_deliver> (<NP_object> | <NP_objectpron>) <deliverPrep> (<NP_person> | <NP_personalpron>) <prsInLocPrep> <NP_place>;
+<takeObjFromLocToLoc> = <V_take> (<NP_object> | <NP_objectpron>) <fromLocPrep> <NP_place> <toLocPrep> <NP_placeTwo>;
+<speakInfoToPrsInLoc> = <V_speak> <NP_talk> <speakToPrsPrep> (<NP_person> | <NP_personalpron>) <prsInLocPrep> <NP_place>;
+<answerToPrsInLoc> = <V_answer> <NP_answer> <speakToPrsPrep> (<NP_person> | <NP_personalpron>) <prsInLocPrep> <NP_place>;
+<tellMeObjInfoInLoc> = <V_tell> (me what is) <NP_objectprop> <emptyPrep> <NP_category> <objInLocPrep> <NP_place>;
+
+
+<V_goto> = (go (to)) | (navigate (to));
+<V_deliver> = deliver | bring | give | place;
+<V_take> = bring | take | get;
+<V_place> = put | place;
+<V_find>	= (find | (look for) | locate);
+<V_speak> 	= (tell | say);
+<V_answer> 	= (answer);
+<V_tell> = (tell);
+
+
+<NP_object> 	= (the <N_object>) | (a <N_object>) | (an <N_object>) | (<N_object>);
+<NP_place> 	= (the <N_place>) | (a <N_place>) | (an <N_place>) | (<N_place>);
+<NP_placeTwo> 	= (the <N_placeTwo>) | (a <N_placeTwo>) | (an <N_placeTwo>) | (<N_placeTwo>);
+<NP_person> 	= [a | the] [<N_gestures> | <N_poses>] (<N_names>);
+<NP_objectpron>	= <N_objectpron>;
+<NP_personalpron> = <N_personalpron>;
+<NP_talk>	= <N_talk>;
+<NP_answer> = <N_answer>;
+<NP_pose> = <N_poses>;
+<NP_sex> = <N_sex>;
+<NP_personinfo> = [the] <N_personinfo>;
+<NP_objectprop> = [the] <N_objectprop>;
+<NP_category> = <N_category>;
+
+
+<N_object> = (biscuits | (choco syrup) | (baby sweets) | egg | pretzels | pringles | beer | coconut milk | coke | tea | apple | paprika | (pumpernickel) | shampoo | soap | sponge | cloth | bowl | tray | plate | chips);
+<N_place> = (drawer | desk | bed | bedside | bar | cupboard | sink | (side shelf) | bookcase | (dining table) | (tv stand) | (living shelf) | (living table) | cabinet | office | bedroom | kitchen | (living room) | corridor | exit);
+<N_placeTwo> = (drawer | desk | bed | bedside | bar | cupboard | sink | (side shelf) | bookcase | (dining table) | (tv stand) | (living shelf) | (living table) | cabinet | office | bedroom | kitchen | (living room) | corridor | exit);
+<N_names> = (emma | taylor | sophia | isabella | ava | robin | emily | angel | madison | charlotte | noah | liam | mason | jacob | william | ethan | michael | alexander | james | daniel | person | me | man | woman | boy | girl | (male person) | (female person));
+<N_gestures> = waving | calling | (rising (left | right) arm) | (pointing (left | right));
+<N_poses> = sitting | standing | lying;
+<N_objectpron> = it | them;
+<N_personalpron> = 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_sex> = men | women | boys | girls | male | female;
+<N_personinfo> = name | gender | pose;
+<N_objectprop> = biggest | largest | smallest | heaviest | lightest | thinnest;
+<N_category> = snack | candy | food | drink | toiletry | container | object;
+
+
+<toLocPrep> = to | on;
+<deliverPrep> = to;
+<prsInLocPrep> = in | at;
+<fromLocPrep> = from;
+<takePrep> = from;
+<onLocPrep> = on;
+<speakToPrsPrep> = to;
+<objInLocPrep> = in;
+<emptyPrep> = [no];
-- 
GitLab