diff --git a/client/vocabcompiler.py b/client/vocabcompiler.py index 0f8a648a5..866715092 100644 --- a/client/vocabcompiler.py +++ b/client/vocabcompiler.py @@ -504,6 +504,15 @@ def get_keyword_phrases(): if phrase: phrases.append(phrase) + profile_path = jasperpath.config('profile.yml') + if os.path.exists(profile_path): + with open(profile_path, 'r') as f: + profile = yaml.safe_load(f) + persona = profile.get('persona', 'JASPER').upper() + else: + persona = 'JASPER' + + phrases.append(persona) return phrases diff --git a/static/keyword_phrases b/static/keyword_phrases index d118b13ac..d3d2f3c1a 100644 --- a/static/keyword_phrases +++ b/static/keyword_phrases @@ -6,7 +6,6 @@ FIRST IN IS IT -JASPER NOW OF ON @@ -15,4 +14,4 @@ SAY WHAT WHICH WITH -WORK \ No newline at end of file +WORK diff --git a/tests/test_vocabcompiler.py b/tests/test_vocabcompiler.py index 2ce977d26..95d85e2d2 100644 --- a/tests/test_vocabcompiler.py +++ b/tests/test_vocabcompiler.py @@ -23,7 +23,7 @@ def testPhraseExtraction(self): self.assertEqual(expected_phrases, extracted_phrases) def testKeywordPhraseExtraction(self): - expected_phrases = ['MOCK'] + expected_phrases = ['MOCK', 'JASPER'] with tempfile.TemporaryFile() as f: # We can't use mock_open here, because it doesn't seem to work