Skip to content

Commit 5097056

Browse files
committed
Merge branch 'master' into develop
2 parents 8b3cc7d + 8f74744 commit 5097056

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

sugaroid/brain/swaglyrics.py

+3
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,15 @@ class SwagLyricsAdapter(LogicAdapter):
2525

2626
def __init__(self, chatbot, **kwargs):
2727
super().__init__(chatbot, **kwargs)
28+
self.normalized = None
2829

2930
def can_process(self, statement):
3031
self.normalized = str(statement).lower().strip().split()
3132
return "$by" in str(statement) and "who" not in self.normalized
3233

3334
def process(self, statement, additional_response_selection_parameters=None):
35+
if self.normalized is None:
36+
self.normalized = str(statement).lower().strip().split()
3437
if (
3538
self.normalized[0] == "get"
3639
and self.normalized[1] == "lyrics"

sugaroid/brain/wiki.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def process(self, statement, additional_response_selection_parameters=None):
9999
continue
100100
else:
101101
question = norm[j:]
102-
if question.lower_ == "time":
102+
if question[0].lower_ == "time":
103103
response = Neuron.gen_time()
104104
confidence = 1.0
105105
stat = True

0 commit comments

Comments
 (0)