Show actual alphabet path in error message

This commit is contained in:
Alexandre Lissy 2020-03-06 10:13:18 +01:00
parent fe8ee4f778
commit 61fa1ad428
1 changed files with 2 additions and 2 deletions

View File

@ -33,9 +33,9 @@ class Alphabet(object):
return self._str_to_label[string]
except KeyError as e:
raise KeyError(
'ERROR: Your transcripts contain characters (e.g. \'{}\') which do not occur in data/alphabet.txt! Use ' \
'ERROR: Your transcripts contain characters (e.g. \'{}\') which do not occur in \'{}\'! Use ' \
'util/check_characters.py to see what characters are in your [train,dev,test].csv transcripts, and ' \
'then add all these to data/alphabet.txt.'.format(string)
'then add all these to \'{}\'.'.format(self._config_file, string, self._config_file)
).with_traceback(e.__traceback__)
def has_char(self, char):