You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Robert
Thanks for the code. I noticed that for case insensitive matching, Trie.parseText() reduces the input text to lower case but the keywords are left in their original case (as added). So for the situation where
trie.addKeyword("Alpha");
and
Collection emits = trie.parseText("Alpha");
no matches are returned when case insensitive = true
Adding
if (trieConfig.isCaseInsensitive()) {
character = Character.toLowerCase(character);
}
to addKeyword would make addKeyword and parseText symmetric and match all combinations of case.
thanks
The text was updated successfully, but these errors were encountered:
yim1990
pushed a commit
to yim1990/aho-corasick
that referenced
this issue
Nov 28, 2014
Robert
Thanks for the code. I noticed that for case insensitive matching, Trie.parseText() reduces the input text to lower case but the keywords are left in their original case (as added). So for the situation where
trie.addKeyword("Alpha");
and
Collection emits = trie.parseText("Alpha");
no matches are returned when case insensitive = true
Adding
if (trieConfig.isCaseInsensitive()) {
character = Character.toLowerCase(character);
}
to addKeyword would make addKeyword and parseText symmetric and match all combinations of case.
thanks
The text was updated successfully, but these errors were encountered: