Я пытаюсь удалить стоп-слова из вектора символов. Но проблема, с которой я столкнулся, заключается в том, что есть слово «king kond». Поскольку «король» является одним из стоп-слов, «король» в «кинг-конге» удаляется.
Есть ли способ избежать удаления двойных слов? Мой код:
text <- VCorpus(VectorSource(newmnt1$form))
#(newmnt1$form is chr [1:4] "king kong lives" "foot" "island" "skull")
#Normal standardization of text.
text <- tm_map(text, content_transformer(tolower))
text <- tm_map(text, removeWords, custom_stopwords)
text <- tm_map(text, stripWhitespace)
newmnt2 <- text[[1]]$content