title: Checking if 2 lines of text are nearly equal in R
body: <p>I have the below data, where I want to check if any 2 records have the same address. </p>
  
  <pre><code>Id  Class   Address
  42  18  PLOT#39 H#8-2-293/A4/A/
  42  68  PLOT #39 H #8-2-293/A4/A
  42  35  PLOT NO 1030 BUNGLOW NO
  42  34  PLOT NO 1030 BUNGLOW NO
  42  00  PLOT 1030 BUNGLOW NO 3
  42  53  PLOT NO-39 H#8-2-293/A4/
  42  70  GAYATRAI RESIDENCY MADHU
  </code></pre>
  
  <p>I am tokenizing Address using <strong>strsplit(dt$Address, " ")</strong> and storing it in a list variable. I will consider it as the same address if 70% of the words match. </p>
  
  <p>My problem here is when I use strplit(), it gives me a </p>
  
  <pre><code>&gt; strsplit(dt$Address, " ")[1]
  [[1]]
  [1] "PLOT#39"  "H#8-2-293/A4/A/"
  </code></pre>
  
  <p>So here I am not able to iterate over the words to check if these words are present in the other Address list. How can I check if they are nearly equal addresses.</p>