A text classification method and system based on large model and Labeled-LDA
By combining the large model and Labeled-LDA text classification method, the problems of low efficiency and insufficient accuracy in the existing technology are solved, and efficient and accurate text classification is achieved. It performs particularly well when processing complex texts and is suitable for a variety of text classification tasks.
Patent Information
- Application Number
- CN202411348758.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-26
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2044-09-26
AI Technical Summary
Existing text classification methods are inefficient and inaccurate when processing large-scale data. Deep learning methods ignore document structure information. Traditional methods rely on manual features and find it difficult to fully explore complex semantics. Labeled-LDA is slightly insufficient in deep semantic understanding.
Combining the big model and Labeled-LDA, through data preprocessing, feature extraction, model training and feature fusion, the big model is used to extract deep semantic features, Labeled-LDA extracts topic distribution features, and the model parameters are optimized through cross-validation to achieve text classification.
It significantly improves the accuracy and robustness of text classification, especially when processing text with complex topics and semantics. It is adaptable to different text classification tasks and has good scalability.
Smart Images

Figure CN119293247B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of text classification, and in particular to a text classification method and system based on a large model and Labeled-LDA. Background Art
[0002] With the rapid development of computing technology and the internet, online information resources have exploded. Faced with such a vast information base, users often find it difficult to find the information they need. Efficiently and accurately filtering valuable content from this vast amount of information has become a pressing challenge. To address this challenge, information labeling and classification are crucial.
[0003] Currently, text classification methods are primarily categorized into three types: manual annotation, traditional machine learning, and deep learning. While manual annotation is suitable for small amounts of data, it is inefficient and costly, making it difficult to meet the demands of large-scale data processing. Traditional machine learning methods, such as Naive Bayes and Support Vector Machines (SVMs), have achieved promising results in text classification. However, these methods rely on manual rules, which are prone to omissions and redundancies, compromising the accuracy of classification results.
[0004] In recent years, deep learning methods have made significant progress in text classification. For example, models such as FastText and TextCNN can automatically learn text features, thereby improving classification accuracy. However, these methods often ignore the structural information of documents, resulting in a failure to fully utilize the useful information in the text in some cases. Therefore, how to incorporate document structural information to improve the performance of deep learning methods in text classification has become a hot topic of research.
[0005] Traditional text classification methods typically rely on manual feature engineering or simple statistical features, making it difficult to fully explore the complex semantics of text. The emergence of large models, such as BERT and GPT, has sparked great interest in their high-quality, context-sensitive data annotation capabilities. By learning from large amounts of text data, they can provide high-dimensional semantic representations of text. However, using large models alone may overlook the structured information of the text, such as topic distribution. Labeled-LDA, as a supervised topic model, can divide text into several topics and take category labels into account, but it is slightly lacking in deep semantic understanding. Summary of the Invention
[0006] The purpose of the present invention is to provide a text classification method and system based on a large model and Labeled-LDA to solve the problems raised in the above background technology.
[0007] To achieve the above object, the present invention provides the following technical solutions: A text classification method based on a large model and Labeled-LDA, the method comprising the following steps:
[0008] S01: Data collection and data preprocessing: Collect text data in the target domain and perform preprocessing operations, including but not limited to word segmentation, stop word removal, and stemming, to prepare a high-quality text data set for subsequent feature extraction;
[0009] S02: Feature extraction: Use a large model to encode the preprocessed text and extract a vector representation reflecting the deep semantics of the text; Apply the Labeled-LDA model to perform topic modeling on the text and extract the topic distribution features of the text to enhance the understanding of the text structure;
[0010] S03: Model training: Perform model settings and define model parameters, including the number of topics K, the hyperparameters α of the Dirichlet prior distribution - the smoothness of the document-topic distribution and β - the smoothness of the topic-word distribution, and the strategy for how to combine the supervision information. Use the labeled data to train the Labeled-LDA model to identify the topics in the text and their associations with the categories; Select a pre-trained large model or fine-tune it on a specific data set to adapt to the text classification task; Use the labeled text data set to train the Labeled-LDA model so that the model learns the association between the topics and the text categories. According to the task requirements, fine-tune the large model to better adapt to the specific text classification task;
[0011] S04: Feature fusion: Fusion the features extracted by the large model and the topic features extracted by Labeled-LDA in order to capture the multi-dimensional information of the text;
[0012] S05: Train a classification model based on the fused features, evaluate the model performance through the cross-validation method, adjust the model parameters, perform feature selection and model tuning according to the evaluation results, and finally deploy it to the production environment to achieve the automatic classification of the text.
[0013] Preferably, the step S01 includes:[[ID=> <000><000030>Collect text data, obtain the text data set to be classified, collect a large amount of text data from the target domain, ensure the diversity and representativeness of the data, and perform a series of cleaning and formatting operations on the collected text data, including but not limited to, noise removal: remove irrelevant information such as HTML tags, special characters, numbers, and symbols in the text; Word segmentation: Segment the text into words or phrases; Stop word removal: Delete common words that do not affect the semantics of the text, such as "and", "of", "in"; Word form reduction: Restore the vocabulary to its basic form, for example, change the plural to the singular and the past tense to the original form.
[0015] Preferably, step S02 includes:
[0016] Assign category labels to text data, which are used to train and evaluate models, and use Labeled-LDA to extract topic features: determine the number of topics to be extracted. Use labeled text data to train the Labeled-LDA model to discover the topic distribution in the text, extract the topic distribution as features for each text, and apply the Labeled-LDA model to perform topic modeling on the text; Labeled-LDA is supervised and uses the category labels of the text to guide topic learning, thereby extracting features that reflect the topic distribution of the text; each document will be assigned a topic distribution that reflects the relative importance of each topic in the document; use a large model to extract deep features: select a suitable large model based on the task, fine-tune the pre-trained model on a specific task to adapt to the text classification task, and use the fine-tuned model to extract deep features of the text.
[0017] Preferably, step S03 includes:
[0018] Training the model: Use an annotated text dataset to train the Labeled-LDA model. Through the iterative EM algorithm, the model gradually optimizes the document-topic and topic-word distributions, enabling the model to learn the intrinsic connection between topics and text categories. Initialization: Initialize the document-topic and topic-word distributions randomly or based on some heuristic method, then iteratively update: Use algorithms such as Gibbs sampling to iteratively update the topic assignment of each document and the word distribution of each topic. In each iteration, Labeled-LDA considers the influence of supervisory information, guiding model learning by adjusting sampling probabilities or directly adding regularization terms to the objective function. Monitor the likelihood function or other convergence indicators, such as the difference between multiple iterations. When the change is less than a set threshold, the model is considered converged.
[0019] Use annotated text datasets to train large models: select a suitable model architecture, set model parameters, including the number of layers, hidden layer size, and number of attention heads, and use the preprocessed dataset to train the model; the training process involves forward propagation to calculate predictions, calculate the loss function, adjust the weight parameters through backpropagation, minimize the loss through gradient descent or other optimization algorithms, and perform multiple rounds of iterations; choose to fine-tune the large model on a dataset related to a specific task to adapt to a specific text classification task; during the fine-tuning process, adjust the weights of the top layer or some layers of the model to make it more suitable for the target classification task.
[0020] Preferably, step S04 includes: combining the topic features extracted by Labeled-LDA with the deep features extracted by the large model to form a more comprehensive feature representation, which is achieved by simple splicing, weighted fusion or other advanced fusion techniques, with the aim of integrating the advantages of the two features and improving classification performance;
[0021] Step S05 includes: selecting a suitable classification algorithm according to the task and using the fused feature vector to train the classifier, dividing the data set into a training set, a validation set, and a test set, performing cross-validation on the training set and the validation set, adjusting the model parameters, evaluating the performance of the model on the test set, and using the accuracy, recall, and F1 score indicators to evaluate the model performance; adjusting the hyperparameters such as the learning rate and regularization parameters based on the model evaluation results, selecting the features that are most helpful for the classification task, considering the use of integrated learning techniques such as bagging or boosting to further improve the model performance, and finally deploying the trained model to the production environment.
[0022] A text classification system based on a large model and Labeled-LDA, the system comprising:
[0023] Data collection and preprocessing module: responsible for collecting text data in the target field and performing preprocessing operations such as cleaning, word segmentation, stop word removal, and lemmatization to generate high-quality text datasets;
[0024] Feature extraction module: Use the large model and Labeled-LDA model to encode and model the preprocessed text, respectively extracting the deep semantic features and topic distribution features of the text;
[0025] Model training module: This module trains the Labeled-LDA model based on labeled data and fine-tunes the large model to meet the needs of text classification tasks.
[0026] Feature fusion module: fuses the deep features extracted by the large model with the topic features extracted by Labeled-LDA to form a comprehensive feature representation;
[0027] Classification and evaluation module: Trains a classification model based on the fused features, evaluates model performance through cross-validation, adjusts model parameters and performs optimization based on the evaluation results, and finally deploys the trained model to the production environment to achieve automatic text classification.
[0028] Preferably, the data collection and preprocessing module includes a data collection unit, a cleaning unit, a word segmentation unit, a stop word removal unit, and a morphological restoration unit, and is configured to perform the following operations:
[0029] Collect text data in the target field to ensure data diversity and representativeness;
[0030] Clean the text data to remove irrelevant information such as HTML tags, special characters, numbers, and symbols;
[0031] Segment the text into words or phrases;
[0032] Delete common words that do not affect the semantics of the text, such as "and", "of", "in";
[0033] Restore the words to their basic forms, such as changing plurals to singulars and past tenses to infinitives.
[0034] Preferably, the feature extraction module includes a large model feature extraction unit and a Labeled-LDA feature extraction unit for performing the following operations:
[0035] Large model feature extraction unit: Extract the deep semantic features of the text using a pre-trained or fine-tuned large model;
[0036] Labeled-LDA feature extraction unit: Train a Labeled-LDA model using the labeled text data to discover the topic distribution in the text and extract the topic distribution as a feature for each text.
[0037] Preferably, the model training module includes a Labeled-LDA training unit and a large model fine-tuning unit for performing the following operations:
[0038] Labeled-LDA training unit: Train a Labeled-LDA model using the labeled text data set, optimize the document-topic and topic-word distributions through the iterative EM algorithm, and learn the internal relationship between topics and text categories;
[0039] Large model fine-tuning unit: Select a suitable model architecture and parameters according to the requirements of the text classification task, and fine-tune the pre-trained large model to improve its performance on specific tasks.
[0040] [[ID=3又1]]Preferably, the feature fusion module fuses the deep features extracted by the large model and the topic features extracted by Labeled-LDA through splicing, weighting, or other advanced fusion techniques; the classification and evaluation module then trains a classification model based on the fused features, evaluates the model performance through cross-validation methods, including metrics such as accuracy, recall, and F1 score, and adjusts the model parameters and performs feature selection according to the evaluation results, and finally deploys the trained model to the production environment to achieve automated classification of the text.
[0041] Compared with the prior art, the beneficial effects of the present invention are:
[0042] The text classification method and system based on the large model and Labeled-LDA proposed in the present invention can improve the performance of text classification tasks, especially when dealing with texts with complex themes and semantics, by combining the advantages of the two models. Labeled-LDA can help the large model better generalize to unseen data, and this combination method can adapt to different text classification tasks, whether it is news classification, sentiment analysis or other types of text analysis. It significantly improves the accuracy and robustness of classification, especially when dealing with texts containing metaphors, slang and professional terms. Through the complementary effects of the large model and Labeled-LDA, the deep semantics of the text are captured, and the topic structure of the text is grasped, making the model more accurate when facing complex text classification tasks. In addition, the method has good scalability and can be easily applied to text classification scenarios of different fields and scales. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 Flow chart of the method of the present invention;
[0044] Figure 2 This is a schematic diagram of the LDA supervised topic model structure of the present invention. DETAILED DESCRIPTION
[0045] In order to clearly and completely describe the objectives and technical solutions of the present invention and make the advantages more clearly understood, the embodiments of the present invention are further described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are part of the embodiments of the present invention, not all of them, and are only used to explain the embodiments of the present invention, not to limit the embodiments of the present invention. All other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0046] For example 1, please refer to Figures 1 to 2 The present invention provides a technical solution: a text classification method based on a large model and Labeled-LDA, the method comprising the following steps:
[0047] S01: Data collection and preprocessing: Collect text data in the target domain and perform preprocessing operations, including but not limited to word segmentation, stop word removal, stemming, etc., to prepare a high-quality text dataset for subsequent feature extraction; including: Collect text data, obtain the text dataset to be classified, collect a large amount of text data from the target domain, ensuring the diversity and representativeness of the data. Perform a series of cleaning and formatting operations on the collected text data, including but not limited to, noise removal: Remove irrelevant information such as HTML tags, special characters, numbers, and symbols in the text; Word segmentation: Split the text into words or phrases; Stop word removal: Delete common words that do not affect the semantics of the text, such as "and", "of", "in", etc.; Lemmatization: Restore the vocabulary to its basic form, for example, change the plural to the singular, and the past tense to the original form, etc.
[0048] S02: Feature extraction: First, use a large model (such as the pre-trained BERT model) to encode the preprocessed text and extract vector representations that reflect the deep semantics of the text; Second, apply the Labeled-LDA model to perform topic modeling on the text and extract the topic distribution features of the text to enhance the understanding of the text structure; including: Assign class labels to the text data, and these labels will be used to train and evaluate the model. Use Labeled-LDA to extract topic features: Determine the number of topics to be extracted. Use the labeled text data to train the Labeled-LDA model to discover the topic distribution in the text, and extract the topic distribution for each text as a feature. Apply the Labeled-LDA model to perform topic modeling on the text. Labeled-LDA is supervised and can use the class labels of the text to guide topic learning, thereby extracting features that reflect the topic distribution of the text. Each document will be assigned a topic distribution, which reflects the relative importance of each topic in the document. Use a large model to extract deep features: Select a suitable large model according to the task, fine-tune the pre-trained model on a specific task to adapt to the text classification task, and use the fine-tuned model to extract the deep features of the text.
[0049] S03: Training model: Perform model settings and define model parameters, including the number of topics K, the hyperparameters of the Dirichlet prior distribution α (smoothness of the document-topic distribution) and β (smoothness of the topic-word distribution), and strategies for incorporating supervisory information. Use labeled data to train the Labeled-LDA model to identify topics in the text and their association with categories; select a pre-trained large model, or fine-tune it on a specific dataset to adapt to the text classification task; use the labeled text dataset to train the Labeled-LDA model so that the model can learn the association between topics and text categories. At the same time, according to task requirements, fine-tune the large model to make it better suited to specific text classification tasks; including: Training model: Use labeled text datasets to train the Labeled-LDA model. Through the iterative EM algorithm, the model gradually optimizes the document-topic and topic-word distributions, allowing the model to learn the intrinsic connection between topics and text categories. Initialization: The document-topic and topic-word distributions are initialized randomly or based on some heuristic method. Then, iterative updates are performed: algorithms such as Gibbs sampling are used to iteratively update the topic assignments for each document and the word distributions for each topic. In each iteration, Labeled-LDA considers the influence of supervisory information, perhaps by adjusting sampling probabilities or directly adding regularization terms to the objective function to guide model learning. The likelihood function or other convergence metrics, such as the difference between iterations, are monitored. The model is considered converged when the change is less than a set threshold.
[0050] Use annotated text datasets to train large models: Select an appropriate model architecture and set model parameters, including the number of layers, hidden layer size, and number of attention heads. Then, train the model using the preprocessed dataset. The training process involves multiple rounds of forward propagation to calculate predictions, compute the loss function, and then backpropagate to adjust weight parameters. Minimize the loss using gradient descent or other optimization algorithms. The large model can be fine-tuned on a task-specific dataset to adapt it to a specific text classification task. Fine-tuning involves adjusting the weights of the top layer or a subset of layers to better suit the target classification task.
[0051] S04: Feature Fusion: Fusion the features extracted by the large model with the topic features extracted by Labeled-LDA to capture the multi-dimensional information of the text. This includes combining the topic features extracted by Labeled-LDA with the deep features extracted by the large model to form a more comprehensive feature representation. This can be achieved through simple concatenation, weighted fusion, or other advanced fusion techniques, aiming to combine the advantages of both features and improve classification performance.
[0052] S05: Train a classification model (such as SVM, random forest, or neural network) based on the fused features, evaluate the model performance through methods such as cross-validation, adjust the model parameters, perform feature selection and model tuning according to the evaluation results, and finally deploy it to the production environment to achieve automated text classification; including: Select a suitable classification algorithm according to the task, use the fused feature vectors to train the classifier, divide the dataset into training set, validation set, and test set, perform cross-validation on the training set and validation set, adjust the model parameters, evaluate the model performance on the test set, and evaluate the model performance using metrics such as accuracy, recall, and F1 score. Adjust the hyperparameters according to the model evaluation results, such as learning rate, regularization parameter, etc., select the features that are most helpful for the classification task, consider using ensemble learning techniques, such as bagging or boosting, to further improve the model performance, and finally deploy the trained model to the production environment.
[0053] Example 2, based on Example 1, proposes a text classification system based on a large model and Labeled-LDA. The system includes:
[0054] Data collection and preprocessing module: Responsible for collecting text data in the target domain and performing preprocessing operations such as cleaning, tokenization, stop word removal, and lemmatization to generate a high-quality text dataset; including a data collection unit, a cleaning unit, a tokenization unit, a stop word removal unit, and a lemmatization unit, used to perform the following operations:
[0055] Collect text data in the target domain to ensure the diversity and representativeness of the data;
[0056] Clean the text data and remove irrelevant information such as HTML tags, special characters, numbers, and symbols;
[0057] Tokenize the text into words or phrases;
[0058] Delete common words that do not affect the text semantics, such as "and", "of", "in";
[0059] Lemmatize the words to their basic forms, such as changing the plural to the singular and the past tense to the base form.
[0060] Feature extraction module: Use the large model and Labeled-LDA model to encode and perform topic modeling on the preprocessed text, and extract the deep semantic features and topic distribution features of the text respectively; including a large model feature extraction unit and a Labeled-LDA feature extraction unit, used to perform the following operations:
[0061] Large model feature extraction unit: Use the pre-trained or fine-tuned large model to extract the deep semantic features of the text;
[0062] Labeled-LDA feature extraction unit: Use the labeled text data to train the Labeled-LDA model to discover the topic distribution in the text and extract the topic distribution as a feature for each text.
[0063] Model training module: This module trains the Labeled-LDA model using labeled data and fine-tunes the large model to meet the requirements of text classification tasks. This module includes a Labeled-LDA training unit and a large model fine-tuning unit, which perform the following operations:
[0064] Labeled-LDA training unit: uses labeled text datasets to train the Labeled-LDA model. It uses the iterative EM algorithm to optimize the document-topic and topic-word distributions and learn the intrinsic connections between topics and text categories.
[0065] Large model fine-tuning unit: According to the requirements of the text classification task, select the appropriate model architecture and parameters, and fine-tune the pre-trained large model to improve its performance on specific tasks.
[0066] Feature fusion module: fuses the deep features extracted by the large model and the topic features extracted by Labeled-LDA to form a comprehensive feature representation; fuses the deep features extracted by the large model and the topic features extracted by Labeled-LDA through splicing, weighting or other advanced fusion technologies; the classification and evaluation module trains the classification model based on the fused features, evaluates the model performance through cross-validation method, including indicators such as accuracy, recall rate and F1 score, adjusts the model parameters and performs feature selection based on the evaluation results, and finally deploys the trained model to the production environment to realize automatic text classification.
[0067] Classification and evaluation module: Trains a classification model based on the fused features, evaluates model performance through cross-validation, adjusts model parameters and performs optimization based on the evaluation results, and finally deploys the trained model to the production environment to achieve automatic text classification.
[0068] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.
Claims
1. A text classification method based on a large model and Labeled-LDA, characterized by: The method comprises the following steps: S01: Data collection and data preprocessing: Collect text data in the target domain and perform preprocessing operations, including but not limited to word segmentation, stop word removal, and stemming, to prepare high-quality text datasets for subsequent feature extraction; S02: Feature Extraction: Use a large model to encode the preprocessed text and extract vector representations that reflect the deep semantics of the text; apply the Labeled-LDA model to perform topic modeling on the text, extract the topic distribution features of the text, and enhance the understanding of the text structure; S03: Training the Model: Perform model setup and define model parameters, including the number of topics K, the hyperparameters of the Dirichlet prior distribution (α, which represents the smoothness of the document-topic distribution, and β, which represents the smoothness of the topic-word distribution), and strategies for incorporating supervised information. Use labeled data to train the Labeled-LDA model to identify topics in text and their associations with categories. Select a pre-trained large model or fine-tune it on a specific dataset to adapt it to text classification tasks. Use a labeled text dataset to train the Labeled-LDA model, allowing it to learn the associations between topics and text categories. Fine-tune the large model based on task requirements to better suit specific text classification tasks. S04: Feature fusion: Fuse the features extracted by the large model with the topic features extracted by Labeled-LDA to capture the multi-dimensional information of the text; S05: Train a classification model based on the fused features and evaluate the model performance through cross-validation. Based on the evaluation results, adjust the model parameters, perform feature selection, and optimize the model. Finally, deploy the model to the production environment to achieve automated text classification. Step S03 includes: Training the model: Use an annotated text dataset to train the Labeled-LDA model. Through the iterative EM algorithm, the model gradually optimizes the document-topic and topic-word distributions, enabling the model to learn the intrinsic connection between topics and text categories. Initialization: Initialize the document-topic and topic-word distributions randomly or based on some heuristic method, then iteratively update: Use algorithms such as Gibbs sampling to iteratively update the topic assignment of each document and the word distribution of each topic. In each iteration, Labeled-LDA monitors the impact of information, guiding model learning by adjusting sampling probabilities or directly adding regularization terms to the objective function. It also monitors the likelihood function or other convergence indicators, and the difference between multiple iterations. When the change is less than a set threshold, the model is considered converged. Training a large model using an annotated text dataset: Select a suitable model architecture and set model parameters, including the number of layers, hidden layer size, and number of attention heads. Train the model using the preprocessed dataset. The training process involves forward propagation for prediction, calculating the loss function, and backpropagation to adjust the weight parameters. Minimize the loss through gradient descent or other optimization algorithms and perform multiple iterations. Select a dataset related to a specific task to fine-tune the large model to adapt to the specific text classification task. During fine-tuning, adjust the weights of the top layer or some layers of the model to better fit the requirements of the target classification task.
2. The text classification method based on a large model and Labeled-LDA according to claim 1, characterized in that: The step S01 includes: Collect text data to obtain a text dataset to be classified. Collect a large amount of text data from the target domain to ensure data diversity and representativeness. Perform a series of cleaning and formatting operations on the collected text data, including but not limited to: Denoising: Remove irrelevant information such as HTML tags, special characters, numbers, and symbols in the text; Tokenization: Split the text into words or phrases; Stop word removal: Delete common words that do not affect the semantics of the text, such as "and", "of", "in"; Lemmatization: Restore the vocabulary to its basic form, change plurals to singulars, and past tenses to the base form.
3. The text classification method based on a large model and Labeled-LDA according to claim 1, characterized in that: The step S02 includes: Assign class labels to the text data. The labels are used to train and evaluate the model. Use Labeled-LDA to extract topic features: Determine the number of topics to be extracted and train the Labeled-LDA model using the annotated text data to discover the topic distribution in the text. Extract the topic distribution as a feature for each text and apply the Labeled-LDA model to perform topic modeling on the text. Labeled-LDA is supervised and uses the class labels of the text to guide topic learning, thereby extracting features that reflect the topic distribution of the text. Each document will be assigned a topic distribution, which reflects the relative importance of each topic in the document. Use a large model to extract deep features: Select a suitable large model according to the task, fine-tune the pre-trained model on a specific task to adapt to the text classification task, and use the fine-tuned model to extract the deep features of the text.
4. The text classification method based on a large model and Labeled-LDA according to claim 1, characterized in that: The step S04 includes: Combine the topic features extracted by Labeled-LDA with the deep features extracted by the large model to form a more comprehensive feature representation, which is achieved through simple concatenation, weighted fusion, or other advanced fusion techniques. The purpose is to integrate the advantages of the two types of features and improve the classification performance. Step S05 includes: selecting an appropriate classification algorithm according to the task, using the fused feature vectors to train a classifier, dividing the dataset into a training set, a validation set, and a test set, performing cross-validation on the training set and the validation set, adjusting the model parameters, evaluating the performance of the model on the test set, and evaluating the model performance using accuracy, recall, and F1-score metrics; adjusting the hyperparameters, learning rate, and regularization parameter according to the model evaluation results, selecting the features most helpful for the classification task, using ensemble learning techniques, bagging or boosting, to further improve the model performance, and finally deploying the trained model to the production environment.
5. A text classification system based on a large model and Labeled-LDA according to the text classification method based on a large model and Labeled-LDA according to claim 1, characterized in that: The system includes: Data collection and preprocessing module: responsible for collecting text data in the target domain and performing preprocessing operations such as cleaning, tokenization, stop-word removal, and lemmatization to generate a high-quality text dataset; Feature extraction module: using a large model and a Labeled-LDA model to encode and perform topic modeling on the preprocessed text, and extracting the deep semantic features and topic distribution features of the text respectively; Model training module: training the Labeled-LDA model in combination with the labeled data and fine-tuning the large model to meet the requirements of the text classification task; Feature fusion module: fusing the deep features extracted by the large model and the topic features extracted by Labeled-LDA to form a comprehensive feature representation; Classification and evaluation module: training a classification model based on the fused features, evaluating the model performance through cross-validation, adjusting the model parameters and performing optimization according to the evaluation results, and finally deploying the trained model to the production environment to achieve automated classification of texts.
6. The text classification system based on a large model and Labeled-LDA according to claim 5, characterized in that: The data collection and preprocessing module includes a data collection unit, a cleaning unit, a tokenization unit, a stop-word removal unit, and a lemmatization unit, and is used to perform the following operations: Collect text data in the target domain to ensure the diversity and representativeness of the data; Clean the text data to remove irrelevant information such as HTML tags, special characters, numbers, and symbols; Tokenize the text into words or phrases; Delete common words that do not affect the semantics of the text, such as "and", "of", "in"; Lemmatize the words to their basic forms, changing plurals to singulars and past tenses to their original forms.
7. The text classification system based on a large model and Labeled-LDA according to claim 5, characterized in that: The feature extraction module includes a large model feature extraction unit and a Labeled-LDA feature extraction unit, and is used to perform the following operations: Large model feature extraction unit: using a pre-trained or fine-tuned large model to extract the deep semantic features of the text; Labeled-LDA feature extraction unit: using the labeled text data to train the Labeled-LDA model to discover the topic distribution in the text and extracting the topic distribution as a feature for each text.
8. The text classification system based on a large model and Labeled-LDA according to claim 5, characterized in that: The model training module includes a Labeled-LDA training unit and a large model fine-tuning unit, and is used to perform the following operations: Labeled-LDA training unit: using the labeled text dataset to train the Labeled-LDA model, optimizing the document-topic and topic-word distributions through the iterative EM algorithm, and learning the internal relationship between the topics and the text categories; Large model fine-tuning unit: According to the requirements of the text classification task, select the appropriate model architecture and parameters, and fine-tune the pre-trained large model to improve its performance on specific tasks.
9. The text classification system based on a large model and Labeled-LDA according to claim 5, characterized in that: The feature fusion module fuses the deep features extracted by the large model and the topic features extracted by Labeled-LDA through splicing, weighting or other advanced fusion technologies; the classification and evaluation module trains the classification model based on the fused features, and evaluates the model performance through cross-validation, including indicators such as accuracy, recall rate and F1 score, and adjusts the model parameters and performs feature selection based on the evaluation results. Finally, the trained model is deployed to the production environment to realize automatic classification of text.
Citation Information
Patent Citations
Short text named entity disambiguation method based on multi-information fusion
CN117709349A
Systems and methods for multi-modal automated categorization
US20190065589A1