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: 'っ' #20

Closed
meo-meo opened this issue Dec 10, 2020 · 2 comments
Closed

KeyError: 'っ' #20

meo-meo opened this issue Dec 10, 2020 · 2 comments

Comments

@meo-meo
Copy link

meo-meo commented Dec 10, 2020

Here is a new KeyError I got:

% cutlet
ずっーと
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "$HOME/anaconda3/envs/py36_mecab/lib/python3.6/site-packages/cutlet/cutlet.py", line 133, in romaji
    roma = self.romaji_word(word)
  File "$HOME/anaconda3/envs/py36_mecab/lib/python3.6/site-packages/cutlet/cutlet.py", line 228, in romaji_word
    return self.map_kana(kana)
  File "$HOME/anaconda3/envs/py36_mecab/lib/python3.6/site-packages/cutlet/cutlet.py", line 238, in map_kana
    out += self.get_single_mapping(pk, char, nk)
  File "$HOME/anaconda3/envs/py36_mecab/lib/python3.6/site-packages/cutlet/cutlet.py", line 254, in get_single_mapping
    if pk: return self.table[pk][-1]
KeyError: 'っ'
@polm
Copy link
Owner

polm commented Dec 11, 2020

Thanks for the report, that is not a case I had considered. I made an alpha release that should fix it, please give it a try and let me know if it works.

pip install cutlet==0.1.15a1

@polm
Copy link
Owner

polm commented Dec 13, 2020

Released 0.1.15, which resolves this.

@polm polm closed this as completed Dec 13, 2020
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

2 participants