flashtext: bug
len("İ") # 1
len("İ".lower()) # 2
this will cause string index out of range flashtext.
About this issue
- Original URL
- State: open
- Created 6 years ago
- Reactions: 10
- Comments: 15 (2 by maintainers)
Commits related to this issue
- fix crash fixes https://github.com/vi3k6i5/flashtext/issues/44 — committed to erg/flashtext by erg 5 years ago
Also had a similar issue, quick fix was to add a check for “and idy < len(orig_sentence)” in lines 593, 615, 665.
I posted a fix (#82) a long time ago but it was never merged. Thus I moved to pyahocorasick which is faster too.