title: Grouping words that are similar
body: <pre><code>CompanyName &lt;- c('Kraft', 'Kraft Foods', 'Kfraft', 'nestle', 'nestle usa', 'GM', 'general motors', 'the dow chemical company', 'Dow')
  </code></pre>
  
  <p>I want to get either:</p>
  
  <pre><code>CompanyName2
  Kraft
  Kraft
  Kraft
  nestle
  nestle
  general motors
  general motors
  Dow
  Dow
  </code></pre>
  
  <p>But would be absolutely fine with:</p>
  
  <pre><code>CompanyName2
  1
  1
  1
  2
  2
  3
  3
  </code></pre>
  
  <p>I see algorithms for getting the distance between two words, so if I had just one weird name I would compare it to all other names and pick the one with the lowest distance. But I have thousands of names and want to group them all into groups.</p>
  
  <p>I do not know anything about elastic search, but would one of the functions in the <code>elastic</code> package or some other function help me out here?</p>
  
  <p>I'm sorry there's no programming here. I know. But this is way out of my area of normal expertise.</p>