exclude lines with URLs in them from creating markov chains
closes #156
This commit is contained in:
parent
b2473a4ac4
commit
70aceab622
1 changed files with 3 additions and 0 deletions
|
@ -53,6 +53,9 @@ class Module(ModuleManager.BaseModule):
|
|||
return lambda: self._create(channel_id, line)
|
||||
|
||||
def _create(self, channel_id, line):
|
||||
if utils.http.REGEX_URL.search(line):
|
||||
return
|
||||
|
||||
words = list(filter(None, line.split(" ")))
|
||||
words = [word.lower() for word in words]
|
||||
words_n = len(words)
|
||||
|
|
Loading…
Reference in a new issue