Skip to content
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

String index out of range #23

Open
Conobi opened this issue May 23, 2018 · 2 comments
Open

String index out of range #23

Conobi opened this issue May 23, 2018 · 2 comments

Comments

@Conobi
Copy link

Conobi commented May 23, 2018

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.

@Hunterwolf88
Copy link

Hunterwolf88 commented Feb 27, 2019

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 '

@joeycurnutt
Copy link

No luck? Same issue here and got frustrated so I just tossed in a try: except:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants