Using ParsBert on Augmented Data for Persian News Classification
Mohammad Reza Varasteh, Arefeh Kazemi · 2021
Text classification is a fundamental task in Natural Language Processing (NLP). Although many works have been done to perform text classification in English, the number of studies on Persian text classification is limited. Previous works on Persian text classification often use classic machine learning methods such as Naive Bayes, Support Vector Machines, Decision Trees, etc. While these methods are fast and straightforward, they need feature engineering, and their performance heavily depends on the selected features. In this paper, we first augment the input words with their stem form and then use a pre-trained language model for the Persian language (ParsBERT) to classify the text. Augmenting the input words with their stem form enables the proposed classifier to generalize well to the new unseen data. We compare the performance of our proposed model with that of traditional machine learning algorithms. The results show that the proposed model achieves a 0.91 accuracy and outperforms the traditional machine learning algorithm by at least +0.4 absolute on both accuracy and F1 score.