Skip to content

KeyError: 'i' #8

@shahnewaz-labib

Description

@shahnewaz-labib

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions