Applications of mathematical methods to linguistic research for obtaining the distributions of words in corpora and generation of models for frequencies