The mathematical component of philological science