A few bug fixes (encoding and division by 0)
Small ruby script to generate word frequency