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

Case insenstive setting presumes keywords are lowercase? #12

Closed
dlutz2 opened this issue Sep 13, 2014 · 1 comment
Closed

Case insenstive setting presumes keywords are lowercase? #12

dlutz2 opened this issue Sep 13, 2014 · 1 comment

Comments

@dlutz2
Copy link

dlutz2 commented Sep 13, 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

yim1990 pushed a commit to yim1990/aho-corasick that referenced this issue Nov 28, 2014
@yim1990
Copy link

yim1990 commented Nov 28, 2014

I fixed this issue and requested pull.

robert-bor added a commit that referenced this issue Sep 22, 2015
…hat the keyword emit is lowercased as well
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants