BERT-pytorch
BERT-pytorch copied to clipboard
IndexError
I try to run according to md tutorial
but
same issue
hey bro,do you have solutions?
becauese there are some problems abouot spilt('\t').
same issue, any solutions?
check your corpus, it might not follow this rule in some lines: 'text \t text'
It likes the parser for '\t' works bad..
if you install bert_pytorch by pip, edit /opt/conda/lib/python3.8/site-packages/bert_pytorch/dataset/dataset.py
line 23.
change
self.lines = [line[:-1].split("\t")
for line in tqdm.tqdm(f, desc="Loading Dataset", total=corpus_lines)]
to
self.lines = [line[:-1].split("\\t")
for line in tqdm.tqdm(f, desc="Loading Dataset", total=corpus_lines)]