# IWF-TextRank Keyword Extraction Algorithm Modelling
## 2 Materials and Methods
### Feature Analysis Model
#### 2.4.1 Statistical Feature Modelling  
In the IWF-TextRank algorithm, statistical feature modelling is used to quantify the importance of words in the text, aiming to comprehensively evaluate the keyword potential of words from multiple statistical perspectives. Specifically, statistical feature modelling takes into account word frequency, lexical features, and word length. These features help construct the basic importance score of each word and provide data support for the subsequent comprehensive weight calculation.  
(1) Word frequency characteristics  
The term frequency feature uses the classic TF-IDF (term frequency-inverse document frequency) method to measure the relative importance of words in the entire text dataset. TF-IDF is mainly composed of term frequency (TF) and inverse document frequency (IDF) [26]. The term frequency (TF), which represents the frequency of occurrence of the word \(t_{i}\) in the document \(D_{j}\), is calculated as:  
\[tf_{i,j}=\frac{n_{i,j}}{\sum_{k}n_{k,j}} \tag{3}\]  
where \(n_{i,j}\) refers to the number of times the word appears in document \(D_{j}\); \(\sum_{k}n_{k,j}\) represents the sum of the occurrences of all words in the document \(D_{j}\).  
The inverse document frequency (IDF) measures the importance of a word in the whole corpus and is obtained by dividing the total number of documents in the database by the total number of documents containing the word and taking the logarithm of the base 10. The formula is:  
\[idf_{i}=log\frac{|\mathrm{D}|}{\left|\left\{j:t_{i}\in d_{j}\right\}\right|} \tag{4}\]  
where \(|\mathrm{D}|\) denotes the total number of documents in the corpus, and \(\sum_{k}n_{k,j}\) denotes the total number of documents in the corpus containing the word \(t_{i}\).  
Multiplying TF and IDF gives the TF-IDF value of each word in the document, and then assigns preliminary weights to the words in the keyword candidate set in IWF-TextRank.  
\[TF-IDF=tf_{i,j}\times idf_{i} \tag{5}\]  
(2) Lexical features (posi)  
Lexical features are used to identify the grammatical properties of words, thereby distinguishing key categories such as nouns, verbs, and adjectives, which usually have different importance in text analysis. For example, nouns and verbs are usually more representative when describing events, so they are given higher weights. In the statistical process, we determine the importance of each type of part of speech through part-of-speech statistical methods and adjust the priority of different parts of speech based on the statistical results.  
(3) Word length features (leni)  
Word length is another statistical feature used to evaluate the amount of information a word contains in a text. Generally, longer words tend to carry more information and may be more suitable as keywords. In word length feature modelling, the word length is divided into five levels (e.g., 1, 2, 3, 4, >4), and corresponding weights are assigned to different word lengths based on statistical results, thereby ensuring that word length features have an appropriate impact on keyword extraction.