From 4d4088375d83e658e82e0a50e3b545bba961be92 Mon Sep 17 00:00:00 2001 From: Benoit Favre <benoit.favre@lif.univ-mrs.fr> Date: Sun, 22 Feb 2015 22:06:07 +0100 Subject: [PATCH] refine slu behaviour --- data/style.css | 2 +- main.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/data/style.css b/data/style.css index ea7538d..90f6e47 100644 --- a/data/style.css +++ b/data/style.css @@ -47,7 +47,7 @@ } .confirm { - font: bold 14; + font: bold 20; background: #ff9999; } diff --git a/main.py b/main.py index 84c6693..ac9faec 100644 --- a/main.py +++ b/main.py @@ -72,10 +72,10 @@ class ScriptedASR(Gtk.Window): # setup singletons osc.setup(osc_host, osc_port) actions.setup(self.confirmer, self.xmlview) + self.current_section = 0 def set_section(self, section_id): self.xmlview.set_section(section_id) - self.previous_actions = 0 def slu_finished(self, model, slu_output): for action_id in range(self.previous_actions, model.num_actions()): @@ -94,6 +94,9 @@ class ScriptedASR(Gtk.Window): #hyp = ' '.join(hyp).replace('[noise]', ' ').split() words = hyp[-1].strip().replace('_', ' ').split() section_id = self.xmlview.get_section() + if self.current_section != section_id: + self.previous_actions = 0 + self.current_section = section_id #print section_id if section_id in self.slu: model = self.slu[section_id] -- GitLab