From 5deb1799cefe9351b90d3457898990d454d4a4dc Mon Sep 17 00:00:00 2001 From: schneefux Date: Mon, 26 May 2014 23:44:50 -0700 Subject: finalized test --- boot/test.py | 8 +++++++- boot/vocabcompiler.py | 1 - 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'boot') diff --git a/boot/test.py b/boot/test.py index 1c03a33..c6bd3ff 100644 --- a/boot/test.py +++ b/boot/test.py @@ -12,6 +12,7 @@ sys.path.append(mod_path) import g2p + class TestVocabCompiler(unittest.TestCase): def testWordExtraction(self): @@ -19,7 +20,12 @@ class TestVocabCompiler(unittest.TestCase): dictionary = "temp_dictionary.dic" languagemodel = "temp_languagemodel.lm" - words = ['HACKER', 'LIFE', 'FACEBOOK', 'THIRD', 'NO', 'JOKE', 'NOTIFICATION', 'MEANING', 'TIME', 'TODAY', 'SECOND', 'BIRTHDAY', 'KNOCK KNOCK', 'INBOX', 'OF', 'NEWS', 'YES', 'TOMORROW', 'EMAIL', 'WEATHER', 'FIRST', 'MUSIC', 'SPOTIFY'] + words = [ + 'HACKER', 'LIFE', 'FACEBOOK', 'THIRD', 'NO', 'JOKE', + 'NOTIFICATION', 'MEANING', 'TIME', 'TODAY', 'SECOND', + 'BIRTHDAY', 'KNOCK KNOCK', 'INBOX', 'OF', 'NEWS', 'YES', + 'TOMORROW', 'EMAIL', 'WEATHER', 'FIRST', 'MUSIC', 'SPOTIFY' + ] with patch.object(g2p, 'translateWords') as translateWords: with patch.object(vocabcompiler, 'text2lm') as text2lm: diff --git a/boot/vocabcompiler.py b/boot/vocabcompiler.py index 33fb0a8..1d2a51d 100644 --- a/boot/vocabcompiler.py +++ b/boot/vocabcompiler.py @@ -48,7 +48,6 @@ def compile(sentences, dictionary, languagemodel): pass # module probably doesn't have the property words = list(set(words)) - print words # for spotify module words.extend(["MUSIC", "SPOTIFY"]) -- cgit v1.3.1