summaryrefslogtreecommitdiff
path: root/client/vocabcompiler.py
diff options
context:
space:
mode:
Diffstat (limited to 'client/vocabcompiler.py')
-rw-r--r--client/vocabcompiler.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/client/vocabcompiler.py b/client/vocabcompiler.py
index 0e498a2..a7d2c4b 100644
--- a/client/vocabcompiler.py
+++ b/client/vocabcompiler.py
@@ -168,6 +168,28 @@ class AbstractVocabulary(object):
pass
+class DummyVocabulary(AbstractVocabulary):
+
+ PATH_PREFIX = 'dummy-vocabulary'
+
+ @property
+ def is_compiled(self):
+ """
+ Checks if the vocabulary is compiled by checking if the revision
+ file is readable.
+
+ Returns:
+ True if this vocabulary has been compiled, else False
+ """
+ return super(self.__class__, self).is_compiled
+
+ def _compile_vocabulary(self, phrases):
+ """
+ Does nothing (because this is a dummy class for testing purposes).
+ """
+ pass
+
+
class PocketsphinxVocabulary(AbstractVocabulary):
PATH_PREFIX = 'pocketsphinx-vocabulary'