Time entity recognition method and device, computer storage medium, and electronic device
By generating time dictionary trees and replacement rules to process medical texts, the problem of low accuracy of time entity recognition in the existing technology is solved, and more efficient time entity recognition is achieved.
Patent Information
- Application Number
- CN202210524897.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-13
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2042-05-13
AI Technical Summary
Existing temporal entity recognition methods in medical texts are based on regular expressions, resulting in high false call rates and misconnections, resulting in low temporal recognition accuracy.
The time rule library is used to generate a time dictionary tree, and the text to be recognized is replaced and matched through replacement rules, combined with time standardization, to improve the accuracy and efficiency of time entity recognition.
The accuracy and efficiency of time entity recognition are improved, the false call rate and misconnection are reduced, and the convenience of time recognition is enhanced.
Smart Images

Figure CN114943222B
Abstract
Description
Background Art
[0002] In the recognition of medical texts, there are many time representations, and the ways of expressing time are diverse. These times are very important in many scenarios, and they often need to be accurately extracted to form time series information.
[0003] In related technologies, the recognition schemes of temporal entities are all rule-based, such as FudanNLP (a toolkit developed for Chinese natural language processing) and HeidelTime (a time marker). The above two temporal entity recognition schemes are based on regular expression extraction rules, which improves the false recall rate; and in FudanNLP, a concept of temporal primitives is proposed, which connects the recognized temporal primitives into a whole, improving the recall rate, but it will be misconnected to a large extent, resulting in low accuracy of temporal recognition.
[0004] Therefore, a new temporal entity recognition method needs to be provided.
[0005] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0006] The purpose of the present disclosure is to provide a temporal entity recognition method, a temporal entity recognition device, a computer storage medium and an electronic device, thereby overcoming, at least to a certain extent, the problem of low temporal entity recognition accuracy in medical texts due to the limitations and defects of related technologies.
[0007] According to one aspect of the present disclosure, a temporal entity recognition method is provided, comprising:
[0008] Acquire a time rule base, and generate a time dictionary tree according to the time included in the time rule base;
[0009] Acquire a text to be recognized, and replace words included in the text to be recognized according to a preset replacement rule to obtain a replacement array;
[0010] Matching the replacement array with the time dictionary tree to obtain the time entity included in the text to be recognized;
[0011] Time entities included in the text to be recognized are time-normalized to obtain target time entities.
[0012] In an exemplary embodiment of the present disclosure, generating a time dictionary tree according to the time included in the time rule base includes:
[0013] Acquire a relative time rule base and an absolute time rule base included in the time rule base;
[0014] Replacing the time and words associated with the time included in the relative time rule base and the absolute time rule base to obtain a replaced relative time rule and a replaced absolute time rule;
[0015] The relative time dictionary tree is generated by replacing the relative time rule, and the absolute time dictionary tree is generated by replacing the absolute time rule; wherein the time dictionary tree includes the relative time dictionary tree and the absolute time dictionary tree.
[0016] In an exemplary embodiment of the present disclosure, a text to be recognized is obtained, and words included in the text to be recognized are replaced according to a preset replacement rule to obtain a replacement array, including:
[0017] Acquire the text to be recognized, and pre-process the words included in the text to be recognized to obtain a processed recognized text;
[0018] Replacing the to-be-replaced word included in the processed recognized text according to the preset replacement rule to obtain a replacement symbol;
[0019] The replacement array is generated by the words to be replaced and the replacement symbols.
[0020] In an exemplary embodiment of the present disclosure, matching the replacement array with the time dictionary tree to obtain the time entity included in the text to be recognized includes:
[0021] Obtain the replacement array in sequence and traverse it in the time dictionary tree;
[0022] When it is determined that the time dictionary tree includes a node corresponding to the replacement symbol in the replacement array, the time entity included in the text to be recognized is obtained through the node.
[0023] In an exemplary embodiment of the present disclosure, traversing the time dictionary tree includes:
[0024] When it is determined that the time dictionary tree does not include a node corresponding to a replacement symbol in any of the replacement arrays, obtaining a next replacement array of any of the replacement arrays;
[0025] According to the next replacement array, traversal is performed in the time dictionary tree.
[0026] In an exemplary embodiment of the present disclosure, time normalization is performed on the time entity included in the to-be-recognized text to obtain a target time entity, including:
[0027] Determining the type of time entity included in the text to be recognized;
[0028] According to the type of the time entity, the time entity is time-standardized to obtain the target time entity.
[0029] In an exemplary embodiment of the present disclosure, the type of the time entity is one of a relative time entity or an absolute time entity;
[0030] When the type of the time entity is an absolute time entity, time standardization is performed on the time entity to obtain the target time entity, including:
[0031] The absolute time entity is acquired, and the format of the absolute time entity is processed to obtain the target time entity.
[0032] In an exemplary embodiment of the present disclosure, when the type of the time entity is a relative time entity, time standardization is performed on the time entity to obtain the target time entity, including:
[0033] Acquire the relative time entity, and acquire the absolute time entity associated with the relative time entity in the processed recognition text;
[0034] Obtaining a target absolute time entity according to an absolute time entity associated with the relative time entity and a context feature of the relative time entity;
[0035] The format of the target absolute time entity is processed to obtain the target time entity.
[0036] In an exemplary embodiment of the present disclosure, the temporal entity recognition method further includes:
[0037] Acquire a preset time recognition model, and recognize the text to be recognized by using the time recognition model to obtain a first time entity list;
[0038] Acquire a second time entity list obtained by identifying the text to be identified using the time dictionary tree;
[0039] Calculating a difference between the first time entity list and the second time entity list to obtain a time entity difference;
[0040] When it is determined that the time entity difference set is not empty, converting the time entities included in the time entity difference set into a first time dictionary tree;
[0041] The first time dictionary tree is added to the time dictionary tree to obtain a target dictionary tree.
[0042] According to one aspect of the present disclosure, a temporal entity recognition device is provided, comprising:
[0043] A dictionary tree generation module, used to obtain a time rule base, and generate a time dictionary tree according to the time included in the time rule base;
[0044] The to-be-recognized text replacement module is used to obtain the to-be-recognized text, and replace the words included in the to-be-recognized text according to a preset replacement rule to obtain a replacement array;
[0045] A text matching module to be recognized, used for matching the replacement array with the time dictionary tree to obtain the time entity included in the text to be recognized;
[0046] The target time acquisition module is used to perform time standardization on the time entity included in the text to be recognized to obtain the target time entity.
[0047] According to one aspect of the present disclosure, a computer storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the temporal entity recognition method described in any of the above exemplary embodiments is implemented.
[0048] According to one aspect of the present disclosure, there is provided an electronic device, including:
[0049] Processor; and
[0050] A memory, configured to store executable instructions of the processor;
[0051] The processor is configured to execute the temporal entity recognition method described in any of the above exemplary embodiments by executing the executable instructions.
[0052] A time entity recognition method provided by an embodiment of the present disclosure comprises the following steps: obtaining a time rule library, generating a time dictionary tree according to the time included in the time rule library; obtaining a text to be recognized, replacing the words included in the text to be recognized according to a preset replacement rule to obtain a replacement array; matching the replacement array with the time dictionary tree to obtain the time entity included in the text to be recognized; and time-standardizing the time entity included in the text to be recognized to obtain a target time entity; on the one hand, obtaining a time rule library, generating a time dictionary tree according to the time rules in the time rule library, matching the text to be recognized with the time dictionary tree to obtain the time entity included in the text to be recognized, solving the problem that time entity recognition can only be performed by regular expressions in the related art, and improving the convenience and accuracy of time entity recognition; on the other hand, after obtaining the text to be recognized, replacing the text to be recognized according to the preset replacement rule to obtain a replacement array, matching the replacement array with the time dictionary tree to obtain the time entity included in the text to be recognized, and standardizing the acquired time entity to obtain the target time entity, thereby improving the efficiency of time recognition in the text to be recognized.
[0053] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.
[0055] Figure 1 A flowchart of a temporal entity recognition method according to an exemplary embodiment of the present disclosure is schematically shown.
[0056] Figure 2 A block diagram of a temporal entity recognition system according to an exemplary embodiment of the present disclosure is schematically shown.
[0057] Figure 3 A flowchart of a method for generating a time dictionary tree according to time included in a time rule base according to an exemplary embodiment of the present disclosure is schematically shown.
[0058] Figure 4 A flowchart of a method for replacing words included in a text to be recognized according to a preset replacement rule to obtain a replacement array according to an exemplary embodiment of the present disclosure is schematically shown.
[0059] Figure 5A flowchart of a method for matching a replacement array with a time dictionary tree to obtain a time entity included in a text to be recognized according to an exemplary embodiment of the present disclosure is schematically shown.
[0060] Figure 6 A flowchart of a method for traversing a time dictionary tree according to an exemplary embodiment of the present disclosure is schematically shown.
[0061] Figure 7 A flowchart of a method for performing time standardization on a time entity included in a text to be recognized to obtain a target time entity according to an exemplary embodiment of the present disclosure is schematically shown.
[0062] Figure 8 A flowchart of a method for performing time standardization on a time entity to obtain the target time entity when the type of the time entity is a relative time entity according to an exemplary embodiment of the present disclosure is schematically shown.
[0063] Fig. 9 A flowchart of a temporal entity recognition method according to an exemplary embodiment of the present disclosure is schematically shown.
[0064] Fig.10 A block diagram schematically shows a temporal entity recognition device according to an exemplary embodiment of the present disclosure.
[0065] Fig.11 An electronic device for implementing the above-mentioned temporal entity recognition method according to an exemplary embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0066] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concepts of the example embodiments are fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.
[0067] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0068] In natural language text recognition, especially in the recognition of medical texts, there are a lot of time in medical texts, and the ways of expressing time are diverse. Most of the time is not standardized, which not only increases the difficulty of time recognition, but also requires preprocessing and standardization of the recognized time entities, further increasing the difficulty of recognition. For example: from July 8, 2020 to July 15, 2020, I came to our hospital for chemotherapy, or the epidemic has lasted for almost 2 years, etc. These times are very important in many scenarios, and it is often necessary to accurately extract these times to form time series information for easy reading or related research.
[0069] The recognition schemes of time entities in related technologies are all rule-based. For example, FudanNLP. In the time extraction module of FudanNLP, the concept of time primitives is proposed. The time primitive is based on the time unit and is the smallest unit that constitutes the time expression. FudanNLP uses regular expressions to recognize time primitives and connects the recognized time primitives into a whole to constitute the time entity that needs to be recognized.
[0070] However, FudanNLP uses regular expressions to extract temporal entities in the text to be recognized. Although regular expressions have strong expressive power, they will increase the false recall rate of the model. Although FudanNLP can improve the recall rate, it will cause false connections to a large extent, resulting in low accuracy of temporal entity recognition.
[0071] Based on one or more of the above problems, this exemplary embodiment first provides a temporal entity recognition method, which can be run on a server, a server cluster or a cloud server, etc. Of course, those skilled in the art can also run the method of the present invention on other platforms as required, and this exemplary embodiment does not specifically limit this. Figure 1 As shown, the temporal entity recognition method may include steps S110 to S140:
[0072] Step S110. Obtain a time rule base, and generate a time dictionary tree according to the time included in the time rule base;
[0073] Step S120. Obtain the text to be recognized, and replace the words included in the text to be recognized according to a preset replacement rule to obtain a replacement array;
[0074] Step S130. Match the replacement array with the time dictionary tree to obtain the time entity included in the text to be recognized;
[0075] Step S140: Time-standardize the time entity included in the text to be recognized to obtain a target time entity.
[0076] The above-mentioned time entity recognition method obtains a time rule library, generates a time dictionary tree according to the time included in the time rule library; obtains the text to be recognized, replaces the words included in the text to be recognized according to the preset replacement rules, and obtains a replacement array; matches the replacement array with the time dictionary tree to obtain the time entity included in the text to be recognized; and performs time standardization on the time entity included in the text to be recognized to obtain the target time entity; on the one hand, obtains the time rule library, generates a time dictionary tree according to the time rules in the time rule library, matches the text to be recognized through the time dictionary tree, and obtains the time entity included in the text to be recognized, which solves the problem that time entity recognition can only be performed through regular expressions in the related art, and improves the convenience and accuracy of time entity recognition; on the other hand, after obtaining the text to be recognized, replaces the text to be recognized according to the preset replacement rules to obtain a replacement array, uses the replacement array to match the time dictionary tree to obtain the time entity included in the text to be recognized, and standardizes the obtained time entity to obtain the target time entity, which improves the efficiency of time recognition in the text to be recognized.
[0077] Hereinafter, each step involved in the temporal entity recognition method according to the exemplary embodiment of the present disclosure is explained and illustrated in detail.
[0078] First, the application scenario and purpose of the exemplary embodiment of the present disclosure are explained and illustrated. Specifically, the exemplary embodiment of the present disclosure can be applied to recognize the time included in the medical text, and mainly studies how to improve the accuracy and efficiency of time entity recognition in the medical text.
[0079] In the present disclosure, the acquired time rule library and the text to be recognized are taken as the basis. After the time rule library is acquired, the absolute time rules included in the time rule library and the time and the words associated with the time included in the relative rules are replaced to obtain the replaced relative time rules and the replaced absolute time rules, and a time dictionary tree is generated according to the replaced relative time rules and the replaced absolute time rules; by constructing the time dictionary tree, the convenience of time entity recognition in the text to be recognized is improved; for the acquired text to be recognized, the words included in the text to be recognized are preprocessed, and the words to be replaced included in the text to be recognized are replaced according to the preset replacement rules to obtain the target words, a replacement array is generated according to the words to be replaced and the target words, and the time dictionary tree is traversed and matched according to the replacement array to obtain the time entity corresponding to the text to be recognized, and the time entity is standardized to obtain the target time entity, thereby improving the accuracy and efficiency of time entity recognition in the text to be recognized.
[0080] Next, the temporal entity recognition system involved in the exemplary embodiment of the present disclosure is explained and illustrated. Figure 2As shown, the time entity recognition system may include a dictionary tree construction module 210, a time entity recognition module 220, a time entity standardization module 230, and a time rule mining module 240. The dictionary tree construction module 210 is used to obtain the relative time rules and absolute time rules included in the time rule library, replace the time and the words associated with the time in the relative time rules and the absolute time rules, obtain the replaced relative time rules and the replaced absolute time rules, and generate the relative time dictionary tree and the absolute time dictionary tree according to the replaced relative time rules and the replaced absolute time rules; the time entity recognition module 220 is connected to the dictionary tree construction module 210 network, and is used to obtain the text to be recognized, replace the words to be replaced in the text to be recognized according to the preset replacement rules, obtain the replacement symbols, obtain the replacement array according to the replacement symbols and the words to be replaced, and use the replacement array to traverse and match in the time dictionary tree to obtain the time entity included in the text to be recognized; the time entity standardization module 230 is connected to the time entity recognition module 220, and is used to obtain the text to be recognized according to the preset replacement rules, replace the words to be replaced in the text to be recognized, obtain the replacement symbols, obtain the replacement array according to the replacement symbols and the words to be replaced, and use the replacement array to traverse and match in the time dictionary tree to obtain the time entity included in the text to be recognized; The entity recognition module 220 is connected to the network and is used to receive the time entity included in the text to be recognized obtained by the time entity recognition module 220, determine the category of the received time entity, standardize the time entity according to the category of the received time entity, and obtain the target time entity; the time rule mining module 240 is connected to the dictionary tree construction module 210 and the time entity recognition module 220, and is used to recognize the time entity included in the text to be recognized through a preset time recognition model, obtain a first time entity list and obtain a second time entity list obtained through the time dictionary tree, calculate the difference between the first time list and the second time list, and obtain a time entity difference set. When the time entity difference set is not empty, the time in the time entity difference set is converted into a first time dictionary tree, and the first time dictionary tree is supplemented into the time dictionary tree.
[0081] The following will be combined Figure 2 Steps S110 to S140 are explained and illustrated in detail.
[0082] In step S110, a time rule base is obtained, and a time dictionary tree is generated according to the time included in the time rule base.
[0083] Among them, the time rule library includes a relative time rule library and an absolute time rule library. The absolute time rule library refers to a rule library with specific time. For example, the time 2021-11-12 is the absolute time; the relative time rule library refers to a rule library relative to the absolute time. For example, May of this year is a relative time.
[0084] In this example embodiment, reference Figure 3 As shown, generating a time dictionary tree according to the time included in the time rule base may include steps S310 to S330:
[0085] Step S310. Obtain a relative time rule library and an absolute time rule library included in the time rule library;
[0086] Step S320: Replace the time and words associated with the time included in the relative time rule base and the absolute time rule base to obtain a replacement relative time rule and a replacement absolute time rule;
[0087] Step S330. Generate a relative time dictionary tree by replacing the relative time rule, and generate an absolute time dictionary tree by replacing the absolute time rule; wherein the time dictionary tree includes the relative time dictionary tree and the absolute time dictionary tree.
[0088] In the following, step S310 to step S330 will be further explained and illustrated. Specifically, first, the relative time rule library and the absolute time rule library included in the time rule library are obtained. In order to ensure that the rules have a certain degree of generalization ability, the time and the words related to time included in the relative time rule library are replaced to obtain the replaced relative time rules; at the same time, the time and the words related to time included in the absolute time rule library are also replaced to obtain the replaced absolute time rules; specifically, when replacing, the numbers in the time can be replaced, and the words related to time can be the units of measurement of time, such as: beginning, first ten days, middle ten days, last ten days, year, month, day, etc.; it can be an abstract expression of time, such as: before, after, come, etc.; it can also be a word or symbol that records the time span, such as: until, to, and, symbol. ~, etc.; it can also be a common symbol in the time rule library, such as: space, comma, period, etc. In this example embodiment, no specific limitation is made to the words related to time. When replacing the words related to time, the beginning, the first ten days, the middle ten days, and the last ten days can be replaced with the same symbol, and the year, month, and day can be replaced with different symbols respectively. The various words included in the abstract expression of time can be replaced with the same symbol, and the various words recording the time span can also be replaced with the same symbol; in this example embodiment, the replacement symbol of the data in time and the replacement symbol of each time-related word are not specifically limited. Those skilled in the art can select the corresponding replacement symbol according to the specific implementation situation. Then, the relative time dictionary tree is generated by replacing the relative time rule, and the absolute time dictionary tree is generated by replacing the absolute time rule. The time dictionary tree is an ordered tree. In the time dictionary tree, the key is not stored in the node, but is determined by the position of the node in the tree. All descendants of a node have the same prefix. The root node does not contain characters, and each node outside the root node contains only one character. The characters passed on the path from the root node to a certain node are connected to form the string corresponding to the node.
[0089] For example, when constructing the time dictionary tree for the time March 1, 2000 and May 2000, first, replace the time, which can be replaced with: #d#d#d#d#y#d#m#d#a, #d#d#d#d#y#d#d#m; then construct the time dictionary tree. During the construction, since the root node does not contain any characters and the root node has no child node #d, the first child node #d of the root node can be created. The first child node #d has no child node #d, and the second child node #d of the first child node #d is created. The third character #d is inserted on the basis of the second child node #d, and the third child node #d of the second child node #d is created. The fourth character #d is inserted on the basis of the third child node, and the fourth child node #d of the third child node #d is created. The fifth character #y is inserted on the basis of the fourth child node #d, and the child node #y of the fourth child node #d is created. The sixth character #d is inserted on the basis of the child node #y, and the The fifth child node #d of child node #y, inserts the seventh character #m based on the fifth child node #d, creates the child node #m of the fifth child node #d, inserts the eighth character #d based on the child node #m, creates the sixth child node #d of child node #m, inserts the ninth character #a based on the sixth child node, creates the child node #a of the sixth child node #d, and marks the child node #a as the end of the string; when inserting #d#d#d#d#y#d#d#m, there is no need to recreate the first child node #d, the second child node #d, the third child node #d, the fourth child node #d, the child node #y and the fifth child node #d, inserts the seventh character #d based on the fifth child node #d, creates another child node of the fifth child node #d, the seventh child node #d, inserts the eighth character #m based on the seventh child node #d, creates the child node #m of the seventh child node #d, and marks the child node #m as the end of the string.
[0090] In step S120, a text to be recognized is obtained, and words included in the text to be recognized are replaced according to a preset replacement rule to obtain a replacement array.
[0091] The text to be recognized is a Chinese text to be recognized. The word included in the text to be recognized can be a Chinese character. The replacement array includes the word to be replaced and the replacement symbol after replacement.
[0092] In this example embodiment, reference Figure 4 As shown, obtaining a text to be recognized, replacing words included in the text to be recognized according to a preset replacement rule, and obtaining a replacement array may include steps S410 to S430:
[0093] Step S410. Obtain the text to be recognized, preprocess the words included in the text to be recognized, and obtain the processed recognition text;
[0094] Step S420. Replace the words to be replaced included in the processed recognition text according to the preset replacement rules to obtain replacement symbols;
[0095] Step S430. Generate the replacement array through the words to be replaced and the replacement symbols.
[0096] Hereinafter, steps S410 - S430 will be further explained and described. Specifically, first, obtain the text to be recognized, and preprocess the words included in the text to be recognized. The preprocessing of the words can be to delete the spaces before each word in the text to be recognized. After deleting the spaces before each word in the text to be recognized, the processed recognition text is obtained; then, replace the words included in the processed recognition text according to the preset replacement rules to obtain replacement symbols; in this exemplary embodiment, when replacing the words to be replaced included in the processed recognition text, the replacement rules are the same as those for replacing the time and the words associated with time included in the relative time rule library and the absolute time rule library, that is, when performing the replacement, the numbers in the time can be replaced, and the words related to time can be the measurement units of time, such as: beginning, first ten days, middle ten days, last ten days, year, month, day, etc.; can be the abstract expressions of time, such as: before, after, coming, etc.; can also be the words or symbols recording the time span, such as: to, until, and, symbol ~, etc.; can also be the common symbols in the time rule library, such as: space, comma, period, etc. In this exemplary embodiment, the words related to time are not specifically limited. When replacing the words related to time, the same symbol can be used to replace beginning, first ten days, middle ten days, and last ten days, and different symbols can be used to replace year, month, and day respectively. The same symbol can be used to replace various words included in the abstract expressions of time, and the same symbol can also be used to replace various words recording the time span; in this exemplary embodiment, the replacement symbols for the data in the time and the replacement symbols for each word related to time are not specifically limited, and those skilled in the art can select the corresponding replacement symbols according to the specific implementation situation; finally, generate the replacement array through the words to be replaced and the replacement symbols obtained after replacement. For example, when the processed recognition text includes '2014 year', the replacement array obtained after replacement is: ['2', '#d'], ['0', '#d'], ['1', '#d'], ['4', '#d'], ['year', '#s'].
[0097] It should be noted that when replacing the words to be replaced included in the processed recognition text, a machine learning method can also be used. First, the text in the training set is annotated, and the preset model is trained through the annotated text to obtain a target recognition model. The processed recognition text is input into the target recognition model to obtain the recognition result, and the recognition result is replaced. Among them, the preset model can be FudanNLP or other natural language recognition models. In this example embodiment, the preset model is not specifically limited.
[0098] In step S130, the replacement array is matched with the time dictionary tree to obtain the time entity included in the text to be recognized.
[0099] In this example embodiment, reference Figure 5 As shown, matching the replacement array with the time dictionary tree to obtain the time entity included in the text to be recognized may include step S510 and step S520:
[0100] Step S510. Obtain the replacement array in sequence and traverse the time dictionary tree;
[0101] Step S520. When it is determined that the time dictionary tree includes a node corresponding to the replacement symbol in the replacement array, the time entity included in the text to be recognized is obtained through the node.
[0102] In the following, step S510 and step S520 will be further explained and illustrated. Specifically, the replacement array is obtained in sequence, and the time dictionary tree is traversed according to the replacement array. When it is determined that the time dictionary tree includes a node corresponding to the replacement symbol included in the replacement array, the time rule corresponding to the processed recognition text is determined according to the node, and the time entity included in the text to be processed is obtained according to the time rule. That is, when matching the replacement array, all replacement arrays can be matched to the corresponding nodes in the time dictionary tree, and the time rules in the time rule library corresponding to the processed recognition text are determined according to the matched nodes, and the time entity included in the processed recognition text is determined according to the matched time rules.
[0103] Further, in this exemplary embodiment, during the matching process, when any replacement array fails to match in the time dictionary array, reference is made to Figure 6 As shown, traversing the time dictionary tree may include step S610 and step S620:
[0104] Step S610. When it is determined that the time dictionary tree does not include a node corresponding to a replacement symbol in any of the replacement arrays, obtain the next replacement array of any of the replacement arrays;
[0105] Step S620: Traverse the time dictionary tree according to the next replacement array.
[0106] In the following, step S610 and step S620 will be further explained and illustrated. Specifically, for any replacement array, when traversing and matching in the time dictionary tree, if there is no node corresponding to the replacement symbol included in any replacement array in the time dictionary tree, the next replacement array of any replacement array is obtained, and traversing and matching is performed in the time dictionary tree according to the replacement symbol in the next replacement array.
[0107] In step S140, time normalization is performed on the time entity included in the text to be recognized to obtain a target time entity.
[0108] In this example embodiment, reference Figure 7 As shown, time normalization is performed on the time entity included in the text to be recognized to obtain the target time entity, which may include step S710 and step S720:
[0109] Step S710. Determine the type of time entity included in the text to be recognized;
[0110] Step S720: According to the type of the time entity, time standardize the time entity to obtain the target time entity.
[0111] In the following, step S710 and step S720 are further explained and illustrated. Specifically, first, a time entity obtained by matching the time dictionary tree is obtained, the type of the time entity is determined, and the matched time entity is standardized according to the type of the time entity to obtain a target time entity. The type of the time entity is one of a relative time entity and an absolute time entity.
[0112] In this exemplary embodiment, when the type of the time entity is an absolute time entity, performing time standardization on the time entity to obtain the target time entity may include:
[0113] The absolute time entity is acquired, and the format of the absolute time entity is processed to obtain the target time entity.
[0114] Specifically, when the matched time entity is an absolute time entity, the format of the absolute time entity is processed, wherein the processing of the format may include completing the format of the time entity, for example, when the time entity is May 2020, the format of the time entity may be processed as 2020 May? Day, where? represents that it is not mentioned in the text to be recognized; or the time entity may be formatted, for example, when the matched time entity is 2021-06-05, it may be formatted as 2021-06-05, or when the matched time entity is 2021--March 5, it may be formatted as 2021-03-05.
[0115] For further reference, Figure 8 As shown, when the type of the time entity is a relative time entity, time standardization is performed on the time entity to obtain the target time entity, which may include steps S810 to S830:
[0116] Step S810: Acquire the relative time entity, and acquire the absolute time entity associated with the relative time entity in the processed recognition text;
[0117] Step S820. Obtain a target absolute time entity according to the absolute time entity associated with the relative time entity and the context feature of the relative time entity;
[0118] Step S830: Process the format of the target absolute time entity to obtain the target time entity.
[0119] In the following, step S810-step S830 will be further explained and illustrated. First, a relative time entity is obtained, and an absolute time entity associated with the relative time entity included in the recognized text is obtained, wherein the absolute time entity associated with the relative time entity can be an absolute time entity representing the current time included in the text to be recognized, or it can be an absolute time entity located before or after the relative time entity; based on the absolute time entity associated with the relative time entity and the contextual features of the relative time entity, a target absolute time entity corresponding to the relative time entity is obtained, and the format of the target absolute time entity is processed to obtain the target time entity, wherein the processing of the format of the target absolute time entity can be to complete the format of the target absolute time entity, or it can be to format the target absolute time entity. In this example embodiment, the format processing of the target absolute time entity is not specifically limited.
[0120] For example, when the text to be recognized is: came to our hospital for treatment on September 9, 2014, the patient said that he had undergone modified radical mastectomy for "breast cancer" 12 years ago, and the relative time entity matched by the time dictionary tree is 12 years ago. In order to determine the target absolute time entity corresponding to the relative time entity, the absolute time entity representing the current time in the text to be recognized or the absolute time entity before the relative time entity can be obtained, that is, September 9, 2014; then, through the absolute time entity associated with the relative time entity and the contextual features of the relative time entity, that is, through 12 years ago and September 9, 2014, the target absolute time entity corresponding to the relative time entity, September 9, 2002, is obtained.
[0121] In this example embodiment, the time dictionary tree can also be expanded, referring to Fig. 9 As shown, the temporal entity recognition method may further include steps S910 to S950:
[0122] Step S910. Obtain a preset time recognition model, and recognize the text to be recognized by using the time recognition model to obtain a first time entity list;
[0123] Step S920. Obtain a second time entity list obtained by using the time dictionary tree to identify the text to be identified;
[0124] Step S930. Calculate the difference between the first time entity list and the second time entity list to obtain a time entity difference;
[0125] Step S940. When it is determined that the time entity difference set is not empty, convert the time entity included in the time entity difference set into a first time dictionary tree;
[0126] Step S950. Add the first time dictionary tree to the time dictionary tree to obtain a target dictionary tree.
[0127] In the following, step S910-step S950 will be further explained and illustrated. Specifically, when identifying the time entities included in the text to be identified, not only can the second time entity list included in the text to be identified be obtained through the time dictionary tree, but also a preset time recognition model can be obtained, and the time entities included in the text to be identified can be identified through the preset time recognition model to obtain a first time entity list, wherein the preset time recognition model can be FudanNLP or other time recognition models, and the preset time recognition model is not specifically limited in this example embodiment; then, after obtaining the first time entity list and the second time entity list, the difference set can be calculated between the first time entity list and the second time entity list to obtain a time entity difference set, and the time entities included in the time entity difference set are time entities that are not recognized by the time dictionary tree; then, the time entities included in the time entity difference set are converted into a first time dictionary tree, and the first time dictionary tree is added to the time dictionary tree to obtain a target time dictionary tree.
[0128] In this example embodiment, although the time rule has a certain generalization ability, the time formats in the text to be recognized are diverse. The difference between the time entity list recognized by the preset time recognition model and the time entity list matched by the time dictionary tree is used to determine the recognized time entity in the time dictionary tree, and the unrecognized time entity is converted into a first time dictionary tree, and the first time dictionary tree is added to the time dictionary tree, thereby improving the recall rate of time entity recognition.
[0129] The time entity recognition method provided by the example embodiments of the present disclosure has at least the following advantages: on the one hand, a time dictionary tree is generated by using a time rule library. After the text to be recognized is obtained, the time and words associated with the time included in the text to be recognized are replaced according to a preset replacement rule to obtain a replacement array. The time entity included in the text to be recognized is obtained by traversing and matching the replacement array in the time dictionary tree, and the obtained time entity is standardized to obtain a target time entity, thereby improving the convenience and accuracy of time entity recognition; on the other hand, in addition to matching the time entity in the text to be recognized through the constructed time dictionary tree, the time entity recognized in the time dictionary tree is determined to be a difference between the time entity list recognized by the preset time recognition model and the time entity list matched by the time dictionary tree, and the unrecognized time entity is converted into a first time dictionary tree, and the first time dictionary tree is added to the time dictionary tree, thereby improving the recall rate of time entity recognition.
[0130] The exemplary embodiment of the present disclosure also provides a temporal entity recognition device, referring to Fig.10As shown, it may include: a dictionary tree generation module 1010, a to-be-recognized text replacement module 1020, a to-be-recognized text matching module 1030, and a target time acquisition module 1040. Among them:
[0131] The dictionary tree generation module 1010 is used to obtain a time rule base and generate a time dictionary tree according to the time included in the time rule base;
[0132] The to-be-recognized text replacement module 1020 is used to obtain the to-be-recognized text, and replace the words included in the to-be-recognized text according to a preset replacement rule to obtain a replacement array;
[0133] The to-be-recognized text matching module 1030 is used to match the replacement array with the time dictionary tree to obtain the time entity included in the to-be-recognized text;
[0134] The target time acquisition module 1040 is used to perform time standardization on the time entity included in the text to be recognized to obtain a target time entity.
[0135] The specific details of each module in the above-mentioned temporal entity recognition device have been described in detail in the corresponding temporal entity recognition method, so they will not be repeated here.
[0136] In an exemplary embodiment of the present disclosure, generating a time dictionary tree according to the time included in the time rule base includes:
[0137] Acquire a relative time rule base and an absolute time rule base included in the time rule base;
[0138] Replacing the time and words associated with the time included in the relative time rule base and the absolute time rule base to obtain a replaced relative time rule and a replaced absolute time rule;
[0139] The relative time dictionary tree is generated by replacing the relative time rule, and the absolute time dictionary tree is generated by replacing the absolute time rule; wherein the time dictionary tree includes the relative time dictionary tree and the absolute time dictionary tree.
[0140] In an exemplary embodiment of the present disclosure, a text to be recognized is obtained, and words included in the text to be recognized are replaced according to a preset replacement rule to obtain a replacement array, including:
[0141] Acquire the text to be recognized, and pre-process the words included in the text to be recognized to obtain a processed recognized text;
[0142] Replacing the to-be-replaced word included in the processed recognized text according to the preset replacement rule to obtain a replacement symbol;
[0143] The replacement array is generated by the words to be replaced and the replacement symbols.
[0144] In an exemplary embodiment of the present disclosure, matching the replacement array with the time dictionary tree to obtain the time entity included in the text to be recognized includes:
[0145] Obtain the replacement array in sequence and traverse it in the time dictionary tree;
[0146] When it is determined that the time dictionary tree includes a node corresponding to the replacement symbol in the replacement array, the time entity included in the text to be recognized is obtained through the node.
[0147] In an exemplary embodiment of the present disclosure, traversing the time dictionary tree includes:
[0148] When it is determined that the time dictionary tree does not include a node corresponding to a replacement symbol in any of the replacement arrays, obtaining a next replacement array of any of the replacement arrays;
[0149] According to the next replacement array, traversal is performed in the time dictionary tree.
[0150] In an exemplary embodiment of the present disclosure, time normalization is performed on the time entity included in the to-be-recognized text to obtain a target time entity, including:
[0151] Determining the type of time entity included in the text to be recognized;
[0152] According to the type of the time entity, the time entity is time-standardized to obtain the target time entity.
[0153] In an exemplary embodiment of the present disclosure, the type of the time entity is one of a relative time entity or an absolute time entity;
[0154] When the type of the time entity is an absolute time entity, time standardization is performed on the time entity to obtain the target time entity, including:
[0155] The absolute time entity is acquired, and the format of the absolute time entity is processed to obtain the target time entity.
[0156] In an exemplary embodiment of the present disclosure, when the type of the time entity is a relative time entity, time standardization is performed on the time entity to obtain the target time entity, including:
[0157] Acquire the relative time entity, and acquire the absolute time entity associated with the relative time entity in the processed recognition text;
[0158] Obtaining a target absolute time entity according to an absolute time entity associated with the relative time entity and a context feature of the relative time entity;
[0159] The format of the target absolute time entity is processed to obtain the target time entity.
[0160] In an exemplary embodiment of the present disclosure, the temporal entity recognition method further includes:
[0161] Acquire a preset time recognition model, and recognize the text to be recognized by using the time recognition model to obtain a first time entity list;
[0162] Acquire a second time entity list obtained by identifying the text to be identified using the time dictionary tree;
[0163] Calculating a difference between the first time entity list and the second time entity list to obtain a time entity difference;
[0164] When it is determined that the time entity difference set is not empty, converting the time entities included in the time entity difference set into a first time dictionary tree;
[0165] The first time dictionary tree is added to the time dictionary tree to obtain a target dictionary tree.
[0166] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
[0167] In addition, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.
[0168] In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
[0169] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as "circuits", "modules" or "systems".
[0170] Refer to the following Fig.11 1100 according to this embodiment of the present disclosure is described. Fig.11 The electronic device 1100 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0171] like Fig.11 As shown, the electronic device 1100 is in the form of a general computing device. The components of the electronic device 1100 may include, but are not limited to: the at least one processing unit 1110, the at least one storage unit 1120, a bus 1130 connecting different system components (including the storage unit 1120 and the processing unit 1110), and a display unit 1140.
[0172] The storage unit stores a program code, which can be executed by the processing unit 1110, so that the processing unit 1110 performs the steps described in the "Exemplary Method" section of the present specification according to various exemplary embodiments of the present disclosure. For example, the processing unit 1110 can perform the following steps: Figure 1 The steps S110 shown in the figure are as follows: obtaining a time rule library, and generating a time dictionary tree according to the time included in the time rule library; S120: obtaining a text to be recognized, and replacing the words included in the text to be recognized according to a preset replacement rule to obtain a replacement array; S130: matching the replacement array with the time dictionary tree to obtain the time entity included in the text to be recognized; S140: performing time standardization on the time entity included in the text to be recognized to obtain a target time entity.
[0173] The storage unit 1120 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 11201 and / or a cache storage unit 11202 , and may further include a read-only storage unit (ROM) 11203 .
[0174] The storage unit 1120 may also include a program / utility 11204 having a set (at least one) of program modules 11205, such program modules 11205 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] Bus 1130 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0176] The electronic device 1100 may also communicate with one or more external devices 1200 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 1100, and / or communicate with any device that enables the electronic device 1100 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 1150. Furthermore, the electronic device 1100 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 1160. As shown, the network adapter 1160 communicates with other modules of the electronic device 1100 via a bus 1130. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 1100, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0177] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
[0178] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible implementations, various aspects of the present disclosure may also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary implementations of the present disclosure described in the above "Exemplary Method" section of the present specification.
[0179] According to the program product for implementing the above method in the embodiment of the present disclosure, it can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.
[0180] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0181] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0182] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0183] Program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0184] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present disclosure, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.
[0185] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.
Claims
1. A temporal entity recognition method, characterized in that: include: Obtain a time rule base, and generate a time dictionary tree according to the time included in the time rule base; wherein the time rule base includes a relative time rule base and an absolute time rule base, the absolute time rule base refers to a rule base with a specific time, and the relative time rule base refers to a rule base relative to the absolute time; Acquire a text to be recognized, and replace words included in the text to be recognized according to a preset replacement rule to obtain a replacement array; Matching the replacement array with the time dictionary tree to obtain the time entity included in the text to be recognized; Performing time standardization on the time entity included in the text to be recognized to obtain a target time entity; Obtain a preset time recognition model, recognize the text to be recognized by using the time recognition model to obtain a first time entity list; obtain a second time entity list obtained by recognizing the text to be recognized by using the time dictionary tree; calculate the difference between the first time entity list and the second time entity list to obtain a time entity difference set; when it is determined that the time entity difference set is not empty, convert the time entities included in the time entity difference set into a first time dictionary tree; add the first time dictionary tree to the time dictionary tree to obtain a target dictionary tree.
2. The temporal entity recognition method according to claim 1, characterized in that: Generate a time dictionary tree according to the time included in the time rule base, including: Acquire a relative time rule base and an absolute time rule base included in the time rule base; Replacing the time and words associated with the time included in the relative time rule base and the absolute time rule base to obtain a replaced relative time rule and a replaced absolute time rule; The relative time dictionary tree is generated by replacing the relative time rule, and the absolute time dictionary tree is generated by replacing the absolute time rule; wherein the time dictionary tree includes the relative time dictionary tree and the absolute time dictionary tree.
3. The temporal entity recognition method according to claim 2, characterized in that: Obtain a text to be recognized, and replace the words included in the text to be recognized according to a preset replacement rule to obtain a replacement array, including: Acquire the text to be recognized, and pre-process the words included in the text to be recognized to obtain a processed recognized text; Replacing the to-be-replaced word included in the processed recognized text according to the preset replacement rule to obtain a replacement symbol; The replacement array is generated by the words to be replaced and the replacement symbols.
4. The temporal entity recognition method according to claim 3, characterized in that: Matching the replacement array with the time dictionary tree to obtain the time entity included in the text to be recognized includes: Obtain the replacement array in sequence and traverse it in the time dictionary tree; When it is determined that the time dictionary tree includes a node corresponding to the replacement symbol in the replacement array, the time entity included in the text to be recognized is obtained through the node.
5. The temporal entity recognition method according to claim 4, characterized in that: Traversing the time dictionary tree includes: When it is determined that the time dictionary tree does not include a node corresponding to a replacement symbol in any of the replacement arrays, obtaining a next replacement array of any of the replacement arrays; According to the next replacement array, traversal is performed in the time dictionary tree.
6. The temporal entity recognition method according to claim 2, characterized in that: Time normalization is performed on the time entity included in the text to be recognized to obtain a target time entity, including: Determining the type of time entity included in the text to be recognized; According to the type of the time entity, the time entity is time-standardized to obtain the target time entity.
7. The temporal entity recognition method according to claim 6, characterized in that: The type of the time entity is one of a relative time entity and an absolute time entity; When the type of the time entity is an absolute time entity, time standardization is performed on the time entity to obtain the target time entity, including: The absolute time entity is acquired, and the format of the absolute time entity is processed to obtain the target time entity.
8. The temporal entity recognition method according to claim 7, characterized in that: When the type of the time entity is a relative time entity, time standardization is performed on the time entity to obtain the target time entity, including: Acquire the relative time entity, and acquire the absolute time entity associated with the relative time entity in the recognized text; Obtaining a target absolute time entity according to an absolute time entity associated with the relative time entity and a context feature of the relative time entity; The format of the target absolute time entity is processed to obtain the target time entity.
9. A temporal entity recognition device, characterized in that: include: A dictionary tree generation module, used to obtain a time rule base and generate a time dictionary tree according to the time included in the time rule base; The to-be-recognized text replacement module is used to obtain the to-be-recognized text, and replace the words included in the to-be-recognized text according to a preset replacement rule to obtain a replacement array; A text matching module to be recognized, used for matching the replacement array with the time dictionary tree to obtain the time entity included in the text to be recognized; A target time acquisition module, used for performing time standardization on the time entity included in the text to be recognized to obtain a target time entity; Obtain a preset time recognition model, recognize the text to be recognized by using the time recognition model to obtain a first time entity list; obtain a second time entity list obtained by recognizing the text to be recognized by using the time dictionary tree; calculate the difference between the first time entity list and the second time entity list to obtain a time entity difference set; when it is determined that the time entity difference set is not empty, convert the time entities included in the time entity difference set into a first time dictionary tree; add the first time dictionary tree to the time dictionary tree to obtain a target dictionary tree.
10. A computer storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the temporal entity recognition method according to any one of claims 1 to 8 is implemented.
11. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; Wherein, the processor is configured to execute the temporal entity recognition method described in any one of claims 1-8 by executing the executable instructions.
