-
Notifications
You must be signed in to change notification settings - Fork 10
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
Error when replacing unique words #2
Comments
I tried but couldn't recreate the bug here - https://runkit.com/drenther/flashtext-bug-recreate Can you provide an isolated instance recreating this bug? It will help me debug it. Thank you for opening the issue. |
Hi @drenther, I work with @MarcDelp. You can see that the bug happens for the two last tests. Thanks. |
Update to the new release 1.0.5 Thanks for the patience. |
Yes it seems that everything is working as intended now. |
Hi there,
I have a little bug when using your great implementation of FlashText to replace keywords.
It only appears in one case:
Let's say that I have a file containing my words to find and the replacement words.
First word is the word to find in my text, second the replacement word.
I parse my file and feed my FlashText object with it and then I start using it in my application.
My app will take an user input and use FlashText to replace the words I want.
let newInput = AppNamesKeywordProcessor.replaceKeywords(input);
The bug occurs when the user send a single word as sentence, such as
In this case, the replace method give me back an empty string. Same with any of "a", "ap", "appl".
Otherwise, if the user sends me a real sentence such as
or
everything works as expected.
The text was updated successfully, but these errors were encountered: