A method and system for named entity recognition of small sample text dataset based on Gaussian function
By using the Gaussian function to calculate the similarity between variables and prototypes in the text data set, the problem in the existing technology of poor model noise resistance and classification results being greatly affected by prototype points is solved, and the accuracy and robustness of small sample named entity recognition are improved. sex, reducing the impact of distribution differences on the prediction results.
Patent Information
- Application Number
- CN202410237440.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-01
- Publication Date
- 2024-08-27
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In existing text data sets, there are problems such as poor noise resistance of models, classification results greatly affected by prototype point selection, low prediction accuracy for unevenly distributed samples, and only rough prediction classification.
A Gaussian function is used instead of a distance function to calculate the similarity between variables and prototypes. Each entity type is derived by dividing the text dataset into a training set, a validation set, and a test set, and calculating the average of the same type of tag embeddings in the support set. The prototype calculates the Gaussian function value to improve the recognition rate and robustness of the model.
It improves the tolerance to noise values and outliers, enhances the tolerance to missing data, reduces the impact of the distribution difference between training data and test data on the prediction results, and significantly improves the precision, recall and F-value of the model.
Smart Images

Figure CN118114671B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of text dataset recognition, and in particular to a method and system for recognizing named entities in a small sample of a text dataset based on a Gaussian function. Background Art
[0002] NER is usually expressed as a list of sequences and questions. Many methods equipped with deep neural networks have achieved great success, which largely relies on a large amount of training data. However, in real life, in many cases, it is not possible to obtain enough sample data, or there is not enough manpower and time to manually label unlabeled data. Small sample learning hopes to enable machines to learn human problem-solving methods through a small number of samples. When a new category has only one or a few labeled samples, the old categories that have been learned can help predict the new category.
[0003] At present, the commonly used text databases for named entity recognition include OntoNotes, CoNLL'03, and WNUT'17. These text databases face the following two challenges: First, the database samples are insufficient; second, due to the lack of a unified benchmark database, comparison is impossible; the "FEW-NERD: A Few-shot Named Entity Recognition Dataset" dataset balances the dataset by selecting paragraphs through a remote dictionary. The dataset uses the latest nearest neighbor method to calculate the distance between the variable x and each prototype and predicts the possibility of x falling into different categories based on the distance. However, the model has poor noise resistance, the classification results are greatly affected by the selection of prototype points, the prediction accuracy for unevenly distributed samples is low, and only rough prediction classification can be performed; therefore, it is necessary to design a small sample named entity recognition method and system for text datasets based on Gaussian functions. Summary of the invention
[0004] The purpose of the present invention is to overcome the shortcomings of the prior art, in order to better and effectively solve the problems that the noise resistance of the model in the existing text data set is poor, the classification result is greatly affected by the selection of prototype points, the prediction accuracy for unevenly distributed samples is low, and only relatively rough prediction and classification can be performed. A method and system for named entity recognition of a small sample of a text data set based on a Gaussian function is provided, which realizes the use of a Gaussian function instead of a distance function to calculate the similarity between a variable and a prototype and improves the recognition rate and robustness of the model, not only improves the tolerance to noise values and outliers, but also improves the tolerance to missing data, and reduces the influence of the distribution difference between training data and test data on the prediction result.
[0005] In order to achieve the above object, the technical solution adopted by the present invention is:
[0006] A method for named entity recognition of a small sample of a text dataset based on a Gaussian function comprises the following steps:
[0007] Step A, dividing the text data set into an Etrain set, an Edev set, and an Etest set, wherein the Etrain set is a training set, the Edev set is a validation set, and the Etest set is a test set;
[0008] Step B, perform secondary partitioning on both the Etrain set and the Edev set and set the support set and the query set respectively;
[0009] Step C, learn the model in the Etrain set and calculate the average embedding of tags sharing the same type in the support set to obtain the prototype z of each entity type;
[0010] Step D, calculate each tag x in the support set of the Etrain set i Gaussian function value with each prototype z;
[0011] Step E: Use the model learned in the support set to predict the unknown data labels for the query set in the Etrain set to obtain the predicted labels;
[0012] Step F, determine whether the predicted label is the same as the prototype label with the largest Gaussian function value, if they are the same, proceed to the next step;
[0013] Step G, predict the model in the Edev set and adjust the A and μ parameters, and then determine the training model;
[0014] Step H, in the Etest set, use the determined parameters and the learned model to predict the data labels for unknown data, and compare the recall and precision of the model to complete the small sample named entity recognition task of the text dataset.
[0015] The aforementioned method for named entity recognition of a small sample of a text dataset based on a Gaussian function, step A, divides the text dataset into an Etrain set, an Edev set and an Etest set, wherein the Etrain set is a training set, the Edev set is a validation set and the Etest set is a test set, wherein the Etrain set, the Edev set and the Etest set are all non-overlapping subsets of the text dataset, the training set Etrain set is used to learn the classification method, the validation set Edev set is used to adjust the model parameters, and the test set Etest set is used to test the generalization ability of the model for unknown data.
[0016] The aforementioned method for named entity recognition of a small sample of a text dataset based on a Gaussian function, step C, learns the model in the Etrain set, and calculates the average embedding of tags sharing the same type in the support set to obtain the prototype z of each entity type, where for the i-th type, the prototype is z i , the support set is s i , and the prototype z i and support sets i The relationship between is shown in formula (1):
[0017]
[0018] Among them, f θ As encoder, set the sequence x = {x1, x2, x3, ..., x n}, and for each tag x i The encoder obtains the representation vector of each token in each sentence, as shown in formula (2):
[0019] h=[h1,...,h n ] = f θ ([x1, ..., x n ]) (2)
[0020] Among them, token is the smallest semantic unit in the text, and h is the representation vector generated by the encoder for a given sequence.
[0021] The aforementioned Gaussian function-based text dataset small sample named entity recognition method, step D, calculates each tag x in the support set of the Etrain set i The Gaussian function value of each prototype z is as follows:
[0022] Step D1: for each x in the support set i Calculate the Gaussian function value of each prototype, as shown in formula (3),
[0023]
[0024] Among them, x is the independent variable, A is the amplitude and is used to adjust the peak value of the Gaussian curve, μ(z i ) is the mean and is used to indicate the center of the Gaussian curve, σ is the standard deviation and is used to determine the width of the curve; A and σ are variable parameters, z i For the prototype of the i-th type, use the distance metric Predict the degree of similarity between the variable and each prototype, so that the distance measurement becomes a probability comparison;
[0025] Step D2, due to the simultaneous implementation of Euclidean distance and Gaussian function, the Gaussian kernel function is used as shown in formula (4):
[0026]
[0027] Among them, ‖xx′‖ 2 is the distance metric
[0028] The aforementioned method for named entity recognition of a small sample of a text dataset based on a Gaussian function, step F, determines whether the predicted label is the same as the prototype label with the largest Gaussian function value, and if they are the same, proceeds to the next step, wherein for the support set s of the type value set Y y The judgment process of variable x is shown in formula (5).
[0029] y * =arg min Gy(x), y∈Y (5).
[0030] The aforementioned method for named entity recognition of a small sample of a text dataset based on a Gaussian function, step H, uses the determined parameters and the learned model to predict the data label in the face of unknown data in the Etest set, and compares the recall rate and precision rate of the model to complete the named entity recognition task of a small sample of the text dataset, as shown in formula (6), formula (7) and formula (8),
[0031]
[0032]
[0033]
[0034] Among them, True Positives is the number of positive examples correctly predicted by the model as positive examples, False Positives is the number of actual negative examples incorrectly predicted by the model as positive examples, and False Negatives is the number of actual positive examples incorrectly predicted by the model as negative examples.
[0035] A Gaussian function-based text data set small sample named entity recognition system comprises a data set preliminary division module, a data set secondary division module, a prototype acquisition module, a Gaussian function value calculation module, a predicted label acquisition module, a label judgment module, a model building module and a named entity recognition module, wherein the data set preliminary division module is used to divide the text data set into an Etrain set, an Edev set and an Etest set, wherein the Etrain set is a training set, the Edev set is a verification set and the Etest set is a test set; the data set secondary division module is used to perform secondary division on both the Etrain set and the Edev set and respectively set a support set and a query set; the prototype acquisition module is used to learn a model in the Etrain set, and calculate the average embedding value of tags sharing the same type in the support set to obtain a prototype z of each entity type; the Gaussian function value calculation module is used to calculate each tag x in the support set in the Etrain set. i and the Gaussian function value of each prototype z; the predicted label acquisition module is used to predict the data label for the query set in the Etrain set using the model learned in the support set to obtain the predicted label; the label judgment module is used to judge whether the predicted label is the same as the prototype label with the largest Gaussian function value, and if they are the same, proceed to the next step; the model establishment module is used to predict the model in the Edev set and adjust the A and μ parameters, and then determine the training model; the named entity recognition module is used to predict the data label in the Etest set using the determined parameters and the learned model in the face of unknown data, and compare the recall rate and precision rate of the model to complete the small sample named entity recognition task of the text data set.
[0036] The beneficial effects of the present invention are as follows: a method and system for named entity recognition of a small sample of a text data set based on a Gaussian function of the present invention, firstly, divides the text data set into an Etrain set, an Edev set and an Etest set, then performs secondary division on both the Etrain set and the Edev set and sets a support set and a query set respectively, then learns the model in the Etrain set, and calculates the average embedding of tags sharing the same type in the support set to obtain the prototype of each entity type, then calculates the Gaussian function value of each tag and each prototype in the support set in the Etrain set, then uses the model learned in the support set to predict unknown data labels for the query set in the Etrain set and obtains the predicted labels, and then judges It is determined whether the predicted label is the same as the prototype label with the largest Gaussian function value. If they are the same, the next step is carried out, and then the model is predicted in the Edev set and the parameters are adjusted, and then the training model is determined. Finally, in the Etest set, the data label is predicted using the determined parameters and the learned model for unknown data, and the recall rate and precision of the model are compared to complete the named entity recognition task of a small sample of the text data set. The present invention realizes the function of using the Gaussian function instead of the distance function to calculate the similarity between the variable and the prototype and improve the recognition rate and robustness of the model, which not only improves the tolerance to noise values and outliers, but also improves the tolerance to missing data, and reduces the influence of the distribution difference between the training data and the test data on the prediction results. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 It is a flowchart of a method and system for named entity recognition of a small sample of a text data set based on a Gaussian function of the present invention;
[0038] Figure 2 is a data comparison diagram before and after the method PRECISION proposed by the present invention is applied to the INTER data set in an embodiment of the present invention;
[0039] Figure 3 is a data comparison diagram before and after the RECALL method proposed by the present invention is applied to the INTER data set in an embodiment of the present invention;
[0040] Figure 4 is a data comparison diagram of the F value before and after the method proposed by the present invention is applied to the INTER data set in an embodiment of the present invention;
[0041] Figure 5 is a data comparison diagram before and after the method PRECISION proposed by the present invention is applied to the INTRA data set in an embodiment of the present invention;
[0042] Figure 6is a data comparison diagram before and after the method RECALL proposed by the present invention is applied to the INTRA data set in an embodiment of the present invention;
[0043] Figure 7 It is a data comparison diagram of the F value before and after the method proposed by the present invention is applied to the INTRA data set in an embodiment of the present invention. DETAILED DESCRIPTION
[0044] The present invention will be further described below in conjunction with the accompanying drawings.
[0045] like Figure 1 As shown, a method for identifying named entities in a small sample of a text dataset based on a Gaussian function of the present invention comprises the following steps:
[0046] Step A, dividing the text data set into an Etrain set, an Edev set and an Etest set, wherein the Etrain set is a training set, the Edev set is a validation set and the Etest set is a test set, wherein the Etrain set, the Edev set and the Etest set are all mutually exclusive subsets in the text data set, the training set Etrain set is used to learn the classification method, the validation set Edev set is used to adjust the model parameters, and the test set Etest set is used to test the generalization ability of the model for unknown data;
[0047] Step B, perform secondary partitioning on both the Etrain set and the Edev set and set the support set and the query set respectively;
[0048] Step C, learn the model in the Etrain set and calculate the average embedding of tags sharing the same type in the support set to obtain the prototype z of each entity type, where for the i-th type, the prototype is z i , the support set is s i , and the prototype z i and support sets i The relationship between is shown in formula (1):
[0049]
[0050] Among them, f θ As encoder, set the sequence x = {x1, x2, x3, ..., x n}, and for each tag x i The encoder obtains the representation vector of each token in each sentence, as shown in formula (2):
[0051] h=[h1,...,h n ] = f θ ([x1, ..., x n ]) (2)
[0052] Among them, token is the smallest semantic unit in the text, and h is the representation vector generated by the encoder for a given sequence;
[0053] Step D, calculate each tag x in the support set of the Etrain set i The Gaussian function value of each prototype z is as follows:
[0054] Step D1: for each x in the support set i Calculate the Gaussian function value of each prototype, as shown in formula (3),
[0055]
[0056] Among them, x is the independent variable, A is the amplitude and is used to adjust the peak value of the Gaussian curve, μ(z i ) is the mean and is used to indicate the center of the Gaussian curve, σ is the standard deviation and is used to determine the width of the curve; A and σ are variable parameters, z i For the prototype of the i-th type, use the distance metric Predict the degree of similarity between the variable and each prototype, so that the distance measurement becomes a probability comparison;
[0057] Step D2, due to the simultaneous implementation of Euclidean distance and Gaussian function, the Gaussian kernel function is used as shown in formula (4):
[0058]
[0059] Among them, ‖xx′‖ 2 is the distance metric
[0060] Step E: Use the model learned in the support set to predict the unknown data labels for the query set in the Etrain set to obtain the predicted labels;
[0061] Step F, determine whether the predicted label is the same as the prototype label with the largest Gaussian function value. If they are the same, proceed to the next step, where the support set s for the type value set Y y The judgment process of variable x is shown in formula (5).
[0062] y * =arg min Gy(x), y∈Y (5);
[0063] Step G, predict the model in the Edev set and adjust the A and μ parameters, and then determine the training model;
[0064] Step H, in the Etest set, the data labels are predicted using the determined parameters and the learned model for unknown data, and the recall and precision of the model are compared to complete the named entity recognition task of a small sample of the text dataset, as shown in formulas (6), (7) and (8).
[0065]
[0066]
[0067]
[0068] Among them, True Positives is the number of positive examples correctly predicted by the model as positive examples, False Positives is the number of actual negative examples incorrectly predicted by the model as positive examples, and False Negatives is the number of actual positive examples incorrectly predicted by the model as negative examples.
[0069] A Gaussian function-based text data set small sample named entity recognition system comprises a data set preliminary division module, a data set secondary division module, a prototype acquisition module, a Gaussian function value calculation module, a predicted label acquisition module, a label judgment module, a model building module and a named entity recognition module, wherein the data set preliminary division module is used to divide the text data set into an Etrain set, an Edev set and an Etest set, wherein the Etrain set is a training set, the Edev set is a verification set and the Etest set is a test set; the data set secondary division module is used to perform secondary division on both the Etrain set and the Edev set and respectively set a support set and a query set; the prototype acquisition module is used to learn a model in the Etrain set, and calculate the average embedding value of tags sharing the same type in the support set to obtain a prototype z of each entity type; the Gaussian function value calculation module is used to calculate each tag x in the support set in the Etrain set. i and the Gaussian function value of each prototype z; the predicted label acquisition module is used to predict the data label for the query set in the Etrain set using the model learned in the support set to obtain the predicted label; the label judgment module is used to judge whether the predicted label is the same as the prototype label with the largest Gaussian function value, and if they are the same, proceed to the next step; the model establishment module is used to predict the model in the Edev set and adjust the A and μ parameters, and then determine the training model; the named entity recognition module is used to predict the data label in the Etest set using the determined parameters and the learned model in the face of unknown data, and compare the recall rate and precision rate of the model to complete the small sample named entity recognition task of the text data set.
[0070] To better illustrate the use effect of the present invention, a specific embodiment of the present invention is introduced below. S1, three benchmarks are used to divide Etrain, Edev and Etest;
[0071] Few-NERD (SUP) is a standard supervised learning model. All corpora are randomly sampled, with 70% as training set, 10% as validation set and 20% as test set. All three sets contain 66 fine-grained entity classes.
[0072] Few-NERD (INTRA) is a classification based on coarse-grained entities. The training set is People, MISC, Art, and Product, the validation set is Event and Building, and the test set is ORG and LOC.
[0073] Few-NERD (INTER) is divided according to fine-grainedness. In each coarse-grained class, 60% of the fine-grained entity classes are randomly selected as the training set, and then 20% of each coarse-grained class is randomly selected as the validation set and 20% as the test set;
[0074] The contents of Few-NERD(SUP), Few-NERD(INTRA) and Few-NERD(INTER) datasets are shown in Table 1;
[0075] Table 1. Contents of three datasets
[0076]
[0077] S2, conduct N-way-K-shot training and uniformly use the structshot model,
[0078] Use the inter set to perform N-way-K-shot and customize the parameters, and then divide the support set, query set, Etrain, Edev, and Etest;
[0079] Use the intra set for N-way-K-shot and customize the parameters, and then divide it into support set, query set, Etrain, Edev, and Etest;
[0080] S3, calculate each type of prototype;
[0081] S4, supports the centralized use of Gaussian kernel function to predict categories;
[0082] S5. Predict unknown data labels in the query set;
[0083] S6. Calculate the loss, recall, precision and f-value in the Etest set;
[0084] The experimental data of applying the method of the present invention to the Few-NERD (INTRA) and Few-NERD (INTER) data sets are shown in Table 2 and Table 3, respectively.
[0085] Table 2. Experimental data of the method proposed in the present invention in the INTRA dataset
[0086]
[0087] Table 3. Experimental data of the method proposed in the present invention in the INTER dataset
[0088]
[0089] The Gaussian function-based small sample named entity recognition method proposed in the present invention is used in the INTER data set: in the 10-way-1-1 model training, the precision rate reaches 0.0641, the recall rate reaches 0.0322, and the F value reaches 0.0429; in the 10-way-5-1 model training, the precision rate reaches 0.0448, the recall rate reaches 0.0179, and the F value reaches 0.0256. In small sample learning, the application of Gaussian kernel function can greatly reduce the loss of the model during training, making the prediction of training data as close to the actual label as possible, and enhancing the training of the model; compared with the use of Euclidean distance, in the 10-way test, the performance of the model is greatly improved, the model is more accurate in predicting positive examples, and the recognition ability of positive examples is also stronger.
[0090] In summary, a method and system for named entity recognition of a small sample of a text data set based on a Gaussian function of the present invention first divides the text data set into an Etrain set, an Edev set, and an Etest set, then performs secondary division on both the Etrain set and the Edev set and sets a support set and a query set respectively, then learns the model in the Etrain set, and calculates the average embedding of tags sharing the same type in the support set to obtain a prototype of each entity type, and then calculates the Gaussian function value of each tag and each prototype of the support set in the Etrain set, and then uses the model learned in the support set for the query set in the Etrain set to predict unknown data labels and obtain predicted labels, and then judges the predicted Whether the label is the same as the prototype label with the largest Gaussian function value, if the same, proceed to the next step, then predict the model in the Edev set and adjust the parameters, then determine the training model, and finally use the determined parameters and the learned model to predict the data label in the Etest set facing unknown data, and compare the recall rate and precision rate of the model to complete the named entity recognition operation of the small sample of the text data set; the present invention realizes the function of using the Gaussian function instead of the distance function to calculate the similarity between the variable and the prototype and improve the recognition rate and robustness of the model, which not only improves the tolerance for noise values and outliers, but also improves the tolerance for missing data, and reduces the impact of the distribution difference between the training data and the test data on the prediction results. The experimental results show that the optimized model has achieved significant improvements in precision, recall and F value.
[0091] The above shows and describes the basic principles, main features and advantages of the present invention. It should be understood by those skilled in the art that the present invention is not limited to the above embodiments. The above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention to be protected. The scope of protection of the present invention is defined by the attached claims and their equivalents.
Claims
1. A method for named entity recognition of a small sample of a text dataset based on a Gaussian function, characterized by: The following steps are included: Step A, dividing the text data set into an Etrain set, an Edev set, and an Etest set, wherein the Etrain set is a training set, the Edev set is a validation set, and the Etest set is a test set; Step B, perform secondary partitioning on both the Etrain set and the Edev set and set the support set and the query set respectively; Step C, learn the model in the Etrain set and calculate the average embedding of tags sharing the same type in the support set to obtain the prototype z of each entity type, where for the i-th type, the prototype is z i , the support set is s i , and the prototype z i and support sets i The relationship between is shown in formula (1): Among them, f θ As encoder, set the sequence x = {x1, x2, x3, ..., x n }, and for each tag x i The encoder obtains the representation vector of each token in each sentence, as shown in formula (2): h=[h1,...,h n ]=f θ ([x1,...,x n ]) (2) Among them, token is the smallest semantic unit in the text, and h is the representation vector generated by the encoder for a given sequence; Step D, calculate each tag x in the support set of the Etrain set i The Gaussian function value of each prototype z is as follows: Step D1: for each x in the support set i Calculate the Gaussian function value of each prototype, as shown in formula (3), Among them, x i is the independent variable, A is the amplitude and is used to adjust the peak value of the Gaussian curve, μ is the mean and is used to indicate the center of the Gaussian curve, σ is the standard deviation and is used to determine the width of the curve; A and σ are variable parameters, z i For the prototype of the i-th type, use the distance metric Predict the degree of similarity between the variable and each prototype, so that the distance measurement becomes a probability comparison; Step D2, due to the simultaneous implementation of Euclidean distance and Gaussian function, the Gaussian kernel function is used as shown in formula (4): Among them, ‖xx′‖ 2 is the distance metric Step E: Use the model learned in the support set to predict the unknown data labels for the query set in the Etrain set to obtain the predicted labels; Step F, determine whether the predicted label is the same as the prototype label with the largest Gaussian function value, if they are the same, proceed to the next step; Step G, predict the model in the Edev set and adjust the A and μ parameters, and then determine the training model; Step H, in the Etest set, use the determined parameters and the learned model to predict the data labels for unknown data, and compare the recall and precision of the model to complete the small sample named entity recognition task of the text dataset.
2. The method for named entity recognition of a small sample of a text dataset based on a Gaussian function according to claim 1, characterized in that: Step A, dividing the text data set into an Etrain set, an Edev set and an Etest set, wherein the Etrain set is a training set, the Edev set is a validation set and the Etest set is a test set, wherein the Etrain set, the Edev set and the Etest set are all non-overlapping subsets of the text data set, the training set Etrain set is used to learn the classification method, the validation set Edev set is used to adjust the model parameters, and the test set Etest set is used to test the generalization ability of the model for unknown data.
3. The method for named entity recognition of a small sample of a text dataset based on a Gaussian function according to claim 2, characterized in that: Step F, determine whether the predicted label is the same as the prototype label with the largest Gaussian function value. If they are the same, proceed to the next step, where the support set s for the type value set Y y The judgment process of variable x is shown in formula (5). the * =arg min Gy(x),y∈Y (5)。 4. The method for named entity recognition of a small sample of a text dataset based on a Gaussian function according to claim 3, characterized in that: Step H, in the Etest set, the data labels are predicted using the determined parameters and the learned model for unknown data, and the recall and precision of the model are compared to complete the named entity recognition task of a small sample of the text dataset, as shown in formulas (6), (7) and (8). Among them, TruePositives is the number of positive examples correctly predicted by the model as positive examples, FalsePositives is the number of actual negative examples incorrectly predicted by the model as positive examples, and FalseNegatives is the number of actual positive examples incorrectly predicted by the model as negative examples.
5. A named entity recognition system for a small sample of a text dataset based on a Gaussian function, wherein the recognition process of the recognition system is based on the recognition method according to any one of claims 1 to 4, characterized in that: It includes a data set preliminary division module, a data set secondary division module, a prototype acquisition module, a Gaussian function value calculation module, a prediction label acquisition module, a label judgment module, a model building module and a named entity recognition module, wherein the data set preliminary division module is used to divide the text data set into an Etrain set, an Edev set and an Etest set, wherein the Etrain set is a training set, the Edev set is a verification set and the Etest set is a test set; The data set secondary partitioning module is used to perform secondary partitioning on both the Etrain set and the Edev set and set the support set and the query set respectively; The prototype acquisition module is used to learn the model in the Etrain set, and calculate the average value of embeddings sharing the same type of tags in the support set to obtain the prototype z of each entity type; The Gaussian function value calculation module is used to calculate each mark x of the support set in the Etrain set i Gaussian function value with each prototype z; The predicted label acquisition module is used to predict the data labels of the query set in the Etrain set using the model learned in the support set to obtain the predicted labels; The label judgment module is used to judge whether the predicted label is the same as the prototype label with the largest Gaussian function value, and if they are the same, proceed to the next step; The model building module is used to predict the model in the Edev set and adjust the A and μ parameters, and then determine the training model; The named entity recognition module is used to predict data labels using the determined parameters and the learned model in the Etest set when facing unknown data, and compare the recall rate and precision rate of the model to complete the named entity recognition task of a small sample of the text dataset.
