I was looking for some help of writing my keyword density checker class and found this function and it is worth sharing. Have a look at it.
Function Code for calculating the word density goes as Follows:
Function Code for calculating the word density goes as Follows: