My question is somewhat a prequel to the question asked in Visualise distances between texts
I have a table with two sentences to compare for each observation.
compare <- read.table(header=T,sep="|", text=
"person | text1 | text2
person1 | the quick brown fox jumps over the lazy dog | the quick cat jumps on the fast fog
person2 | I dont want to work today | I feel like working today
"
)
I want a column where the values represent the difference between two sentences for each observation.
Basically I am looking for functions similar to agrep
but for comparing sentences or paragraphs.