powered by
cosine distance of two character strings (each string consists of more than one words)
cosine_distance(sentence1, sentence2, split_separator = " ")
a float number
a character string consisting of multiple words
a character string specifying the delimiter(s) to split the sentence
library(textTinyR) sentence1 = 'this is one sentence' sentence2 = 'this is a similar sentence' cds = cosine_distance(sentence1, sentence2)
Run the code above in your browser using DataLab