title: Matching inexact company names in Java
body: <p>I have a database of companies. My application receives data that references a company by name, but the name may not exactly match the value in the database. I need to match the incoming data to the company it refers to.</p>
  
  <p>For instance, my database might contain a company with name "A. B. Widgets &amp; Co Ltd." while my incoming data might reference "AB Widgets Limited", "A.B. Widgets and Co", or "A B Widgets".</p>
  
  <p>Some words in the company name (A B Widgets) are more important for matching than others (Co, Ltd, Inc, etc). It's important to avoid false matches.</p>
  
  <p>The number of companies is small enough that I can maintain a map of their names in memory, ie. I have the option of using Java rather than SQL to find the right name.</p>
  
  <p>How would you do this in Java?</p>