banglakit / bengali-stemmer

A library of implementations of published stemming methods for the Bengali language.
MIT License
32 stars 14 forks source link

Bug Report #2

Open riyadhrazzaq opened 4 years ago

riyadhrazzaq commented 4 years ago

Describe the bug Throws this error while stemming some words.

/usr/local/lib/python3.6/dist-packages/py_bangla_stemmer/stemmer/rule_file_parser.py in stem_of_word(self, word)
     75                         while k < indx + len(replace_suffix):
     76                             if replace_suffix[_l] != '.':
---> 77                                 builder[k] = replace_suffix[_l]
     78                             k += 1
     79                             _l += 1

IndexError: list assignment index out of range

To Reproduce

stemmer.stem("গেলেও")
stemmer.stem("মেনে")
stemmer.stem("হিসেবে")

Expected behaviour stemmer.stem("গেলেও") = গেল stemmer.stem("মেনে") = মেনে stemmer.stem("হিসেবে") = হিসেব

Desktop (please complete the following information):

aniruddha-adhikary commented 4 years ago

Thanks @riyadhrazzaq ! Looking into it!