AI algorithms in text analysis