markov: bit of debug logging in file import

This commit is contained in:
Brian S. Stephan 2016-06-30 16:25:38 -05:00
parent b82e5309e1
commit 81339a4f16
1 changed files with 2 additions and 0 deletions

View File

@ -37,6 +37,7 @@ def import_file(request):
whos = []
for line in log_file:
log.debug(line)
(timestamp, who, what) = line.decode('utf-8').split('\t', 2)
if who in ('-->', '<--', '--', ' *'):
@ -50,6 +51,7 @@ def import_file(request):
# this is a line we probably care about now
what = [x for x in what.rstrip().split(' ') if x not in strips]
markovlib.learn_line(' '.join(what), context)
log.debug("learned")
log.debug(set(whos))
form = LogUploadForm()