Research on Text Classification Based on TextRank

Guangming Lu, Yule Xia, Jiamei Wang, Zhenling Yang2016

Abstract

Extracting keywords from the result of word segmentation with the improved TextRank algorithm. Use the relative position of the words in the article to calculate the influence of position; the position of the coverage of the words and expressions is extended to the statement of the words and the key words as the feature of the text. Hadoop programming using naive Bayesian algorithm for text classification. The experiments show that the improved Textrank has a great improvement in classification performance, and the classification accuracy of naive Bayesian algorithm is 93% when the number of keywords is 40. Compared with the traditional, the accuracy rate increased by about 10%.

Introduction

As digital text data grows exponentially, traditional classification methods face challenges in balancing speed and accuracy. A major bottleneck is feature extraction—identifying the most representative words in a document. Standard graph-based methods like TextRank often overlook structural nuances, such as the importance of word positioning. This paper proposes an improved TextRank algorithm that incorporates word position and frequency, implemented on a Hadoop cluster for scalable text classification.

Methods

The proposed pipeline consists of three main components:

  1. Improved TextRank: Modifies edge weights ($w_{ij}$) by combining coverage ($\alpha$), position ($\beta$), and frequency ($\gamma$). This prioritizes words at the document's beginning or end and accounts for their overall frequency.
  2. Naive Bayes Classification: Uses the top $N$ keywords as features, reducing noise and computational overhead compared to full-text processing.
  3. Distributed Computing: Implemented via MapReduce on Hadoop, utilizing Apache Mahout for classification logic to handle large-scale datasets.

The study used a news corpus of 18,000 documents across 9 categories (e.g., economy, medical, sports), with an 80/20 train-test split.

Results and Discussion

Performance Analysis

The researchers observed that classification performance follows a non-linear trend relative to the number of keywords. Peak performance was achieved at 40 keywords, reaching an F-value of approximately 0.9338.

Classification performance metrics (MR, F, MP) vs. keyword count

Beyond 40 keywords, accuracy begins to decline, suggesting that additional keywords introduce noise rather than useful information. This "Goldilocks Zone" highlights the importance of structural awareness in feature extraction, mimicking human reading patterns where the thesis and summary contain the most descriptive vocabulary.

Computational Efficiency

While more keywords can improve accuracy up to a point, they also significantly impact processing time. As shown in the figure below, training time increases sharply as the keyword count rises, reflecting the computational cost of the MapReduce process.

Training and testing time vs. keyword count

The Hadoop implementation successfully managed the 18,000-document corpus, demonstrating the system's scalability for industrial applications despite the performance overhead of virtualized environments.

Conclusion

The improved TextRank algorithm provides a 10% accuracy boost over traditional Naive Bayes methods by better capturing document structure. Future work will focus on optimizing the weighting parameters ($\alpha, \beta, \gamma$) for different text types and exploring more complex models like SVMs or deep learning architectures.

Summary updated

BibTeX
@misc{lu2016research,
  author = {Guangming Lu and Yule Xia and Jiamei Wang and Zhenling Yang},
  title = {{Research on Text Classification Based on TextRank}},
  year = {2016},
  doi = {10.2991/cimns-16.2016.79},
}
Figure