module for text analysis functions