Commit eab980fd authored by searchivarius's avatar searchivarius
Browse files

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

parent a95ced62
...@@ -329,6 +329,7 @@ def main(): ...@@ -329,6 +329,7 @@ def main():
doc = [] doc = []
else: else:
tokens = tokenizer.tokenize(line) tokens = tokenizer.tokenize(line)
if tokens:
doc.append(tokens) doc.append(tokens)
if doc: if doc:
docs.add_document(doc) # If the last doc didn't end on a newline, make sure it still gets added docs.add_document(doc) # If the last doc didn't end on a newline, make sure it still gets added
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment