From a77d7282eaccab3b159b0299f24a490044ed8a48 Mon Sep 17 00:00:00 2001 From: AbrJA Date: Fri, 29 Sep 2023 09:53:02 -0600 Subject: [PATCH] Bug fixing for replace_keys --- R/KeywordProcessor.R | 1 + 1 file changed, 1 insertion(+) diff --git a/R/KeywordProcessor.R b/R/KeywordProcessor.R index dc86a3b..a1ba7e1 100644 --- a/R/KeywordProcessor.R +++ b/R/KeywordProcessor.R @@ -177,6 +177,7 @@ KeywordProcessor <- R6::R6Class( replace_keys = function(sentences) { if (is.null(self$attrs$trie)) stop("Create a trie dictionary first") stopifnot(is.character(sentences), length(sentences) > 0) + if (self$attrs$ignore_case) sentences <- tolower(sentences) replaceKeys(self$attrs$trie, sentences, self$attrs$chars, self$attrs$id) } #-----------------------------------------------------------------