Skip to content
Snippets Groups Projects
Commit 4d408837 authored by Benoit Favre's avatar Benoit Favre
Browse files

refine slu behaviour

parent 113e9e37
No related branches found
No related tags found
No related merge requests found
......@@ -47,7 +47,7 @@
}
.confirm {
font: bold 14;
font: bold 20;
background: #ff9999;
}
......
......@@ -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]
......
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