rewicks / ersatz

Apache License 2.0
39 stars 5 forks source link

IndexError: string index out of range #5

Open robotsp opened 2 years ago

robotsp commented 2 years ago

I tried to create a training dataset, but there is an error:

File "dataset.py", line 271, in main() File "dataset.py", line 267, in main determiner=determiner) File "dataset.py", line 66, in split_train_file ''.join(right_temp).replace('\u2581', ' ').replace('', '')): File "/root/study/ersatz/ersatz/candidates.py", line 72, in call if right_context[0] == ' ': IndexError: string index out of range.

I prepared only one sentence in the raw data file, but it still raises this "out of range" error. How can I fix?

rewicks commented 2 years ago

Can you clarify what the input is? I'm somewhat confused by using only one sentence as training data.