Fix to prevent crashing on assert len(tokens_b)>=1

This commit is contained in:
searchivarius committed 2019-09-09 19:58:08 -04:00
1 parent a95ced6260
commit eab980fd68
1 file changed
+2 -1
@@ -329,7 +329,8 @@ def main():
doc = []
else:
tokens = tokenizer.tokenize(line)
doc.append(tokens)
if tokens:
doc.append(tokens)
if doc:
docs.add_document(doc) # If the last doc didn't end on a newline, make sure it still gets added
if len(docs) <= 1: