# Innovative Application of Blockchain Technology for Digital Recipe Copyright Protection
## 4 Text Similarity Detection
### Results of the Experiment
#### 4.4.3 Experimental Results and Analysis  
We selected 1400 pairs of preprocessed English text data from the STS dataset and 600 pairs from the Chinese recipe dataset, to which we applied the traditional SimHash algorithm, the pretrained word-model-based approach, VSM, WMF-LDA, and our improved P-SimHash algorithm. The specific process is shown in Figure 7. We recorded and counted the number of similar texts and the number of misclassified texts found by each algorithm. Comparison results on the STS dataset are shown in Table 2, which demonstrates the average performance of each algorithm in terms of accuracy.  
There are many ways to evaluate a similar text detection task, and the common evaluation criteria are the detection rate and recall rate, through which the evaluation index can effectively reflect the effectiveness of the similar text detection algorithm. To better show the experimental results, the average detection rate and recall rate of similar text detection are shown as a cluster bar chart Figure 8.  
For datasets in Chinese, it is necessary to omit the lemmatization step, which is specific to English data processing. This is because Chinese grammatical structure does not differentiate tenses such as past tense or present continuous as English does, and such differentiation might lead to polysemy in natural language processing. Therefore, the lemmatization step is not practically necessary in a Chinese context.  
Furthermore, we need to replace the pretrained word embedding model for the Chinese corpus. The Glove model we previously used is trained on an English corpus and is not suitable for Chinese data processing. To this end, we employ the Chinese word and phrase embedding corpus released by Tencent AI Lab as the pretrained word embedding model.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Algorithm** & **Dataset Size** & **Number of Similar Data** & **FN** & **FP** \\ \hline VSM & 1419 & 796 & 240 & 81 \\ \hline SimHash & 1419 & 796 & 188 & 126 \\ \hline Pretrained word model & 1419 & 796 & 163 & 179 \\ \hline P-SimHash & 1419 & 796 & 150 & 87 \\ \hline WMF-LDA & 1419 & 796 & 136 & 110 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Experimental comparison results of the STS dataset.  
Despite these adjustments, we continue with the comparative experiments as before. The results are shown in Table 3 and Figure 9.  
Figure 8: Cluster diagram of comparative experiment on the STS.  
Figure 7: P-SimHash algorithm diagram.  
Experimental data confirm that our improved SimHash algorithm performed exceptionally well in text similarity detection tasks, regardless of whether the text was in Chinese or English. Compared to other algorithms, our method improved on all metrics. Although the improvements in precision and recall were only one percentage point over the original vector space model (VSM) and pretrained word models in the STS dataset, all other metrics improved in the Chinese recipe dataset, albeit with a slightly lower recall rate than the traditional SimHash algorithm. Overall, the effectiveness of the improved SimHash algorithm is still commendable.