-
Notifications
You must be signed in to change notification settings - Fork 316
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ValueError: empty range for randrange() (0,0, 0) #34
Comments
same issue here:
|
In code/eda.py, the main function eda starts with below in line 175
get_only_chars function performs preprocessing to remove non-alphabetic characters from text. Therefore, if you input text data consisting of only non-alphabetic characters, len(words)-1 becomes -1 in the code below in line 117 and etc. and an error occurs.
If you input text data that consists only of non-alphabetic characters, you can avoid this error by modifying the get_only_chars function in line 45, so that the data is excluded from removal as follows.
|
i have same problem,big probability is your data problem. if you are sentence is null or particular token ,like "------". |
I also have this problem, could this problem refers to dataset? |
This is just for your reference. My dataset contains two columns separated by '\t', and the labels are '0' or '1'. The dataset contains neither null values nor "-------", but it does include Japanese text. Once I eliminated the Japanese text, eda_nlp started working fine.
|
I have processed the data according to the data format you said,Here are my running scripts and errors
python code/augment.py --input=train_50w.en --output=train_50w._augmented.txt --num_aug=1 --alpha_sr=0.05 --alpha_rd=0.05 --alpha_ri=0 --alpha_rs=0.05
The text was updated successfully, but these errors were encountered: