Described is the algorithm of detecting changes in the ratio of different words to the total number of words in the text which can be used to address the issues of determining the author's style. The problem of comparing text styles works is relevant in both philological and historical studies, as well as in computer science. The use of these comparison methods can improve the quality of classification and text collections management, which is important for search engines and large repositories of text data. A distinctive feature of the algorithm among similar ones is its ability to analyze the dynamics of lexical richness of the text. The algorithm is implemented in software system for texts analysis.