A Multi-Granularity Semantic Extraction Method for Text Classification
摘要
Text classification plays an active role in various real-world applications, including sentiment analysis and news categorization. The inherent ambiguity and multiple meanings present in natural language pose challenges for text classification methods, leading to difficulties in understanding and categorizing certain texts, known as classification ambiguity. Existing methods tend to lean on the single granularity of global information encoded by BERT, ignoring the richer multi-level and multi-granularity of semantic features. In this paper, we propose a multi granularity semantic extraction method, which can sufficiently mine the semantic knowledge at different granularities to form contextual features containing rich semantics and solve the problem of ambiguous classification. Our method consists of coarse-grained semantic extraction (CSE) and fine-grained semantic extraction (FSE). CSE uses the first token of each encoder of BERT to comprehensively capture the coarse-grained overall semantic information, while FSE uses a portion of the output of the final encoder of BERT to emphasize fine-grained local semantic information. Then, through TextCNN, the features are extracted twice to capture important local features and filter some of the noise. Experimental results show that our method can effectively tackle the text classification tasks with F1-score 1.34%, 1.25%, and 1.52% higher than the optimal method on three datasets, respectively.