Background: Diagnosing and treating anorexia nervosa is an important challenge for modern psychiatry. Taking into account a connection between the mental state of a person and the characteristics of their language, this paper presents developed and tested method for analyzing the written statements of patients with anorexia nervosa and healthy individuals, including the identification of keywords.Methods: Due to the short nature of the texts, which is related to the difficulty of expressing oneself about one's body when suffering from anorexia, the bag of words approach was used for documents' information representation. The document is represented as a vector, where its various elements indicate the number of individual words. Then, a rule-based model was created, where as a collection of rules, dictionary files were used corresponding to three groups of positive, negative and neutral sounds for each subcategory. Next in the analyzed texts were searched and counted keywords. Based on the keywords found, each of the documents was categorized into one of the groups in every subcategory.Results: It is possible to indicate a set of characteristics sentiment for every person. Additionally, the results of specific patient could be analyzed in six specific subcategories: self-esteem, acceptance of the assessment of the environment, emotions, autoimmune, functioning of the body and body image.Conclusions: The described analysis indicates the existence of a relationship between the mental state of the author's textual health and the vocabulary he or she uses. It is possible to indicate a set of characteristic sentiment terms specific to a given group of people. Their presence is related to the author's mental state and their body image. It could help focus on specific topics during therapy. [ABSTRACT FROM AUTHOR]