Research Article
Application of an Improved TF-IDF Method in Literary Text Classification
Algorithm 1
Improved TF-IDF algorithm.
| Input: Proceedings X; | | Output: matrix m; | | Step 1: Initialize TF-IDF matrix ; | | Step 2: For each word i in paper j, loop through the following process: | | Step 3: Calculate the frequency F(mi) of the word i in the subject classification; | | Step 4: Calculate the frequency F(oi) of word i classified in other subjects; | | Step 5: Calculate the frequency F(tf) of word i in all literature; | | Step 6: Update each value in matrix g by: | | Step 7: When the loop termination condition is reached, the iteration terminates. |
|