A Text Entity Recognition Method Based on Curriculum Learning
Through a course learning method, the BERT embedded entity recognition model is trained from easy to difficult, which solves the problems of low training efficiency and reduced recognition accuracy of the BERT embedded model, and achieves more efficient training and more accurate Identify effects.
Patent Information
- Application Number
- CN202210210099.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-04
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2042-03-04
AI Technical Summary
The existing BERT embedded entity recognition models have low training efficiency and reduced recognition accuracy, mainly due to the huge model size and slow training.
Using the text entity recognition method based on course learning, the text data of the training set is preprocessed and annotated, and divided into blocks from easy to difficult. The BERT-BiLSTM-CRF model is used for step-by-step learning and training, and the model checkpoint is set for evaluation. , obtain the optimal model parameters, improve the training efficiency and recognition accuracy of the model.
The training efficiency and recognition accuracy of the entity recognition model have been significantly improved. Specifically on the power text annotation data set, the model training time has been reduced by 50%, the F1 value has been increased by 2.37%, and the generalization ability of the model has been improved.
Smart Images

Figure CN114595691B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of text recognition, and in particular to a text entity recognition method based on curriculum learning. Background Art
[0002] Named Entity Recognition (NER) is a basic research topic in the field of Natural Language Processing (NLP). Its main task is to identify meaningful entity items from unstructured text and classify them into predefined entity categories. Open domains generally include names of people, places, organizations, etc. Different vertical fields also have different predefined entity categories. Named entity recognition in the power field can realize the automatic processing of power texts, and mine a large amount of valuable power field knowledge from complex power text data, which helps researchers to extract key relevant information (for example, related power technologies and equipment facilities used, etc.) more easily and quickly.
[0003] In recent years, the BERT (Bidirectional Encoder Representation from Transformers) pre-trained language model has been widely used in the field of named entity recognition with high recognition accuracy. However, due to the large size and large number of parameters of the BERT model, entity recognition models based on BERT embedding are generally difficult to train and have slow inference speed.
[0004] In order to ensure the recognition effect of the BERT embedded entity recognition model, it needs to be trained on the training text in advance. The current conventional BERT embedded entity recognition model training method is to randomly input samples and then perform model training, which will cause the problem of slow training. As a result, its recognition accuracy is also reduced.
[0005] In summary, there is an urgent need for a text entity recognition method based on curriculum learning to solve the problems existing in the existing technology. Summary of the invention
[0006] The present invention aims to provide a text entity recognition method based on curriculum learning to solve the problem of low training efficiency of existing entity recognition models.
[0007] To achieve the above object, the present invention provides a text entity recognition method based on curriculum learning, comprising the following steps:
[0008] Step 1: Preprocess the text data in the training project text, annotate the preprocessed text data, and construct a text annotation dataset;
[0009] Step 2: Divide the text annotation dataset into training set, validation set and test set;
[0010] Step 3: Arrange the text data in the training set in order from easy to difficult, and divide the sorted text data in the training set into n blocks using the natural breakpoint classification algorithm;
[0011] Step 4: Allow the entity recognition model to learn the text data of n blocks in the training set until the model converges; during the learning and training process, the entity recognition model is evaluated on the validation set to obtain the optimal model parameter settings;
[0012] Step 5: Test the entity recognition model corresponding to the optimal model parameter settings on the test set, and apply the entity recognition model that meets the training results to the real project text entity recognition scenario.
[0013] Preferably, in the step 1, the preprocessed text data is annotated using the BIOES annotation mode, and an entity category representation symbol is added after the annotation symbol.
[0014] Preferably, in step one, B in the BIOES annotation mode represents the start of the annotation entity, I represents the internal annotation of the entity, E represents the end of the annotation entity, S represents a single-character entity, and O represents a non-entity; in the entity category representation symbol, G represents the project application unit, F represents facilities and equipment, and T represents a technical term.
[0015] Preferably, in the step 3, when the text data of the training set are sorted in order from easy to difficult, the difficulty is sorted by the domain entity ratio. The larger the domain entity ratio value, the greater the learning difficulty. The domain entity ratio of each text data is calculated by expression 1):
[0016]
[0017] Among them, s is a single text data in the training set, N is the total number of entity words in the text data s, and e j is the jth entity word to be identified in s, d(s) is the domain entity ratio of s, len(s) is the sample length of s, len(e j ) is e j Entity word length.
[0018] Preferably, in step three, when the sample size of text data in the training set is less than 5,000, 1<n≤3; when the sample size of text data in the training set is between 5,000 and 100,000, 4≤n≤9; when the sample size of text data in the training set is more than 100,000, n≥10.
[0019] Preferably, in the step 3, when the block division is performed by the natural breakpoint classification algorithm, the domain entity proportions corresponding to the sorted text data in the training set are sequentially placed in the domain entity proportion set, and the division with the largest variance goodness of fit GVF value in the domain entity proportion set is selected as the best division; the variance goodness of fit GVF is calculated by expression 2):
[0020]
[0021] Among them, SDAM Z is the sum of squared deviations of all domain entity proportions in the domain entity proportion set, SDAM1 to SDAM n They are the squared sums of the deviations of the proportions of all domain entities corresponding to the 1st block to the nth block.
[0022] Preferably, in step 4, a BERT-BiLSTM-CRF entity recognition model is established, and course learning is performed on the text data in the sorted training set.
[0023] Preferably, in step 4, the entity recognition model first performs n stages of learning and training. When performing the i-th stage of learning and training, the text data from the 1st block to the i-th block is input into the entity recognition model for learning and training, where 1≤i≤n; then the entity recognition model is allowed to repeatedly learn the text data of the entire training set until the model converges, i.e., the training is completed.
[0024] Preferably, in step 4, several model checkpoints are set during the entity recognition model learning and training process; at each checkpoint, the entity recognition model is evaluated on the validation set, and the recognition accuracy and convergence of the entity recognition model at each checkpoint are compared to obtain the optimal model parameter settings.
[0025] Preferably, in step five, the entity recognition model corresponding to the optimal model parameter setting is tested on a test set to evaluate whether the generalization ability of the entity recognition model meets the usage requirements.
[0026] The application of the technical solution of the present invention has the following beneficial effects:
[0027] (1) In the present invention, by making the entity recognition model perform course learning, the neural network model is first trained with simpler data blocks, and then the difficulty level of the data blocks is gradually increased until the entire training set is covered. For the neural network model, the initial stage starts learning from simpler data blocks, which can more easily find the minimum value of the objective function, and then gradually increase more complex and difficult data blocks. During the training process, the model's tracking of local minima will guide it to a better parameter space, and it is more likely to approach the global minimum, making it have better generalization, thereby achieving the effect of improving training efficiency and recognition accuracy.
[0028] (2) In the present invention, the text data in the training set are sorted by the proportion of domain entities. The higher the proportion of domain entities in a sample, the more and richer the domain knowledge it contains, and the more complex the sample is. Correspondingly, for the entity recognition model, the learning difficulty of the sample is also higher, which can provide sample sorting with increasing difficulty for course learning.
[0029] (3) In the present invention, the text data in the training set is divided into multiple blocks through the natural breakpoint classification algorithm, which can ensure that the similarity of sample difficulty within a block is maximized and the difference of sample difficulty between different blocks is maximized.
[0030] (4) In the present invention, entity recognition is performed by establishing a BERT-BiLSTM-CRF entity recognition model, and the BERT embedding layer is used to create a dynamic word vector containing context information; secondly, a BiLSTM module is added after the BERT embedding layer to obtain bidirectional information; then, a necessary linear layer is connected after the output of the BiLSTM layer to adjust the output dimension; finally, a CRF layer is added to learn the constraint relationship between labels to ensure the rationality of the label sequence.
[0031] (5) In the present invention, several model checkpoints are set during the learning and training process of the entity recognition model; at each checkpoint, the entity recognition model is evaluated on the validation set, and the recognition accuracy and convergence of the entity recognition model at each checkpoint are compared to obtain the optimal model parameter settings.
[0032] (6) In the present invention, the entity recognition model is trained by the learning training method of the present application, which can improve the training efficiency and recognition effect of the entity recognition model based on BERT embedding (specifically, on the electric power text annotation dataset, the model training time is reduced by 50% and the F1 of the model is improved by 2.37%).
[0033] (7) In the present invention, the entity recognition model in this application is applied to the entity recognition of power field projects, which helps researchers to extract key relevant information more easily and quickly, such as the relevant power technologies and equipment facilities used.
[0034] In addition to the above-described purposes, features and advantages, the present invention has other purposes, features and advantages. The present invention will be further described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] The drawings constituting a part of this application are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0036] Figure 1 It is a flowchart of a text entity recognition method based on course learning in an embodiment of the present application;
[0037] Figure 2 Schematic diagram of the division of the training set in the embodiment of the present application;
[0038] Figure 3 This is a comparison chart of the effects of a text entity recognition method based on course learning and a conventional model learning method in an embodiment of the present application. DETAILED DESCRIPTION
[0039] The embodiments of the present invention are described in detail below with reference to the accompanying drawings, but the present invention can be implemented in many different ways as defined and covered by the claims.
[0040] Example:
[0041] See also Figures 1 to 3 , a text entity recognition method based on curriculum learning, this embodiment is applied to entity recognition in project texts in the power field.
[0042] A text entity recognition method based on curriculum learning, comprising the following steps:
[0043] Step 1: Preprocess the text data in the training project text, annotate the preprocessed text data, and construct a text annotation dataset;
[0044] In this embodiment, materials related to 312 completed power projects were collected from the data department of State Grid Hunan Electric Power Co., Ltd., and the text data in the power projects were cleaned by missing value completion, deduplication and replacement, and redundant data was eliminated, and finally clean power project text data was obtained; the preprocessed text data was annotated using the BIOES annotation mode, and entity category representation symbols were added after the annotation symbols.
[0045] After analyzing a large number of feasibility study reports of power industry projects, we found that the text of power industry projects is different from the free text of general open domains. It usually contains a large number of professional terms in the power industry and has strong domain characteristics. Therefore, combined with the text characteristics of power industry projects and referring to the entity categories of other vertical fields, we finally defined the following three entity categories that need to be identified that are suitable for the power domain:
[0046] 1) Project applicant (project responsible unit): represented by the entity category symbol G (Group);
[0047] 2) Equipment and facilities (power components, power-related devices, and other equipment and facilities): Use the entity category representation symbol F (Facility Equipment) to represent;
[0048] 3) Technical terms (electric power technology methods, research algorithm strategies, etc.): represented by the entity category representation symbol T (Technical Term).
[0049] When the BIOES annotation mode is used to annotate the above three entity categories, B (Begin) represents the beginning of the annotation entity, I (Intermediate) represents the annotation inside the entity, E (End) represents the end of the annotation entity, S (Single) represents the single-character entity, and O (Other) represents the non-entity; for single-character entities, "S" is used for annotation; for two-character entities, such as "conductor", "B" is used to mark the beginning of the entity, and "E" is used to mark the end of the entity; for entities with three or more characters, such as "transformer", "B" and "E" are still used to mark the beginning and end of the entity respectively, and "I" (for Intermediate) is used to mark the inside of the entity; for non-entities, that is, parts that do not belong to the predefined categories, "O" (for Other) is used for annotation. So far, combined with the previously defined three types of entity category representation symbols suitable for the power field, a total of 3×4+1=13 annotation symbols for power texts can be obtained, as shown in Table 1.
[0050] Table 1 Table of symbols for entity marking in the power field
[0051]
[0052]
[0053] The annotation examples are shown in Table 2:
[0054] Table 2 Schematic diagram of project text data annotation
[0055] burden load Harmony Vibration Change Change Device Depend on L C Harmony Vibration electricity road Group become 。 BF IF IF IF IF IF EF O BT IT IT IT IT ET O O O
[0056] The cleaned power project text data are manually annotated, and the annotated power project text data are cut to obtain 18,552 relatively clean and standard power text data, and a text annotation dataset is constructed.
[0057] Step 2: Divide the text annotation dataset into training set, validation set and test set;
[0058] The text annotation dataset is divided into a training set, a validation set, and a test set by the hold-out method, wherein the sample size of the training set should be large enough to meet the learning and training requirements of the entity recognition model. In this embodiment, the text data in the text annotation dataset is randomly divided into a training set (14841 samples), a validation set (1855 samples), and a test set (1856 samples) in a ratio of 8:1:1 by the hold-out method.
[0059] Step 3: Arrange the text data in the training set in order from easy to difficult, and divide the sorted text data in the training set into n blocks using the natural breakpoint classification algorithm;
[0060] When conducting course learning, the main goal is to train the neural network model with simpler data blocks (or simpler subtasks), and then gradually increase the difficulty level of the data (or subtasks) until the entire training data set (or target task) is covered. Simply put, course learning means the training process from simple data to more difficult data, similar to the process of students learning courses: gradually learning from simpler courses to more complex courses. For the neural network model, starting with simpler data blocks in the initial stage can more easily find the minimum value of the objective function, and then gradually increase more complex and difficult data blocks. During the training process, the model's tracking of local minima will guide it to a better parameter space, and it is more likely to approach the global minimum, making it more generalizable, thereby achieving the effect of improving training efficiency and recognition accuracy.
[0061] In the prior art, a difficulty evaluator is usually used to decide which samples are simpler (easy) and which samples are more complex (difficult) based on the sample difficulty evaluation criteria; a training scheduler is used to decide when and how many more difficult samples to add to the model input, or to decide which samples the network model can access at a certain stage based on the sample difficulty.
[0062] In this application, the learning difficulty of the sample is evaluated by the domain entity proportion DEP (Domain Entities Proportion). This evaluation standard can be interpreted as: the higher the domain entity proportion of a sample, the more and richer the domain knowledge it contains, and the more complex the sample is. Correspondingly, for the entity recognition model, the learning difficulty of the sample is also higher.
[0063] When sorting the text data of the training set from easy to difficult, the difficulty is sorted by the proportion of domain entities. The larger the proportion of domain entities, the greater the learning difficulty. The proportion of domain entities for each text data is calculated by expression 1):
[0064]
[0065] Where s is a single text data (i.e., a single sample) in the training set, N is the total number of entity words in the text data s, and e j is the jth entity word to be identified in s (including project application units, facilities and equipment, and technical terms), d(s) is the domain entity ratio of s, len(s) is the sample length of s, len(e j ) is e j Entity word length.
[0066] After obtaining the domain entity ratio of all text data in the training set according to expression 1), the domain entity ratio is sorted according to the numerical value of the domain entity ratio to obtain a training set X arranged from easy to difficult in terms of learning difficulty. The training set X includes a total of 14,841 samples, and the learning difficulty (domain entity ratio) of each sample increases successively.
[0067] Then, the sample sequence needs to be divided into multiple blocks of similar difficulty according to the sample difficulty. At present, there are many methods for block division, such as evenly dividing the data into multiple blocks, that is, the number of samples in each block is the same; in addition, multiple thresholds can be set for division, etc. However, the uniform division method may cause the sample difficulty within the same block to fluctuate greatly, while the difficulty difference between different blocks is not large enough; the method of setting the threshold is to try to ensure that the number of samples in the same block is the same while dividing, and there is a problem that it is difficult to choose a reasonable threshold.
[0068] The present invention adopts the natural breakpoint classification algorithm (JenksNatural Breaks) proposed by Professor George Frederick Jenks to divide the sample set. This method is often used in geographic information systems. Introducing it into the sample division here can ensure that the similarity of sample difficulty within a block is maximized and the difference of sample difficulty between different blocks is maximized.
[0069] When the natural breakpoint classification algorithm is used to divide the blocks, the value range of n is as follows:
[0070] When the number of text data samples in the training set is less than 5,000, 1<n≤3;
[0071] When the number of text data samples in the training set is between 5,000 and 100,000, 4≤n≤9;
[0072] When the number of text data samples in the training set is more than 100,000, n ≥ 10.
[0073] In this embodiment, the training set X includes 14841 samples in total, and the value of n is preferably 6, that is, the training set X is divided into 6 blocks by the natural breakpoint classification algorithm.
[0074] When the natural breakpoint classification algorithm is used for block division, the domain entity proportions corresponding to the sorted text data in the training set (i.e., the training set X) are sequentially placed into the domain entity proportion set D, and the division with the largest variance goodness of fit GVF value in the domain entity proportion set D is selected as the best division; the variance goodness of fit GVF is calculated by expression 2):
[0075]
[0076] Among them, SDAM Z is the sum of squared deviations of all domain entity proportions in the domain entity proportion set D, SDAM1 to SDAM n They are the squared sums of the deviations of the proportions of all domain entities corresponding to the 1st block to the nth block.
[0077] After obtaining the optimal division of the domain entity proportion set D, each breakpoint is mapped to the training set X, and the text data in the training set X is divided into blocks, such as Figure 2 According to the steps of the above natural breakpoint classification algorithm, the training set is finally divided into 6 blocks, and the samples from block 1 to block 6 are considered to have gradually increasing learning difficulty:
[0078] Block 1 is: sample 1 to sample 2909 (number of samples: 2909);
[0079] The second block is: sample No. 2910 to sample No. 6522 (number of samples: 3613);
[0080] The third block is: the 6523rd sample to the 10017th sample (3495 samples);
[0081] The fourth block is: sample No. 10018 to sample No. 12680 (number of samples: 2663);
[0082] The fifth block is: sample No. 12681 to sample No. 14276 (number of samples: 1596);
[0083] The 6th block is: sample No. 14277 to sample No. 14841 (number of samples: 565).
[0084] Step 4: Allow the entity recognition model to learn the text data of n blocks in the training set until the model converges; during the learning and training process, the entity recognition model is evaluated on the validation set to obtain the optimal model parameter settings;
[0085] In this application, a BERT-BiLSTM-CRF entity recognition model is established to perform course learning on the text data in the sorted training set (i.e., training set X).
[0086] First, the BERT embedding layer is used to create dynamic word vectors containing contextual information. Second, a BiLSTM module is added after the BERT embedding layer to obtain bidirectional information. Then, a necessary linear layer is added after the output of the BiLSTM layer to adjust the output dimension. Finally, a CRF layer is added to learn the constraint relationship between labels to ensure the rationality of the label sequence.
[0087] After many experiments, appropriate values were set for various parameters in the entity recognition model. For each sample in the training set of power text annotation data, the tags [CLS] and [SEP] were added at the beginning and end respectively, and the maximum length of the character sequence was set to 256 (including the first and last tags). Sequences with a length of less than 256 were padded with the tag [PAD], and sequences with a length of more than 256 were reduced. In addition, the BERT hidden layer size was set to 768, and the BiLSTM hidden layer parameters were set to the dimension of the BERT output word vector, that is, 768. During the training process, the model was optimized using the AdamW optimization algorithm, and the learning rate was set to 1e-3. At the same time, in order to prevent division by zero errors, the AdamW optimizer set the epsilon value to 1e-8. Finally, the parameter settings of the model are summarized in Table 3:
[0088] Table 3 Initial parameter settings of entity recognition model
[0089]
[0090]
[0091] After completing the entity recognition model settings, you can start learning the entity recognition model course through the training set X.
[0092] The entity recognition model first undergoes n stages of learning and training. During the i-th stage of learning and training, the text data from the 1st block to the i-th block is input into the entity recognition model for learning and training, where 1≤i≤n; then the text data of the entire training set (i.e., the entire training set X) is repeatedly learned until the model converges and the training is completed. The specific learning and training process is as follows: in the first stage, all samples in the first block are input into the BERT-BiLSTM-CRF model for training; in the second stage, all samples in the first and second blocks are input into the model for further training; in the third stage, all samples in the first, second and third blocks are input into the model for further training; and so on. When entering the nth stage, all samples in the first to nth blocks (that is, all text data in the entire training set X) are input into the model for further training. When the nth stage of learning and training is completed, all text data in the training set have been input into the entity recognition model, and the entity recognition model is allowed to repeatedly learn all text data in the entire training set X (that is, all samples in the first to nth blocks) until the model converges and the training is completed, as shown in FIG. Figure 1 shown.
[0093] According to the above training strategy, the initial stage starts with simpler blocks, which can easily find the minimum value of the objective function, and then gradually adds more complex and difficult blocks. During the training process, the model's tracking of local minima will guide it to a better parameter space and is more likely to approach the global minimum. Therefore, compared with the method that does not use curriculum learning (randomly input samples into the model for training), the curriculum learning method based on the proportion of domain entities will have better generalization and can achieve the effect of improving training efficiency and recognition accuracy.
[0094] During the learning and training process of the entity recognition model, several model checkpoints are set; at each checkpoint, the entity recognition model is evaluated on the validation set, and the recognition accuracy and convergence of the entity recognition model at each checkpoint are compared to obtain the optimal entity recognition model parameter settings.
[0095] In this embodiment, 16 samples are set as a batch, and a checkpoint is set for every 100 batches. During the model training process, for each checkpoint, the entity recognition model is evaluated on the validation set to output the recognition accuracy, observe the convergence of the model, etc., and save the model setting parameters with better effects until the optimal model parameter settings are obtained.
[0096] Step 5: Test the entity recognition model corresponding to the optimal model parameter settings on the test set to evaluate whether the generalization ability of the entity recognition model meets the usage requirements, and apply the entity recognition model that meets the training effect (i.e., usage requirements) to the real project text entity recognition scenario.
[0097] See also Figure 3 , w / o-CL means without Curriculum Learning (w / o-CL), DEP represents the model learning method in this application that divides the difficulty by domain entity proportion (DEP) and then performs curriculum learning. The horizontal axis is the checkpoint, and the vertical axis is the F1 value of the model on the validation set at the corresponding checkpoint, reflecting the performance of the model on the power text annotation data validation set at that moment. Figure 3 It can be seen that the performance of the entity recognition model of the present application evaluated on the validation set after learning is significantly better than the conventional model learning method.
[0098] In the experiment, the number of model training iterations in the w / o-CL method is 472 checkpoints, while the number of training iterations in the DEP method is 230 checkpoints. The training speed of the DEP method is 2.05 times that of the w / o-CL method, which means that the training time is reduced by about 50%.
[0099] Finally, after the models of the two methods are trained, they will be tested on the test set to evaluate the generalization ability of the models. The F1 value of the w / o-CL method on the test set is 85.73%, and that of the DEP method is 88.10%, which is 2.37% higher than that of the w / o-CL method. Therefore, the experiment shows that the course learning method based on the proportion of domain entities proposed in this application can help improve the training efficiency and recognition effect of the BERT-embedded entity recognition model in the power text, and can be applied to real project texts, which helps researchers to extract key relevant information (for example, relevant power technologies and equipment facilities used, etc.) more easily and quickly.
[0100] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A text entity recognition method based on curriculum learning, characterized in that: The following steps are involved: Step 1: Preprocess the text data in the training project text, annotate the preprocessed text data, and construct a text annotation dataset; Step 2: Divide the text annotation dataset into training set, validation set and test set; Step 3: Arrange the text data in the training set in order from easy to difficult, and divide the sorted text data in the training set into n blocks using the natural breakpoint classification algorithm; Step 4: Allow the entity recognition model to learn the text data of n blocks in the training set until the model converges; during the learning and training process, the entity recognition model is evaluated on the validation set to obtain the optimal model parameter settings; Step 5: Test the entity recognition model corresponding to the optimal model parameter setting on the test set, and apply the entity recognition model that meets the training effect to the real project text entity recognition scenario; In the step 3, when the text data of the training set is sorted from easy to difficult, the difficulty is sorted by the proportion of domain entities. The larger the value of the domain entity proportion, the greater the learning difficulty. The domain entity proportion of each text data is calculated by expression 1): Among them, s is a single text data in the training set, N is the total number of entity words in the text data s, and e j is the jth entity word to be identified in s, d(s) is the domain entity ratio of s, len(s) is the sample length of s, len(e j ) is e j Length of entity words; In the step 3, when the sample size of the text data in the training set is less than 5,000, 1<n≤3; when the sample size of the text data in the training set is between 5,000 and 100,000, 4≤n≤9; when the sample size of the text data in the training set is more than 100,000, n≥10; In the step 3, when the block division is performed by the natural breakpoint classification algorithm, the domain entity proportions corresponding to the sorted text data in the training set are sequentially placed in the domain entity proportion set, and the division with the largest variance goodness of fit GVF value in the domain entity proportion set is selected as the best division; the variance goodness of fit GVF is calculated by expression 2): Among them, SDAM Z is the sum of squared deviations of all domain entity proportions in the domain entity proportion set, SDAM1 to SDAM n They are the squared sums of the deviations of the proportions of all domain entities corresponding to the 1st block to the nth block.
2. According to a text entity recognition method based on curriculum learning according to claim 1, it is characterized in that: In the step 1, the preprocessed text data is annotated using the BIOES annotation mode, and an entity category representation symbol is added after the annotation symbol.
3. A text entity recognition method based on curriculum learning according to claim 2, characterized in that: In the step 1, B in the BIOES annotation mode represents the beginning of the annotation entity, I represents the internal annotation of the entity, E represents the end of the annotation entity, S represents a single-character entity, and O represents a non-entity; in the entity category representation symbol, G represents the project application unit, F represents facilities and equipment, and T represents technical terms.
4. According to a method for text entity recognition based on curriculum learning according to claim 1, it is characterized in that: In the step 4, a BERT-BiLSTM-CRF entity recognition model is established, and course learning is performed on the text data in the sorted training set.
5. A text entity recognition method based on curriculum learning according to claim 4, characterized in that: In the step 4, the entity recognition model first performs n stages of learning and training. When performing the i-th stage of learning and training, the text data from the 1st block to the i-th block is input into the entity recognition model for learning and training, where 1≤i≤n; then the entity recognition model is allowed to repeatedly learn the text data of the entire training set until the model converges, i.e., the training is completed.
6. A text entity recognition method based on curriculum learning according to claim 1, characterized in that: In the step 4, several model checkpoints are set during the entity recognition model learning and training process; at each checkpoint, the entity recognition model is evaluated on the validation set, and the recognition accuracy and convergence of the entity recognition model at each checkpoint are compared to obtain the optimal model parameter settings.
7. A text entity recognition method based on curriculum learning according to claim 1 or 6, characterized in that: In the step five, the entity recognition model corresponding to the optimal model parameter setting is tested on the test set to evaluate whether the generalization ability of the entity recognition model meets the usage requirements.
Citation Information
Patent Citations
Named entity recognition method based on multivariate features and machine learning
CN112989830A