title: How to convert words to links?
body: <p>I have a xml with two properties: word and link.
  How can I replace the words on a text to a link using the xml information.
  Ex.: 
  XML</p>
  
  <pre><code>&lt;word&gt;dog&lt;/word&gt;
  &lt;link&gt;http://www.dog.com&lt;/link&gt;
  </code></pre>
  
  <p>Text: The dog is nice.</p>
  
  <p>Result: The <a href="http://www.dog.com/" rel="nofollow">dog</a> is nice.</p>
  
  <p>Results OK.</p>
  
  <p>The problems:</p>
  
  <p>1- If the text has the word <strong>dogs</strong> the result is incorret, because of "s".</p>
  
  <p>2- I've tested doing a split by space on text to fix it, but if the word is composed like <strong>new year</strong> the result is incorret again.</p>
  
  <p>Does anyone have any suggestions to do it and fix these problems (plural and compound words)?</p>
  
  <p>Thanks for the help.</p>