From a3e0e9f9bc078a34333575433ea4acc04c3b22e9 Mon Sep 17 00:00:00 2001 From: Robert Gale Date: Thu, 1 Aug 2019 12:14:13 -0700 Subject: [PATCH] Update text.py "characters" was a bad variable name now that I think about it --- util/text.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/util/text.py b/util/text.py index 368c812f..8a115ab4 100644 --- a/util/text.py +++ b/util/text.py @@ -52,10 +52,10 @@ def text_to_char_array(original, alphabet): Given a Python string ``original``, remove unsupported characters, map characters to integers and return a numpy array representing the processed string. """ - characters = np.asarray([alphabet.label_from_string(c) for c in original]) - if characters.shape[0] == 0: + integers = np.asarray([alphabet.label_from_string(c) for c in original]) + if integers.shape[0] == 0: raise Exception("Found an empty transcript! You must include a transcript for all training data.") - return characters + return integers # The following code is from: http://hetland.org/coding/python/levenshtein.py