Skip to content

Commit

Permalink
Merge pull request #7 from AbrJA/rcpp
Browse files Browse the repository at this point in the history
Bug fixing for replace_keys
  • Loading branch information
AbrJA authored Sep 29, 2023
2 parents 8b64e4a + a77d728 commit b0edb49
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 b0edb49

Please sign in to comment.