# Innovative Application of Blockchain Technology for Digital Recipe Copyright Protection
## 4 Text Similarity Detection
### Results of the Experiment
#### 4.4.2 Experimental Environment and Comparison Algorithms  
This experiment was developed and tested in a Python programming environment, and the hardware platform used was a Windows mainframe equipped with an 11 th-generation Intel(R) Core(TM) i5-11400H processor (with a base frequency of 2.70 GHz), 16 GB of RAM, and a 1 TB hard disk.  
In the experimental design, we systematically compared and evaluated three different text similarity calculation methods:  
1. **SimHash algorithm**[15]: SimHash is a technique that transforms high-dimensional feature vectors into low-dimensional feature fingerprints. It generates fingerprints by calculating the statistical characteristics of the input data and compares these fingerprints using the Hamming distance. Due to its dimensionality reduction properties, SimHash is capable of effectively handling large-scale or high-dimensional data, reducing the complexity of storage and computation. It is particularly suited for detecting near-duplicate contents, such as in web crawling or copyright detection scenarios.
2. **Method based on pretrained word models**[37]: This method leverages word vector models that are pretrained on extensive corpora, like Word2 Vec or GloVe. Through these models, each word can be translated into a vector of fixed size, capturing the semantic information and relationships between words. Averaging or weighted averaging of word vectors in a sentence or document can derive a vector representation of the sentence or document. The strength of this method lies in its ability to capture the deep semantic information of texts.  
Figure 6: Preprocessing of the Chinese dataset.  
3. **Vector space model (VSM) combined with TF-IDF**[38]: The VSM is a method of representing text as vectors, where each dimension represents a specific word or term. TF-IDF is a statistical method used to evaluate the importance of a word in a collection of documents, with TF representing term frequency and IDF denoting inverse document frequency. Combining VSM with TF-IDF results in a weighted feature vector of the text. Subsequently, cosine similarity can be utilized to compute the similarity between these vectors. This method's advantage is that it captures the term frequency and significance in the text, thereby enhancing the accuracy of similarity computation.
4. **WMF-LDA**[39]: The WMF-LDA algorithm utilizes the semantic and part-of-speech information of words, as well as the domain differences between different types of texts, to improve the application of the traditional LDA model in the field of text similarity computation. This algorithm first maps domain words and synonyms to a unified word through the word2 vec model, filters out irrelevant words based on their part-of-speech, and finally uses the LDA model to perform topic modeling on the text. The JS distance is then used to calculate the similarity between texts.  
Each of these algorithms has its own strengths and characteristics, making them suitable for different types of text similarity calculation tasks and offering a comprehensive reference and comparison for the experiment.