Skip to content

Commit

Permalink
Update mongodb.py
Browse files Browse the repository at this point in the history
  • Loading branch information
rafak360 authored and gunthercox committed Jun 19, 2019
1 parent 1d623eb commit 4befe4e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion chatterbot/storage/mongodb.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def filter(self, **kwargs):
or_regex = '|'.join([
'({})'.format(word) for word in search_text_contains.split(' ')
])
kwargs['search_text'] = re.compile(or_regex)
kwargs['search_text'] = re.compile("(?<!^)\s+(?=[A-Z])(?!.\s)").split(or_regex)

mongo_ordering = []

Expand Down

0 comments on commit 4befe4e

Please sign in to comment.