Coreference is a task in the field of natural language processing aimed at linking words and phrases in a text that point to the same extra-linguistic object or referent. It is applicable in text summarization, question answering, information retrieval, and dialog systems. In this paper, the existing methods for solving the coreferencing problem are dissected and a method based on the application of a two-stage machine learning model is proposed. The language model converts text tokens into vector representations. Then, for each pair of tokens, based on their vector representations, an estimate of the probability of finding these tokens either in one noun phrase or in two coreference noun phrases is computed. Thus, the method simultaneously searches for noun phrases and predicts the coreference relationship between them.