# A Hierarchical Orthographic Similarity Measure for Interconnected Texts Represented by Graphs
## 4 Representing a Textual Corpus as a Graph
### Graph Representation of a Textual Corpus
For each remaining pair of verses or epigrams in the relation (after the \(\alpha\)-cut), it is checked whether the verse or epigram pair is also similar according to the ground truth. If this is the case, it leads to a true positive (TP), and when it is not the case, it results in a false positive (FP). Likewise, all pairs of verses and epigrams that were pruned by the \(\alpha\)-cut are checked in the same manner. Pruned pairs linking two verses or epigrams that are similar according to the ground truth are counted as false negatives (FN), whereas the others are counted as true negatives (TN). These four values enable the calculation of various quality measures offering insight into the performance of the different similarity measures concerning individual verses or full epigrams, according to the provided parameter values and a given \(\alpha\) value. As a first quality measure, we calculate the recall of the proposed similarity measure

\[\text{recall}=\frac{\text{TP}}{\text{TP}+\text{FN}}, \tag{24}\]

where the fraction of successfully identified similar texts is determined. Secondly, we calculate the precision:

\[\text{precision}=\frac{\text{TP}}{\text{TP}+\text{FP}}. \tag{25}\] \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Level** & **Parameter** & **Default** & **Custom 1** & **Custom 2** \\ \hline \multirow{3}{*}{Word} & \(c_{I,D}\) & 1.0 & 0.9 & 0.8 \\  & \(c_{T}\) & 1.0 & 0.9 & 0.0 \\  & \(c_{R}\) & 1.0 & 1.0 & 1.0 \\ \hline \multirow{3}{*}{Verse} & \(c_{I,D}\) & 1.0 & 0.9 & 0.8 \\  & \(c_{T}\) & 1.0 & 0.0 & 0.0 \\  & \(t\) & 1.0 & 0.9 & 0.8 \\  & \(r\) & 1.0 & 0.8 & 0.7 \\ \hline \multirow{3}{*}{Epigram} & \(c_{I,D}\) & 1.0 & 0.95 & 0.85 \\  & \(c_{T}\) & 1.0 & 0.0 & 0.0 \\ \cline{1-1}  & \(t\) & 1.0 & 0.9 & 0.8 \\ \cline{1-1}  & \(r\) & 1.0 & 0.8 & 0.7 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Different sets of parameter values for the first experiment. The precision depicts the fraction of correctly identified similar texts among all identified similar texts. As a third and last quality measure, we compute the F\({}_{1}\)-score. This is the harmonic mean of the precision and recall:

\[\text{F}_{1}\text{-score}=2\cdot\frac{\text{precision}\cdot\text{recall}}{ \text{precision}+\text{recall}}. \tag{26}\]

The F\({}_{1}\)-score provides us with a single value that indicates an overall performance of the similarity measure, balancing precision and recall into a single measure. For each similarity calculation in both experiments, we have calculated these quality measures for a set of nine distinct \(\alpha\) values, ranging from 0.1 till 0.9. Ultimately, the quality measures are computed for 54 different situations in the first experiment and for 36 situations in the second experiment. ### Results

Table 2 showcases the results of the calculated quality measures for the verse and epigram test sets and three distinct parameter sets in our first experiment. In each column, the highest value for each performance measure is highlighted in bold. Additionally, the F\({}_{1}\)-score results for verses and epigrams are visualised by plots in Figure 6a and Figure 6b, respectively.