From 6c66ddb76962cd60124e30a95c478ef57be5f1a5 Mon Sep 17 00:00:00 2001
From: Lukas Hindemith <lhindemith@techfak.uni-bielefeld.de>
Date: Thu, 16 Mar 2017 12:28:21 +0100
Subject: [PATCH] added grammar

---
 psConfig/tasks/restaurant/restaurant.conf | 29 +++++++++++++++++++++++
 psGrammar/tasks/restaurant/commands.jsgf  |  9 +++++++
 psGrammar/tasks/restaurant/goTable.jsgf   |  9 +++++++
 psGrammar/tasks/restaurant/order.jsgf     | 10 ++++++++
 4 files changed, 57 insertions(+)
 create mode 100644 psConfig/tasks/restaurant/restaurant.conf
 create mode 100644 psGrammar/tasks/restaurant/commands.jsgf
 create mode 100644 psGrammar/tasks/restaurant/goTable.jsgf
 create mode 100644 psGrammar/tasks/restaurant/order.jsgf

diff --git a/psConfig/tasks/restaurant/restaurant.conf b/psConfig/tasks/restaurant/restaurant.conf
new file mode 100644
index 00000000..18b2ca02
--- /dev/null
+++ b/psConfig/tasks/restaurant/restaurant.conf
@@ -0,0 +1,29 @@
+[main]
+startdb=30;
+uttdb=35;
+silence=400;
+timeout=8;
+openDeviceDirectly=yes;
+alsadevice=sysdefault;
+
+[pocketsphinxinstance]
+name=confirm;
+jsgf=../../../psGrammar/confirm/confirm.jsgf;
+rsbscope=/speechrec/psa/confirm;
+bestpath=no;
+autoload=yes;
+
+[pocketsphinxinstance]
+name=ordering;
+jsgf=../../../psGrammar/tasks/restaurant/order.jsgf;
+rsbscope=/speechrec/psa/ordering;
+bestpath=no;
+autoload=yes;
+
+[pocketsphinxinstance]
+name=goTable;
+jsgf=../../../psGrammar/tasks/restaurant/goTable.jsgf;
+rsbscope=/speechrec/psa/goTable;
+bestpath=no;
+autoload=yes;
+
diff --git a/psGrammar/tasks/restaurant/commands.jsgf b/psGrammar/tasks/restaurant/commands.jsgf
new file mode 100644
index 00000000..6b556526
--- /dev/null
+++ b/psGrammar/tasks/restaurant/commands.jsgf
@@ -0,0 +1,9 @@
+#JSGF V1.0;
+grammar restaurant_save_command;
+
+public <restaurant> = [tobi] [please] (<followMe> | <stop> | <place> | <table>);
+<followMe> = ((follow me) | (come [(with me) | here]) | (keep up));
+<stop> = (stop [this]);
+<place> = (save (place | location));
+<table> = (this [is] table <number>);
+<number> = (one | two | three);
diff --git a/psGrammar/tasks/restaurant/goTable.jsgf b/psGrammar/tasks/restaurant/goTable.jsgf
new file mode 100644
index 00000000..919deb8e
--- /dev/null
+++ b/psGrammar/tasks/restaurant/goTable.jsgf
@@ -0,0 +1,9 @@
+#JSGF V1.0;
+grammar restaurant_save_command;
+
+public <restaurant> = <nameGo> | <robotGo> | <nameWait> | <robotWait>;
+<nameGo> = [tobi|biron] ([please] (take the order) [please]| yes);
+<robotGo> = robot ([please] (take the order) [please]| yes);
+<nameWait> = ([tobi|biron] [please] wait [please]| no);
+<robotWait> = (robot [please] wait [please]| no);
+
diff --git a/psGrammar/tasks/restaurant/order.jsgf b/psGrammar/tasks/restaurant/order.jsgf
new file mode 100644
index 00000000..7f6727a3
--- /dev/null
+++ b/psGrammar/tasks/restaurant/order.jsgf
@@ -0,0 +1,10 @@
+#JSGF V1.0;
+grammar restaurant_ordering;
+
+public <restaurant> = ([tobi] [bring me] [one | a ] <objects> [please]);
+
+<objects> = (<drinks> | <combo>);
+<combo> = (<food> (and | with) <food>);
+
+<drinks> = ((coconut milk) | (beer) | (coke) | (tea));
+<food> = ((apple) | (paprika) | (pumpernickel) | (chips) | (pretzels) | (pringles) | (biscuits) | (choco syrup) | (baby sweets) | (egg));
-- 
GitLab