working nlu
This commit is contained in:
parent
55aa425cca
commit
70cd8fce9d
@ -3,7 +3,9 @@ import jsgf
|
|||||||
|
|
||||||
class Nlu:
|
class Nlu:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.rules_grammar = jsgf.parse_grammar_file('rules.jsgf')
|
with open('rules.jsgf', 'r', encoding='utf-8') as f:
|
||||||
|
lines = f.readlines()
|
||||||
|
self.rules_grammar = jsgf.parse_grammar_string("".join(lines))
|
||||||
self.acts = {
|
self.acts = {
|
||||||
"request": {
|
"request": {
|
||||||
'triggers': ['jak', 'kiedy'],
|
'triggers': ['jak', 'kiedy'],
|
||||||
|
Loading…
Reference in New Issue
Block a user