# Methodology for Assessing the Digital Image of an Enterprise with Its Industry Specifics
## 2 Materials and Methods
In our work, we used different Python libraries: pandas for working with table data, numpy for working with vectors and linear algebra, scipy for specific aspects of linear algebra, nltk for working with text data, pymorphy2 for morphological analysis [36], dostoyevski for evaluation of text sentiment in Russia, sklearn for specific tasks of machine learning, and matplotlib for visualization tasks. Most of the indicators we offered for digital image analysis were based on the vector text analysis model. Vector text analysis is conducted by representing the totality of texts (documents) in the form of a frequency matrix. This matrix shows the number of occurrences of \(i\) word (token) in \(j\) text (document); it is also known as \"a bag of words\" [37]. An example of such matrices can be seen in Figure 5.  
Rows of the matrix are represented in a form of vector rows, and the distance between them is calculated which helps to analyze text similarity. Hence, each vector can represent the semantic orientation of a text in a multidimensional space, and we can measure the distance between the two vectors. Cosine distance was taken as measure in this work. Let vectors \(x\) and \(y\) be given. Scalar product and cosine of the angle \(\theta\) are linked through the relation:  
\[\langle x,y\rangle=\|x\|\|y\|\cos\theta\]  
Hence, cosine measure can be defined as:  
\[\rho_{\cos}(x,y)=\arccos\biggl{(}\frac{\langle x,y\rangle}{\|x\|\|y\|}\biggr{)} =\arccos\left(\frac{\sum_{i=1}^{d}x_{i}y_{i}}{\left(\sum_{i=1}^{d}x_{i}^{2} \right)^{\frac{1}{2}}\left(\sum_{i=1}^{d}y_{i}^{2}\right)^{\frac{1}{2}}}\right)\]  
Figure 5: “Bag of words” model. Figure 6: Length of companies’ tokens. and the cosine distance, in turn, is defined as:  
\[cosine=1-\rho_{cos}(x,\ y)\]  
Thus, the larger cosine distance between vectors of texts is, the less similar they are and vice versa. Cosine distance helps to determine several other metrics which are essential for analyzing digital image. The first metric is the index of the presence of a key information component in a company's digital image:  
\[Iapp_{\infty}^{a}=1-cosine(a,\infty)\]  
where \(a\) is a row vector for tokens related to a company, and \(\alpha\) is a row vector for tokens related to an informational component. For most key components, a high value may indicate a favorable image built by the company compared to other competitors. A group of indexes on the presence of key information components allows one to describe the digital image of a company and draw conclusions about measures to manage it correctly. The next metric is the index of the presence of sustainable development components, calculated as:  
\[I_{SD}^{a}=Iapp_{SP}^{a}+Iapp_{ED}^{a}+Iapp_{ER}^{a}\]  
where \(SP\) is the index of the presence of the component of social progress, \(ED\) the presence index of the economic development component, and \(ER\) the index of the presence of an ecology component. An increase in this indicator demonstrates a favorable dynamic in the perception of the company's image based on the parameters of social progress, economic development, and care for the environment. The index of digital image uniqueness is calculated as:  
\[I_{y}^{a}=\frac{\sum_{b=1}^{\beta}cosine(a,b)}{\beta-1},\ \ a\
eq b\]  
where \(a\) is a row vector for tokens related to company A, \(b\) is a row vector for tokens related to its competitor, and \(\beta\) is the total number of competitors analyzed, including company A itself. Uniqueness of digital image allows companies to stand out from their competitors. At the same time, it can indicate both the advantages of the current image and its shortcomings (for example, if the company forms its digital image incorrectly and does not compare with competitors). To increase the value of this indicator, it is necessary to define your target and contact audience and form the unique message they need more clearly.