Text classification method and system based on large model and Labeled-LDA
By combining the big model and the Labeled-LDA model, the deep semantics and theme distribution characteristics of the text are extracted, and the problems of inefficient text classification and insufficient utilization of structural information in the existing technology are solved, and high accuracy and robust text classification are achieved Effect.
Patent Information
- Application Number
- CN202411348758.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-26
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2044-09-26
AI Technical Summary
Existing text classification methods are inefficient when processing large-scale data, making it difficult to make full use of document structure information, and deep learning methods ignore topic distribution, resulting in limited classification accuracy.
Combining the big model and Labeled-LDA model, through data preprocessing, feature extraction, model training and feature fusion, deep semantics and theme distribution features of the text are extracted, text structure understanding is enhanced, and model parameters are adjusted through cross-validation to achieve text automation. Classification.
It significantly improves the accuracy and robustness of text classification, especially when dealing with complex topics and semantic texts, and is suitable for different text classification tasks and has good scalability.
Smart Images

Figure CN119293247A_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, network information resources have shown explosive growth. Faced with such a huge information base, users often feel overwhelmed when looking for the information they need. How to efficiently and accurately filter out valuable content from massive information has become an urgent problem to be solved. In order to meet this challenge, information labeling and classification is particularly important.
[0003] At present, there are three main types of text classification methods: manual annotation, traditional machine learning methods, and deep learning methods. Although manual annotation is suitable for a small amount of data, it is inefficient and costly, and it is difficult to meet the needs of large-scale data processing. Traditional machine learning methods, such as Naive Bayes and Support Vector Machine (SVM), have achieved good results in the field of text classification. However, these methods rely on manual rules, which are prone to omissions and redundancy, resulting in the accuracy of classification results being affected.
[0004] In recent years, deep learning methods have made significant progress in the field of text classification. For example, models such as FastText and TextCNN can automatically learn text features to improve classification accuracy. However, these methods often ignore the structural information of the document, resulting in the inability to fully utilize the useful information in the text in some cases. Therefore, how to combine document structural information to improve the performance of deep learning methods in text classification has become a hot topic in current research.
[0005] Traditional text classification methods usually rely on manual feature engineering or simple statistical features, which makes it difficult to fully explore the complex semantics of text. The emergence of large models has aroused great interest in their high-quality, context-sensitive data annotation capabilities, such as BERT, GPT, etc., which can provide high-dimensional semantic representations of text by learning large amounts of text data. However, using large models alone may ignore 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 insufficient 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 solution: 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: Fuse the features extracted by the large model with 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:
[0014] 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: 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, for example, change the plural to the singular and the past tense to the base form.
[0015] Preferably, step S02 includes:
[0016] Assign category labels to text data, which are used to train and evaluate models. 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 model: Use annotated text datasets to train the Labeled-LDA model. Through the iterative EM algorithm, the model gradually optimizes the document-topic and topic-word distributions, so that the model can learn the intrinsic connection between topics and text categories; Initialization: Initialize the document-topic distribution and topic-word distribution randomly or based on some heuristic method, and 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 will consider the influence of supervisory information, guide model learning by adjusting the sampling probability or directly adding regularization terms to the objective function, monitor the likelihood function or other convergence indicators, such as the difference between multiple iterations, and consider the model converged when the change is less than the set threshold;
[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 loss functions, and adjust weight parameters through backpropagation, minimize losses 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 in line with the needs of 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 purpose 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 model parameters, evaluating the performance of the model on the test set, and using accuracy, recall, and F1 score indicators to evaluate model performance; adjusting hyperparameters such as learning rate and regularization parameters according to the model evaluation results, selecting the features that are most helpful for the classification task, considering using ensemble learning techniques such as bagging or boosting to further improve 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 data sets;
[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: trains the Labeled-LDA model with 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 and the topic features extracted by Labeled-LDA to form a comprehensive feature representation;
[0027] Classification and evaluation module: The classification model is trained based on the fused features, the model performance is evaluated through cross-validation, and the model parameters are adjusted and optimized according to the evaluation results. Finally, the trained model is deployed to the production environment to realize automatic classification of text.
[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, which are used 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 originals.
[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 the 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] Preferably, the feature fusion module fuses the deep features extracted by the large model and the topic features extracted by Labeled-LDA through concatenation, 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 text classification.
[0041] Compared with the prior art, the beneficial effects of the present invention are:
[0042] The text classification method and system based on a large model and Labeled-LDA proposed in the present invention can improve the performance of text classification tasks, especially when processing texts with complex themes and semantics, by combining the advantages of the two models. Labeled-LDA can help the large model to 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. The accuracy and robustness of classification are significantly improved, especially when processing 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 is a flow chart of the method of the present invention;
[0044] Figure 2 Schematic diagram of the structure of the LDA supervised topic model of the present invention. DETAILED DESCRIPTION
[0045] In order to make the purpose and technical solution of the present invention clearly and completely described, and the advantages more clearly understood, the embodiments of the present invention are further described in detail 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, rather than all of the embodiments, and are only used to explain the embodiments of the present invention, and are not used to limit the embodiments of the present invention. All other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0046] For example, see Figure 1 to Figure 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, Data 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 to ensure 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, the past tense to the base 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 the vector representation that reflects 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 category 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 as a feature for each text. Apply the Labeled-LDA model to perform topic modeling on the text. Labeled-LDA is supervised and can use the category labels of the text to guide topic learning, so as to extract the features reflecting 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 combining supervisory information. Use labeled data to train the Labeled-LDA model to identify topics in the text and their associations 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 better adapt it 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 distribution of documents-topics and topics-words, so that the model can learn the intrinsic connection between topics and text categories. Initialize first: Initialize the document-topic distribution and topic-word distribution randomly or based on some heuristic method, and then iterate and 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 will consider the influence of supervisory information, and may guide model learning by adjusting the sampling probability or directly adding regularization terms to the objective function, monitoring the likelihood function or other convergence indicators, such as the difference between multiple iterations, and consider the model converged when the change is less than the set threshold.
[0050] Use annotated text datasets to train large models: select the appropriate model architecture, set model parameters, including the number of layers, hidden layer size, number of attention heads, etc., and use the preprocessed dataset to train the model. The training process involves forward propagation to calculate predictions, calculate loss functions, and adjust weight parameters through backpropagation, minimizing losses through gradient descent or other optimization algorithms, and performing multiple rounds of iterations. You can 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.
[0051] 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; including: 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, with the goal of integrating the advantages of the two features and improving 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 the 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 to 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: The Labeled-LDA model is trained using labeled text data to discover the topic distribution in the text and extract the topic distribution as a feature for each text.
[0063] Model training module: Trains the Labeled-LDA model with labeled data and fine-tunes the large model to meet the needs of text classification tasks. It includes the Labeled-LDA training unit and the large model fine-tuning unit, which are used to perform the following operations:
[0064] Labeled-LDA training unit: Use the labeled text dataset to train the Labeled-LDA model, optimize the document-topic and topic-word distribution through the iterative EM algorithm, and learn the intrinsic connection 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 according to the evaluation results, and finally deploys the trained model to the production environment to realize automatic classification of text.
[0067] Classification and evaluation module: The classification model is trained based on the fused features, the model performance is evaluated through cross-validation, and the model parameters are adjusted and optimized according to the evaluation results. Finally, the trained model is deployed to the production environment to realize automatic classification of text.
[0068] Although 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 the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present 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 includes 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 a high-quality text dataset for subsequent feature extraction; S02: Feature extraction: Use a large model to encode the preprocessed text and extract vector representations 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; 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, as well as the strategy for how to combine supervised information. Use labeled data to train the Labeled-LDA model to identify the topics in the text and their associations 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 learns the association between topics and text categories. According to the task requirements, fine-tune the large model to better adapt to the specific text classification task; 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; 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 automated text classification.
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, obtain the text dataset to be classified, collect a large amount of text data from the target domain to 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: 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, for example, change the plural to the singular and the past tense to the original 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 category labels to text data, which are used to train and evaluate models. 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.
4. The text classification method based on a large model and Labeled-LDA according to claim 1, characterized in that: Step S03 includes: Training model: Use annotated text datasets to train the Labeled-LDA model. Through the iterative EM algorithm, the model gradually optimizes the document-topic and topic-word distributions, so that the model can learn the intrinsic connection between topics and text categories; Initialization: Initialize the document-topic distribution and topic-word distribution randomly or based on some heuristic method, and 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 will consider the influence of supervisory information, guide model learning by adjusting the sampling probability or directly adding regularization terms to the objective function, monitor the likelihood function or other convergence indicators, such as the difference between multiple iterations, and consider the model converged when the change is less than the set threshold; 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 loss functions, and adjust weight parameters through backpropagation, minimize losses 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 in line with the needs of the target classification task.
5. The text classification method based on a large model and Labeled-LDA according to claim 1, characterized in that: 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 purpose of integrating the advantages of the two features and improving 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 model performance on the test set, and evaluating the model performance using accuracy, recall, and F1-score metrics; Adjusting the hyperparameters according to the model evaluation results, such as the learning rate and regularization parameter, selecting the features that are most helpful for the classification task, considering using ensemble learning techniques, such as bagging or boosting, to further improve the model performance, and finally deploying the trained model to the production environment.
6. 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: A 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; A feature extraction module: Using a large model and a Labeled-LDA model to encode and perform topic modeling on the preprocessed text, and respectively extracting the deep semantic features and topic distribution features of the text; A model training module: Combining the labeled data to train the Labeled-LDA model and fine-tuning the large model to meet the requirements of the text classification task; A 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; A 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 automatic classification of texts.
7. A text classification system based on a large model and Labeled-LDA according to claim 6, 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, which are used to perform the following operations: Collecting text data in the target domain to ensure the diversity and representativeness of the data; Cleaning the text data to remove irrelevant information such as HTML tags, special characters, numbers, and symbols; Splitting the text into words or phrases; Deleting common words that do not affect the text semantics, such as "and", "of", "in"; Restoring the words to their basic forms, such as changing the plural to the singular and the past tense to the original form.
8. A text classification system based on a large model and Labeled-LDA according to claim 6, characterized in that: The feature extraction module includes a large model feature extraction unit and a Labeled-LDA feature extraction unit, which are used to perform the following operations: The large model feature extraction unit: Using a pre-trained or fine-tuned large model to extract the deep semantic features of the text; The 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.
9. The text classification system based on large model and Labeled-LDA according to claim 6, characterized in that: The model training module includes a Labeled-LDA training unit and a large model fine-tuning unit, which are used to perform the following operations: The 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 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.
10. The text classification system based on large model and Labeled-LDA according to claim 6, 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 the cross-validation method, including indicators such as accuracy, recall rate and F1 score, and 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 classification of text.
Citation Information
Patent Citations
Web service classification method fusing unstructured information and structured information
CN113111288A
News topic discovery method fused with neighbor title graph
CN114722896A
Short text named entity disambiguation method based on multi-information fusion
CN117709349A
Scientific and technological text theme recognition and clustering screening method and system based on SAO structure
CN118193731A
Semisupervised autoencoder for sentiment analysis
US20180165554A1