Semi-supervised named entity recognition method based on domain rules

By extracting domain feature words from corpora in different fields and constructing co-occurrence relationships, generating a rule base, and using unlabeled data to generate pseudo labels, it solves the problems of low accuracy of named entity recognition and slow model convergence in the existing technology, and achieves Efficient named entity recognition when annotated data is limited.

CN118657150APending Publication Date: 2024-09-17TAIYUAN UNIVERSITY OF TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410966395.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-18
Publication Date
2024-09-17

AI Technical Summary

Technical Problem

Existing rule-based semi-supervised named entity recognition methods have problems such as low recognition accuracy and slow model convergence speed, especially when the annotation data is limited, and it is especially difficult to effectively identify named entities in professional fields such as medicine.

Method used

By extracting domain feature words from corpora in different fields, construct the co-occurrence relationship between domain feature words and entities, generate a rule base, and use unlabeled data to generate pseudo labels, iteratively train the model, and improve the recognition accuracy and convergence speed of the model.

Benefits of technology

Effectively extract domain information features, quickly and efficiently generate high-quality pseudo-labels, improve the recognition accuracy and convergence speed of the model, and solve the problems of low recognition accuracy and slow model convergence speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118657150A
    Figure CN118657150A
Patent Text Reader

Abstract

The invention belongs to the technical field of information extraction, and particularly relates to a semi-supervised named entity recognition method based on domain rules. The method solves the problems that in the prior art, the recognition precision is not high, and the model convergence speed is low. The method comprises the steps that S1, domain feature words are extracted from corpora of different domains; s2, constructing a co-occurrence relationship between domain feature words and entities from a small amount of annotation data; s3, correlation analysis is carried out on all the co-occurrence relations, and the co-occurrence relations with high correlation degree are converted into corresponding rules to form a rule base; s4, generating an entity candidate set and a rule candidate set by using the unlabeled data; s5, performing rule matching on the entity candidate set in the appearing sentences by using rules in the rule base; s6, selecting a pseudo tag set; s7, performing a round of training on the neural network model by using the pseudo label training set; s8, obtaining a trained model; and S9, performing entity recognition on the verification set by using the trained model to obtain an entity recognition result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of information extraction, and specifically is a semi-supervised named entity recognition method based on domain rules. Background Art

[0002] Named entity recognition aims to identify entities such as names of people, places, and organizations and their categories from unstructured texts, and is an important task for information extraction. Currently, rule-based named entity recognition methods and machine learning-based named entity recognition methods often require a lot of manpower to establish rules or design features. Although deep learning named entity recognition methods can learn rules and extract features in an automated way, they still require a large amount of high-quality annotated data to train the model in order to achieve good recognition results. Although large-model-based named entity recognition methods can achieve good entity recognition results in common fields, the recognition effect in professional fields still needs to be improved.

[0003] The lack of labeled data has become the biggest obstacle that hinders deep learning models from being used for named entity recognition tasks. In some specific contexts (such as languages ​​with scarce language data such as Indonesian) or fields (such as the medical field), the labeled data is quite limited, but in these fields, it is easy to obtain unlabeled data containing a large amount of entity information. For example, papers in the medical field contain a large number of unlabeled entities such as diseases and drugs. How to use a small amount of labeled data and a large amount of unlabeled data to train models and perform named entity recognition has become an urgent problem to be solved.

[0004] Semi-supervised learning uses labeled data to give unlabeled sample data "pseudo-labels" as training data to make up for the problem of insufficient training due to the small number of samples. The rule-based named entity recognition method has good interpretability and high entity recognition efficiency. Its main idea is to use a pre-constructed dictionary and rule base to identify entities in the dictionary and entities that match the rules. Compared with manually annotated data, less manpower is required to complete the design of rules. When the rules are reasonably designed, the rule-based named entity recognition method can have a high entity recognition rate. Applying the rule-based method to semi-supervised named entity recognition and iteratively generating new rules through the semi-supervised model not only further liberates manpower, but also enhances the interpretability of the pseudo-label annotation results, and ultimately enables the model to achieve good recognition results.

[0005] Existing rule-based semi-supervised named entity recognition methods have good interpretability, but they have problems such as low recognition accuracy and slow model convergence. Summary of the invention

[0006] In order to solve the problems of low recognition accuracy and slow model convergence speed in the prior art, the present invention provides a semi-supervised named entity recognition method based on domain rules.

[0007] The present invention adopts the following technical solution: a semi-supervised named entity recognition method based on domain rules, comprising: S1: Extract domain feature words from corpora in different fields; The domain characteristic words are common words in the target domain; S2: Construct the co-occurrence relationship between domain feature words and entities from a small amount of annotated data; The co-occurrence relationship includes entities, domain feature words and co-occurrence modes; S3: Perform correlation analysis on all co-occurrence relationships, and convert the co-occurrence relationships with high correlation into corresponding rules to form a rule base; S4: Generate entity candidate sets and rule candidate sets using unlabeled data; The unlabeled data can come from a public dataset or can be directly converted from the corpus of the target domain; The entity candidate set includes all entities that may appear in the unlabeled dataset; The rule candidate set includes all rules that may appear in the unlabeled data set; S5: Use the rules in the rule base to match the entity candidate set in the sentences in which it appears, and obtain a set of pseudo labels for unlabeled entities; The pseudo-label set includes entities and their types matched with any rule in the rule base; S6: Select the pseudo label set and retain the pseudo labels with accuracy higher than the threshold as the pseudo label training set; S7: Perform one round of training on the neural network model using the pseudo-label training set; S8: When the model training rounds do not meet the requirements, the rules in the rule candidate set are scored and the rules with higher scores are selected to be added to the rule base, and the process returns to S5 for the next round of training; if the training rounds meet the requirements, the training is terminated and a trained model is obtained; S9: Use the trained model to perform entity recognition on the validation set to obtain the entity recognition results.

[0008] In some embodiments, step S1 includes: S11: Count the occurrence frequencies of words in the texts of various fields, and select words with higher occurrence frequencies as the word frequency information table of the field.

[0009] S12: deleting the words and their word frequencies that appear simultaneously in the word frequency information tables of other fields from the word frequency information table of the target field, and taking the remaining words in the word frequency information table as field feature words.

[0010] In some embodiments, step S2 includes: S21: Count the words similar to the domain feature words and record them as domain feature words; S22: Search for domain feature words adjacent to the entity in a small amount of annotated data, and convert them into a co-occurrence relationship with the entity after finding them.

[0011] In some embodiments, step S3 includes: S31: Perform correlation analysis on all co-occurrence relationships and calculate correlation scores; S32: Convert the co-occurrence relationships with higher scores into rules and add them to the rule base.

[0012] In some embodiments, step S4 includes: S41: enumerate all words that may appear in the unlabeled data set and whose span does not exceed a predetermined length as an entity candidate set; S42: Extract rules from the unlabeled dataset as a rule candidate set.

[0013] In some embodiments, step S41 specifically includes: for any sentence in the unlabeled data set, first, exhaustively enumerate all words with an entity span length of 1 and add them to the entity candidate set, then increase the entity span length i to i+1 and exhaustively enumerate all words with an entity span length equal to i+1 and add them to the entity candidate set, and repeat the above process until the entity span length i reaches a predetermined length.

[0014] In some embodiments, step S6 includes: S61: Calculate the maximum similarity and average similarity between any given pseudo-label entity and entities in a certain category of pseudo-label training set; S62: Calculate a confidence score according to the maximum similarity and the average similarity; S63: If the confidence score of the pseudo-label entity is greater than a certain threshold, the pseudo-label entity is added to the pseudo-label training set.

[0015] In some embodiments, step S7 includes: S71: Use the pre-trained language model to calculate all span entities of sentences in the unlabeled dataset; S72: Use BiLSTM network model and self-attention layer to calculate the context embedding of sentences; S73: Calculate the embedding of pseudo-label entities in the pseudo-label training set; S74: Use a multi-layer perceptron to calculate and predict the category of the pseudo-label entity and obtain the probability value of belonging to this category.

[0016] In some embodiments, step S8 includes: S81: Determine whether the training rounds meet the requirements. If the training rounds do not meet the requirements, proceed to step S82; if the training rounds meet the requirements, proceed to step S9; S82: Score the rules in the rule candidate set and select the rules with higher scores to add to the rule base.

[0017] In some embodiments, step S82 includes: S821: Sort the top 70% most confident entities in each category according to their probability values; S822: Calculate the confidence score of the rule; S823: selecting a certain number of rules for each entity category from the rule candidate library according to the confidence score, and adding them to the rule library; S824: Return to step S5 to perform the next round of training.

[0018] A semi-supervised named entity recognition system based on domain rules, comprising: A domain feature word extraction module is used to extract and store domain feature words from the target domain; The co-occurrence relationship extraction module is used to extract and store the co-occurrence relationship between domain feature words and entities from a small amount of annotated data; A rule base construction module is used to perform correlation analysis on co-occurrence relationships, convert co-occurrence relationships with high correlation into corresponding rules, store the rules, and construct a rule base; The entity candidate set generation module is used to extract all possible entities in the unlabeled data and form them into an entity candidate set; The rule candidate set generation module is used to extract all possible rules that may appear in the unlabeled data and form them into a rule candidate set; The rule matching module is used to match all possible entities in the unlabeled data with the rules in the rule base to obtain a set of pseudo labels for the unlabeled entities; The pseudo-label selection module is used to select the pseudo-label set and only retain the pseudo-labels with higher accuracy as the pseudo-label training set; The model training module is used to train the BERT-BiLSTM-MLP model using the pseudo-label training set as input to obtain a trained model; A rule selection module is used to score the rules in the rule candidate set and select the rules with higher scores to be added to the rule base; The model verification module is used to perform entity recognition on the verification set of the trained model to obtain the entity recognition result.

[0019] Compared with the prior art, the present invention has the following beneficial effects: the present invention constructs the co-occurrence relationship between domain feature words and entities from corpora of different fields, and abstracts it into rules to form a rule base, so as to effectively extract the information features contained in the entities in the field, and quickly and efficiently finds a batch of high-quality pseudo-labels through the rule base containing these information features to enter the neural network model for training, thereby accelerating the convergence speed of the model and improving the recognition accuracy of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 This is a flowchart of the semi-supervised named entity recognition method based on domain rules; Figure 2 This is a system structure diagram of the semi-supervised named entity recognition method based on domain rules. DETAILED DESCRIPTION

[0021] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments; based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0022] The present invention provides a semi-supervised named entity recognition method based on domain rules, such as Figure 1 As shown, the following steps are included: Step S1: extracting domain feature words from corpora in different fields; Step S1 specifically includes: Step S11: Count the occurrence frequencies of words in the texts of various fields, and select words with higher occurrence frequencies as the word frequency information table of the field.

[0023] Specifically, for each field that needs statistics, first count the frequency of all words in the field, then sort the words from high to low according to the frequency of their occurrence, and finally select the words whose frequency of occurrence is greater than a certain threshold as the word frequency information. This threshold has different values ​​depending on the field.

[0024] Step S12: Delete the words and their frequencies that co-occur in the word frequency information tables of other fields from the word frequency information table of the target field, and use the remaining words in the word frequency information table as field feature words.

[0025] A specific embodiment is given below: All the sentences in the training set of the bc5cdr dataset are collected together as the corpus in the medical field, and all the sentences in the training set of the conll2003 dataset are collected together as the corpus in the daily life field. For the high-frequency words treatment, dose, drug, day, and result in the medical field, their frequencies of occurrence in the medical field corpus are 357 times, 344 times, 284 times, 270 times, and 262 times respectively; and the words day and result are also high-frequency words in the daily life field corpus, with word frequencies of 108 times and 87 times respectively. We delete day and result and their word frequencies in the high-frequency words in the medical field, and retain treatment, dose, and drug as characteristic words in the medical field.

[0026] Step S2: construct the co-occurrence relationship between domain feature words and entities from a small amount of annotated data; Step S2 specifically includes: Step S21: Count words similar to the domain feature words and record them as domain feature words; Specifically, we use the BERT model (or SciBERT model) to encode domain feature words and possible similar words. If the cosine similarity of two word vectors is greater than a certain threshold, we consider the two words to be similar. The above threshold has different values ​​depending on the domain.

[0027] Step S22: Search for domain feature words adjacent to the entity in a small amount of annotated data, and convert them into a co-occurrence relationship with the entity after finding them.

[0028] Specifically, if a word is adjacent to an entity and is a domain feature word, then the word and the entity are considered to satisfy a co-occurrence relationship. A word can be considered adjacent to an entity directly or after removing stop words; a co-occurrence relationship is an object that contains three attributes: entity, domain feature word, and co-occurrence mode.

[0029] A specific example is given below: In the sentence President Bill Clinton's triumphal appearance at the Democratic convention..., Bill Clinton is an entity, President is a domain feature word, and is adjacent to the entity, so it can be converted into a co-occurrence relationship: (Person class entity: BillClinton; domain feature word: President; co-occurrence mode: pre), where pre means that the domain feature word appears before the entity.

[0030] Step S3: Perform correlation analysis on all co-occurrence relationships, and convert co-occurrence relationships with high correlation into corresponding rules to form a rule base; Step S3 specifically includes: Step S31: performing correlation analysis on all co-occurrence relationships and calculating correlation scores; Specifically, the geometric mean of the lift and support of the entity and the feature candidate word in the corpus is calculated as the relevance score, that is, Among them: A represents the set of all sentences containing entity a, B represents the set of all sentences containing feature candidate word b, and N represents the set of all sentences.

[0031] Step S32: Convert the co-occurrence relationships with higher scores into rules and add them to the rule base.

[0032] Specifically, if the score is greater than a certain threshold, it is converted into a rule with the format of "p ->q" (or if p then q), where q represents the target entity category and p represents the matching condition. The rule is then added to the rule base.

[0033] A specific example is given below: For a co-occurrence relationship (Person-type entity: Bill Clinton; domain feature word: President; co-occurrence mode: pre), a rule can be extracted: PreNgram == "President" ∧ POSTag == "PROPN PROPN" → Person. This rule indicates that if the entity prefix is ​​"President" and the entity part of speech is "PROPN PROPN", then the entity is a Person-type entity. This rule is then added to the rule base.

[0034] Step S4: Generate entity candidate sets and rule candidate sets using the unlabeled dataset.

[0035] Step S4 specifically includes: Step S41: Enumerate all possible words in the unlabeled data set whose span does not exceed a predetermined length as an entity candidate set.

[0036] Specifically, for any sentence in the unlabeled dataset, first, exhaustively enumerate all words with an entity span length of 1 and add them to the entity candidate set. Then, increase the entity span length i to i+1 and exhaustively enumerate all words with an entity span length equal to i+1 and add them to the entity candidate set. Repeat the above process until the entity span length i reaches the predetermined length.

[0037] Step S42: extracting rules from the unlabeled data set as a rule candidate set.

[0038] Specifically, for each sentence in the dataset, all candidate entities in the sentence that exist in the entity candidate set are enumerated, and the context, part of speech, and dependency relationships of the entities are extracted as rules and added to the rule candidate set.

[0039] Step S5: Use the rules in the rule base to match the entity candidate entities in the sentences in which they appear, and obtain a set of pseudo labels for the unlabeled entities.

[0040] Specifically, the rules in the rule base are applied to all candidate entities in the entity candidate set, and pseudo-labeling is performed by matching the rules in the original text. If multiple rules match it, the category pointed to by the majority of rules is selected as its true entity class.

[0041] Step S6: Select the pseudo-label set and retain the pseudo-labels with higher accuracy as the pseudo-label training set.

[0042] Step S6 specifically includes: Step S61: Calculate the maximum similarity and average similarity between any given pseudo-label entity and entities in a certain category of pseudo-label training set.

[0043] Specifically, first, the average embedding value of all words in the entity is used as the embedding value of the pseudo-label entity, where the embedding value of each word is the average value of the output of the first three layers of the pre-trained language model; then, for any given category, the cosine similarity between each entity in the pseudo-label training set of the category and the pseudo-label entity is calculated, and the maximum value is taken as the local score, and the average value is taken as the global score.

[0044] Step S62: Calculate a confidence score based on the maximum similarity and the average similarity.

[0045] Specifically, the geometric mean of the maximum similarity and the average similarity is taken as the confidence score.

[0046] Step S63: If the confidence score of the pseudo-label entity is greater than a certain threshold, the pseudo-label entity is added to the pseudo-label training set.

[0047] Specifically, a dynamically changing threshold may be set to take into account both the diversity and accuracy of entities.

[0048] Step S7: Perform a round of training on the neural network model using the pseudo-label training set; the neural network model is a model with BiLSTM as the main architecture.

[0049] Step S7 specifically includes: Step S71: Use the pre-trained language model to calculate all span entities of the sentences in the unlabeled dataset.

[0050] Step S72: Use BiLSTM and self-attention layer to calculate the context embedding of the sentence.

[0051] Step S73: Calculate the embedding of the pseudo-label entities in the pseudo-label training set.

[0052] Specifically, for a given sentence x=[w1,w2,…,w n ], span si=[w bi ,w bi+1 ,…,w ei ], where bi and ei are the start index and end index respectively. The entity representation consists of two parts: the content representation vector z c (i) and the boundary representation vector z u (i), where the content representation vector represents the weighted average of all word embeddings, and the boundary representation vector represents the embedding of the entity start position information and end position information. The detailed processing process is as follows: c1,c2,…,c n =TokenReper(w1,w2,…w n ), u1,u2,…,u n =BiLSTM(c1,c2,…,c n ), z c (i) = SelfAttn(c bi ,c bi+1 ,…,c ei ), z u (i)=[u bi ,u ei ], z(i)=[z c (i),z u (i)]; TokenReper represents the encoder, which can choose a non-contextual encoder such as Glove or a contextual encoder such as BERT. BiLSTM is a bidirectional long short-term memory neural network, and SelfAttn is a self-attention model.

[0053] Step S74: Use a multi-layer perceptron to calculate and predict the category of the pseudo-label entity and obtain the probability value of belonging to this category.

[0054] Specifically, use O i =softmax(MLP span (z i )) to predict all span labels, where O i is the result of span prediction.

[0055] Step S8: When the model training rounds do not meet the requirements, the rules in the rule candidate set are scored and the rules with higher scores are selected to be added to the rule base, and return to S5 for the next round of training; if the training rounds meet the requirements, the training is terminated to obtain a trained model.

[0056] Step S8 specifically includes: Step S81: Determine whether the training rounds meet the requirements. If the training rounds do not meet the requirements, proceed to step S82; if the training rounds meet the requirements, proceed to step S9.

[0057] Step S82: Score the rules in the rule candidate set and select the rules with higher scores to add to the rule base.

[0058] Step S82 specifically includes: Step S821: Sort the top 70% most confident entities in each category according to the above probability values.

[0059] Step S822: Calculate the confidence score of the rule.

[0060] Step S823: Select a certain number of rules for each entity category from the rule candidate library according to the confidence score, and add them to the rule library.

[0061] Step S824: Return to S5 to perform the next round of training.

[0062] Step S9: Use the trained model to perform entity recognition on the verification set to obtain entity recognition results.

[0063] The present invention provides a semi-supervised named entity recognition system based on domain rules, such as Figure 2 As shown, including: A domain feature word extraction module is used to extract and store domain feature words from the target domain; The co-occurrence relationship extraction module is used to extract and store the co-occurrence relationship between domain feature words and entities from a small amount of annotated data; A rule base construction module is used to perform correlation analysis on co-occurrence relationships, convert co-occurrence relationships with high correlation into corresponding rules, store the rules, and construct a rule base; The entity candidate set generation module is used to extract all possible entities in the unlabeled data and form them into an entity candidate set; The rule candidate set generation module is used to extract all possible rules that may appear in the unlabeled data and form them into a rule candidate set; The rule matching module is used to match all possible entities in the unlabeled data with the rules in the rule base to obtain a set of pseudo labels for the unlabeled entities; The pseudo-label selection module is used to select the pseudo-label set and only retain the pseudo-labels with higher accuracy as the pseudo-label training set; The model training module is used to train the BERT-BiLSTM-MLP model using the pseudo-label training set as input to obtain a trained model; A rule selection module is used to score the rules in the rule candidate set and select the rules with higher scores to be added to the rule base; The model verification module is used to perform entity recognition on the verification set of the trained model to obtain the entity recognition result.

[0064] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A semi-supervised named entity recognition method based on domain rules, characterized in that: include: S1: Extract domain feature words from corpora in different fields; The domain characteristic words are common words in the target domain; S2: Construct the co-occurrence relationship between domain feature words and entities from a small amount of annotated data; The co-occurrence relationship includes entities, domain feature words and co-occurrence modes; S3: Perform correlation analysis on all co-occurrence relationships, and convert the co-occurrence relationships with high correlation into corresponding rules to form a rule base; S4: Generate entity candidate sets and rule candidate sets using unlabeled datasets; The unlabeled data can come from a public dataset or can be directly converted from the corpus of the target domain; The entity candidate set includes all entities that may appear in the unlabeled dataset; The rule candidate set includes all rules that may appear in the unlabeled data set; S5: Use the rules in the rule base to match the entity candidate set in the sentences in which it appears, and obtain a set of pseudo labels for unlabeled entities; The pseudo-label set includes entities and their types matched with any rule in the rule base; S6: Select the pseudo label set and retain the pseudo labels with accuracy higher than the threshold as the pseudo label training set; S7: Perform one round of training on the neural network model using the pseudo-label training set; S8: When the model training rounds do not meet the requirements, the rules in the rule candidate set are scored and the rules with higher scores are selected to be added to the rule base, and the process returns to S5 for the next round of training; if the training rounds meet the requirements, the training is terminated and a trained model is obtained; S9: Use the trained model to perform entity recognition on the validation set to obtain the entity recognition results.

2. The method for semi-supervised named entity recognition based on domain rules according to claim 1, characterized in that: The step S1 comprises: S11: Count the frequency of occurrence of words in the texts of various fields, and select words with higher frequency of occurrence as the word frequency information table of the field; S12: deleting the words and their word frequencies that appear simultaneously in the word frequency information tables of other fields from the word frequency information table of the target field, and taking the remaining words in the word frequency information table as field feature words.

3. The method for semi-supervised named entity recognition based on domain rules according to claim 2, characterized in that: The step S2 comprises: S21: Count the words similar to the domain feature words and record them as domain feature words; S22: Search for domain feature words adjacent to the entity in a small amount of annotated data, and convert them into a co-occurrence relationship with the entity after finding them.

4. The method for semi-supervised named entity recognition based on domain rules according to claim 3 is characterized in that: The step S3 comprises: S31: Perform correlation analysis on all co-occurrence relationships and calculate correlation scores; S32: Convert the co-occurrence relationships with higher scores into rules and add them to the rule base.

5. The method for semi-supervised named entity recognition based on domain rules according to claim 4, characterized in that: The step S4 comprises: S41: enumerate all words that may appear in the unlabeled data set and whose span does not exceed a predetermined length as an entity candidate set; S42: Extract rules from the unlabeled dataset as a rule candidate set.

6. The method for semi-supervised named entity recognition based on domain rules according to claim 5, characterized in that: The step S41 specifically includes: for any sentence in the unlabeled data set, first, exhaustively enumerate all words with an entity span length of 1 and add them to the entity candidate set, then increase the entity span length i to i+1 and exhaustively enumerate all words with an entity span length equal to i+1 and add them to the entity candidate set, and repeat the above process until the entity span length i reaches a predetermined length.

7. The method for semi-supervised named entity recognition based on domain rules according to claim 6, characterized in that: The step S6 comprises: S61: Calculate the maximum similarity and average similarity between any given pseudo-label entity and entities in a certain category of pseudo-label training set; S62: Calculate a confidence score according to the maximum similarity and the average similarity; S63: If the confidence score of the pseudo-label entity is greater than a certain threshold, the pseudo-label entity is added to the pseudo-label training set.

8. The method for semi-supervised named entity recognition based on domain rules according to claim 7, characterized in that: The step S7 comprises: Step S71: using the pre-trained language model to calculate all span entities of the sentences in the unlabeled dataset; Step S72: Use the BiLSTM network model and the self-attention layer to calculate the context embedding of the sentence; Step S73: Calculate the embedding of the pseudo-label entities in the pseudo-label training set; Step S74: Use a multi-layer perceptron to calculate and predict the category of the pseudo-label entity and obtain the probability value of belonging to this category.

9. The method for semi-supervised named entity recognition based on domain rules according to claim 8, characterized in that: The step S8 comprises: S81: Determine whether the training rounds meet the requirements. If the training rounds do not meet the requirements, proceed to step S82; if the training rounds meet the requirements, proceed to step S9; S82: Score the rules in the rule candidate set and select the rules with higher scores to add to the rule base.

10. The method for semi-supervised named entity recognition based on domain rules according to claim 9, characterized in that: The step S82 comprises: S821: Sort the top 70% most confident entities in each category according to their probability values; S822: Calculate the confidence score of the rule; S823: Selecting a certain number of rules for each entity category from the rule candidate library according to the confidence score, and adding them to the rule library; S824: Return to step S5 to perform the next round of training.