## 3 Models of Vector Presentation of Text Documents Using Lexical and Semantic Approaches  
We can use TF-IDF presentations of texts as part of lexical and semantic approaches to the formalized presentation of texts as vectors. With the lexical approach to creating TF-IDF, we can use the occurrence frequency of words (TF) and terms (n-grams) from the vocabulary of a text corpus (or associative-semantic class objects) and the inverse document frequency (IDF). With the semantic approach to creating TF-IDF, we can use semantic bonds between words in the form of graphs for presenting documents (graph embeddings) and parameters such as the average number of neighbors (the degree of a node--a semantic unit of the text); the clustering coefficient (a parameter that renders the network connectivity in general); the average shortest path length; the network diameter; etc. Numeric values of these parameters can form a vector that describes both the properties of individual objects in the semantic network for a given text and those of the entire network in general. To implement the semantic approach to creating TF-IDF, we can use, for instance, the ICAN algorithm (incremental construction of an associative network), which is based on updating the semantic graph when moving along it with a sliding window with a preset size [22]. The semantic similarity between a word \(t_{i}\) and its neighbor \(w_{j}\) in the sliding window is calculated as the product of the bond weights along the shortest paths between them. The ICAN graph [14] can be constructed according to the following sequence of steps:  
Step 1. Direct co-occurrence effect. Apply a sliding window of 11 terms for each term \(t_{i}\) in the processed document \(d\). The sliding window has the following structure: [\(w_{1}\), \(w_{2}\)\(w_{3}\), \(w_{4}\), \(w_{5}\), \(t_{i}\), \(w_{6}\), \(w_{7}\), \(w_{8}\), \(w_{9}\), \(w_{10}\)], where sliding window values include the term \(t_{i}\) itself and 10 other terms on the left (\(w_{1}\), \(w_{2}\), \(w_{3}\), \(w_{4}\), \(w_{5}\)) and on the right (\(w_{6}\), \(w_{7}\), \(w_{8}\), \(w_{9}\), \(w_{10}\)) of term \(t_{i}\). The size of such a sliding window was chosen to be 11 based on the research results of the ICAN algorithm described in [14]. In this step, we searched for edges (bonds) between the term \(t_{i}\) and other terms \(w_{i}\) in the sliding window. If any edge (\(t_{i}\), \(w_{j}\)) does not exist (i.e., there is no bond between terms), the bond between terms is added to the semantic graph \(g\) of document \(d\) with weight \(p=0.5\); otherwise, the weight \(p\) of the bond between terms is set equal to \(p+(1-p)/2\). Step 2. Second-order co-occurrence effect. Let each edge (\(t_{i}\), \(w_{j}\)) have weight \(p\) (obtained in the first step). Then, for each node \(c_{k}\) that is connected to \(w_{j}\) with weight \(\gamma\) (edge weight (\(w_{j}\), \(c_{k}\))) we should perform the following actions: if any edge (\(t_{i}\), \(c_{k}\)) does not exist in graph \(g\), we should add it to the semantic graph \(g\) of document \(d\) with weight \(q=p*\gamma\); otherwise, weight \(q\) should be changed to \(q+A*(1-q)*(p*\gamma)\), where A is the scaling factor (\(A=0.02\)). It should be noted that before the scaling factor reaches the value \(A=0.2\), it almost does not affect the modeling result. Step 3. Occurrence without co-occurrence effect. Reduce the weight on all edges connecting \(t_{i}\) with its neighbors by a fraction equal to 0.9 (i.e., 90% of the current value) and remove bonds that fall under the weight reduction threshold of 0.4 (i.e., 40%). The process of the ICAN graph construction is described in Algorithm 1. ```
1:\(d\)--document, \(A\in\mathbb{R}\)--scaling coefficient (\(A=0.02\)). 2:Define set of edges \(E=\varnothing\) for the semantic graph. 3:Define edge weight function \(p:E\rightarrow\mathbb{R}\). 4:For each term \(t_{i}\in d\)do
5:Define for the term \(t_{i}\) a sliding window \(\{w_{1},w_{2},w_{3},w_{4},w_{5},t_{i},w_{6},w_{7},w_{8},w_{9},\ w_{10}\}\).