## 1 Introduction  
The growth of communication networks and computer systems has led to an increase in cyberattacks and consequently the number of incidents recorded through the information residing in their logs [1]. Peripheral nodes where events occur send their logs to central nodes responsible for analyzing them and detecting anomalies that may cause unexpected system behavior. The exponential increase in log size slows the process, increases the number of false positives, and consequently generates alert fatigue when cybersecurity professionals are overwhelmed by a high volume of security alerts, reducing their ability to react and detect anomalies [2]. Logs generated by a system often have a high number of repeated or similar messages. Modern anomaly detection systems based on logs utilize various artificial intelligence techniques, the most commonly used being those based on machine-learning algorithms [3] or natural language processing like Large Language Models [4]. These techniques consist of three phases: log parsing, feature extraction, and anomaly detection using a trained model. In log parsing, the log is converted from its semi-structured format into a format that can be analyzed by the machine. With feature extraction, the goal is to extract the most important information from the data. The third phase, model execution, has resource needs and performance proportional to the volume or number of tokens processed. The literature includes various works that have addressed the task of log compaction, and, as in our case, have encountered various challenges. Logs can have different origins, which implies a certain diversity of words in the messages, complicating their analysis [5]. There are no dictionaries that associate all the words in a log's messages with their natural language meanings so that this log's semantics can be automatically obtained and used in its analysis [6]. The hierarchies of themes currently used refer to very restricted thematic areas and have few levels in their hierarchical tree [7; 8]. Nor is there a numerical encoding of the themes of the words that simply stores complete semantic information of each word of the log and its messages [9]. Our work processes a system log and converts it into a much smaller log with the same semantics but without repeated messages. In this way, we significantly reduce the log size, automatically decreasing the time and resources needed for its processing with an AI model, as well as reducing the number of false positives. To carry out this task, we implemented an algorithm that develops a hierarchical classification of the themes of the words in a log and assigns each theme a numerical code, called a hierarchical code. Each of these codes represents the theme of a node in the tree and the themes of its superior nodes. A hierarchical code is formed by the concatenation of digits that identify each of the nodes in the branch of the tree that descends from the root node to the node in question. Thus, the coding performed allows a code to reflect the specificity of its theme in the hierarchy. The constructed tree has more than 15 levels and contains all names in English, which facilitates its applicability to various logs. From the themes of the hierarchical tree and their codes, we generate a catalog of words ordered alphabetically, each associated with its possible hierarchical codes, also considering the existence of synonyms. We automatically use the catalog to obtain the themes of all the messages from a system log and then compare and analyze the themes of different messages of the log among themselves to obtain a concise summary with non-repeated themes. The rest of this article is organized as follows. Section 2 introduces previous work related to our proposal. The algorithm we developed is shown in Section 3, where we explain the thematic classifier tree, the themes and codes catalog we created, and the log analysis using hierarchical codes.