Skip to content

Commit

Permalink
Bug fixing for replace_keys
Browse files Browse the repository at this point in the history
  • Loading branch information
AbrJA committed Sep 29, 2023
1 parent cc969e6 commit a77d728
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions R/KeywordProcessor.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
#-----------------------------------------------------------------
Expand Down

0 comments on commit a77d728

Please sign in to comment.