#Specifying a character vector &
#use a dictionary from malaytextr package
stem_malay(word = "banyaknya", dictionary = malayrootwords)
#A data frame,
#Use a dictionary from malaytextr package,
#With a dataframe, you will need to specify the column to be stemmed
x <- data.frame(text = c("banyaknya","sangat","terkedu", "pengetahuan"))
stem_malay(word = x, dictionary = malayrootwords, col_feature1 = "text")
Run the code above in your browser using DataLab