Named entity recognition method, system, device and medium for multi-round dialogue robot
By using a multi-round dialogue robot method in named entity recognition, conflicting entities are handled through the polling and filtering modules of regular and negative regular rule groups, combined with neural network model, the entity conflict problem in named entity recognition in the prior art is solved. , improves recognition accuracy.
Patent Information
- Application Number
- CN202210556817.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-19
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2042-05-19
AI Technical Summary
There is a problem of entity conflict in the existing named entity recognition methods, which leads to redundancy and error in the identification results, and cannot effectively resolve conflicts, affecting the recognition accuracy.
The named entity recognition method of multi-round dialogue robots is adopted. Through the polling, comparison and filtering modules of regular rule groups and negative regular rule groups, conflicting entities are identified and retained and filtered. Combined with neural network models to improve recognition accuracy .
Eliminate entity conflicts between rule groups, improve the accuracy of naming entity recognition, define and handle conflicting entities, and obtain higher recognition accuracy from traditional methods.
Smart Images

Figure CN114912454B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to natural language processing technology, and in particular to a method, system, device and medium for named entity recognition of a multi-round dialogue robot. Background Art
[0002] Intelligent customer service is now widely used. Many companies have their own outbound call systems or intelligent conversational robots. The slot filling module is an important function for the robot to understand the user's speaking intention and obtain the key information expressed by the user. This module uses named entity recognition technology to extract the required information from the conversation. Named entity recognition (NER) is used to identify target entities, including time, names, currency, etc. The current mainstream named entity recognition methods are based on rules or models, or a mixture of rules and models. However, due to the fact that entity conflicts often exist in the recognition results in actual use, such as: entity conflicts within the rule group, entity conflicts between rule groups, and entity conflicts between rule groups and model extraction results, leaving the conflicting results unchecked will cause redundancy and errors in the recognition results. Therefore, if the conflict cannot be reasonably resolved, the existing named entity recognition methods will have certain errors. Summary of the invention
[0003] The technical problem to be solved by the present invention is to overcome the defects of conflicting results of named entity recognition methods in the prior art, which may lead to redundancy and errors in the results, and to provide a configurable named entity recognition technology, which greatly improves the convenience of named entity recognition when applied in different scenarios.
[0004] The present invention solves the above technical problems through the following technical solutions:
[0005] The present invention provides a method for named entity recognition of a multi-round dialogue robot, comprising the following steps:
[0006] Identify the input text information, poll each regular rule group, and place the entities identified in the text information by the regular rule group into a positive example set;
[0007] Identify the input text information, poll each negative positive rule group, and place the entity identified by the negative positive rule group in the text information into a negative example set;
[0008] Compare the entities in the negative example set with those in the positive example set to obtain conflicting entities;
[0009] The conflicting entities in the positive example set are filtered out to obtain a target entity set.
[0010] Preferably, the positive rule group and the negative positive rule group are both provided with a positive dictionary and a negative dictionary, and the step of polling each regular rule group and placing the entities identified by the regular rule group in the text information into the positive example set comprises:
[0011] Putting the words in the text information that both conform to the rules of the regular rule group and are included in the positive dictionary of the regular rule group into a first positive set;
[0012] Putting the words in the text information that both conform to the rules of the regular rule group and are included in the negative dictionary of the regular rule group into a first negative set;
[0013] Comparing the words covered by the first positive set with those covered by the first negative set to obtain conflicting words;
[0014] Filter out the conflicting words in the first positive set, and place the remaining words in the first positive set as entities in the positive example set;
[0015] and / or,
[0016] The step of polling each negative positive rule group and placing the entity identified by the negative positive rule group in the text information into a negative example set comprises:
[0017] Putting the words in the text information that both conform to the rules of the negative positive rule group and are included in the positive dictionary of the negative positive rule group into a second positive set;
[0018] Putting the words in the text information that both conform to the rules of the negative positive rule group and are included in the negative dictionary of the negative positive rule group into a second negative set;
[0019] Comparing the words covered by the second positive set with those covered by the second negative set to obtain conflicting words;
[0020] The conflicting words in the second positive set are filtered out, and the remaining words in the second positive set are placed in the negative example set as entities.
[0021] Preferably, the step of comparing entities in the negative example set with entities in the positive example set to obtain conflicting entities comprises:
[0022] The words in the positive example set that are covered by the negative example set are regarded as conflicting words;
[0023] and / or,
[0024] The words in the negative example set that are covered by the positive example set are regarded as conflicting words;
[0025] and / or,
[0026] The words that overlap with each other in the positive example set and the negative example set are regarded as conflicting words.
[0027] Preferably, the positive rule group and the negative positive rule group are both provided with priority options, and the priorities include high priority and low priority;
[0028] The step of polling each regular rule group and placing the entity identified by the regular rule group in the text information into a positive example set comprises:
[0029] When there is a relationship of covering or being covered between entities identified by a regular rule group with a high priority and entities identified by a regular rule group with a low priority, the covered or covered entities among the entities identified by the regular rule group with a high priority are retained, and the covered or covered entities among the entities identified by the regular rule group with a low priority are filtered out;
[0030] and / or,
[0031] The specific steps of polling each negative positive rule group and placing the entity identified by the negative positive rule group in the text information into a negative example set include:
[0032] When there is an overlapping or covered relationship between entities identified by a high-priority negative positive rule group and entities identified by a low-priority negative positive rule group, the overlapping or covered entities among the entities identified by the high-priority negative positive rule group are retained, and the overlapping or covered entities among the entities identified by the low-priority negative positive rule group are filtered out.
[0033] Preferably, the step of polling each regular rule group and placing the entity identified by the regular rule group in the text information into a positive example set comprises:
[0034] When there is a front-to-back overlap between entities identified by a regular rule group with a high priority and entities identified by a regular rule group with a low priority, the entities with the overlap among the entities identified by the regular rule group with a high priority are retained, and the entities with the overlap among the entities identified by the regular rule group with a low priority are filtered out;
[0035] and / or,
[0036] The step of polling each negative positive rule group and placing the entity identified by the negative positive rule group in the text information into a negative example set comprises:
[0037] When there is a front-to-back overlapping relationship between entities identified by a high-priority negative positive rule group and entities identified by a low-priority negative positive rule group, the entities with the overlapping relationship among the entities identified by the high-priority negative positive rule group are retained, and the entities with the overlapping relationship among the entities identified by the low-priority negative positive rule group are filtered out.
[0038] Preferably, the step of filtering out the conflicting entities in the positive example set to obtain the target entity set includes:
[0039] The positive example set after filtering out the conflicting entities is used as the first entity set;
[0040] Inputting text information into a named entity recognition model, wherein the named entity recognition model is a neural network model;
[0041] The named entity recognition model outputs the entity to obtain a second entity set;
[0042] The first entity set and the second entity set are combined to obtain a target entity set.
[0043] Preferably, the step of combining the first entity set and the second entity set to obtain a target entity set includes:
[0044] Entities in the first entity set and the second entity set that have a covering and covered relationship are covering entities, and the covering entities of the first entity set are retained, and the covering entities of the second entity set are filtered out;
[0045] Entities in the first entity set and the second entity set that have a front-to-back overlapping relationship are overlapping entities, and the overlapping entities of the first entity set are retained, and the overlapping entities of the second entity set are filtered out;
[0046] The first entity set and the second entity set that have been retained and filtered out are merged to obtain a target entity set.
[0047] The present invention also provides a named entity recognition system for a multi-round dialogue robot, comprising a positive module, a negative positive module, a comparison module and a filtering module;
[0048] The regularization module is used to identify the input text information, poll each regularization rule group, and place the entity identified by the regularization rule group in the text information into a positive example set;
[0049] The negative positive module is used to identify the input text information, poll each negative positive rule group, and place the entity identified by the negative positive rule group in the text information into a negative example set;
[0050] The comparison module is used to compare entities in the negative example set and the positive example set to obtain conflicting entities;
[0051] The filtering module is used to filter out the conflicting entities in the positive example set to obtain a target entity set.
[0052] Preferably, the regular rule group and the negative regular rule group are both provided with a positive dictionary and a negative dictionary, and the regular module is further used to put the words in the text information that both meet the rules of the regular rule group and are included in the positive dictionary of the regular rule group into the first positive set;
[0053] Putting the words in the text information that both conform to the rules of the regular rule group and are included in the negative dictionary of the regular rule group into a first negative set;
[0054] Comparing the words covered by the first positive set with those covered by the first negative set to obtain conflicting words;
[0055] Filter out the conflicting words in the first positive set, and place the remaining words in the first positive set as entities in the positive example set;
[0056] and / or,
[0057] The step of polling each negative positive rule group and placing the entity identified by the negative positive rule group in the text information into a negative example set comprises:
[0058] Putting the words in the text information that both conform to the rules of the negative positive rule group and are included in the positive dictionary of the negative positive rule group into a second positive set;
[0059] Putting the words in the text information that both conform to the rules of the negative positive rule group and are included in the negative dictionary of the negative positive rule group into a second negative set;
[0060] Comparing the words covered by the second positive set with those covered by the second negative set to obtain conflicting words;
[0061] The conflicting words in the second positive set are filtered out, and the remaining words in the second positive set are placed in the negative example set as entities.
[0062] Preferably, the comparison module is further used to take the words in the positive example set that are covered by the negative example set as conflicting words;
[0063] and / or,
[0064] The words in the negative example set that are covered by the positive example set are regarded as conflicting words;
[0065] and / or,
[0066] The words that overlap with each other in the positive example set and the negative example set are regarded as conflicting words.
[0067] Preferably, the positive rule group and the negative positive rule group are both provided with priority options, and the priorities include high priority and low priority;
[0068] The regularization module is also used for retaining the covered or overwritten entities among the entities identified by the high-priority regularization rule group, and filtering out the covered or overwritten entities among the entities identified by the low-priority regularization rule group, when there is an overwriting or overwritten relationship between the entities identified by the high-priority regularization rule group and the entities identified by the low-priority regularization rule group;
[0069] and / or,
[0070] The negative positive module is also used to retain the covered or overlapped entities in the entities identified by the high-priority negative positive rule group and filter out the covered or overlapped entities in the entities identified by the low-priority negative positive rule group when there is an overlapping or overlapped relationship between the entities identified by the high-priority negative positive rule group and the entities identified by the low-priority negative positive rule group.
[0071] Preferably, the regularization module is also used for retaining the entities with overlapping relationship among the entities identified by the high-priority regularization rule group and filtering out the entities with overlapping relationship among the entities identified by the low-priority regularization rule group when there is a front-to-back overlapping relationship between the entities identified by the high-priority regularization rule group and the entities identified by the low-priority regularization rule group;
[0072] and / or,
[0073] The negative positive module is also used to retain the entities with overlapping relationship among the entities identified by the high-priority negative positive rule group and the entities identified by the low-priority negative positive rule group, and filter out the entities with overlapping relationship among the entities identified by the low-priority negative positive rule group.
[0074] Preferably, the filtering module is further used to use the positive example set after filtering out the conflicting entities as the first entity set;
[0075] Inputting text information into a named entity recognition model, wherein the named entity recognition model is a neural network model;
[0076] The named entity recognition model outputs the entity to obtain a second entity set;
[0077] The first entity set and the second entity set are combined to obtain a target entity set.
[0078] Preferably, entities in the first entity set and the second entity set that have a covering and covered relationship are covering entities, and entities in the first entity set and the second entity set that have a front-to-back overlapping relationship are overlapping entities, and the filtering module is further used to retain the covering entities of the first entity set and filter out the covering entities of the second entity set;
[0079] Retain overlapping entities of the first entity set, and filter out overlapping entities of the second entity set;
[0080] The first entity set and the second entity set that have been retained and filtered out are then merged to obtain a target entity set.
[0081] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the named entity recognition method of the multi-round dialogue robot of the present invention is implemented.
[0082] The present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for named entity recognition of the multi-round dialogue robot of the present invention are implemented.
[0083] The positive and progressive effects of the present invention are: by retaining and filtering conflicting entities, entity conflicts between rule groups are eliminated, the accuracy of named entity recognition is improved, conflicting entities are defined, and conflicting entities are retained and filtered according to specific logic. Different from traditional named entity recognition methods, it can be combined with neural networks to obtain higher accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0084] Figure 1 This is a flowchart of a method for named entity recognition by a multi-round dialogue robot according to Example 1 of the present invention.
[0085] Figure 2 This is a structural diagram of a named entity recognition system for a multi-round dialogue robot according to Example 3 of the present invention.
[0086] Figure 3 This is a schematic diagram of the structure of an electronic device according to Embodiment 5 of the present invention. DETAILED DESCRIPTION
[0087] The present invention is further described below by way of examples, but the present invention is not limited to the scope of the examples.
[0088] Example 1
[0089] The present invention provides a method for named entity recognition of a multi-round dialogue robot. Figure 1, the named entity recognition method of the multi-round dialogue robot includes the following steps:
[0090] S11, polling each regular rule group to identify the input text information, and placing the entities identified by the regular rule group in the text information into a positive example set.
[0091] S12, polling each negative positive rule group to identify the input text information, and placing the entity identified by the negative positive rule group in the text information into a negative example set.
[0092] S13. Compare entities in the negative example set with entities in the positive example set to obtain conflicting entities.
[0093] S14, filtering out conflicting entities in the positive example set to obtain a target entity set. The entities in the target entity set are the entities that are targeted to be identified in the text information by this method.
[0094] A rule group is the smallest unit for identifying an entity through rules or dictionaries. An entity may be identified by multiple rule groups. When configuring a rule group, you can configure the rule group with an identifier, entity name, merge option, extended rule group, priority, positive or negative positive, dictionary, etc. Entities can be set by developers according to their needs. Specific dates, names, addresses, etc. can all be used as entities and identified in conversations using this method.
[0095] The named entity recognition method of the multi-round dialogue robot of this embodiment uses the positive rule group and the negative positive rule group to recognize text information respectively. The advantage of this is that unnecessary entities can be defined in the negative positive rule group. Therefore, when the recognition result of the regular rule group conflicts with the recognition result of the negative positive rule group, that is, when the conflicting entity defined above is generated, by filtering out the conflicting entities in the positive example set, the entity obtained by the recognition result can be made to meet expectations more accurately.
[0096] Example 2
[0097] Based on Example 1, this example provides a method for named entity recognition of a multi-round dialogue robot.
[0098] Both the positive rule group and the negative positive rule group can be set with a positive dictionary and a negative dictionary; both the positive rule group and the negative positive rule group can be set with a priority option; both the positive rule group and the negative positive rule group can be set with a merge option.
[0099] The S11 also includes:
[0100] S111 . Put words in the text information that conform to the rules of the regular rule group and are included in the forward dictionary of the regular rule group into a first forward set.
[0101] S112: put the words in the text information that conform to the rules of the regular rule group and are included in the negative dictionary of the regular rule group into a first negative set.
[0102] S113: The words in the first positive set that are covered by the first negative set are regarded as conflicting words.
[0103] S114, concatenating the overlapping words in the first positive set and the first negative set into one word and removing redundant overlapping parts, and retaining the concatenated word in the first positive set.
[0104] S115 , filter out conflicting words in the first positive set, and place the remaining words in the first positive set as entities in the positive example set.
[0105] S116. When there is an overlapping or covered relationship between entities identified by a high-priority regular rule group and entities identified by a low-priority regular rule group, the overlapping or covered entities among the entities identified by the high-priority regular rule group are retained, and the overlapping or covered entities among the entities identified by the low-priority regular rule group are filtered out.
[0106] S117. When there is a front-to-back overlapping relationship between entities identified by a high-priority regular rule group and entities identified by a low-priority regular rule group, the entities with the overlapping relationship among the entities identified by the high-priority regular rule group are retained, and the entities with the overlapping relationship among the entities identified by the low-priority regular rule group are filtered out.
[0107] S118. When entities identified by multiple regular rule groups with merge options overlap, the overlapping entities are concatenated into one entity and redundant overlapping parts are removed.
[0108] The S12 also includes:
[0109] S121. Put words in the text information that both conform to the rules of the negative positive rule group and are included in the positive dictionary of the negative positive rule group into a second positive set.
[0110] S122: put the words in the text information that both meet the rules of the negative positive rule group and are included in the negative dictionary of the negative positive rule group into a second negative set.
[0111] S123. The words in the second positive set that are covered by the second negative set are regarded as conflicting words.
[0112] S124, concatenating the overlapping words in the second positive set and the second negative set into one word and removing redundant overlapping parts, and retaining the concatenated word in the second positive set.
[0113] S125 , filtering out the conflicting words in the second positive set, and placing the remaining words in the second positive set as entities in the negative example set.
[0114] S116. When there is an overlapping or covered relationship between entities identified by a high-priority negative positive rule group and entities identified by a low-priority negative positive rule group, the overlapping or covered entities among the entities identified by the high-priority negative positive rule group are retained, and the overlapping or covered entities among the entities identified by the low-priority negative positive rule group are filtered out.
[0115] S117. When there is a front-to-back overlapping relationship between entities identified by a high-priority negative positive rule group and entities identified by a low-priority negative positive rule group, the entities with overlapping relationship among the entities identified by the high-priority negative positive rule group are retained, and the entities with overlapping relationship among the entities identified by the low-priority negative positive rule group are filtered out.
[0116] S118. When entities identified by multiple negative positive rule groups with a merge option overlap, the overlapping entities are concatenated into one entity and redundant overlapping parts are removed.
[0117] S13 includes:
[0118] S131. The words in the positive example set that are covered by the negative example set are regarded as conflicting words.
[0119] and / or,
[0120] S132: The words in the negative example set that are covered by the positive example set are regarded as conflicting words.
[0121] and / or,
[0122] S133: The words that overlap with each other in the positive example set and the negative example set are regarded as conflicting words.
[0123] S14 includes:
[0124] S141 . Using the positive example set after filtering out conflicting entities as the first entity set.
[0125] S142, inputting the text information into a named entity recognition model, where the named entity recognition model is a neural network model, and the model can be obtained through training with labeled texts in related fields.
[0126] S143. The named entity recognition model outputs entities to obtain a second entity set.
[0127] S144, entities in the first entity set and the second entity set that have a covering and covered relationship are covering entities, the covering entities of the first entity set are retained, and the covering entities of the second entity set are filtered out;
[0128] S145. Entities in the first entity set and the second entity set that have a front-to-back overlapping relationship are overlapping entities, and the overlapping entities of the first entity set are retained, and the overlapping entities of the second entity set are filtered out;
[0129] S146: Merge the first entity set and the second entity set that have been retained and filtered out to obtain a target entity set.
[0130] Example 3
[0131] The present invention provides a named entity recognition system for a multi-round dialogue robot. Figure 2 The named entity recognition system of the multi-round dialogue robot includes a regularization module 21, a negative regularization module 22, a comparison module 23 and a filtering module 24.
[0132] The regularization module 21 is used to put the words in the text information that meet the rules of the regularization rule group and are included in the positive dictionary of the regularization rule group into the first positive set.
[0133] The negative positive module 22 is used to poll each negative positive rule group to identify the input text information, and place the entities identified by the negative positive rule group in the text information into a negative example set.
[0134] The comparison module 23 is used to compare entities in the negative example set and the positive example set to obtain conflicting entities.
[0135] The filtering module 24 is used to filter out conflicting entities in the positive example set to obtain a target entity set. The entities in the target entity set are the entities that are targeted and identified in the text information by this method.
[0136] Example 4
[0137] Based on Example 1, this example provides a named entity recognition system for a multi-round dialogue robot.
[0138] The regularization module 21 is also used for:
[0139] The words in the text information that conform to the rules of the regular rule group and are included in the positive dictionary of the regular rule group are put into the first positive set.
[0140] The words in the text information that conform to the rules of the regular rule group and are included in the negative dictionary of the regular rule group are put into the first negative set.
[0141] The words in the first positive set that are covered by the first negative set are regarded as conflicting words.
[0142] The overlapping words in the first positive set and the first negative set are concatenated into one word and the redundant overlapping parts are removed, and the concatenated word is retained in the first positive set.
[0143] Filter out conflicting words in the first positive set, and place the remaining words in the first positive set as entities in the positive example set.
[0144] When there is an overlapping or covered relationship between entities identified by a high-priority regular rule group and entities identified by a low-priority regular rule group, the overlapping or covered entities among the entities identified by the high-priority regular rule group are retained, and the overlapping or covered entities among the entities identified by the low-priority regular rule group are filtered out.
[0145] When there is a front-to-back overlapping relationship between entities identified by a high-priority regular rule group and entities identified by a low-priority regular rule group, the entities with overlapping relationship among the entities identified by the high-priority regular rule group are retained, and the entities with overlapping relationship among the entities identified by the low-priority regular rule group are filtered out.
[0146] When entities identified by multiple regular rule groups with merge options overlap, the overlapping entities are concatenated into one entity and the redundant overlapping parts are removed.
[0147] The negative positive module 22 is also used for:
[0148] The words in the text information that both meet the rules of the negative positive rule group and are included in the positive dictionary of the negative positive rule group are put into the second positive set.
[0149] The words in the text information that both meet the rules of the negative positive rule group and are included in the negative dictionary of the negative positive rule group are put into the second negative set.
[0150] The words in the second positive set that are covered by the second negative set are regarded as conflicting words.
[0151] The overlapping words in the second positive set and the second negative set are concatenated into one word and the redundant overlapping parts are removed, and the concatenated word is retained in the second positive set.
[0152] The conflicting words in the second positive set are filtered out, and the remaining words in the second positive set are placed in the negative example set as entities.
[0153] When there is an overlapping or covered relationship between entities identified by a high-priority negative positive rule group and entities identified by a low-priority negative positive rule group, the overlapping or covered entities among the entities identified by the high-priority negative positive rule group are retained, and the overlapping or covered entities among the entities identified by the low-priority negative positive rule group are filtered out.
[0154] When there is a front-to-back overlapping relationship between entities identified by a high-priority negative positive rule group and entities identified by a low-priority negative positive rule group, the entities with overlapping relationship among the entities identified by the high-priority negative positive rule group are retained, and the entities with overlapping relationship among the entities identified by the low-priority negative positive rule group are filtered out.
[0155] When entities identified by multiple negative positive rule groups with a merge option overlap, the overlapping entities are concatenated into one entity and the redundant overlapping parts are removed.
[0156] The comparison module 23 is also used for:
[0157] The words in the positive example set that are covered by the negative example set are regarded as conflicting words.
[0158] and / or,
[0159] The words in the negative example set that are covered by the positive example set are regarded as conflicting words.
[0160] and / or,
[0161] The words that overlap with each other in the positive example set and the negative example set are regarded as conflicting words.
[0162] The filtering module 24 is also used for:
[0163] The positive example set after filtering out conflicting entities is taken as the first entity set.
[0164] The text information is input into a named entity recognition model. The named entity recognition model is a neural network model, and the model can be obtained by training labeled texts in related fields.
[0165] The named entity recognition model outputs the entity to obtain a second entity set.
[0166] The entities that have a covering and covered relationship between the first entity set and the second entity set are covering entities, the covering entities of the first entity set are retained, and the covering entities of the second entity set are filtered out;
[0167] Entities in the first entity set and the second entity set that have a front-to-back overlapping relationship are overlapping entities, and the overlapping entities of the first entity set are retained, and the overlapping entities of the second entity set are filtered out;
[0168] The first entity set and the second entity set that have been retained and filtered out are merged to obtain a target entity set.
[0169] Example 5
[0170] Figure 3 A schematic diagram of the structure of an electronic device provided in this embodiment. The electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the method for named entity recognition of a multi-round dialogue robot of embodiment 1 or embodiment 2 when executing the program. Figure 3 The electronic device 30 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0171] like Figure 3 As shown, the electronic device 30 may be in the form of a general-purpose computing device, for example, it may be a server device. The components of the electronic device 30 may include, but are not limited to: at least one processor 31, at least one memory 32, and a bus 33 connecting different system components (including the memory 32 and the processor 31).
[0172] The bus 33 includes a data bus, an address bus, and a control bus.
[0173] The memory 32 may include a volatile memory, such as a random access memory (RAM) 321 and / or a cache memory 322 , and may further include a read-only memory (ROM) 323 .
[0174] The memory 32 may also include a program / utility 325 having a set (at least one) of program modules 324, such program modules 324 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0175] The processor 31 executes various functional applications and data processing by running the computer program stored in the memory 32, such as the named entity recognition method of the multi-round dialogue robot in Example 1 or Example 2 of the present invention.
[0176] The electronic device 30 may also communicate with one or more external devices 34 (e.g., keyboards, pointing devices, etc.). Such communication may be performed via an input / output (I / O) interface 35. Furthermore, the model-generated electronic device 30 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 36. As shown, the network adapter 36 communicates with other modules of the model-generated electronic device 30 via a bus 33. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the model-generated electronic device 30, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, and data backup storage systems, etc.
[0177] It should be noted that although several units / modules or sub-units / modules of the electronic device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to an embodiment of the present invention, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided into multiple units / modules to be embodied.
[0178] Example 6
[0179] This embodiment provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method for named entity recognition of a multi-round dialogue robot of embodiment 1 or embodiment 2.
[0180] The readable storage medium may include but is not limited to: a portable disk, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory, an optical storage device, a magnetic storage device or any suitable combination of the above.
[0181] In a possible implementation, the present invention can also be implemented in the form of a program product, which includes a program code. When the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps of the named entity recognition method of the multi-round dialogue robot of Example 1 or Example 2.
[0182] The program code for executing the present invention may be written in any combination of one or more programming languages, and may be executed entirely on a user device, partially on a user device, as an independent software package, partially on a user device and partially on a remote device, or entirely on a remote device.
[0183] Although the specific embodiments of the present invention are described above, it should be understood by those skilled in the art that this is only for illustration and the protection scope of the present invention is defined by the appended claims. Those skilled in the art may make various changes or modifications to these embodiments without departing from the principles and essence of the present invention, but these changes and modifications all fall within the protection scope of the present invention.
Claims
1. A method for named entity recognition of a multi-round dialogue robot, characterized in that: The following steps are involved: Identify the input text information, poll each regular rule group, and place the entities identified in the text information by the regular rule group into a positive example set; Identify the input text information, poll each negative positive rule group, and place the entity identified by the negative positive rule group in the text information into a negative example set; Compare the entities in the negative example set with those in the positive example set to obtain conflicting entities; Filtering out the conflicting entities in the positive example set to obtain a target entity set; The positive rule group and the negative positive rule group are both provided with a positive dictionary and a negative dictionary, and the step of polling each regular rule group and placing the entity identified by the regular rule group in the text information into the positive example set comprises: Putting the words in the text information that both conform to the rules of the regular rule group and are included in the positive dictionary of the regular rule group into a first positive set; Putting the words in the text information that both conform to the rules of the regular rule group and are included in the negative dictionary of the regular rule group into a first negative set; Comparing the words covered by the first positive set with those covered by the first negative set to obtain conflicting words; Filter out the conflicting words in the first positive set, and place the remaining words in the first positive set as entities in the positive example set; and / or, The step of polling each negative positive rule group and placing the entity identified by the negative positive rule group in the text information into a negative example set comprises: Putting the words in the text information that both conform to the rules of the negative positive rule group and are included in the positive dictionary of the negative positive rule group into a second positive set; Putting the words in the text information that both conform to the rules of the negative positive rule group and are included in the negative dictionary of the negative positive rule group into a second negative set; Comparing the words covered by the second positive set with those covered by the second negative set to obtain conflicting words; The conflicting words in the second positive set are filtered out, and the remaining words in the second positive set are placed in the negative example set as entities.
2. The method for named entity recognition of a multi-round dialogue robot according to claim 1, characterized in that: The step of comparing entities in the negative example set with entities in the positive example set to obtain conflicting entities comprises: The words in the positive example set that are covered by the negative example set are regarded as conflicting words; and / or, The words in the negative example set that are covered by the positive example set are regarded as conflicting words; and / or, The words that overlap with each other in the positive example set and the negative example set are regarded as conflicting words.
3. The method for named entity recognition of a multi-round dialogue robot according to claim 1, characterized in that: The positive rule group and the negative positive rule group are both provided with priority options, and the priorities include high priority and low priority; The step of polling each regular rule group and placing the entity identified by the regular rule group in the text information into a positive example set comprises: When there is a relationship of covering or being covered between entities identified by a regular rule group with a high priority and entities identified by a regular rule group with a low priority, the covered or covered entities among the entities identified by the regular rule group with a high priority are retained, and the covered or covered entities among the entities identified by the regular rule group with a low priority are filtered out; and / or, The specific steps of polling each negative positive rule group and placing the entity identified by the negative positive rule group in the text information into a negative example set include: When there is an overlapping or covered relationship between entities identified by a high-priority negative positive rule group and entities identified by a low-priority negative positive rule group, the overlapping or covered entities among the entities identified by the high-priority negative positive rule group are retained, and the overlapping or covered entities among the entities identified by the low-priority negative positive rule group are filtered out.
4. The method for named entity recognition of a multi-round dialogue robot as claimed in claim 3, characterized in that: The step of polling each regular rule group and placing the entity identified by the regular rule group in the text information into a positive example set comprises: When there is a front-to-back overlap between entities identified by a regular rule group with a high priority and entities identified by a regular rule group with a low priority, the entities with the overlap among the entities identified by the regular rule group with a high priority are retained, and the entities with the overlap among the entities identified by the regular rule group with a low priority are filtered out; and / or, The step of polling each negative positive rule group and placing the entity identified by the negative positive rule group in the text information into a negative example set comprises: When there is a front-to-back overlapping relationship between entities identified by a high-priority negative positive rule group and entities identified by a low-priority negative positive rule group, the entities with the overlapping relationship among the entities identified by the high-priority negative positive rule group are retained, and the entities with the overlapping relationship among the entities identified by the low-priority negative positive rule group are filtered out.
5. The method for named entity recognition of a multi-round dialogue robot according to claim 1, characterized in that: The step of filtering out the conflicting entities in the positive example set to obtain the target entity set comprises: The positive example set after filtering out the conflicting entities is used as the first entity set; Inputting text information into a named entity recognition model, wherein the named entity recognition model is a neural network model; The named entity recognition model outputs the entity to obtain a second entity set; The first entity set and the second entity set are combined to obtain a target entity set.
6. The method for named entity recognition of a multi-round dialogue robot according to claim 5, characterized in that: The step of combining the first entity set and the second entity set to obtain a target entity set comprises: Entities in the first entity set and the second entity set that have a covering and covered relationship are covering entities, and the covering entities of the first entity set are retained, and the covering entities of the second entity set are filtered out; Entities in the first entity set and the second entity set that have a front-to-back overlapping relationship are overlapping entities, and the overlapping entities of the first entity set are retained, and the overlapping entities of the second entity set are filtered out; The first entity set and the second entity set that have been retained and filtered out are merged to obtain a target entity set.
7. A named entity recognition system for a multi-round dialogue robot, characterized in that: It includes positive module, negative positive module, comparison module and filtering module; The regularization module is used to identify the input text information, poll each regularization rule group, and place the entity identified by the regularization rule group in the text information into a positive example set; The negative positive module is used to identify the input text information, poll each negative positive rule group, and place the entity identified by the negative positive rule group in the text information into a negative example set; The comparison module is used to compare entities in the negative example set and the positive example set to obtain conflicting entities; The filtering module is used to filter out the conflicting entities in the positive example set to obtain a target entity set; The positive rule group and the negative positive rule group are both provided with a positive dictionary and a negative dictionary; The regularization module is also used to put the words in the text information that both meet the rules of the regular rule group and are included in the positive dictionary of the regular rule group into the first positive set; put the words in the text information that both meet the rules of the regular rule group and are included in the negative dictionary of the regular rule group into the first negative set; take the words in the first positive set that are covered by the first negative set as conflicting words; splice the words in the first positive set and the first negative set that overlap with each other into one word and remove the redundant overlapping parts, and keep the spliced words in the first positive set; filter out the conflicting words in the first positive set, and put the remaining words in the first positive set as entities in the positive example set; and / or, The negative positive module is also used to: put the words in the text information that both meet the rules of the negative positive rule group and are included in the positive dictionary of the negative positive rule group into the second positive set; put the words in the text information that both meet the rules of the negative positive rule group and are included in the negative dictionary of the negative positive rule group into the second negative set; use the words in the second positive set that are covered by the second negative set as conflicting words; splice the overlapping words in the second positive set and the second negative set into one word and remove the redundant overlapping parts, and keep the spliced words in the second positive set; filter out the conflicting words in the second positive set, and place the remaining words in the second positive set as entities in the negative example set.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method for named entity recognition of a multi-round dialogue robot according to any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for named entity recognition of a multi-round dialogue robot according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Confidence classification method and confidence machine
CN104361224A
Structural extraction method and system of positional information based on semantic position model
CN104462063A
