title: Alphabetize or remove redundant but slightly different versions of phrases in a database
body: <p>I have a column with phrases like this:</p>
  
  <pre><code>one or more of: 
     word/place name +
     the letter 's' (or the plural version of the word)
  in addition to possibly preposition or conjunctions between each word (in, and, etc.)
  </code></pre>
  
  <p>I want to select all the rows that have pluralized or conjunctivized versions of phrases that already exist in the table for deletion/editing. I can get a list of every conjunction/preposition word for matching.</p>
  
  <p>For example, in a table with text rows:</p>
  
  <ul>
  <li>rabbits and foxes</li>
  <li>apple on plate</li>
  <li>apples plates</li>
  <li>the microsoft eggplant hunters</li>
  <li>fox rabbit</li>
  <li>apple plate</li>
  <li>microsoft hunter eggplant</li>
  <li>chickens</li>
  </ul>
  
  <p>I would want to end up selecting the top 4 rows, essentially taking each row and checking it against the rest of the table to see if it's most basic version already exists.</p>
  
  <p>I could think of a way to regex match the strings themselves but how would I check for the duplicate version? <strong>(This doesnt have to be done in sql I can process the rows with a java program too)</strong></p>