HTRC text analysis algorithms from Loretta and Boris