title: compare sentences or paragraphs in a table
body: <p>My question is somewhat a prequel to the question asked in <a href="https://stackoverflow.com/questions/16004847/visualise-distances-between-texts">Visualise distances between texts</a></p>
  
  <p>I have a table with two sentences to compare for each observation.</p>
  
  <pre><code>compare &lt;- 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
  "
  )
  </code></pre>
  
  <p>I want a column where the values represent the difference between two sentences for each observation. 
  Basically I am looking for functions similar to <code>agrep</code> but for comparing sentences or paragraphs.</p>