String index out of range
Conobi opened this issue · comments
Hello,
I saw the #21 issue and I'm experiencing the same problem:
When i try to work with my lyrics (which are in french, for information), I've got this message:
Traceback (most recent call last):
File "model.py", line 300, in <module>
main(depth, train_mode)
File "model.py", line 289, in main
x_data, y_data = build_dataset(bars, rhyme_list)
File "model.py", line 144, in build_dataset
line_list = [line, syllables(line), rhyme(line, rhyme_list)]
File "model.py", line 43, in syllables
if word[0] in vowels:
IndexError: string index out of range
I tried to remove double spaces and I replaced "-" by "—" but it still not work.
same issue here, I tried to fix everything, from double spaces to ".." or other uncommon characters, but can't find any solution.
I tried to:
remove any non-ascii character
remove all double non alphabetical characters
convert all numbers in words
remove punctuation
remove spaces before new lines " /n"
Basically now I have only letters and '
No luck? Same issue here and got frustrated so I just tossed in a try: except: