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

More than 100 Koti is not handled #2

Open
m4hi2 opened this issue Nov 11, 2020 · 1 comment
Open

More than 100 Koti is not handled #2

m4hi2 opened this issue Nov 11, 2020 · 1 comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@m4hi2
Copy link
Member

m4hi2 commented Nov 11, 2020

Calling to_bn_word(111111111110) results in crashing the program.

>>> main.to_bn_word(111111111110)      
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/m4hi2/number-to-bengali-word/number_to_bengali/main.py", line 17, in to_bn_word
    generated_words = whole_part_word_gen(whole_segments)
  File "/home/m4hi2/number-to-bengali-word/number_to_bengali/utils.py", line 58, in whole_part_word_gen
    generated_words += numeric_words[str(segments[segment])] + \
KeyError: '11111'

Expected Output: এগারো হাজার এক শত এগারো কোটি এগারো লক্ষ এগারো হাজার এক শত দশ

@m4hi2 m4hi2 added bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed labels Nov 11, 2020
@m4hi2
Copy link
Member Author

m4hi2 commented Nov 11, 2020

Hint on how to fix:
if the segment of koti is more than 100, run generate_segments() on that and generate the words then add to the rest of the words. Should be simple fix, feel free to ask if you anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant