docs <- c("chimpanzees are found in jungle",
"chimps are jungle animals",
"Mercedes automobiles are best",
"merc is made in germany",
"chimps are intelligent animals")
sentence <- "automobiles are"
s <- bm_25(document=sentence, corpus=docs, top_n=2)
Run the code above in your browser using DataLab