From 32bf1a685a7d5b255a2627a280debf4ebfef461d Mon Sep 17 00:00:00 2001 From: josh Date: Tue, 12 Feb 2019 23:10:46 +0100 Subject: [PATCH] prettier error message to the terminal when alphabets are mis-matched. --- util/text.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/util/text.py b/util/text.py index c39d6b9c..904ad18f 100644 --- a/util/text.py +++ b/util/text.py @@ -31,14 +31,7 @@ class Alphabet(object): return self._str_to_label[string] except KeyError as e: raise KeyError( - ''' - ERROR: You have characters in your transcripts - which do not occur in your data/alphabet.txt - file. Please verify that your alphabet.txt - contains all neccessary characters. Use - util/check_characters.py to see what characters are in - your train / dev / test transcripts. - ''' + '''ERROR: Your transcripts contain characters which do not occur in data/alphabet.txt! 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.''' ).with_traceback(e.__traceback__) sys.exit()