utilities in word_analysis.py