# TextRank Keyword Extraction Algorithm Using Word Vector Clustering Based on Rough Data-Deduction

Authors: Ning Zhou; Wenqian Shi; Renyu Liang; Na Zhong
Journal: Computational Intelligence and Neuroscience
 (2022)

---

## Abstract

When TextRank algorithm based on graph model constructs graph associative edges, the co-occurrence window rules only consider the relationships between local terms. Using the information in the document itself is limited. In order to solve the above problems, an improved TextRank keyword extraction algorithm based on rough data reasoning combined with word vector clustering, RDD-WRank, was proposed. Firstly, the algorithm uses rough data reasoning to mine the association between candidate keywords, expands the search scope, and makes the results more comprehensive. Then, based on Wikipedia online open knowledge base, word embedding technology is used to integrate Word2Vec into the improved algorithm, and the word vector of TextRank lexical graph nodes is clustered to adjust the voting importance of nodes in the cluster. Compared with the traditional TextRank algorithm and the Word2Vec algorithm combined with TextRank, the experimental results show that the improved algorithm has significantly improved the extraction accuracy, which proves that the idea of using rough data reasoning can effectively improve the performance of the algorithm to extract keywords.


---

## Body

## 1. Introduction

In this information age, people’s lives are full of information. Faced with such a huge amount of data, it is particularly important to quickly and accurately obtain the content which we are interested in and which is valuable. As a high-level summary of the text content, keywords can help readers quickly understand the main ideas. In addition, keyword extraction also plays an important role in the fields of information retrieval and text classification. This article mainly discusses the method of using TextRank to extract keywords.The traditional TextRank algorithm uses the co-occurrence window principle to establish the association between nodes when it is constructing candidate keyword graphs. That is, an edge can be constructed between two nodes in the same window, so the co-occurrence relationship can be used to easily obtain the required graph of word. However, using this principle to judge the correlation between nodes only considers the local relationship, which is relatively limited and may lead to the extraction results being not comprehensive or accurate enough. In addition, the algorithm only uses the information of the document itself. If external knowledge can be introduced into the keyword extraction process of the algorithm, the effect of keyword extraction can be improved in theory.To solve the above problems and get more accurate extraction results, this paper introduces rough data-deduction theory into the field of text mining for the first time and makes improvements to the TextRank algorithm based on this. Because rough data-deduction has the characteristics of upper approximation and the deduction object is data [1], when the theory is applied to a problem with potential association, it has important application significance for the problem model building and algorithm simulation. However, there are a few application studies on the theory at present, which are only involved in image repair [2] and have not been used in the related research of text language processing. Therefore, it has theoretical and practical significance to improve TextRank algorithm based on rough data-deduction. The algorithm in this paper uses rough data-deduction theory to infer the association relationship between nodes, determine whether there is a potential association between two nodes, and then obtain the transition probability of coverage influences between nodes. At the same time, to make the algorithm consider the influence of external knowledge on keyword extraction, this paper uses the Word2Vec model training to generate word vectors and cluster the word vectors. The TextRank word nodes of graph are nonuniformly weighted according to the clustering distribution of words. Then, we integrate the external world knowledge of a single document into the algorithm and improve the extraction effect of the algorithm. Different from the existing methods that use topic weighting and inverse document frequency weighting to introduce external knowledge, the training data of Word2Vec is independent of the documents to be extracted. Using the word vector generated by it to improve the algorithm, theoretically a more stable extraction result can be obtained.


## 2. Related Work

The Materials and Methods should be described with sufficient details to allow others to replicate and build on the published results. Please note that the publication of your manuscript implicates that you must make all materials, data, computer code, and protocols associated with the publication available to readers. Please disclose at the submission stage any restrictions on the availability of materials or information. New methods and protocols should be described in detail while well-established methods can be briefly described and appropriately cited.Research manuscripts reporting large datasets that are deposited in a publicly available database should specify where the data have been deposited and provide the relevant accession numbers. If the accession numbers have not yet been obtained at the time of submission, please state that they will be provided during review. They must be provided prior to publication.The research on keyword extraction methods began at the end of the last century. According to whether it is necessary to provide tagged corpus, keyword extraction can be divided into supervised and unsupervised methods in this paper. The supervised extraction method [3] regards keyword extraction as a binary classification problem to perform binary judgment on the words in the text to determine whether it is a keyword, and this method needs to provide tagged corpus. The unsupervised extraction method does not need to provide tagged corpus. It uses statistical properties to rank the candidate words and takes the most important words as keywords. With the continuous improvement of unsupervised extraction methods, its extraction performance is gradually approaching supervised methods [4], and it has strong adaptability, so it is widely used. This paper focuses on the research of unsupervised extraction algorithms, and the mainstream methods can be summarized into three categories, keyword extraction algorithms based on word frequency statistics [5–8], topic models [9–12], and diagram models [13–17].There is a big difference between Chinese and English keyword research, and the algorithm based on graph model is a more effective method in the keyword extraction of Chinese text. It can more fully utilize the relationship between text elements than the method based on word frequency statistics, and has a good keyword extraction effect. The TextRank algorithm, as a typical representative based on the word diagram model, has been widely concerned by researchers.According to the Google’s PageRank algorithm, Mihalcea and Tarau proposed the voting algorithm TextRank based on the graph model. In recent years, in order to further improve the keyword extraction effect of the TextRank algorithm, Literature [18] proposed PositionRank, an unsupervised model for extracting keywords from academic documents, which combines information of all locations where words appear to bias PageRank. Literature [19] integrates LDA into the algorithm, taking into account the influence of the subject matter of the whole documentation set, thereby improving the accuracy of extraction. Literature [20] added the time dimension to the algorithm, which can better adapt to changing themes and improve the effectiveness of extraction. Literature [21] introduced word relevance and document language network in the document graph model to improve keyword extraction performance. Literature [22] improved the algorithm based on the theory of basic level category. Literature [23] integrated the location information of the words in the document into the algorithm and improved the effect of the algorithm on keyword extraction. Literature [24] integrated the Doc2Vec model and the K-means algorithm into the algorithm to improve the quality of extraction. In summary, it is found that the improvements of the existing related algorithms are all at the level of combining external features, and fails to start from the inside of the algorithm to improve its accuracy.With the continuous development of various technologies in the field of artificial intelligence, the neural network tool Word2Vec began to be widely used. Keywords extraction in the text based on the Word2Vec model is one of its important applications. Literature [25] used word2vec to perform K-dimensional vector representation on all the words in the training documentation set, calculated the similarity between words based on the word vectors, and implemented word clustering to get the keywords of the document. Literature [26] combined the LDA topic model with Word2Vec to propose a keyword extraction method that combined topic word embedding and network structure analysis. Literature [27] uses TF-IDF-weighted Glove word vector for word embedding representation. Literature [28] proposed a cuckoo search algorithm and k-means supervised hybrid clustering algorithm to divide all kinds of data samples into clusters so as to provide training subsets with high diversity and merged the word2vec model into the traditional TextRank algorithm by using word embedding technology to improve the accuracy of keyword extraction. Literature [29] merged the word2vec model into the traditional TextRank algorithm by using word embedding technology to improve the accuracy of keyword extraction.


## 3. Research Theory

### 3.1. TextRank Algorithm

The TextRank [30] algorithm is a graph model sorting algorithm based on the Google PageRank [31, 32] algorithm. Now it is widely used in the field of keyword extraction [33, 34]. The basic idea of the algorithm is the voting principle. First, the target text is divided into several meaningful words, and the local connection between the words, which is the same as co-occurrence window, is used to determine the association between the candidate words and construct the candidate word graph. Then, our algorithm uses the voting mechanism to sort the candidate words to achieve keyword extraction. The main steps are as follows:(1)
Sentence segmentation: Segment the target textT according to the completeness of the sentence, that is, T=S1,S2,…,Sm.(2)
Word segmentation and filtering: Segment word for each sentence,Si∈T, and tag part-of-speech, then filter out stop words and some words that are not included in the specified part-of-speech, that is, Si=ti,1,ti,2,…,ti,n, where ti,j is the candidate keyword after filtering.(3)
Construct graph: Construct candidate graph of word,G = (V, E), where V is the vertex set which is composed of the candidate words obtained in (2), E is the edge set which is a subset of V × V. The traditional algorithm uses the co-occurrence window to construct the edges between two nodes in the graph. That is, only when the candidate words corresponding to the two nodes appear in a window whose length is K, there is an edge between the two nodes, where K is the window size and determines the maximum number of words that can co-occur.(4)
Iterative calculation: Iteratively calculate the weight of each node according to formula (1) [30] until the calculation result converges.(1)WSvi=1−d+d×∑vj∈Inviwji∑vk∈OutviwjkWSvi.In the formula,Invi represents the node set pointing to node vi, and d∈0,1 is the damping factor, which was originally the random walk probability of the PageRank algorithm. The original intention of the setting is to prevent those pages without external links from swallowing the opportunity for users to browse down. There are also nodes without any pointing in the text graph model, the general value is 0.85. If there is a node in the candidate word graph whose error rate is less than a specific limit value, it is considered that the node has reached convergence, and this limit value is usually set to 0.0001. pvj⟶vi represents the jump probability from node vj to vi, which is calculated by formula (2) in the traditional TextRank algorithm.(2)pvj⟶vi=wji∑vk∈Outvjwjk,if∃vj⟶vi∈E0,otherwise.In the formula,Outvj represents the set of nodes which is pointed by vj, wji represents the weight of the edge from node wj to node wi, which is determined by the co-occurrence of two words in the traditional algorithm.(5)
Sorting: Sort the node weights in reverse order and use the first K word as keyword in the target text.


### 3.2. Rough Data-Deduction

#### 3.2.1. Rough Set Theory

The original application of rough set theory in text processing is to classify texts to speed up the classification and improve the accuracy of classification [35]. The idea of rough data-deduction is based on rough set theory, and integrates the approximate information in the upper approximation concept into the process of data reasoning. Therefore, the introduction of concepts related to rough set theory will play a role in understanding rough data-deduction. Here is a brief introduction to some related knowledge in the rough set.LetU be a dataset and R an equivalence relation on U. The structure composed of U and R is called approximation space denoted by M=U,R, and U is the domain of discourse. Let U/R=aR|a∈U be referred to as the partition of U relative to R, where aR is the R-equivalence class and determined by a. For any subset X⊆U of U, in approximate space M, the upper and lower approximation R∗x of X are defined in the following ways [36]:(3)R∗x=∪​aR|aR∈URandaR∩​X≠ϕ,R∗x=∪​aR|aR∈URandaR⊆​X≠ϕ.That is, the upper approximation of the subsetX is equal to the union of all R-equivalence classes whose intersection with X is not equal to the empty set, and the lower approximation of the subset X is equal to the union of all R-equivalence classes contained in X.The lower approximationR∗x is approaching X from the inside of X, and the upper approximation R∗x is approaching from the outside of X. If X is considered to contain precise information, R∗x contained within X is often more accurate than precise information. R∗x expands the scope of precise information to include external information, so that the concept of rough set can be derived. That is, when R∗x≠R∗x, X is called a rough set. And, when R∗x=R∗x, X is called a definite set [36]. Since the information of R∗x is too accurate, the information in R∗x covers X which is an extension of accurate information. Therefore, incorporating R∗x into rough data-deduction can increase the deduction data and expand the deduction range, and the results obtained will be more accurate.


#### 3.2.2. Rough Deduction-Space

Rough deduction-space is the structure space that rough data-deduction depends on, and it is an expansion of an approximation spaceM=U,R in content and structure. Then, in the formula, K=R1,R2,…,Rnn≥1, where Rii=1,2,…,n is an equivalence relation on U. Given a binary relation S⊆U×U, S is referred to as a deduction relation. The structure composed of U, K, and S is called a rough deduction-space denoted by W=U,K,S [1].


### 3.3. Rough Data-Deduction

Rough data-deduction accomplishes deductions from data to data, which is different from any logical deduction in the mathematical logic. Since most things and objects in real life can be abstracted as data, data-oriented reasoning is more widely used. LetW=U,K,S be rough deduction-spaces, a∈U and R∈K, then rough data-deductions are defined as follows:(1)
Letb∈U, if b∈R∗a−R, a can directly get rough deduction b with respect to R, denoted by a⇒Rb, where a−R=x|x∈U,and there is a dataz∈aRmakingz,x∈S.The subset a−R is called the S-predecessor set of aR.(2)
Letb1,b2,...,bn, b∈U, if a⇒Rb1, b1⇒Rb2,…, and bn−1⇒Rbnbn⇒Rbn≥0, a roughly deduces b with respect to R, which is denoted by a|=Rb.(3)
ForR∈K and a,b∈U, the process of deduction whether a roughly deduces b with respect to (1) or (2) is called the rough data-deduction with respect to R in W=U,K,S, or rough data-deduction for short [1].Rough data-deduction can expand association scope and increase association data. If this theory is applied to the TextRank keyword extraction algorithm, the association between nodes of two words can be obtained through deduction from the overall situation. According to this, the graph of candidate keywords is constructed to extract keywords, and the extraction result should be more comprehensive.


### 3.4. Word2Vec

Word2Vec is a model tool for word vector training open sourced by Google. It can vectorize all words to quantitatively measure the relationship between words and explore the relationship between candidate words. It uses a shallow neural network model to automatically learn the occurrence of words in the corpus, and embeds the words into a space with a moderate dimension, that is,words⟶Rn, and the expression result of the words in the new space Rn is the word vector [37].The idea of Word2Vec [26, 36] comes from the probability calculation of Bayesian occurrence estimation, let T=w1,w2,…,wn be sentences including n words, the probability of occurrence of the sentence T is:(4)PT=∏i=1npwi|wi−n−1wi−n−2,…,wi−1.And, the Bayesian estimation of the occurrence chance ofwi is(5)pwi|wi−n−1wi−n−2,…,wi−1=Cw1w2,…,wnCw1w2,…,wn−1.In the formula,Cw1w2,…,wn is the probability of the sentence w1w2,…,wn in the corpus.The Word2Vec tool mainly includes the following two training modes: Continuous Bag-of-Words (CBOW) and Skip-Gram, both of which are three-layer neural networks (input layer, projection layer, and output layer). The CBOW model [25, 36] predicts the current value through context, that is, inputting a known context and outputting the prediction of the current word, as shown in Figure 1. What is predicted by the CBOW model in the figure is pwt|wt−2,wt−1,wt+1,wt+2, and the window is 2. Assuming that k words are taken before and after the target word wt, that is, the window size is k, the prediction of the CBOW model is(6)pwt|wt−k,wt−k−1,…,wt−1,wt+1,…,wt+k−1,wt+k.Figure 1
CBOW and Skip-Gram model structures.And, the learning goal of this model is to maximize the functionL1:(7)L1=∏t=1Vpwt|wt−k,wt−k−1,…,wt−1,wt+1,…,wt+k−1,wt+k.The Skip-Gram model [25, 36] has the opposite characteristics of the CBOW model. Its input is a word vector of a specific word, and the output is a context word vector corresponding to a specific word, as shown in Figure 1. Similarly, if it is assumed that k words are taken before and after the word wt, that is, the window size is k, then the prediction of the Skip-Gram model is(8)pwt+p|wt−k≤p≤k,k≠0.And, the learning goal of this model is to maximize the functionL2:(9)L2=∏t=1V∏p=−k,t≠0kpwt+p|wt.CBOW and Skip-Gram are two important models in Word2Vec, which describe the association between surrounding words and current words from different angles. Comparing the two models, the Skip-Gram model can generate more training samples and capture more semantic details between words. Under ideal conditions where the corpus is good enough, the Skip-Gram model is superior to the CBOW model. However, in the case of less corpus, it is difficult to capture more details between words. On the contrary, the CBOW model has the characteristics of averaging which will make the training effect better, and this study considers both. At the same time, two optimization methods are proposed to reduce the training complexity: negative sampling [38] and hierarchical softmax [39] to speed up the training process.Compared with the traditional text representation, Word2Vec generates a word vector with a lower dimension, and the semantic and syntactic relationship between words can also be well reflected in the vector space, because the words with similar semantics are close to each other in space. It can be said that the word vectors learned in Word2Vec training contain the semantic information of the words in the dataset. Pretraining language models such as GPT and BERT have better training effects, but their data scale is large. Therefore, this paper weights the jump probability between TextRank word graph nodes based on the relationship between the text word vectors obtained by Word2Vec training.


## 3.1. TextRank Algorithm

The TextRank [30] algorithm is a graph model sorting algorithm based on the Google PageRank [31, 32] algorithm. Now it is widely used in the field of keyword extraction [33, 34]. The basic idea of the algorithm is the voting principle. First, the target text is divided into several meaningful words, and the local connection between the words, which is the same as co-occurrence window, is used to determine the association between the candidate words and construct the candidate word graph. Then, our algorithm uses the voting mechanism to sort the candidate words to achieve keyword extraction. The main steps are as follows:(1)
Sentence segmentation: Segment the target textT according to the completeness of the sentence, that is, T=S1,S2,…,Sm.(2)
Word segmentation and filtering: Segment word for each sentence,Si∈T, and tag part-of-speech, then filter out stop words and some words that are not included in the specified part-of-speech, that is, Si=ti,1,ti,2,…,ti,n, where ti,j is the candidate keyword after filtering.(3)
Construct graph: Construct candidate graph of word,G = (V, E), where V is the vertex set which is composed of the candidate words obtained in (2), E is the edge set which is a subset of V × V. The traditional algorithm uses the co-occurrence window to construct the edges between two nodes in the graph. That is, only when the candidate words corresponding to the two nodes appear in a window whose length is K, there is an edge between the two nodes, where K is the window size and determines the maximum number of words that can co-occur.(4)
Iterative calculation: Iteratively calculate the weight of each node according to formula (1) [30] until the calculation result converges.(1)WSvi=1−d+d×∑vj∈Inviwji∑vk∈OutviwjkWSvi.In the formula,Invi represents the node set pointing to node vi, and d∈0,1 is the damping factor, which was originally the random walk probability of the PageRank algorithm. The original intention of the setting is to prevent those pages without external links from swallowing the opportunity for users to browse down. There are also nodes without any pointing in the text graph model, the general value is 0.85. If there is a node in the candidate word graph whose error rate is less than a specific limit value, it is considered that the node has reached convergence, and this limit value is usually set to 0.0001. pvj⟶vi represents the jump probability from node vj to vi, which is calculated by formula (2) in the traditional TextRank algorithm.(2)pvj⟶vi=wji∑vk∈Outvjwjk,if∃vj⟶vi∈E0,otherwise.In the formula,Outvj represents the set of nodes which is pointed by vj, wji represents the weight of the edge from node wj to node wi, which is determined by the co-occurrence of two words in the traditional algorithm.(5)
Sorting: Sort the node weights in reverse order and use the first K word as keyword in the target text.


## 3.2. Rough Data-Deduction

### 3.2.1. Rough Set Theory

The original application of rough set theory in text processing is to classify texts to speed up the classification and improve the accuracy of classification [35]. The idea of rough data-deduction is based on rough set theory, and integrates the approximate information in the upper approximation concept into the process of data reasoning. Therefore, the introduction of concepts related to rough set theory will play a role in understanding rough data-deduction. Here is a brief introduction to some related knowledge in the rough set.LetU be a dataset and R an equivalence relation on U. The structure composed of U and R is called approximation space denoted by M=U,R, and U is the domain of discourse. Let U/R=aR|a∈U be referred to as the partition of U relative to R, where aR is the R-equivalence class and determined by a. For any subset X⊆U of U, in approximate space M, the upper and lower approximation R∗x of X are defined in the following ways [36]:(3)R∗x=∪​aR|aR∈URandaR∩​X≠ϕ,R∗x=∪​aR|aR∈URandaR⊆​X≠ϕ.That is, the upper approximation of the subsetX is equal to the union of all R-equivalence classes whose intersection with X is not equal to the empty set, and the lower approximation of the subset X is equal to the union of all R-equivalence classes contained in X.The lower approximationR∗x is approaching X from the inside of X, and the upper approximation R∗x is approaching from the outside of X. If X is considered to contain precise information, R∗x contained within X is often more accurate than precise information. R∗x expands the scope of precise information to include external information, so that the concept of rough set can be derived. That is, when R∗x≠R∗x, X is called a rough set. And, when R∗x=R∗x, X is called a definite set [36]. Since the information of R∗x is too accurate, the information in R∗x covers X which is an extension of accurate information. Therefore, incorporating R∗x into rough data-deduction can increase the deduction data and expand the deduction range, and the results obtained will be more accurate.


### 3.2.2. Rough Deduction-Space

Rough deduction-space is the structure space that rough data-deduction depends on, and it is an expansion of an approximation spaceM=U,R in content and structure. Then, in the formula, K=R1,R2,…,Rnn≥1, where Rii=1,2,…,n is an equivalence relation on U. Given a binary relation S⊆U×U, S is referred to as a deduction relation. The structure composed of U, K, and S is called a rough deduction-space denoted by W=U,K,S [1].


## 3.2.1. Rough Set Theory

The original application of rough set theory in text processing is to classify texts to speed up the classification and improve the accuracy of classification [35]. The idea of rough data-deduction is based on rough set theory, and integrates the approximate information in the upper approximation concept into the process of data reasoning. Therefore, the introduction of concepts related to rough set theory will play a role in understanding rough data-deduction. Here is a brief introduction to some related knowledge in the rough set.LetU be a dataset and R an equivalence relation on U. The structure composed of U and R is called approximation space denoted by M=U,R, and U is the domain of discourse. Let U/R=aR|a∈U be referred to as the partition of U relative to R, where aR is the R-equivalence class and determined by a. For any subset X⊆U of U, in approximate space M, the upper and lower approximation R∗x of X are defined in the following ways [36]:(3)R∗x=∪​aR|aR∈URandaR∩​X≠ϕ,R∗x=∪​aR|aR∈URandaR⊆​X≠ϕ.That is, the upper approximation of the subsetX is equal to the union of all R-equivalence classes whose intersection with X is not equal to the empty set, and the lower approximation of the subset X is equal to the union of all R-equivalence classes contained in X.The lower approximationR∗x is approaching X from the inside of X, and the upper approximation R∗x is approaching from the outside of X. If X is considered to contain precise information, R∗x contained within X is often more accurate than precise information. R∗x expands the scope of precise information to include external information, so that the concept of rough set can be derived. That is, when R∗x≠R∗x, X is called a rough set. And, when R∗x=R∗x, X is called a definite set [36]. Since the information of R∗x is too accurate, the information in R∗x covers X which is an extension of accurate information. Therefore, incorporating R∗x into rough data-deduction can increase the deduction data and expand the deduction range, and the results obtained will be more accurate.


## 3.2.2. Rough Deduction-Space

Rough deduction-space is the structure space that rough data-deduction depends on, and it is an expansion of an approximation spaceM=U,R in content and structure. Then, in the formula, K=R1,R2,…,Rnn≥1, where Rii=1,2,…,n is an equivalence relation on U. Given a binary relation S⊆U×U, S is referred to as a deduction relation. The structure composed of U, K, and S is called a rough deduction-space denoted by W=U,K,S [1].


## 3.3. Rough Data-Deduction

Rough data-deduction accomplishes deductions from data to data, which is different from any logical deduction in the mathematical logic. Since most things and objects in real life can be abstracted as data, data-oriented reasoning is more widely used. LetW=U,K,S be rough deduction-spaces, a∈U and R∈K, then rough data-deductions are defined as follows:(1)
Letb∈U, if b∈R∗a−R, a can directly get rough deduction b with respect to R, denoted by a⇒Rb, where a−R=x|x∈U,and there is a dataz∈aRmakingz,x∈S.The subset a−R is called the S-predecessor set of aR.(2)
Letb1,b2,...,bn, b∈U, if a⇒Rb1, b1⇒Rb2,…, and bn−1⇒Rbnbn⇒Rbn≥0, a roughly deduces b with respect to R, which is denoted by a|=Rb.(3)
ForR∈K and a,b∈U, the process of deduction whether a roughly deduces b with respect to (1) or (2) is called the rough data-deduction with respect to R in W=U,K,S, or rough data-deduction for short [1].Rough data-deduction can expand association scope and increase association data. If this theory is applied to the TextRank keyword extraction algorithm, the association between nodes of two words can be obtained through deduction from the overall situation. According to this, the graph of candidate keywords is constructed to extract keywords, and the extraction result should be more comprehensive.


## 3.4. Word2Vec

Word2Vec is a model tool for word vector training open sourced by Google. It can vectorize all words to quantitatively measure the relationship between words and explore the relationship between candidate words. It uses a shallow neural network model to automatically learn the occurrence of words in the corpus, and embeds the words into a space with a moderate dimension, that is,words⟶Rn, and the expression result of the words in the new space Rn is the word vector [37].The idea of Word2Vec [26, 36] comes from the probability calculation of Bayesian occurrence estimation, let T=w1,w2,…,wn be sentences including n words, the probability of occurrence of the sentence T is:(4)PT=∏i=1npwi|wi−n−1wi−n−2,…,wi−1.And, the Bayesian estimation of the occurrence chance ofwi is(5)pwi|wi−n−1wi−n−2,…,wi−1=Cw1w2,…,wnCw1w2,…,wn−1.In the formula,Cw1w2,…,wn is the probability of the sentence w1w2,…,wn in the corpus.The Word2Vec tool mainly includes the following two training modes: Continuous Bag-of-Words (CBOW) and Skip-Gram, both of which are three-layer neural networks (input layer, projection layer, and output layer). The CBOW model [25, 36] predicts the current value through context, that is, inputting a known context and outputting the prediction of the current word, as shown in Figure 1. What is predicted by the CBOW model in the figure is pwt|wt−2,wt−1,wt+1,wt+2, and the window is 2. Assuming that k words are taken before and after the target word wt, that is, the window size is k, the prediction of the CBOW model is(6)pwt|wt−k,wt−k−1,…,wt−1,wt+1,…,wt+k−1,wt+k.Figure 1
CBOW and Skip-Gram model structures.And, the learning goal of this model is to maximize the functionL1:(7)L1=∏t=1Vpwt|wt−k,wt−k−1,…,wt−1,wt+1,…,wt+k−1,wt+k.The Skip-Gram model [25, 36] has the opposite characteristics of the CBOW model. Its input is a word vector of a specific word, and the output is a context word vector corresponding to a specific word, as shown in Figure 1. Similarly, if it is assumed that k words are taken before and after the word wt, that is, the window size is k, then the prediction of the Skip-Gram model is(8)pwt+p|wt−k≤p≤k,k≠0.And, the learning goal of this model is to maximize the functionL2:(9)L2=∏t=1V∏p=−k,t≠0kpwt+p|wt.CBOW and Skip-Gram are two important models in Word2Vec, which describe the association between surrounding words and current words from different angles. Comparing the two models, the Skip-Gram model can generate more training samples and capture more semantic details between words. Under ideal conditions where the corpus is good enough, the Skip-Gram model is superior to the CBOW model. However, in the case of less corpus, it is difficult to capture more details between words. On the contrary, the CBOW model has the characteristics of averaging which will make the training effect better, and this study considers both. At the same time, two optimization methods are proposed to reduce the training complexity: negative sampling [38] and hierarchical softmax [39] to speed up the training process.Compared with the traditional text representation, Word2Vec generates a word vector with a lower dimension, and the semantic and syntactic relationship between words can also be well reflected in the vector space, because the words with similar semantics are close to each other in space. It can be said that the word vectors learned in Word2Vec training contain the semantic information of the words in the dataset. Pretraining language models such as GPT and BERT have better training effects, but their data scale is large. Therefore, this paper weights the jump probability between TextRank word graph nodes based on the relationship between the text word vectors obtained by Word2Vec training.


## 4. Improved Algorithm Using Word Vector Based on Rough Data-Deduction

The classic TextRank algorithm constructs the graph model of candidate keywords through the co-occurrence relationship and then iteratively calculates the weight of each node through the average transition probability matrix until it converges. This approach is relatively simple and effective, but it has certain limitations. The rule of co-occurrence window only considers the correlation between local words, so some words that are locally associated with certain keywords may be extracted. However, the keywords of a document are not limited to some words around important words. When extracting text keywords, we must fully consider the words in the text and some potentially associated words. Words with potential association will have an important impact on the entirely iterative sorting process, and this potential association can be explored through the theory of rough data-deduction. At the same time, considering the influence of external knowledge on keyword extraction, the improved algorithm introduces Word2Vec to quantify the candidate word nodes. Unlike existing methods that use topic weighting and inverse document frequency weighting to introduce external knowledge, the training data of the Word2Vec model is independent of the text data to be extracted. Using the word vectors generated by its training to improve the algorithm, in theory, a more stable extraction result can be obtained [40]. The word vector reflects the external knowledge information, and the candidate keywords can be clustered into several clusters according to the similarity between the word vectors. The farther a word is from the centroid of the cluster, the more it can reflect the different aspects of a cluster from words near the centroid. When it is used as a word node in TextRank, the higher the importance of its vote, the higher the probability of jumping between adjacent nodes.First, starting from the meaning of the words, according to the similarity of the meanings between words, the candidate keywords are classified. Since a group of different words with similar meanings may describe the same important content in a document, the weight of this group of words should be increased accordingly to improve the accuracy of the extraction results. The classic TextRank algorithm does not consider this aspect but only considers the word itself, thereby ignoring the contribution rate of words with similar meanings. The improved algorithm takes the word meaning into account and divides the candidate words by word meaning to participate in the subsequent association deduction, which can extract keywords more effectively.Second, the rough deduction-spaceW=U,K,S is introduced to describe the structure of keyword extraction, where U is a dataset composed of candidate keywords, K is the set of equivalence relations, and R∈K, for a,b∈U, a,b∈R if and only if a and bb have similar meanings. S⊆U×U is defined as S=u,v|u,v∈Uand there is an association betweenuandv.At the same time, using rough data-deduction, it is assumed that the deduction relationship is(10)S=w1,w4,w3,w4,w3,w6,w5,w8,where w1∼w9 are candidate keywords selected from the text after word segmentation and filtering, and this deduction relationship is determined by the association degree of the association rules in the deduction, that is, point mutual information. For the equivalence relation R∈K, it is assumed that the division of U with respect to R is(11)UR=w1,w2,w3,w4,w5,w6,w7,w8,w9.The equivalence division here is based on the similarity of word meanings between candidate words, combined with the above information to obtain a rough data-deduction schematic diagram in keyword extraction, as shown in Figure2.Figure 2
Diagram of rough data-deduction in keyword extraction.As shown in Figure2, in the process of rough data-deduction, for the candidate word w1, the algorithm obtains w2, w3 based on the similarity rule of word meaning, so w1, w2, and w3 are divided into a dataset. Similarly, w4∼w9 can be divided. Based on the association degree of association rules in point mutual information deduction, the algorithm deduces from w1 to w4 and get w5∼w9. According to the definition of rough data-deduction, for w1, there are w1R=w1,w2,w3, w1−R=w4,w6, R∗w1−R=w4,w5,w6, so w1⇒Rw5. For candidate word w5: w6R=w4,w5,w6, w5−R=w8, R∗w5−R=w7,w8,w9, so w5⇒Rw9. Finally, w1|=Rw9 can be got from w1⇒Rw5 and w5⇒Rw9. As can be seen from the above, there is also a potential correlation between w1 and w9, which can provide a certain contribution for the calculation. The association between candidate keywords is established by the above rules, and the association weight can be added as a contribution rate to the iterative calculation process to improve the accuracy of extraction. For any two nodes vj and vi, the influence of node vj on vi is transmitted through its directed edge vj,vi, and the weight of the edge determines the influence of vj and finally obtained by vi. Therefore, let the association weight between vj and vi based on rough data-deduction be the weight of the coverage influence of node vj transmitted to node vi, and record it as wij′. With reference to formula (2), the transition probability of coverage that influences between candidate keywords nodes vj and vi is(12)pcovvj⟶vi=wjk′∑vk∈Outvjwjk′.Then, for the textT and its candidate keyword word set w1,w2,…,wn and the Word2Vec word vector model obtained by training, let wi⟶ represent the word vector corresponding to the word wi, C1,C2,…,Ck represent the clustering result after K-means clustering by the word vector set of the text, and formula (13) is proposed to calculate the voting importance of any word vi in the cluster Cvi.(13)cweightvi=dvi⟶,cvi⟶∑vj∈cvidvi⟶,cvi⟶×Cvi.In this formula,Cvi⟶ is the vector corresponding to the centroid of cluster Cvi, dvi⟶,cvi⟶ is the Euclidean distance from vector vi⟶ to vector cvi⟶ in the word vector space, and Cvi is the number of words included in the cluster Cvi. The total voting score of a cluster is the number of nodes in the cluster, and the voting weight of each node in the cluster is proportionally distributed according to the Euclidean distance from the centroid. The further away from the centroid, the higher the importance of voting. When the semantic association of the two nodes in the word vector space is expressed as the clustering weighted influence between the nodes, then through cluster analysis and calculation to get the voting importance of each word, the transition probability of cluster influence between nodes vj and vi is(14)pcluvj⟶vi=cweightvi∑vk∈outvjcweightvk.Finally, according to the coverage influence between nodes and clustering weighted influence, formula (15) is proposed to calculate the jump probability between nodes vi and vj.(15)pvj⟶vji=α×pcovvj⟶vi+β×pcluvj⟶vi.In this formula,α and β are the weight coefficients of each influence, respectively, and α+β=1. This paper takes α=0.7 and β=0.3 according to the result of experiments.According to the theory of link analysis, as long as the jump probability transition matrix between nodes in a given graph is given, the importance of the nodes can be calculated iteratively by formula (1).The main steps to improve the algorithm are as follows:Step 1.
Preprocess the target text based on the classic TextRank algorithm, to get candidate keywords by cutting sentences, word segmentation, and part-of-speech filtering.Step 2.
Divide the candidate keywords into different equivalence classes according to the similarity of word meanings. In this paper, we divide words based on HowNet and Cilin. For any two wordsw1, w2, the division rule [41] is(16)s=λ1s1+λ2s2.
In this formula,s1 and s2 are the similarity calculated by HowNet and Cilin, respectively, λ1 and λ2 are the two weights given to s1 and s2, and the requirement λ1+λ2=1. The values of λ1 and λ2 are defined by the distribution of words w1 and w2 in HowNet and Cilin in Figure 3.
In this formula, the strategies for taking the value ofλ1 and λ2 are as follows [41]:(1)
Whenw1∈C, w2∈C, calculate the similarity between w1 and w2, respectively, based on HowNet and Cilin. Then, denote them as s1 and s2. Takes λ1=λ2=0.5 in the experiment of this paper.(2)
Whenw1∈A, w2∈A or w1∈B, w2∈B, calculate the similarity between w1 and w2 based on HowNet or Cilin, and denote them as s1 or s2. Here, λ1 is 1 and λ2 is 0.(3)
Whenw1∈A, w2∈B, find the synonyms set of w2 based on Cilin, then calculate the similarity of these synonymous words with w1 based on HowNet, and take the maximum value as s1. If w2 has no synonymous words in Cilin, then take s1=0.2. Now λ1=1 and λ2=0.(4)
Whenw1∈A, w2∈C, first calculate the similarity between w1 and w2 based on HowNet and denote as s1. Then, find the synonyms set of w2 in Cilin and calculate the similarity with w1 based on HowNet. Take the maximum value and denote as s2. If w2 has no synonymous words in Cilin, then take s2=s1. Now λ1>λ2. Takes λ1=0.6 and λ2=0.4 in the experiment of this paper.(5)
Whenw1∈B, w2∈C, first calculate the similarity between w1 and w2 based on Cilin and denote as s2. Then, find the synonyms set of w1 in Cilin and calculate the similarity with w2 based on HowNet. Take the maximum value and denote as s1. If w1 has no synonymous words in Cilin, then take s1=s2. Now λ2>λ1. Takes λ1=0.4 and λ2=0.6 in the experiment of this paper.
The calculation of word similarity based on HowNet is as follows [41]:(17)simC1,C2=∑i=13βi∏j=1isimjC1,C2.(18)simW1,W2=maxi=1,…,m,j=1,…,nsimC1i,C2j.
In formula (17), sim1C1,C2 is the similarity calculated by the set of independent sememe, sim2C1,C2 is the similarity of the characteristic structure of the relational sememe, and sim3C1,C2 is the similarity of the characteristic structure of the relation symbol. The parameter βi1≤i≤3 is adjustable and satisfies β1+β2+β3=1. After experiments, β1, β2, and β3 in the algorithm of this paper take 0.7, 0.17, and 0.13, respectively. Formula (17) obtains the similarity of sense. When there are multiple senses in a word, formula (18) is used to calculate the maximum similarity value among all sense combinations, which is the similarity of two words, where m is the number of senses of the word W1 and n is the number of senses of the word W2
The calculation of word similarity based on Cilin is as follows [40]:(19)simC1,C2=1.05−0.05disC1,C2e−k/2n.
In formula (19), disC1,C2 is the distance function of word coding C1 and C2 in the tree structure; n is the total number of nodes in the branch layer, which indicates the number of direct children of the nearest common parent node adjacent between two words; k represents the separation distance between the branches where the two words are located in the nearest common parent node. Similarly, when a word corresponds to multiple codes, formula (18) is used to calculate the similarity of words.Figure 3
The distribution of words in HowNet and Cilin.Step 3.
The association degree of the association rules in rough reasoning is defined as [42](20)PMIA,B=pA,BpApB.
In this formula,A and B are two candidate keywords in the text, pA,B represents the frequency of occurrence of A and B in the same sentence, pA is the frequency of occurrence of A and pB is the frequency of occurrence of B. The larger the PMI value, the more relevant.
According to this degree of association, it is determined that there are candidate keywords that are directly related. That is, whenPMIw1,w2≠0, there is a direct association between w1 and w2, then w1, w2 and their association weight wij′ are stored into the association set. At the same time, the deduction relationship S for rough data-deduction can be established according to this association weight. Next, the rules of rough data-deduction are used to obtain the association between the remaining candidate keywords in all different equivalence classes, and these words and their association weight wij′ are also stored in the association set. The transition probability of coverage influence between candidate keyword nodes is obtained by formula (12).Step 4.
The popular Python software package Gensim is used to train and construct the Word2vec model, and the largest Wikipedia online open knowledge base is selected as the training corpus, which can ensure that the model has better generalization ability. The Word2Vec model is trained to generate word vectors, then theK-means clustering is performed on the word vectors of the candidate words, and the transition probability of clustering influence between the candidate keyword nodes is obtained from formulas (14) and (15).Step 5.
The jump probability between word nodes is obtained by formula (16). Finally, the weight of each candidate keyword is iteratively iterated to convergence using formula (1). The flow chart of the improved algorithm is shown in Figure 4.Figure 4
Flow chart of improved algorithm.


## 5. Experimental Results and Analysis

### 5.1. Experimental Data and Evaluation Criteria

#### 5.1.1. Experimental Data

The experiment selected the Wikipedia Chinese corpus released in February 2020 “zhwiki-20200201-pages-articles-multistream.xml.bz2” to train Chinese word vectors [43, 44], which contains a main file of 1.9CB. First, the experiment uses the Python software package Gensim to convert the downloaded xml compressed file to txt format. Second, it uses opencc to simplify the wiki content and remove other characters except Chinese characters. Finally, after using the jieba word segmentation tool [45] to segment the Chinese corpus obtained above, the word vector is trained using the Word2Vec tool [46]. And, the following datasets were used in the experiment to test the extraction results of each algorithm.Dataset 1: The experiment selected 1.4 GB of SogouCA from Sogou Lab as the basis for extracting the test text. The dataset contains news data on various fields from June to July 2012, related to domestic and foreign agencies, sports, culture, entertainment, etc. A total of 2045 texts in various fields were randomly selected to form a test set to test the effect of the algorithm. At the same time, many teachers and students with undergraduate degree or above are invited. They are all teachers and students of the Department of Journalism and Chinese of our school. Using manual cross-labeling, 10 keywords are extracted for each text and given in order of importance.In addition, in order to prevent overfitting of the experimental results of the improved algorithm, the experiment also tested the extraction effect of the improved algorithm based on the following two different types of datasets:Dataset 2: In this paper, we use CNKI as the retrieval platform and use advanced search method to randomly collect the text data needed by the experiment in the following types of literature, namely, “Geology,” “General Chemistry Industry,” “Highway and Waterway Transportation,” “Fundamental Science of Agriculture,” “Plant Protection,” “Paediatrics,” “Cardiovascular System Disease,” “Geography,” “Biography,” “Military Affairs,” “Chinese Communist Party,” “Ideological & Political Education,” “Computer Hardware Technology,” “Internet Technology” and “Market Research and Information.” From the result set, we selected the titles, abstracts, and keywords of the journal texts in the period from 2014 to 2020 and graded in CSCD/CSSCI and above. And, we exclude texts whose abstract length is less than 150 words and documents whose number of manually marked keywords is less than or equal to 1. The final test dataset contains 17514 data and 65310 keywords provided by the author, and each paper contains 3.73 keywords.Dataset 3: The Python web crawler is used to capture user comment data of some restaurants in the Taiyuan area of Dianping, including 400 restaurants and 120,000 user comments. However, some of the restaurants only have a very small number of user reviews, which will affect subsequent experiments, so they are excluded from the dataset. In addition, since many users only score the merchants without writing specific review content, user reviews are empty. These kinds of data are also not conducive to subsequent experiments, so it is cleaned from the dataset. The final test dataset contains 17,309 valid user reviews of 178 merchants. At the same time, teachers and students who have manually labeled keywords for dataset 1 are asked to label valid keywords for this dataset [47].


#### 5.1.2. Evaluation Criteria

In addition, the article uses three evaluation indicators commonly used in the field of information retrieval and classification to compare the quality of the experimental results. It contains the precisionP, which represents the accuracy of the extraction results; the recall R, which represents the degree of coverage of the extraction results for the correct keywords; and the F-Measure F, which is a comprehensive evaluation index of the reconciliation of P and R. The specific calculation formulas of the three indicators are as follows [48–50]:(21)P=KA∩​KBKB×100%,R=KA∩​KBKA×100%,F=2×P×RP+R×100%.In this formula,KA represents the set of manually annotated keywords, and KB represents the set of keywords extracted by the algorithm.The operating system of the experimental environment is Windows7-64bit. The algorithm proposed in this paper is implemented in Python language. The word segmentation and part-of-speech tagging use Jieba open source tools. At the same time, the remaining contrast algorithms involved in the experiment are completed using python language.


### 5.2. Experimental Results and Analysis

#### 5.2.1. Determine the Weight Coefficientα, α,β. β

In this paper, the transition probability of coverage influence obtained by rough data-deduction and the transition probability of cluster influence obtained by word vector clustering are used to jointly determine the jump probability between nodes. The value of the jump probability directly affects the extraction effect of the improved algorithm, so it is very important to determine the value of the weight coefficient in formula (15). Based on dataset 1, the number of extracted keywords is set to 3–10, and the following 11 groups of α and β values are tested: E1 (1.0, 0), E2 (0.9, 0.1), E3 (0.8, 0), E4 (0.7, 0.3), E5 (0.6, 0.4), E6 (0.5, 0.5), E7 (0.4, 0.6), E8 (0.3, 0.7), E9 (0.2, 0.8), E10 (0.1, 0.9), and E11 (0, 1.0). The F-Measure of the extraction result of the improved algorithm corresponding to each set of data is shown in Figure 5.Figure 5
TheF-Measure of extraction results under different α. α and β.It can be seen from Figure5 that the extraction effect of the algorithm in this paper is different under different values of α and β. In the experiment, the weighting coefficients are compared under the same test set. And, it is found that when the fifth set of data E4 (0.7, 0.3) is taken, the algorithm of this paper has the best extraction effect. Therefore, the algorithm takes α=0.7 and β=0.3 in this paper.


#### 5.2.2. Comparative Algorithm

Based on the same test set, this paper compares the following algorithms with the experimental results of this algorithm.


## 5.1. Experimental Data and Evaluation Criteria

### 5.1.1. Experimental Data

The experiment selected the Wikipedia Chinese corpus released in February 2020 “zhwiki-20200201-pages-articles-multistream.xml.bz2” to train Chinese word vectors [43, 44], which contains a main file of 1.9CB. First, the experiment uses the Python software package Gensim to convert the downloaded xml compressed file to txt format. Second, it uses opencc to simplify the wiki content and remove other characters except Chinese characters. Finally, after using the jieba word segmentation tool [45] to segment the Chinese corpus obtained above, the word vector is trained using the Word2Vec tool [46]. And, the following datasets were used in the experiment to test the extraction results of each algorithm.Dataset 1: The experiment selected 1.4 GB of SogouCA from Sogou Lab as the basis for extracting the test text. The dataset contains news data on various fields from June to July 2012, related to domestic and foreign agencies, sports, culture, entertainment, etc. A total of 2045 texts in various fields were randomly selected to form a test set to test the effect of the algorithm. At the same time, many teachers and students with undergraduate degree or above are invited. They are all teachers and students of the Department of Journalism and Chinese of our school. Using manual cross-labeling, 10 keywords are extracted for each text and given in order of importance.In addition, in order to prevent overfitting of the experimental results of the improved algorithm, the experiment also tested the extraction effect of the improved algorithm based on the following two different types of datasets:Dataset 2: In this paper, we use CNKI as the retrieval platform and use advanced search method to randomly collect the text data needed by the experiment in the following types of literature, namely, “Geology,” “General Chemistry Industry,” “Highway and Waterway Transportation,” “Fundamental Science of Agriculture,” “Plant Protection,” “Paediatrics,” “Cardiovascular System Disease,” “Geography,” “Biography,” “Military Affairs,” “Chinese Communist Party,” “Ideological & Political Education,” “Computer Hardware Technology,” “Internet Technology” and “Market Research and Information.” From the result set, we selected the titles, abstracts, and keywords of the journal texts in the period from 2014 to 2020 and graded in CSCD/CSSCI and above. And, we exclude texts whose abstract length is less than 150 words and documents whose number of manually marked keywords is less than or equal to 1. The final test dataset contains 17514 data and 65310 keywords provided by the author, and each paper contains 3.73 keywords.Dataset 3: The Python web crawler is used to capture user comment data of some restaurants in the Taiyuan area of Dianping, including 400 restaurants and 120,000 user comments. However, some of the restaurants only have a very small number of user reviews, which will affect subsequent experiments, so they are excluded from the dataset. In addition, since many users only score the merchants without writing specific review content, user reviews are empty. These kinds of data are also not conducive to subsequent experiments, so it is cleaned from the dataset. The final test dataset contains 17,309 valid user reviews of 178 merchants. At the same time, teachers and students who have manually labeled keywords for dataset 1 are asked to label valid keywords for this dataset [47].


### 5.1.2. Evaluation Criteria

In addition, the article uses three evaluation indicators commonly used in the field of information retrieval and classification to compare the quality of the experimental results. It contains the precisionP, which represents the accuracy of the extraction results; the recall R, which represents the degree of coverage of the extraction results for the correct keywords; and the F-Measure F, which is a comprehensive evaluation index of the reconciliation of P and R. The specific calculation formulas of the three indicators are as follows [48–50]:(21)P=KA∩​KBKB×100%,R=KA∩​KBKA×100%,F=2×P×RP+R×100%.In this formula,KA represents the set of manually annotated keywords, and KB represents the set of keywords extracted by the algorithm.The operating system of the experimental environment is Windows7-64bit. The algorithm proposed in this paper is implemented in Python language. The word segmentation and part-of-speech tagging use Jieba open source tools. At the same time, the remaining contrast algorithms involved in the experiment are completed using python language.


## 5.1.1. Experimental Data

The experiment selected the Wikipedia Chinese corpus released in February 2020 “zhwiki-20200201-pages-articles-multistream.xml.bz2” to train Chinese word vectors [43, 44], which contains a main file of 1.9CB. First, the experiment uses the Python software package Gensim to convert the downloaded xml compressed file to txt format. Second, it uses opencc to simplify the wiki content and remove other characters except Chinese characters. Finally, after using the jieba word segmentation tool [45] to segment the Chinese corpus obtained above, the word vector is trained using the Word2Vec tool [46]. And, the following datasets were used in the experiment to test the extraction results of each algorithm.Dataset 1: The experiment selected 1.4 GB of SogouCA from Sogou Lab as the basis for extracting the test text. The dataset contains news data on various fields from June to July 2012, related to domestic and foreign agencies, sports, culture, entertainment, etc. A total of 2045 texts in various fields were randomly selected to form a test set to test the effect of the algorithm. At the same time, many teachers and students with undergraduate degree or above are invited. They are all teachers and students of the Department of Journalism and Chinese of our school. Using manual cross-labeling, 10 keywords are extracted for each text and given in order of importance.In addition, in order to prevent overfitting of the experimental results of the improved algorithm, the experiment also tested the extraction effect of the improved algorithm based on the following two different types of datasets:Dataset 2: In this paper, we use CNKI as the retrieval platform and use advanced search method to randomly collect the text data needed by the experiment in the following types of literature, namely, “Geology,” “General Chemistry Industry,” “Highway and Waterway Transportation,” “Fundamental Science of Agriculture,” “Plant Protection,” “Paediatrics,” “Cardiovascular System Disease,” “Geography,” “Biography,” “Military Affairs,” “Chinese Communist Party,” “Ideological & Political Education,” “Computer Hardware Technology,” “Internet Technology” and “Market Research and Information.” From the result set, we selected the titles, abstracts, and keywords of the journal texts in the period from 2014 to 2020 and graded in CSCD/CSSCI and above. And, we exclude texts whose abstract length is less than 150 words and documents whose number of manually marked keywords is less than or equal to 1. The final test dataset contains 17514 data and 65310 keywords provided by the author, and each paper contains 3.73 keywords.Dataset 3: The Python web crawler is used to capture user comment data of some restaurants in the Taiyuan area of Dianping, including 400 restaurants and 120,000 user comments. However, some of the restaurants only have a very small number of user reviews, which will affect subsequent experiments, so they are excluded from the dataset. In addition, since many users only score the merchants without writing specific review content, user reviews are empty. These kinds of data are also not conducive to subsequent experiments, so it is cleaned from the dataset. The final test dataset contains 17,309 valid user reviews of 178 merchants. At the same time, teachers and students who have manually labeled keywords for dataset 1 are asked to label valid keywords for this dataset [47].


## 5.1.2. Evaluation Criteria

In addition, the article uses three evaluation indicators commonly used in the field of information retrieval and classification to compare the quality of the experimental results. It contains the precisionP, which represents the accuracy of the extraction results; the recall R, which represents the degree of coverage of the extraction results for the correct keywords; and the F-Measure F, which is a comprehensive evaluation index of the reconciliation of P and R. The specific calculation formulas of the three indicators are as follows [48–50]:(21)P=KA∩​KBKB×100%,R=KA∩​KBKA×100%,F=2×P×RP+R×100%.In this formula,KA represents the set of manually annotated keywords, and KB represents the set of keywords extracted by the algorithm.The operating system of the experimental environment is Windows7-64bit. The algorithm proposed in this paper is implemented in Python language. The word segmentation and part-of-speech tagging use Jieba open source tools. At the same time, the remaining contrast algorithms involved in the experiment are completed using python language.


## 5.2. Experimental Results and Analysis

### 5.2.1. Determine the Weight Coefficientα, α,β. β

In this paper, the transition probability of coverage influence obtained by rough data-deduction and the transition probability of cluster influence obtained by word vector clustering are used to jointly determine the jump probability between nodes. The value of the jump probability directly affects the extraction effect of the improved algorithm, so it is very important to determine the value of the weight coefficient in formula (15). Based on dataset 1, the number of extracted keywords is set to 3–10, and the following 11 groups of α and β values are tested: E1 (1.0, 0), E2 (0.9, 0.1), E3 (0.8, 0), E4 (0.7, 0.3), E5 (0.6, 0.4), E6 (0.5, 0.5), E7 (0.4, 0.6), E8 (0.3, 0.7), E9 (0.2, 0.8), E10 (0.1, 0.9), and E11 (0, 1.0). The F-Measure of the extraction result of the improved algorithm corresponding to each set of data is shown in Figure 5.Figure 5
TheF-Measure of extraction results under different α. α and β.It can be seen from Figure5 that the extraction effect of the algorithm in this paper is different under different values of α and β. In the experiment, the weighting coefficients are compared under the same test set. And, it is found that when the fifth set of data E4 (0.7, 0.3) is taken, the algorithm of this paper has the best extraction effect. Therefore, the algorithm takes α=0.7 and β=0.3 in this paper.


### 5.2.2. Comparative Algorithm

Based on the same test set, this paper compares the following algorithms with the experimental results of this algorithm.


## 5.2.1. Determine the Weight Coefficientα, α,β. β

In this paper, the transition probability of coverage influence obtained by rough data-deduction and the transition probability of cluster influence obtained by word vector clustering are used to jointly determine the jump probability between nodes. The value of the jump probability directly affects the extraction effect of the improved algorithm, so it is very important to determine the value of the weight coefficient in formula (15). Based on dataset 1, the number of extracted keywords is set to 3–10, and the following 11 groups of α and β values are tested: E1 (1.0, 0), E2 (0.9, 0.1), E3 (0.8, 0), E4 (0.7, 0.3), E5 (0.6, 0.4), E6 (0.5, 0.5), E7 (0.4, 0.6), E8 (0.3, 0.7), E9 (0.2, 0.8), E10 (0.1, 0.9), and E11 (0, 1.0). The F-Measure of the extraction result of the improved algorithm corresponding to each set of data is shown in Figure 5.Figure 5
TheF-Measure of extraction results under different α. α and β.It can be seen from Figure5 that the extraction effect of the algorithm in this paper is different under different values of α and β. In the experiment, the weighting coefficients are compared under the same test set. And, it is found that when the fifth set of data E4 (0.7, 0.3) is taken, the algorithm of this paper has the best extraction effect. Therefore, the algorithm takes α=0.7 and β=0.3 in this paper.


## 5.2.2. Comparative Algorithm

Based on the same test set, this paper compares the following algorithms with the experimental results of this algorithm.


## 6. Experimental Results

The value of two important parameters in the experiment will affect the extraction result of the TextRank algorithm, which includes the co-occurrence window sizeω and the number of keywords k. However, the implementation of the TF-IDF algorithm based on statistical characteristics and the algorithm in this paper are not affected by the parameter ω. For the determination of the parameter ω, we set the number of extracted keywords as k = 10 based on dataset 1, and when the window value is within [6, 12], we compare the F-Measure of the extraction result of the algorithm. The comparison results are shown in Figure 6.Figure 6
TheF-Measure of extraction results under different ω values.It can be seen from Figure6 that the extraction effect of the TextRank algorithm is different under different values of ω. This paper compares the extraction effects of different values of ω under the same test set, and finds that the TextRank algorithm has the best extraction effect when ω=6. Therefore, in order to ensure the effectiveness of the algorithm in this paper, the initial value of ω of the TextRank algorithm in the comparative experiment is set to 6. At the same time, the other parameters involved in the contrast algorithm are taken from the optimal values used in the respective literature. When the number of keywords is within [3.10], we calculate the precision P, recall R, and F-Measure F of the following nine algorithms. The experimental results (retain two decimal places) are shown in Table 1.Table 1
Comparison of experimental results of various algorithms.
Keywords (pcs)AlgorithmP (%)R (%)F (%)3T147.7114.3122.02T264.2219.2729.64T366.3619.9130.63T428.138.4412.99T567.2820.1831.05T661.1618.3528.23T762.0818.6228.65T855.9616.7925.83RDD-WRank69.7520.9332.194T144.0417.6125.16T256.1922.4832.11T361.2424.5034.99T428.2111.2816.12T562.6125.0535.78T657.1122.8432.63T758.2623.3033.29T851.8320.7329.62RDD-WRank63.4325.3736.245T141.6520.8327.77T253.2126.6135.47T356.1528.0737.43T427.5213.7618.35T557.6128.8138.41T653.9426.9735.96T755.4127.7136.94T847.3423.6731.56RDD-WRank59.2629.6339.516T139.3023.5829.47T249.6929.8237.27T352.2931.3839.22T426.9116.1520.18T554.7432.8441.06T651.0730.6438.30T751.2230.7338.42T846.1827.7134.63RDD-WRank55.8633.5241.907T137.7927.1631.95T246.6632.6638.42T349.9334.9541.12T427.0018.9022.23T550.9835.6941.99T649.0234.3140.37T748.1033.6739.61T844.4331.1036.59RDD-WRank54.1037.8744.558T136.9928.2632.66T244.1535.3239.25T346.4437.1641.28T426.6121.2823.65T547.4837.9842.20T646.5637.2541.39T745.7636.6140.67T843.3534.6838.53RDD-WRank50.9340.7445.279T135.1230.3133.12T242.0037.8039.79T344.3439.9142.01T425.9923.3924.63T545.1640.6442.78T644.1439.7241.82T743.6339.2741.33T842.4138.1740.17RDD-WRank48.9744.0746.3910T132.9832.9832.98T239.7239.7239.72T342.2042.2042.20T425.0525.0525.05T542.6642.6642.66T642.5742.5742.57T741.8341.8341.83T841.1941.1941.19RDD-WRank47.2747.2747.27At the same time, in order to comprehensively observe the differences of different keyword extraction methods, the author further gives the overall changes of theP, R , and F-Measure of nine methods when the top N value is [3, 10] in the form of line chart, as shown in Figures 7–9.Figure 7
Comparison ofP values of various algorithms.Figure 8
Comparison ofR values of various algorithms.Figure 9
Comparison ofF-Measure of various algorithms.Figure7 describes the changing trend of the accuracy of each algorithm when extracting different numbers of keywords. It can be seen from the figure that as the number of extracted keywords increases, the accuracy of each algorithm decreases to some extent. However, the accuracy of the RDD-WRank algorithm in this paper is higher than that of the other algorithms. Because the rough data-deduction rules adopted by the algorithm in this paper will incorporate the approximate information into the process of data deduction, it can make the mutual inference between the data show the characteristics of approximate implication or imprecise association, and explore potential association between candidate keywords. If the potential association is added to the iterative calculation of the weight of each candidate keyword, a more accurate extraction result will be obtained. Therefore, the accuracy of the algorithm in this paper will be higher in theory than the algorithms that calculate the association between words according to fixed association rules or rely on statistical word frequency, and its P value will be higher than that of the other algorithms.Figure8 describes the changes in the recall of each algorithm when extracting different numbers of keywords. The recall of the RDD-Wrank algorithm in this paper is higher than that of the other several algorithms. At the same time, as the number of keywords increases, the relative increase of the algorithm’s recall rate becomes more obvious. This is because the TF-IDF algorithm is too dependent on the word frequency and does not consider the association between words at all. Although the improved algorithms that retain the principle of the co-occurrence window of the traditional TextRank algorithm consider the relationship between words, the algorithm is more inclined to propose frequent words because of the limitations of the association rules adopted by the algorithm. This may ignore important words that have a low frequency but can describe the subject of the text. The rough data-deduction used in the RDD-WRank algorithm can expand the scope of association and increase the association data, which can enhance the coverage of extraction results to the standard words and improve the recall of the algorithm. In particular, as the number of keywords increases, the influence of word frequency decreases, and the advantage of increasing the recall of the algorithm in this paper will be more obvious.Figure9 describes the F-Measure of each algorithm when extracting different numbers of keywords. When evaluating the experimental results, we hope that the higher the P and R values, the better. But in fact, in most cases, the two are contradictory, so F-Measure should be used to comprehensively consider the two indicators. The F-Measure can reflect the effectiveness of the entire algorithm. For the F-Measure of the extraction results of the algorithms in the figure, there are the following results analysis.(1)
T8 in the figure is the Word2Vec word vector clustering method, and its extraction effect alone is not good, which is consistent with the conclusion in the document [40]. It is mentioned in the document [40] that when the Word2Vec word vector clustering method is directly applied to a single document, it is not very accurate to select the clustering center as the keywords of the text, and the N words which are closest to it are not necessarily keywords. Therefore, the extraction effect obtained by using this method is general, but this method is often used in combination with other keyword extraction algorithms.(2)
The T6 and T7 methods incorporate information such as the position of words into the TextRank algorithm to improve the accuracy of extraction, but the effect is worse than the T5 method because the T6 and T7 methods ignore the influence of external knowledge on keyword extraction. The comparison between T5 and T6 and T7 shows that the improved algorithm that introduces external knowledge through Word2Vec can better improve the keyword extraction effect, which is more advantageous than using a single model or feature or clustering.(3)
Comparing the T5 method with the T3 and T4 methods, it is found that the three methods are the fusion of the Word2Vec model and the TextRank model. The difference is that T5 adds the statistical characteristics of words to the algorithm on the basis of considering the influence of external knowledge, which improves the deficiencies of only introducing word vector calculation to obtain keywords.(4)
Comparing the T5 method with the RDD-WRank algorithm in this paper, it is found that the RDD-WRank algorithm has a better extraction effect. This is because this paper uses rough data-deduction theory to further improve the algorithm based on the fusion of the two models. Rough data-deduction can explore the potential associations between candidate keywords and increase the associated candidate words and scope. If the potential association is added to the iterative calculation of the weight of each candidate keyword, the extraction result will be more accurate, and the algorithm will be more effective.At the same time, in order to prevent over-fitting of the experimental results of the improved algorithm, the experiment also compares the extraction results of each comparison algorithm based on datasets 2 and 3. In the experiment, the weight coefficient of the improved algorithm is set toα = 0.7, β = 0.3, and the parameters of the other comparison algorithms still take the optimal values in their respective references. The partial calculation results of the P, R, and F-Measure of each algorithm (retain two decimal places) are shown in Tables 2 and 3.Table 2
Comparison of experimental results based on datasets 2 (TopN takes 3, 5, 7, 10).
Keywords (pcs)AlgorithmP (%)R (%)F (%)3T116.0311.3913.30T29.796.828.03T37.615.326.25T46.394.515.29T515.4210.8612.73T615.4210.8912.75T716.1011.3513.29T816.4111.5713.56RDD-WRank16.4411.6713.635T112.9015.2813.97T27.969.278.55T36.537.627.02T45.966.996.43T512.7615.0113.78T613.5716.0214.68T713.4615.8214.53T813.0615.3314.09RDD-WRank14.4117.0615.607T111.0618.3113.77T26.8811.248.53T35.519.026.83T45.749.467.14T510.6017.4513.17T611.7819.4914.66T711.1918.4313.91T810.9017.9513.55RDD-WRank12.3220.4315.3510T18.8920.9912.47T25.6813.247.94T34.7010.986.57T44.8211.326.75T58.2219.3511.53T610.3624.5514.55T78.3819.7111.75T88.4919.9811.90RDD-WRank9.7523.0913.69Table 3
Comparison of experimental results based on datasets 3 (TopN takes 3, 5, 7, 10).
Keywords (pcs)AlgorithmP (%)R (%)F (%)3T138.3913.8220.33T244.3815.9823.50T351.8718.6827.47T45.241.892.78T557.8720.8430.64T652.8119.0227.96T747.1916.9924.99T831.8411.4616.86RDD-WRank57.8720.8430.645T139.4423.6729.58T242.2525.3531.69T349.5529.7337.17T45.733.444.30T551.6931.0238.77T647.3028.3935.48T743.3726.0332.53T835.6221.3826.72RDD-WRank52.4731.4939.367T140.2933.8536.79T241.0134.4637.45T344.3837.2940.53T46.505.465.94T546.7139.2442.65T643.0236.1439.28T742.4635.6738.77T838.4432.3035.10RDD-WRank47.7540.1243.6110T137.4244.9140.82T237.7045.2541.13T337.5845.1141.01T46.918.297.54T539.0446.8642.60T638.2045.8541.68T737.9845.5841.43T836.2443.4939.53RDD-WRank42.0250.4445.85And, the line chart results ofP, R, and F-measure of each algorithm are shown in Figures 10–12.Figure 10
P value of each algorithm. (a) Results based on dataset 2. (b) Results based on dataset 3.
(a)(b)Figure 11
R value of each algorithm. (a) Results based on dataset 2. (b) Results based on dataset 3.
(a)(b)Figure 12
F-Measure of each algorithm. (a) Results based on dataset 2. (b) Results based on dataset 3.
(a)(b)Figures10–12 describe the comparison results of each algorithm based on the P, R , and F-Measure of datasets 2 and 3. It can be seen from these figures that the RDD-WRank algorithm in this paper still has a good extraction effect on the two datasets, and its three evaluation indicators are higher than that of the other methods. But for dataset 2, the precision, recall, and F-Measure of each method are all lower than the results of dataset 1. This is because the keywords provided in some journal articles are newly proposed key phrases by the authors themselves, but the existing word segmentation technology cannot accurately segment these phrases, which will lead to inaccurate extraction results. This is also a direction that we can study in the future. And, it is found that when the number of keywords is greater than 8, the extraction effect of the T6 method is better. Because of the influence of the text type, when the number of extracted keywords is small, the influence of word position will not be dominant in the extraction process. However, as the number of extracted words increases, keywords in professional texts such as academic paper abstracts will frequently appear at the beginning and end of the abstract. At this time, the advantages of the T6 method based on word position distribution weighting will be more prominent, and its extraction effect will be better. For each journal article, the number of keywords provided by the author generally remains around 3–6, so after the value of the number of keywords is 6, the F-Measure of each comparison algorithm has a downward trend. But, compared with other comparison algorithms, the extraction effect of this algorithm based on this dataset is still better. Compared with dataset 2, the extraction results of each algorithm for dataset 3 will be better. This is due to the fact that the effective keywords proposed in reference [47] are referred to when manually labeling keywords in dataset 3. The effective keywords here refer to the information that is valuable to users and businesses in the comments, and most of such key information is common vocabulary. The existing word segmentation technology is easy to perform accurate segmentation, and the extraction effect will be more accurate.Based on the above analysis, the precision (P), recall (R), and comprehensive evaluation index F-Measure of the algorithm in this paper are higher than those of the other comparison algorithms, which shows that the TextRank algorithm using word vector clustering based on rough data-deduction and fusing with the Word2Vec model is more effective in extracting results. The TF-IDF algorithm based on statistical characteristics and the other several algorithms are more dependent on the word frequency in essence, and may preferentially extract frequently occurring words. But for a document, especially Chinese text, the subject words may not always appear. Therefore, the TextRank algorithm based on rough data-deduction starts from the text as a whole, expands the scope of association, increases the associated data, and establishes the association between words through rough data-deduction, which can further improve the accuracy of the algorithm.


## 7. Conclusions

Through research on text keyword extraction, it is found that the potential association between words and external knowledge has a direct impact on keyword extraction results. Therefore, based on rough data-deduction, this paper proposes a TextRank keyword extraction algorithm combined with Word2Vec model. It can obtain more external knowledge information to use rough data-deduction to explore potential associations between candidate keywords and use word embedding technology to integrate Word2Vec into the algorithm. The experimental results show that the improved algorithm of word vector clustering based on rough data-deduction takes into account the potential associations between candidate words and external knowledge, which further improves the accuracy of keyword extraction. In the next step, we will further refine and improve the rough data-deduction rules to obtain better extraction results.



---

*Source: 5649994-2022-01-25.xml*