The article analyzes the use of the nearest neighbor algorithm among the formal methods to identify particular authors of texts written in the Azerbaijani language and considers its application to the issue of recognizing specific authors. In the work under review, the roots of the words included in the texts of different authors are found, and the vectors according to the frequency of processing of these words are constructed according to a certain rule, and the nearest neighbor method is applied to them by treating these vectors as points in the Euclidean space.