Is this how to make a keyword finder/density check?
<p>Hi I have a relatively big block of text and am wanting to find the most common keywords within it and calculate the density of these keywords.  The way that I have thought of seems as though it could be slow or performance demanding and difficult:</p>

<p>Iterate over each word in the block of text.<br>
Find all the same matches for each of these words
Count the total matches for each of these words
Take say the top 5 most matches and then calculate their density relative to total block.
output results</p>

<p>Is there any easy quick better way of doing this using jquery?</p>
