Entity recognition corpus annotation method, system, device and storage medium

Through the union and intersection processing of entity recognition models, tools and rules, the problem of heavy manual annotation workload in the existing technology is solved, the accuracy of entity recognition in specific fields is improved, and it is suitable for corpus annotation needs in specific fields.

CN110750990BActive Publication Date: 2024-09-06PING AN TECH (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201910875551.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-09-17
Publication Date
2024-09-06
Estimated Expiration
2039-09-17

AI Technical Summary

Technical Problem

Existing entity recognition algorithms require a large amount of manual annotation data, especially for new words and proper nouns in specific fields, which have poor recognition results, resulting in a heavy workload of manual annotation, and the corpus in general fields cannot meet the needs of specific fields.

Method used

A semi-automatic annotation method is adopted to identify the corpus to be recognized through entity recognition models, recognition tools and recognition rules, and perform union and intersection processing to improve the accuracy of text recognition annotation and reduce the workload of manual annotation.

Benefits of technology

It improves the accuracy of text recognition annotation, reduces the workload of manual annotation, and is suitable for entity recognition needs in specific fields.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN110750990B
    Figure CN110750990B
Patent Text Reader

Abstract

The present invention relates to the field of semantic parsing technology, and proposes a semi-automatic annotation method, system, device and storage medium for entity recognition corpus, wherein the method includes obtaining model training data, training an entity recognition model based on the model training data; at the same time, obtaining a recognition tool, and setting a recognition rule; inputting the corpus to be recognized into the trained entity recognition model, recognition tool and recognition rule respectively for entity recognition, and obtaining corresponding recognition results; grouping the recognition results of the entity recognition model, recognition tool and recognition rule in pairs, and performing a union process on the two recognition results in each group to obtain a corresponding union result; performing an intersection process on each union result to obtain the final recognition result of the corpus to be recognized. The present invention can improve the accuracy of text recognition annotation and greatly reduce the workload of manual annotation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of semantic parsing technology, and in particular to a semi-automatic annotation method, system, device and computer-readable storage medium for entity recognition corpus. Background Art

[0002] At present, the importance of data labeling to algorithms is self-evident. It can be said that data is the blood of algorithms. However, in actual work, data labeling is often reduced because it takes a lot of manpower and time to label data, which ultimately greatly affects the effect of the algorithm, or some algorithms with good effects are abandoned because of the heavy workload of labeling.

[0003] There are many existing entity recognition algorithms, but the ones that achieve higher accuracy are all supervised algorithms. Supervised algorithms require the training corpus to be annotated (labeled). At present, the annotation methods for entity recognition all use the BEMSO or BISO method, that is, each word in the text needs to be annotated as an entity type plus one of the BEMSO or BISO letters. Such annotation workload is huge and requires a lot of manpower costs.

[0004] In addition, there are some existing open source tools for entity recognition, or publicly annotated corpora for entity recognition, but most of them are corpora in some general fields (for example, most Chinese corpora use the corpus of People's Daily in 1998), but the recognition effect of some new words and proper nouns in specific fields is poor and cannot meet the use requirements. In our specific business development, most scenarios are for entity recognition in specific fields, and we need to annotate corpora in specific fields to train our own entity recognition models. Summary of the invention

[0005] The present invention provides a semi-automatic annotation method, system, electronic device and computer-readable storage medium for entity recognition corpus, the main purpose of which is to respectively identify the same corpus through entity recognition models, recognition rules and recognition tools, and perform union and / or intersection processing on the results, which can improve the accuracy of text recognition annotation. Subsequently, only manual verification of the annotation results is required, which can greatly reduce the workload of manual annotation.

[0006] To achieve the above object, the present invention provides a semi-automatic annotation method for entity recognition corpus, which is applied to an electronic device, and the method comprises:

[0007] Obtain model training data, and train an entity recognition model based on the model training data; at the same time, obtain a recognition tool and set recognition rules;

[0008] Input the corpus to be recognized into the trained entity recognition model, recognition tool and recognition rules respectively to perform entity recognition and obtain the corresponding recognition results;

[0009] The recognition results of the entity recognition model, recognition tool and recognition rule are grouped in pairs, and the two recognition results in each group are processed as a union to obtain a corresponding union result;

[0010] Perform intersection processing on each union result to obtain the final recognition result of the corpus to be recognized.

[0011] Preferably, the entity recognition model is one or more of a long short-term memory network model, a bidirectional long short-term memory network model, a conditional random field model, and a bidirectional encoder representation model;

[0012] The recognition rules are generated according to the characteristics of the corpus to be recognized and the type of named entities.

[0013] Preferably, the step of combining two recognition results in each group to obtain the corresponding combined result comprises:

[0014] When the recognition results of the recognition tool and the entity recognition model form a group, the step of performing a union process on the recognition result of the recognition tool and the recognition result of the entity recognition model comprises:

[0015] Obtaining recognition results and recognition accuracy rates of the entity recognition model and the recognition tool for the same corpus, and sorting the two recognition accuracy rates according to the magnitude of the recognition accuracy rates;

[0016] Constructing an empty set, and adding the recognition result corresponding to the minimum recognition accuracy rate to the empty set to form a preliminary set;

[0017] The recognition results corresponding to the maximum recognition accuracy are added to the preliminary set one by one to obtain a union result of the recognition result recognized by the recognition tool and the recognition result of the entity recognition model.

[0018] Preferably, the step of adding the recognition results corresponding to the maximum recognition accuracy rate to the preliminary set one by one comprises:

[0019] If the newly added recognition result does not conflict with the recognition result in the preliminary set, the newly added recognition result and the recognition result in the preliminary set are combined for processing;

[0020] If the newly added recognition result conflicts with the result in the preliminary set, the newly added recognition result is retained and the recognition result in the preliminary set is deleted.

[0021] Preferably, the step of combining two recognition results in each group to obtain the corresponding combined result comprises:

[0022] When the recognition rule and the recognition result of the recognition tool form a group, or the recognition rule and the recognition result of the entity recognition model form a group, the step of performing a union processing on the recognition result of the recognition rule and the recognition result of the recognition tool or the recognition result of the entity recognition model comprises:

[0023] Obtaining recognition results and recognition accuracy rates of the same corpus by the recognition rule and the entity recognition model or the recognition tool, and sorting the two recognition accuracy rates according to the size of the recognition accuracy rates;

[0024] Constructing an empty set, and adding the recognition result corresponding to the minimum recognition accuracy rate to the empty set to form a preliminary set;

[0025] The recognition results corresponding to the maximum recognition accuracy are added to the preliminary set one by one to obtain a union result of the recognition results of the recognition rule and the recognition tool or the recognition rule and the entity recognition model.

[0026] Preferably, the step of adding the recognition results corresponding to the recognition modules with high accuracy to the preliminary set one by one comprises:

[0027] If the newly added recognition result does not conflict with the recognition result in the preliminary set, the newly added recognition result and the recognition result in the preliminary set are combined for processing;

[0028] If the newly added recognition result conflicts with the recognition result in the preliminary set, determining whether there is an inclusion relationship between the newly added recognition result and the recognition result in the preliminary set, and if there is an inclusion relationship, retaining the longer recognition result;

[0029] If there is no inclusion relationship, it is determined whether there is an intersection relationship between the newly added recognition result and the recognition results in the preliminary set. If there is an intersection relationship, the recognition result of the recognition rule is retained.

[0030] Preferably, the recognition tool is Stanford CoreNLP or hanlp.

[0031] To achieve the above object, the present invention further provides a semi-automatic annotation system for entity recognition corpus, the system comprising:

[0032] The recognition module confirmation unit is used to obtain model training data and train the entity recognition model based on the model training data; at the same time, obtain the recognition tool and set the recognition rules;

[0033] A recognition result acquisition unit is used to input the corpus to be recognized into the trained entity recognition model, recognition tool and recognition rule respectively to perform entity recognition and obtain the corresponding recognition result;

[0034] A recognition result processing unit, used to group the recognition results of the entity recognition model, recognition tool and recognition rule into two groups, and perform union processing on the two recognition results in each group to obtain a corresponding union result;

[0035] The recognition result confirmation unit is used to perform intersection processing on each union result to obtain the final recognition result of the corpus to be recognized.

[0036] To achieve the above-mentioned purpose, the present invention also provides an electronic device, which includes: a memory and a processor, wherein the memory includes a semi-automatic annotation program for entity recognition corpus, and when the semi-automatic annotation program for entity recognition corpus is executed by the processor, the steps of the semi-automatic annotation method for entity recognition corpus are implemented.

[0037] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, which includes a semi-automatic annotation program for entity recognition corpus. When the semi-automatic annotation program for entity recognition corpus is executed by a processor, any step in the semi-automatic annotation method for entity recognition corpus as described above is implemented.

[0038] The semi-automatic annotation method, system, electronic device and computer-readable storage medium for entity recognition corpus proposed in the present invention can improve the accuracy of text recognition annotation by identifying the corpus to be identified and performing union and / or intersection processing on the results through entity recognition models, recognition tools and recognition rules. Subsequently, only manual verification of the annotation results is required, which can greatly reduce the workload of manual annotation. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 A schematic diagram of an application environment of a preferred embodiment of the semi-automatic annotation method for entity recognition corpus of the present invention;

[0040] Figure 2 for Figure 1 Schematic diagram of the modules of a preferred embodiment of a semi-automatic annotation program for entity recognition corpus;

[0041] Figure 3 Flow chart of a preferred embodiment of the semi-automatic tagging method for entity recognition corpus of the present invention.

[0042] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0043] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0044] The present invention provides a semi-automatic annotation method for entity recognition corpus, which is applied to an electronic device 1. Figure 1 , which is a schematic diagram of the application environment of a preferred embodiment of the semi-automatic annotation method for entity recognition corpus of the present invention.

[0045] In this embodiment, the electronic device 1 may be a terminal device with computing functions, such as a server, a smart phone, a tablet computer, a portable computer, or a desktop computer.

[0046] The electronic device 1 includes a processor 12 , a memory 11 , a network interface 14 and a communication bus 15 .

[0047] The memory 11 includes at least one type of readable storage medium. The at least one type of readable storage medium may be a non-volatile storage medium such as a flash memory, a hard disk, a multimedia card, a card-type memory 11, etc. In some embodiments, the readable storage medium may be an internal storage unit of the electronic device 1, such as a hard disk of the electronic device 1. In other embodiments, the readable storage medium may also be an external memory 11 of the electronic device 1, such as a plug-in hard disk equipped on the electronic device 1, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc.

[0048] In this embodiment, the readable storage medium of the memory 11 is generally used to store the semi-automatic annotation program 10 of the entity recognition corpus installed in the electronic device 1. The memory 11 can also be used to temporarily store data that has been output or is to be output.

[0049] In some embodiments, the processor 12 may be a central processing unit (CPU), a microprocessor or other data processing chip, used to run program codes stored in the memory 11 or process data, such as executing a semi-automatic annotation program 10 of an entity recognition corpus.

[0050] The network interface 14 may optionally include a standard wired interface, a wireless interface (such as a WI-FI interface), and is generally used to establish a communication connection between the electronic device 1 and other electronic devices.

[0051] The communication bus 15 is used to realize the connection and communication between these components.

[0052] Figure 1The electronic device 1 is shown only with components 11 - 15 , but it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.

[0053] Optionally, the electronic device 1 may further include a user interface, which may include an input unit such as a keyboard, a voice input device such as a microphone and other devices with voice recognition function, a voice output device such as a speaker, headphones, etc. Optionally, the user interface may also include a standard wired interface or a wireless interface.

[0054] Optionally, the electronic device 1 may further include a display, which may also be referred to as a display screen or a display unit. In some embodiments, it may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an organic light-emitting diode (OLED) touch device. The display is used to display information processed in the electronic device 1 and to display a visual user interface.

[0055] Optionally, the electronic device 1 further includes a touch sensor. The area provided by the touch sensor for the user to perform a touch operation is called a touch control area. In addition, the touch sensor described here may be a resistive touch sensor, a capacitive touch sensor, etc. Moreover, the touch sensor includes not only a contact touch sensor, but also a proximity touch sensor, etc. In addition, the touch sensor may be a single sensor or a plurality of sensors arranged in an array, for example.

[0056] In addition, the area of ​​the display of the electronic device 1 can be the same as or different from the area of ​​the touch sensor. Optionally, the display and the touch sensor are stacked to form a touch display screen. The device detects touch operations triggered by the user based on the touch display screen.

[0057] Optionally, the electronic device 1 may further include a radio frequency (RF) circuit, a sensor, an audio circuit, etc., which will not be described in detail here.

[0058] exist Figure 1 In the device embodiment shown, the memory 11 as a computer storage medium may include an operating system and a semi-automatic annotation program 10 for entity recognition corpus; when the processor 12 executes the semi-automatic annotation program 10 for entity recognition corpus stored in the memory 11, the following steps are implemented:

[0059] Obtain model training data, and train an entity recognition model based on the model training data; at the same time, obtain a recognition tool and set recognition rules;

[0060] Input the corpus to be recognized into the trained entity recognition model, recognition tool and recognition rules respectively to perform entity recognition and obtain the corresponding recognition results;

[0061] The recognition results of the entity recognition model, recognition tool and recognition rule are grouped in pairs, and the two recognition results in each group are processed as a union to obtain a corresponding union result;

[0062] Perform intersection processing on each union result to obtain the final recognition result of the corpus to be recognized.

[0063] Preferably, the entity recognition model is one or more of a long short-term memory network model, a bidirectional long short-term memory network model, a conditional random field model, and a bidirectional encoder representation model;

[0064] The recognition rules are generated according to the characteristics of the corpus to be recognized and the type of named entities.

[0065] Preferably, the step of combining two recognition results in each group to obtain the corresponding combined result comprises:

[0066] When the recognition results of the recognition tool and the entity recognition model form a group, the step of performing a union process on the recognition result of the recognition tool and the recognition result of the entity recognition model comprises:

[0067] Obtaining recognition results and recognition accuracy rates of the entity recognition model and the recognition tool for the same corpus, and sorting the two recognition accuracy rates according to the magnitude of the recognition accuracy rates;

[0068] Constructing an empty set, and adding the recognition result corresponding to the minimum recognition accuracy rate to the empty set to form a preliminary set;

[0069] The recognition results corresponding to the maximum recognition accuracy are added to the preliminary set one by one to obtain a union result of the recognition result recognized by the recognition tool and the recognition result of the entity recognition model.

[0070] Preferably, the step of adding the recognition results corresponding to the maximum recognition accuracy rate to the preliminary set one by one comprises:

[0071] If the newly added recognition result does not conflict with the recognition result in the preliminary set, the newly added recognition result and the recognition result in the preliminary set are combined for processing;

[0072] If the newly added recognition result conflicts with the result in the preliminary set, the newly added recognition result is retained and the recognition result in the preliminary set is deleted.

[0073] Preferably, the step of combining two recognition results in each group to obtain the corresponding combined result comprises:

[0074] When the recognition rule and the recognition result of the recognition tool form a group, or the recognition rule and the recognition result of the entity recognition model form a group, the step of performing a union processing on the recognition result of the recognition rule and the recognition result of the recognition tool or the recognition result of the entity recognition model comprises:

[0075] Obtaining recognition results and recognition accuracy rates of the same corpus by the recognition rule and the entity recognition model or the recognition tool, and sorting the two recognition accuracy rates according to the size of the recognition accuracy rates;

[0076] Constructing an empty set, and adding the recognition result corresponding to the minimum recognition accuracy rate to the empty set to form a preliminary set;

[0077] The recognition results corresponding to the maximum recognition accuracy are added to the preliminary set one by one to obtain a union result of the recognition results of the recognition rule and the recognition tool or the recognition rule and the entity recognition model.

[0078] Preferably, the step of adding the recognition results corresponding to the recognition modules with high accuracy to the preliminary set one by one comprises:

[0079] If the newly added recognition result does not conflict with the recognition result in the preliminary set, the newly added recognition result and the recognition result in the preliminary set are combined for processing;

[0080] If the newly added recognition result conflicts with the recognition result in the preliminary set, determining whether there is an inclusion relationship between the newly added recognition result and the recognition result in the preliminary set, and if there is an inclusion relationship, retaining the longer recognition result;

[0081] If there is no inclusion relationship, it is determined whether there is an intersection relationship between the newly added recognition result and the recognition results in the preliminary set. If there is an intersection relationship, the recognition result of the recognition rule is retained.

[0082] The present invention also provides a semi-automatic annotation system for entity recognition corpus, comprising:

[0083] The recognition module confirmation unit is used to obtain model training data and train the entity recognition model based on the model training data; at the same time, obtain the recognition tool and set the recognition rules;

[0084] A recognition result acquisition unit is used to input the corpus to be recognized into the trained entity recognition model, recognition tool and recognition rule respectively to perform entity recognition and obtain the corresponding recognition result;

[0085] A recognition result processing unit, used to group the recognition results of the entity recognition model, recognition tool and recognition rule into two groups, and perform union processing on the two recognition results in each group to obtain a corresponding union result;

[0086] The recognition result confirmation unit is used to perform intersection processing on each union result to obtain the final recognition result of the corpus to be recognized.

[0087] Correspondingly, in other embodiments, the semi-automatic annotation program 10 for entity recognition corpus can also be divided into one or more modules, one or more modules are stored in the memory 11, and are executed by the processor 12 to complete the present invention. The module referred to in the present invention refers to a series of computer program instruction segments that can complete a specific function. Figure 2 As shown, Figure 1 1 is a program module diagram of a preferred embodiment of a semi-automatic annotation program 10 for entity recognition corpus. The semi-automatic annotation program 10 for entity recognition corpus can be divided into: a recognition module confirmation unit 11, a recognition result acquisition unit 12, a recognition result processing unit 13, and a recognition result confirmation unit 14. The functions or operation steps implemented by the modules 11-14 are similar to those above and will not be described in detail here.

[0088] In addition, the present invention also provides a semi-automatic annotation method for entity recognition corpus. Figure 3 , which is a flow chart of a preferred embodiment of a semi-automatic annotation method for entity recognition corpus of the present invention. The method can be executed by a device, which can be implemented by software and / or hardware.

[0089] In this embodiment, the semi-automatic annotation method of entity recognition corpus includes: step S110 to step S140.

[0090] Step S110: Obtain model training data, and train an entity recognition model based on the model training data; at the same time, obtain a recognition tool and set recognition rules.

[0091] Among them, the above-mentioned entity recognition model, recognition tool and recognition rules form three recognition modules; wherein the entity recognition model is one model or a combination of multiple models selected from the group consisting of a long short-term memory network LSTM model, a bidirectional long short-term memory network BiLSTM model, a conditional random field CRF model, and a bidirectional encoder representation Bert model; in addition, the recognition rules are set according to the characteristics of the corpus to be recognized and the type of named entity.

[0092] Specifically, the entity recognition model can use the LSTM algorithm alone, or the BiLSTM algorithm alone, or the CRF algorithm alone, or the Bert algorithm alone, or a combination of the above algorithms and other models. In the semi-automatic annotation method of the entity recognition corpus of the present invention, the combination model of BiLSTM+CRF is preferred. The model training data for training the model can use existing corpus data such as the name daily corpus, or small-scale corpus data annotated by others. When small-scale corpus data is selected, it is necessary to download and check whether its annotation format meets the requirements.

[0093] In other words, in step S110, the entity recognition model can be trained based on the BiLSTM+CRF model and the labeled People's Daily training data; at the same time, the recognition tools Stanford CoreNLP (stanford Neuro-Linguistic Programming) or hanlp (Han Language Processing) and the like are obtained, and the recognition rules are set.

[0094] The recognition rules therein can also be called rule algorithms. In the process of identifying and annotating the corpus to be identified through the recognition rules, a reading rule is set in the rule algorithm. The rule algorithm reads the corpus to be identified through the reading rule. When a word containing preset content is read, the word containing the preset content is used as the recognition result.

[0095] Specifically, the recognition rules are set according to the characteristics of the corpus to be recognized and the type of named entity. For example, Chinese place names can be recognized based on the place name dictionary of various provinces and cities in China; for example, company names can be judged based on precursor words such as "founded", "operated", "employed", "employed in", "appointed", etc., combined with suffixes such as "limited liability company", "joint-stock company", etc., and then combined with the dictionary of registered company names in China.

[0096] Step S120: input the corpus to be recognized into the trained entity recognition model, recognition tool and recognition rule respectively to perform entity recognition, and obtain the corresponding recognition result.

[0097] Among them, the recognition tool can use the stanford coreNLP tool, which can provide an entity recognition interface call, directly input the text to be recognized, and the interface outputs the result of named entity recognition. The recognition rules can be set to some obvious rules in a specific field, such as the prefix and suffix words of the company name, the surname in the name of a person, and the province and city in the place name. After entering the text to be recognized, the named entity recognition result of the text can be determined and output according to the rules.

[0098] In this step, the corpus to be recognized is input into the entity recognition model, recognition tool and recognition rule for entity recognition, and three recognition results are obtained accordingly. For example, if the input corpus to be recognized is: I am Wang Xiaoming, the recognition results can be: "I" is a non-entity, "I" is a non-entity, "Wang" is the beginning of the entity, "Xiao" is the middle of the entity, and "Ming" is the end of the entity. For the entity recognition model, recognition tool and recognition rule, corresponding recognition results can be obtained respectively.

[0099] Step S130: grouping the recognition results of the entity recognition model, recognition tool and recognition rule into two groups, and performing a union process on the two recognition results in each group to obtain a corresponding union result.

[0100] Among them, by grouping each recognition result in pairs, three different combinations can be obtained, including: the recognition results of the entity recognition model and the recognition tool as a group, the recognition results of the entity recognition model and the recognition rule as a group, and the recognition results of the recognition tool and the recognition rule as a group. Then, the two recognition results in each group are combined. Here, the combination processing is further divided into two cases:

[0101] In the first case, when the grouping result is that the recognition results of the recognition tool and the entity recognition model are a group, the step of combining the recognition result of the recognition tool and the recognition result of the entity recognition model includes:

[0102] 1. According to the model training data, the recognition accuracy of the entity recognition model and the recognition tool for the same corpus is obtained, and the recognition module with the lowest accuracy is obtained;

[0103] 2. Construct an empty set, and add the recognition results corresponding to the recognition modules with low accuracy into the empty set to form a preliminary set;

[0104] 3. The recognition results corresponding to the recognition modules with high accuracy are added to the preliminary set one by one, and the union result of the recognition result of the recognition tool and the recognition result of the entity recognition model is obtained.

[0105] In other words, when the recognition results of the recognition tool and the entity recognition model are a group, the step of performing a union process on the recognition result of the recognition tool and the recognition result of the entity recognition model includes:

[0106] Obtaining recognition results and recognition accuracy rates of the entity recognition model and the recognition tool for the same corpus, and sorting the two recognition accuracy rates according to the magnitude of the recognition accuracy rates;

[0107] Constructing an empty set, and adding the recognition result corresponding to the minimum recognition accuracy rate to the empty set to form a preliminary set;

[0108] The recognition results corresponding to the maximum recognition accuracy are added to the preliminary set one by one to obtain a union result of the recognition result recognized by the recognition tool and the recognition result of the entity recognition model.

[0109] Wherein, in step 3, if the newly added recognition result does not conflict with the result in the preliminary set, the newly added recognition result and the recognition result in the preliminary set are combined for processing;

[0110] If the newly added recognition result conflicts with the recognition result in the preliminary set, the newly added recognition result is retained and the recognition result in the preliminary set is deleted.

[0111] In the second case, when the grouping result is that the recognition rule and the recognition result of the recognition tool or the entity recognition model are a group, the step of combining the recognition result of the recognition rule and the recognition result of the recognition tool or the recognition result of the entity recognition model includes:

[0112] 1. According to the model training data, the recognition rules and the recognition accuracy of the entity recognition model or the recognition tool for the same corpus are obtained, and the recognition module with the lowest accuracy is obtained;

[0113] 2. Construct an empty set, and add the recognition results corresponding to the recognition modules with low accuracy into the empty set to form a preliminary set;

[0114] 3. The recognition results corresponding to the recognition modules with high accuracy are added to the preliminary set one by one, and the union result of the recognition result of the recognition tool and the recognition result of the entity recognition model is obtained.

[0115] In other words, when the recognition rule and the recognition result of the recognition tool are a group, or the recognition rule and the recognition result of the entity recognition model are a group, the step of performing a union processing on the recognition result of the recognition rule and the recognition result of the recognition tool or the recognition result of the entity recognition model includes:

[0116] Obtaining recognition results and recognition accuracy rates of the same corpus from the recognition rule and entity recognition model or the recognition tool, and sorting the two recognition accuracy rates according to the size of the recognition accuracy rates;

[0117] Constructing an empty set, and adding the recognition result corresponding to the minimum recognition accuracy rate to the empty set to form a preliminary set;

[0118] The recognition results corresponding to the maximum recognition accuracy are added to the preliminary set one by one to obtain a union result of the recognition results of the recognition rule and the recognition tool or the recognition rule and the entity recognition model.

[0119] Wherein, in step 3, if the newly added recognition result does not conflict with the recognition result in the preliminary set, the newly added recognition result and the recognition result in the preliminary set are combined for processing;

[0120] If the newly added recognition result conflicts with the recognition result in the preliminary set, determining whether there is an inclusion relationship between the newly added recognition result and the recognition result in the preliminary set, and if there is an inclusion relationship, retaining the longer recognition result;

[0121] If there is no inclusion relationship, it is further determined whether there is an intersection relationship between the newly added recognition result and the recognition results in the preliminary set. If there is an intersection relationship, the recognition result of the recognition rule is retained, otherwise the process ends.

[0122] Step S140: performing intersection processing on each union result to obtain a final recognition result of the corpus to be recognized.

[0123] In step S130, the obtained union results are processed by intersection, and the content included in the three union results is selected as the final recognition result of the corpus to be recognized. Then the recognition result information of the corpus is output to the manual verification editing page for manual verification.

[0124] It should be noted that the semi-automatic annotation method of entity recognition corpus proposed in the above embodiment, through entity recognition models, recognition tools and recognition rules, identifies the corpus to be recognized and performs union and / or intersection processing on the results, which can improve the accuracy of text recognition and annotation. Subsequently, only manual verification of the annotation results is required, which can greatly reduce the workload of manual annotation.

[0125] In addition, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium includes a semi-automatic annotation program for entity recognition corpus, and when the semi-automatic annotation program for entity recognition corpus is executed by a processor, the following operations are implemented:

[0126] Obtain model training data, and train an entity recognition model based on the model training data; at the same time, obtain a recognition tool and set recognition rules;

[0127] Input the corpus to be recognized into the trained entity recognition model, recognition tool and recognition rules respectively to perform entity recognition and obtain the corresponding recognition results;

[0128] The recognition results of the entity recognition model, recognition tool and recognition rule are grouped in pairs, and the two recognition results in each group are processed as a union to obtain a corresponding union result;

[0129] Perform intersection processing on each union result to obtain the final recognition result of the corpus to be recognized.

[0130] Preferably, the entity recognition model is one or more of a long short-term memory network model, a bidirectional long short-term memory network model, a conditional random field model, and a bidirectional encoder representation model;

[0131] The recognition rules are generated according to the characteristics of the corpus to be recognized and the type of named entities.

[0132] Preferably, the step of combining two recognition results in each group to obtain the corresponding combined result comprises:

[0133] When the recognition results of the recognition tool and the entity recognition model form a group, the step of performing a union process on the recognition result of the recognition tool and the recognition result of the entity recognition model comprises:

[0134] Obtaining recognition results and recognition accuracy rates of the entity recognition model and the recognition tool for the same corpus, and sorting the two recognition accuracy rates according to the magnitude of the recognition accuracy rates;

[0135] Constructing an empty set, and adding the recognition result corresponding to the minimum recognition accuracy rate to the empty set to form a preliminary set;

[0136] The recognition results corresponding to the maximum recognition accuracy are added to the preliminary set one by one to obtain a union result of the recognition result recognized by the recognition tool and the recognition result of the entity recognition model.

[0137] Preferably, the step of adding the recognition results corresponding to the maximum recognition accuracy rate to the preliminary set one by one comprises:

[0138] If the newly added recognition result does not conflict with the recognition result in the preliminary set, the newly added recognition result and the recognition result in the preliminary set are combined for processing;

[0139] If the newly added recognition result conflicts with the result in the preliminary set, the newly added recognition result is retained and the recognition result in the preliminary set is deleted.

[0140] Preferably, the step of combining two recognition results in each group to obtain the corresponding combined result comprises:

[0141] When the recognition rule and the recognition result of the recognition tool form a group, or the recognition rule and the recognition result of the entity recognition model form a group, the step of performing a union processing on the recognition result of the recognition rule and the recognition result of the recognition tool or the recognition result of the entity recognition model comprises:

[0142] Obtaining recognition results and recognition accuracy rates of the same corpus by the recognition rule and the entity recognition model or the recognition tool, and sorting the two recognition accuracy rates according to the size of the recognition accuracy rates;

[0143] Constructing an empty set, and adding the recognition result corresponding to the minimum recognition accuracy rate to the empty set to form a preliminary set;

[0144] The recognition results corresponding to the maximum recognition accuracy are added to the preliminary set one by one to obtain a union result of the recognition results of the recognition rule and the recognition tool or the recognition rule and the entity recognition model.

[0145] Preferably, the step of adding the recognition results corresponding to the recognition modules with high accuracy to the preliminary set one by one comprises:

[0146] If the newly added recognition result does not conflict with the recognition result in the preliminary set, the newly added recognition result and the recognition result in the preliminary set are combined for processing;

[0147] If the newly added recognition result conflicts with the recognition result in the preliminary set, determining whether there is an inclusion relationship between the newly added recognition result and the recognition result in the preliminary set, and if there is an inclusion relationship, retaining the longer recognition result;

[0148] If there is no inclusion relationship, it is determined whether there is an intersection relationship between the newly added recognition result and the recognition results in the preliminary set; if there is an intersection relationship, the recognition result of the recognition rule is retained.

[0149] Preferably, the recognition tool is Stanford CoreNLP or hanlp.

[0150] The specific implementation of the computer-readable storage medium of the present invention is substantially the same as the specific implementation of the semi-automatic annotation method, system, and electronic device of the above-mentioned entity recognition corpus, and will not be described in detail here.

[0151] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the existence of other identical elements in the process, device, article or method including the element.

[0152] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments. Through the description of the above implementation modes, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware, but in many cases the former is a better implementation mode. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0153] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A semi-automatic annotation method for entity recognition corpus, applied to electronic devices, characterized in that: The method comprises: Obtain model training data, and train an entity recognition model based on the model training data; at the same time, obtain a recognition tool and set recognition rules; Input the corpus to be recognized into the trained entity recognition model, recognition tool and recognition rules respectively to perform entity recognition and obtain the corresponding recognition results; The recognition results of the entity recognition model, recognition tool and recognition rule are grouped in pairs, and the two recognition results in each group are processed as a union to obtain a corresponding union result; Performing intersection processing on each union result to obtain the final recognition result of the corpus to be recognized; The step of combining the two recognition results in each group to obtain the corresponding combined result includes: When the recognition rule and the recognition result of the recognition tool form a group, or the recognition rule and the recognition result of the entity recognition model form a group, the step of performing a union processing on the recognition result of the recognition rule and the recognition result of the recognition tool or the recognition result of the entity recognition model comprises: Obtaining recognition results and recognition accuracy rates of the same corpus by the recognition rule and the entity recognition model or the recognition tool, and sorting the two recognition accuracy rates according to the size of the recognition accuracy rates; Constructing an empty set, and adding the recognition result corresponding to the minimum recognition accuracy rate to the empty set to form a preliminary set; Adding recognition results corresponding to the maximum recognition accuracy rate to the preliminary set one by one to obtain a union result of the recognition results of the recognition rule and the recognition tool or the recognition rule and the entity recognition model; The step of adding the recognition results corresponding to the maximum recognition accuracy rate to the preliminary set one by one comprises: If the newly added recognition result does not conflict with the recognition result in the preliminary set, the newly added recognition result and the recognition result in the preliminary set are combined for processing; If the newly added recognition result conflicts with the recognition result in the preliminary set, determining whether there is an inclusion relationship between the newly added recognition result and the recognition result in the preliminary set, and if there is an inclusion relationship, retaining the longer recognition result; If there is no inclusion relationship, it is determined whether there is an intersection relationship between the newly added recognition result and the recognition results in the preliminary set. If there is an intersection relationship, the recognition result of the recognition rule is retained.

2. The semi-automatic annotation method for entity recognition corpus according to claim 1, characterized in that: The entity recognition model is one or more of a long short-term memory network model, a bidirectional long short-term memory network model, a conditional random field model, and a bidirectional encoder representation model; The recognition rules are generated according to the characteristics of the corpus to be recognized and the type of named entities.

3. The semi-automatic annotation method for entity recognition corpus according to claim 1, characterized in that: The step of combining two recognition results in each group to obtain the corresponding combined result includes: When the recognition results of the recognition tool and the entity recognition model form a group, the step of performing a union process on the recognition result of the recognition tool and the recognition result of the entity recognition model comprises: Obtaining recognition results and recognition accuracy rates of the entity recognition model and the recognition tool for the same corpus, and sorting the two recognition accuracy rates according to the magnitude of the recognition accuracy rates; Constructing an empty set, and adding the recognition result corresponding to the minimum recognition accuracy rate to the empty set to form a preliminary set; The recognition results corresponding to the maximum recognition accuracy are added to the preliminary set one by one to obtain a union result of the recognition result recognized by the recognition tool and the recognition result of the entity recognition model.

4. The semi-automatic annotation method for entity recognition corpus according to claim 3, characterized in that: The step of adding the recognition results corresponding to the maximum recognition accuracy rate to the preliminary set one by one comprises: If the newly added recognition result does not conflict with the recognition result in the preliminary set, the newly added recognition result and the recognition result in the preliminary set are combined for processing; If the newly added recognition result conflicts with the result in the preliminary set, the newly added recognition result is retained and the recognition result in the preliminary set is deleted.

5. The semi-automatic annotation method for entity recognition corpus according to claim 1, characterized in that: The recognition tool is Stanford CoreNLP or hanlp.

6. A semi-automatic annotation system for entity recognition corpus, characterized in that: The system comprises: The recognition module confirmation unit is used to obtain model training data and train the entity recognition model based on the model training data; at the same time, obtain the recognition tool and set the recognition rules; A recognition result acquisition unit is used to input the corpus to be recognized into the trained entity recognition model, recognition tool and recognition rule respectively to perform entity recognition and obtain the corresponding recognition result; A recognition result processing unit, used for grouping the recognition results of the entity recognition model, recognition tool and recognition rule into two groups, and performing a union process on the two recognition results in each group to obtain a corresponding union result; A recognition result confirmation unit, used for performing intersection processing on each union result to obtain a final recognition result of the corpus to be recognized; The step of performing a union process on the two recognition results in each group to obtain a corresponding union result includes: When the recognition rule and the recognition result of the recognition tool are a group, or the recognition rule and the recognition result of the entity recognition model are a group, the step of performing a union processing on the recognition result of the recognition rule and the recognition result of the recognition tool or the recognition result of the entity recognition model includes: Obtaining recognition results and recognition accuracy rates of the same corpus by the recognition rule and the entity recognition model or the recognition tool, and sorting the two recognition accuracy rates according to the size of the recognition accuracy rates; Constructing an empty set, and adding the recognition result corresponding to the minimum recognition accuracy rate to the empty set to form a preliminary set; Adding recognition results corresponding to the maximum recognition accuracy rate to the preliminary set one by one to obtain a union result of the recognition results of the recognition rule and the recognition tool or the recognition rule and the entity recognition model; The step of adding the recognition results corresponding to the maximum recognition accuracy rate to the preliminary set one by one includes: If the newly added recognition result does not conflict with the recognition result in the preliminary set, the newly added recognition result and the recognition result in the preliminary set are combined for processing; If the newly added recognition result conflicts with the recognition result in the preliminary set, determining whether there is an inclusion relationship between the newly added recognition result and the recognition result in the preliminary set, and if there is an inclusion relationship, retaining the longer recognition result; If there is no inclusion relationship, it is determined whether there is an intersection relationship between the newly added recognition result and the recognition results in the preliminary set. If there is an intersection relationship, the recognition result of the recognition rule is retained.

7. An electronic device, characterized in that: The electronic device comprises: a memory and a processor, wherein the memory comprises a semi-automatic annotation program for entity recognition corpus, and when the semi-automatic annotation program for entity recognition corpus is executed by the processor, the steps of the semi-automatic annotation method for entity recognition corpus as described in any one of claims 1 to 5 are implemented.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a semi-automatic annotation program for entity recognition corpus. When the semi-automatic annotation program for entity recognition corpus is executed by a processor, the steps of the semi-automatic annotation method for entity recognition corpus according to any one of claims 1 to 5 are implemented.