Word statistics and analysis using python