The goal of the present paper is to report on the work aiming at the developing of the algorithm (and then a programme), which could sort documents (texts) from the point of view of their domains. We have developed an algorithm which enables us to evaluate the probability of the fact that the given texts belong to the same domain, so that related texts can be grouped together. As a tool for similarity measurement we used Princeton WN 1.5. The pilot study of the algorithm on English corpus was carried out. Texts with various domains were taken: sports, politics, economics, medicine a nd arts.