I am trying to split a word into bi-grams. I am using the qlcMatrix
package, but it only returns distinct bi-grams. For example, for the word "detected"
, it only returns "te"
once.
This is the command I use
test_domain <- c("detected")
library("qlcMatrix", lib.loc="~/R/win-library/3.2")
bigram1 <- splitStrings(test_domain, sep = "", bigrams = TRUE, left.boundary = "", right.boundary = "")$bigrams
and this is the result I get:
bigram1
# [1] "ec" "ed" "de" "te" "ct" "et"