# 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
The second factor is related to the high customisability of the proposed measure, allowing for the required tolerance for a corpus with many orthographic inconsistencies. \begin{table}
\begin{tabular}{c c c c c c c} \hline \multirow{2}{*}{**Similarity Parameters**} & \multirow{2}{*}{**Threshold \(\alpha\)**} & \multicolumn{3}{c}{**Verses**} & \multicolumn{3}{c}{**Epigrams**} \\ \cline{3-7}  & & **Precision** & **Recall** & **F\({}_{1}\)-Score** & **Precision** & **Recall** & **F\({}_{1}\)-Score** \\ \hline \multirow{8}{*}{**Two-Level (Damerau)**} & 0.1 & 0.9992 & **0.4860** & **0.6539** & 0.6798 & **0.6559** & **0.6676** \\  & 0.2 & 0.9992 & **0.4860** & **0.6539** & 0.6797 & 0.6557 & 0.6675 \\  & 0.3 & 0.9992 & **0.4860** & **0.6539** & 0.6797 & 0.6556 & 0.6674 \\  & 0.4 & 0.9999 & 0.4788 & 0.6476 & 0.6783 & 0.6294 & 0.6529 \\  & 0.5 & 0.9999 & 0.4788 & 0.6476 & 0.6739 & 0.6158 & 0.6435 \\  & 0.6 & **1.0000** & 0.4688 & 0.6383 & 0.6799 & 0.6062 & 0.6409 \\  & 0.7 & **1.0000** & 0.3952 & 0.5665 & 0.7097 & 0.5438 & 0.6158 \\  & 0.8 & **1.0000** & 0.3192 & 0.4840 & 0.7208 & 0.4536 & 0.5568 \\  & 0.9 & **1.0000** & 0.1694 & 0.2898 & **0.8115** & 0.3019 & 0.4401 \\ \hline \multirow{8}{*}{**Two-Level (Default)**} & 0.1 & **1.0000** & 0.2738 & 0.4299 & 0.7383 & 0.4236 & 0.5383 \\  & 0.2 & **1.0000** & 0.2734 & 0.4294 & 0.7394 & 0.4210 & 0.5365 \\  & 0.3 & **1.0000** & 0.2733 & 0.4293 & 0.7391 & 0.4193 & 0.5351 \\  & 0.4 & **1.0000** & 0.2729 & 0.4288 & 0.7372 & 0.4154 & 0.5313 \\  & 0.5 & **1.0000** & 0.2728 & 0.4287 & 0.7328 & 0.4051 & 0.5218 \\  & 0.6 & **1.0000** & 0.2724 & 0.4281 & 0.7316 & 0.4025 & 0.5193 \\  & 0.7 & **1.0000** & 0.2621 & 0.4153 & 0.7276 & 0.3666 & 0.4875 \\  & 0.8 & **1.0000** & 0.2544 & 0.4056 & 0.7488 & 0.3576 & 0.4840 \\  & 0.9 & **1.0000** & 0.2488 & 0.3985 & 0.7476 & 0.3460 & 0.4731 \\ \hline \end{tabular}
\end{table} 
Table 3: Summary of experimental results of the second experiment using a two-level string matcher. The highest scores for each column are indicated in bold. ### Illustrative Example

In addition to a quantitative analysis, we present an illustrative example showcasing the capabilities of the proposed measure as a hands-on research tool. For this example, we have implemented the proposed graph model as a graph database and utilised the interactive and visual tool from Neo4j, called Bloom ([[https://neo4j.com/product/bloom/](https://neo4j.com/product/bloom/)]([https://neo4j.com/product/bloom/](https://neo4j.com/product/bloom/)), accessed on 1 February 2024), to explore and analyse the data. As the dataset in this example we have imported three groups of similar epigrams into the Neo4j graph database. The data are imported using the same method outlined in Section 6.2, and similarities are calculated with the default parameters. All three groups contain epigrams that are variations of the four-verse epigram presented in Table 4. A first group, with identifier 4245, comprises four-verse epigrams that feature minor deviations from the referenced epigram. The second group, with identifier 2150, primarily consists of three-verse epigrams representing variants of verses 1, 2 and 4 in Table 4, respectively. The last group, that has identifier 2148, contains two-verse epigrams that are variations of the first and last verse of the referenced epigram [52]. Using the Neo4j interactive tool, we have queried the database to display all epigrams and the similarity relationships between them with a similarity score of at least 0.9. The outcome of this query is displayed in Figure 7, where we can clearly distinguish four different groups of nodes representing epigrams. In order not to cloud the image, nodes that are not connected to any of the four groups of nodes have been omitted. These outliers represent epigrams for which the text is barely known and, as such, do not display a high similarity with the epigrams that are part of a node group after executing the query.