Skip to content

Commit f3f7e40

Browse files
committed
Added DummyVocabulary class
1 parent 8363475 commit f3f7e40

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

client/vocabcompiler.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,27 @@ def _compile_vocabulary(self, phrases):
161161
"""
162162
pass
163163

164+
class DummyVocabulary(AbstractVocabulary):
165+
166+
PATH_PREFIX = 'dummy-vocabulary'
167+
168+
@property
169+
def is_compiled(self):
170+
"""
171+
Checks if the vocabulary is compiled by checking if the revision
172+
file is readable.
173+
174+
Returns:
175+
True if this vocabulary has been compiled, else False
176+
"""
177+
return super(self.__class__, self).is_compiled
178+
179+
def _compile_vocabulary(self, phrases):
180+
"""
181+
Does nothing (because this is a dummy class for testing purposes).
182+
"""
183+
pass
184+
164185
class PocketsphinxVocabulary(AbstractVocabulary):
165186

166187
PATH_PREFIX = 'pocketsphinx-vocabulary'

0 commit comments

Comments
 (0)