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

KeyError: 'â' #10

Open
balbinuvm opened this issue Aug 9, 2020 · 0 comments
Open

KeyError: 'â' #10

balbinuvm opened this issue Aug 9, 2020 · 0 comments

Comments

@balbinuvm
Copy link

I'm getting the following error.

Getting rhyme scheme.
67%|███████████████████████████████████████████████████████▎ | 8/12 [00:04<00:02, 1.64it/s]
Traceback (most recent call last):
File "rhyme.py", line 244, in
poem.get_rhyme_scheme_text()
File "rhyme.py", line 215, in get_rhyme_scheme_text
self.rhyme_scheme = [stanza.scheme_to_text(stanza_num=i) for i, stanza in enumerate(self.stanzas)]
File "rhyme.py", line 215, in
self.rhyme_scheme = [stanza.scheme_to_text(stanza_num=i) for i, stanza in enumerate(self.stanzas)]
File "rhyme.py", line 172, in scheme_to_text
rhyme_blocks = self.get_rhyming_blocks()
File "rhyme.py", line 103, in get_rhyming_blocks
self.get_rhyme_scheme()
File "rhyme.py", line 83, in get_rhyme_scheme
if self.does_rhyme(preceding_word, word):
File "rhyme.py", line 57, in does_rhyme
pair = self.prepare_pair(word1, word2)
File "rhyme.py", line 40, in prepare_pair
int_seq = self.get_char_to_int(seq)
File "rhyme.py", line 30, in get_char_to_int
int_list = [corpus.char_to_int[char] for char in word]
File "rhyme.py", line 30, in
int_list = [corpus.char_to_int[char] for char in word]
KeyError: 'â'

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

1 participant