diff options
Diffstat (limited to 'boot/vocabcompiler.py')
| -rw-r--r-- | boot/vocabcompiler.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/boot/vocabcompiler.py b/boot/vocabcompiler.py index a3aaf66..33fb0a8 100644 --- a/boot/vocabcompiler.py +++ b/boot/vocabcompiler.py @@ -48,6 +48,7 @@ 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"]) @@ -57,11 +58,11 @@ def compile(sentences, dictionary, languagemodel): zipped = zip(words, pronounced) lines = ["%s %s" % (x, y) for x, y in zipped] - with open(dictionary, "w") as f: + with open(dictionary, "w+") as f: f.write("\n".join(lines) + "\n") # create the language model - with open(sentences, "w") as f: + with open(sentences, "w+") as f: f.write("\n".join(words) + "\n") f.write("<s> \n </s> \n") f.close() |
