Skip to content

KeyError: 'i' #8

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

Open
shahnewaz-labib opened this issue Jan 6, 2024 · 0 comments
Open

KeyError: 'i' #8

shahnewaz-labib opened this issue Jan 6, 2024 · 0 comments

Comments

@shahnewaz-labib
Copy link

shahnewaz-labib commented Jan 6, 2024

The code for Bengali to Banglish Example provided in the readme:

# coding=utf-8
from bnbphoneticparser import BengaliToBanglish


bengali2banglish = BengaliToBanglish()
bengali_text = "আমি বাংলাদেশি"
print(bengali2banglish.parse(bengali_text.strip()))

fails with the following error:

  File "../bnbphoneticparser/bnbphoneticparser/bengalitobanglish.py", line 44, in __change_sworborno
    asx += self.kar_reverse_map[_ch]
           ~~~~~~~~~~~~~~~~~~~~^^^^^
KeyError: 'i'

The problem persists for different strings.

The tests run by:

pytest tests/bengalitobanglish.py

also fail with similar 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