Add log messages that provide insight into the disambiguation behavior

pull/2393/head
Chris Veilleux 2019-09-28 12:20:22 -05:00
parent 5980779e48
commit f16989c2ec
1 changed files with 3 additions and 0 deletions

View File

@ -22,6 +22,7 @@ from os import walk
from os.path import splitext, join
from mycroft.util.format import expand_options
from mycroft.util.log import LOG
def read_vocab_file(path):
@ -60,7 +61,9 @@ def load_regex_from_file(path, skill_id):
for line in reg_file.readlines():
if line.startswith("#"):
continue
LOG.debug('regex pre-munge: ' + line.strip())
regex = munge_regex(line.strip(), skill_id)
LOG.debug('regex post-munge: ' + regex)
# Raise error if regex can't be compiled
re.compile(regex)
regexes.append(regex)