Fix to prevent crashing on assert len(tokens_b)>=1
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user