From 5acb073d06fc47db5ab4d1483f9f8ff4fa8f8455 Mon Sep 17 00:00:00 2001 From: Dave Jarvis Date: Thu, 8 Jun 2017 17:51:42 -0700 Subject: [PATCH] Changes for case sensitivity Changed README to use .ignoreCase(). --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5142f4c..3ebbb50 100644 --- a/README.md +++ b/README.md @@ -107,13 +107,13 @@ the Trie to lowercase the entire searchtext to ease the matching process. The lo ```java Trie trie = Trie.builder() - .caseInsensitive() + .ignoreCase() .addKeyword("casing") .build(); Collection emits = trie.parseText("CaSiNg"); ``` -Normally, this match would not be found. With the caseInsensitive settings the entire search text is lowercased +Normally, this match would not be found. With the ignoreCase settings the entire search text is lowercased before the matching begins. Therefore it will find exactly one match. Since you still have control of the original search text and you will know exactly where the match was, you can still utilize the original casing. @@ -161,7 +161,7 @@ matches as soon as you encounter them. Let's look at an example where we want to String speech = "The Answer to the Great Question... Of Life, " + "the Universe and Everything... Is... Forty-two,' said " + "Deep Thought, with infinite majesty and calm."; - Trie trie = Trie.builder().ignoreOverlaps().onlyWholeWords().caseInsensitive() + Trie trie = Trie.builder().ignoreOverlaps().onlyWholeWords().ignoreCase() .addKeyword("great question") .addKeyword("forty-two") .addKeyword("deep thought")