Add log messages that provide insight into the disambiguation behavior
parent
5980779e48
commit
f16989c2ec
|
@ -22,6 +22,7 @@ from os import walk
|
||||||
from os.path import splitext, join
|
from os.path import splitext, join
|
||||||
|
|
||||||
from mycroft.util.format import expand_options
|
from mycroft.util.format import expand_options
|
||||||
|
from mycroft.util.log import LOG
|
||||||
|
|
||||||
|
|
||||||
def read_vocab_file(path):
|
def read_vocab_file(path):
|
||||||
|
@ -60,7 +61,9 @@ def load_regex_from_file(path, skill_id):
|
||||||
for line in reg_file.readlines():
|
for line in reg_file.readlines():
|
||||||
if line.startswith("#"):
|
if line.startswith("#"):
|
||||||
continue
|
continue
|
||||||
|
LOG.debug('regex pre-munge: ' + line.strip())
|
||||||
regex = munge_regex(line.strip(), skill_id)
|
regex = munge_regex(line.strip(), skill_id)
|
||||||
|
LOG.debug('regex post-munge: ' + regex)
|
||||||
# Raise error if regex can't be compiled
|
# Raise error if regex can't be compiled
|
||||||
re.compile(regex)
|
re.compile(regex)
|
||||||
regexes.append(regex)
|
regexes.append(regex)
|
||||||
|
|
Loading…
Reference in New Issue