diff options
Diffstat (limited to 'client/modules/Life.py')
| -rw-r--r-- | client/modules/Life.py | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/client/modules/Life.py b/client/modules/Life.py deleted file mode 100644 index 2c79ee1..0000000 --- a/client/modules/Life.py +++ /dev/null @@ -1,32 +0,0 @@ -import random -import re - -WORDS = ["MEANING", "OF", "LIFE"] - - -def handle(text, mic, profile): - """ - Responds to user-input, typically speech text, by relaying the - meaning of life. - - Arguments: - text -- user-input, typically transcribed speech - mic -- used to interact with the user (for both input and output) - profile -- contains information related to the user (e.g., phone number) - """ - messages = ["It's 42, you idiot.", - "It's 42. How many times do I have to tell you?"] - - message = random.choice(messages) - - mic.say(message) - - -def isValid(text): - """ - Returns True if the input is related to the meaning of life. - - Arguments: - text -- user-input, typically transcribed speech - """ - return bool(re.search(r'\bmeaning of life\b', text, re.IGNORECASE)) |
