Named entity recognition method, named entity recognition apparatus, and program
By generating candidate entities using a named entity reproduction model and combining it with information from an external knowledge base, this approach addresses the shortcomings of existing models in recognizing short texts and erroneous situations, achieving higher accuracy in named entity recognition.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2026-04-14
AI Technical Summary
Existing neural network-based named entity recognition models struggle to perform sophisticated named entity recognition in short texts, with spelling errors, or typos, resulting in insufficient recognition accuracy.
Candidate entities are generated by using a named entity reproduction model, relevant information is obtained by combining it with an external knowledge base, and then the concatenation with the original text is input into the named entity recognition model for recognition.
It improves the accuracy of named entity recognition, especially in complex scenarios where it can more precisely identify named entities.
Smart Images

Figure 0007845451000001 
Figure 0007845451000002 
Figure 0007845451000003
Abstract
Description
Technical Field
[0001] The present invention belongs to the fields of machine learning and natural language processing (NLP, Natural Language Processing), and specifically relates to a method, apparatus, and storage medium for extracting named entities.
Background Art
[0002] In recent years, a named entity recognition (NER) model based on a neural network has been used for automatic extraction of semantic features of large-scale texts, and good results have already been obtained. However, in actual applications, when fine discrimination of expressions is required, situations may occur where the text to be discriminated is a short sentence (without sufficient context), and there are spelling mistakes or typing mistakes in the text to be discriminated. In such situations, it is difficult for popular pre-trained transformers to make accurate discriminations.
[0003] For example, in the case of the sentence "The term'meter maid' spread to the cute Rita of the Beatles, and this male singer was charmed by a female traffic warden", in the sentence, "the Beatles" is often recognized as an expression type such as "book", "other products", "band", etc., and "cute Rita" is often recognized as an expression type such as "book", "other products", "musical work", etc. In complex (fine) named entity extraction, it is more desirable to recognize "the Beatles" as a "band" and "cute Rita" as a "musical work" in the above sentence. Therefore, for the above sentence, it is difficult for the current named entity extraction model to accurately recognize the named entities in it in detail. Therefore, there is an urgent need for a named entity extraction method that can improve the accuracy in complex (fine) named entity extraction scenarios.
Summary of the Invention
Problems to be Solved by the Invention
[0004] At least one embodiment of the present invention aims to provide a named entity recognition method, apparatus, and storage medium that can improve accuracy in complex (narrow) named entity recognition scenes. [Means for solving the problem]
[0005] To solve the above problems, a first aspect of the present invention provides a named entity extraction method performed by a named entity extraction device, comprising the steps of: reproducing named entity candidates in a first text to be extracted using a named entity reproduction model that reproduces named entities of any type in text; searching a knowledge base based on the named entity candidates in the first text and obtaining related information for the named entity candidates in the first text, wherein the knowledge base includes related information for a plurality of named entities, and the related information for the named entities includes the expression name, expression type, and expression description information of the named entity; obtaining a second text by concatenating the first text and the related information for the named entity candidates in the first text, with the first text as the original text and the related information for the named entity candidates in the first text as the supplementary text; and inputting the second text into a named entity extraction model that extracts named entities from the original text in the input text, and extracting named entities from the original text in the second text using the named entity extraction model.
[0006] Preferably, the method further includes the steps of: obtaining first training data in which only named entities are labeled and the corresponding entity types are not labeled, before reproducing candidate named entities in the first text to be extracted using a named entity reproduction model that reproduces named entities of any type in the text; and training the named entity reproduction model using the first training data with the named entity recall rate as the optimization metric for model training.
[0007] Preferably, the step of acquiring first training data in which named entities are labeled but the representation type is not labeled includes the steps of acquiring second training data having named entity label information, wherein the named entity label information includes a named entity and a representation type; identifying representation segments and non-representation segments in the second training data based on the named entity label information; and deleting the named entity label information in the second training data, labeling the representation segments in the second training data as named entities, labeling the non-representation segments as non-named entities, and acquiring first training data.
[0008] Preferably, the method further includes the steps of acquiring knowledge data, cleaning and organizing the knowledge data, and acquiring formatted data including the expression name, expression type, and expression description information of the named expression, before searching the knowledge base based on the candidate named expression in the first text; and using a search engine framework, constructing a knowledge base based on the formatted data that supports exact match search and fuzzy search based on expression terms.
[0009] Preferably, the step of searching the knowledge base based on named entity candidates in the first text and obtaining related information for the named entity candidates in the first text includes any one of the following: obtaining first related information for the named entity candidates in the first text by performing an exact match match with the expression name in the knowledge base using the named entity candidates in the first text as data; obtaining second related information for the named entity candidates in the first text by performing a fuzzy match with the pronunciation of the expression name in the knowledge base using the named entity candidates in the first text as data; and obtaining third related information for the named entity candidates in the first text by performing a fuzzy match with the expression name having the same length and a similarity greater than a predetermined threshold in the knowledge base using the named entity candidates in the first text as data.
[0010] Preferably, the method further includes the steps of: acquiring third training data containing named entity label information before reproducing named entity candidates in the first text to be extracted using the named entity recognition model; reproducing named entity candidates in the third training data using the named entity recognition model; searching the knowledge base based on the named entity candidates in the third training data and obtaining related information for the named entity candidates in the third training data; obtaining fourth training data by concatenating the third training data and the related information for the named entity candidates in the third training data, using the third training data as the original text and the related information for the named entity candidates in the third training data as supplementary text; and training the named entity extraction model using the fourth training data.
[0011] A second aspect of the present invention provides a named entity extraction device comprising: a first reproduction module that reproduces named entity candidates in a first text to be extracted using a named entity reproduction model that reproduces named entities of any type in text; a first search module that searches a knowledge base based on the named entity candidates in the first text and obtains related information for the named entity candidates in the first text, wherein the knowledge base includes related information for a plurality of named entities, and the related information for the named entities includes the expression name, expression type, and expression description information of the named entity; a first concatenation module that uses the first text as the original text and the related information for the named entity candidates in the first text as the supplementary text, and concatenates the first text and the related information for the named entity candidates in the first text to obtain a second text; and an extraction module that inputs the second text to a named entity extraction model that extracts named entities from the original text in the input text, and extracts named entities from the original text in the second text using the named entity extraction model.
[0012] Preferably, the apparatus further includes a first acquisition module that acquires first training data in which only named entities are labeled and the corresponding representation types are not labeled, and a first training module that trains a named entity reproduction model using the first training data with the recall rate of named entities as an optimization metric for model training.
[0013] Preferably, the first acquisition module further acquires second training data having named entity label information, wherein the named entity label information includes a named entity and a representation type, and based on the named entity label information, it identifies represented segments and unrepresented segments in the second training data. The named entity label information in the second training data is removed, the represented segments in the second training data are labeled as named entities, and the unrepresented segments are labeled as unrepresented entities to obtain the first training data.
[0014] Preferably, the device further includes a build module that, before searching the knowledge base based on named entity candidates in the first text, acquires knowledge data, cleans and organizes the knowledge data, acquires formatted data including named entity names, named entity types and named entity description information, and uses a search engine framework to build a knowledge base based on the formatted data that supports exact match search and fuzzy search based on named entities.
[0015] Preferably, the first search module retrieves related information for the named entity candidates in the first text by searching the knowledge base based on the named entity candidates in the first text using at least one of the following methods: obtaining first related information for the named entity candidates in the first text by performing an exact match matching with the expression name in the knowledge base using the named entity candidates in the first text as data; obtaining second related information for the named entity candidates in the first text by performing a fuzzy match with the pronunciation of the expression name in the knowledge base using the named entity candidates in the first text as data; and obtaining third related information for the named entity candidates in the first text by performing a fuzzy match with the expression name in the knowledge base having the same length and a similarity greater than a predetermined threshold using the named entity candidates in the first text as data.
[0016] Preferably, the apparatus further includes: a second acquisition module that acquires third training data containing named entity label information before reproducing named entity candidates in a first text to be extracted using the named entity reproduction model; a second reproduction module that reproduces named entity candidates in the third training data using the named entity reproduction model; a second search module that searches the knowledge base based on named entity candidates in the third training data and acquires related information for the named entity candidates in the third training data; a second concatenation module that uses the third training data as original text and the related information for the named entity candidates in the third training data as supplementary text, concatenates the third training data and the related information for the named entity candidates in the third training data to acquire fourth training data; and a second training module that trains the named entity extraction model using the fourth training data.
[0017] A third aspect of the present invention provides a computer-readable storage medium characterized in that a computer program is stored therein, and the steps of the named entity recognition method described above are realized by causing the computer program to be executed by a processor. [Effects of the Invention]
[0018] Compared to conventional technologies, the named entity recognition method and apparatus provided in the embodiments of the present invention reproduce named entity candidates in the original text using a named entity recognition model, search an external knowledge base using the named entity candidates, obtain additional information related to the named entity candidates, and concatenate it with the original text to obtain a concatenated text containing the additional information. In this way, when performing named entity recognition using the concatenated text, the accuracy of detailed named entity recognition can be improved because more additional information is introduced. [Brief explanation of the drawing]
[0019] The advantages and effects of the present invention will become apparent to those skilled in the art through the detailed description of embodiments below. The drawings are used solely for the purpose of illustrating preferred embodiments and do not limit the present invention. Throughout the drawings, the same symbols are used for identical components. [Figure 1] This figure shows a flowchart of a named entity recognition method according to an embodiment of the present invention. [Figure 2] This is a flowchart for training a named entity recognition model according to an embodiment of the present invention. [Figure 3] This figure shows the configuration of a named entity recognition device according to an embodiment of the present invention. [Figure 4] This figure shows another configuration of the named entity recognition device according to an embodiment of the present invention. [Modes for carrying out the invention]
[0020] Hereinafter, in order to more clearly illustrate the problems to be solved by the present invention, the configuration and effects of the present invention, specific embodiments will be described in detail with reference to the accompanying drawings. In the following description, the specific details of the configuration and elements are only for helping a comprehensive understanding of the embodiments of the present invention. Therefore, it is obvious to those skilled in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present invention. For the sake of clarity and brevity, the description of known functions and configurations is omitted.
[0021] The phrase "one embodiment" or "an embodiment" referred to throughout the specification means that a specific feature, structure, or characteristic associated with the embodiment is included in at least one embodiment of the present application. Therefore, the phrases "in one embodiment" or "in an embodiment" described in various places in the specification do not necessarily refer to the same embodiment. Additionally, these specific features, configurations, or characteristics can be appropriately combined in any manner in one or more embodiments. The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects and do not necessarily need to be used to describe a specific order or sequence. It should be understood that the data used in this way can be exchanged in appropriate situations. Therefore, the embodiments of the present invention described herein may be implemented in an order different from, for example, those illustrated or described herein. Further, the terms "comprising" and "having", and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus comprising a series of steps or units is not necessarily limited to the explicitly listed steps or units, and may include other steps or units not explicitly listed or inherent to such a process, method, product, or apparatus. The "and / or" in the specification and claims means at least one of the connected objects.
[0022] In each embodiment of the present invention, the magnitude of the numbers of the following processes does not mean the order of execution before or after. The execution order of each process is determined by its function and inherent logic and does not limit the implementation process of the embodiments of the present invention in any way.
[0023] The following description is merely illustrative and does not limit the claims, scope of application, or configuration. Changes can be made without departing from the spirit and scope of the present invention with respect to the functions and arrangements of the elements considered. Appropriate omissions, substitutions, or additions of procedures and elements in various examples can be made. For example, the methods described can be executed in an order different from the described order, and various steps can be added, omitted, or combined for execution. In addition, the features described in some examples may be combined in other examples.
[0024] External knowledge data is useful for extracting named entities because it provides important boundary information, expression classification information, and context information. Embodiments of the present invention provide a named entity extraction method, and by introducing external knowledge data into named entity extraction, the accuracy of fine-grained named entity extraction is improved. As shown in FIG. 1, the named entity extraction method of the present invention includes the following.
[0025] In step 11, use a named entity reproduction model that reproduces any type of named entity existing in the text to reproduce the named entity candidates in the first text to be identified.
[0026] The named entity reproduction model means, for example, a model that evaluates the extraction results by a named entity extraction model with recall. Here, input the first text for named entity extraction into the named entity reproduction model, and obtain the named entity candidates in the first text reproduced by the named entity reproduction model. The named entity reproduction model reproduces any type of named entity in the input text. That is, the named entity reproduction model reproduces all types of named entities regardless of the type of expression.
[0027] In the embodiment of the present invention, a named entity reproduction model is first trained before step 11, and then in step 11, the named entity reproduction model is used to reproduce the named entities in the first text. Specifically, the named entity reproduction model is trained using first training data in which named entities are marked but the representation type is not indicated, with the recall rate of named entities as the optimization metric for model training.
[0028] The training of the named entity recognition model will be explained in detail below.
[0029] (1) Obtain the first training data in which only named entities are marked, and the corresponding representation type is not marked.
[0030] Typically, the notation information of the training data used for named entity recognition includes information such as the named entity and its representation type. Second training data is obtained, which is training data that includes named entity notation information, including the named entity and its representation type. Then, based on the named entity notation information, the represented segments and unrepresented segments in the second training data are identified. Here, the segments may be characters, subwords, or letters.
[0031] Subsequently, the named entity recognition information in the second training data is removed, the represented segments in the second training data are marked as named entities, and the unrepresented segments are marked as unrepresented entities to form the first training data. For example, in the case of representation tags, the representation marking is set to 1 for represented segments and the representation tag is set to 0 for unrepresented segments. Here, a value of 1 for the representation tag indicates that the segment is a named entity, and a value of 0 indicates that the segment is not a named entity.
[0032] (2) Using the first training data, a named entity recall model is trained with the recall rate of named entities as the optimization metric for model training.
[0033] A named entity recognition model is trained using the first training data. In model training, the recall rate of named entities is used as an evaluation metric for the model (e.g., a named entity extraction model). That is, the recall rate is used as an optimization metric for the model to reproduce as many correct named entities as possible. Preferably, the named entity recognition model according to the embodiment of the present invention may use a span-based named entity extraction model, but is not limited thereto. Other named entity extraction models may also be used.
[0034] In step 12, a knowledge base containing related information for multiple named entities, including their name, type, and description, is searched based on the candidate named entity in the first text, and related information for the candidate named entity in the first text is obtained.
[0035] In this embodiment of the present invention, a knowledge base is constructed in advance. The knowledge base includes related information for multiple named entities. The related information for named entities includes the named entity's name, the type of named entity to which it belongs, and the named entity's description information. For example, a knowledge base for searching is constructed based on knowledge data. The knowledge data may be external knowledge data, such as data in databases like Wikipedia, Baidu Encyclopedia, or a geographical dictionary, or data in other similar databases. Specifically, knowledge data is acquired, the knowledge data is cleaned and organized, and formatted data including the named entity's name, type of named entity, and description information is obtained. The description information is information that interprets and explains the named entity. Subsequently, a knowledge base is constructed based on the formatted data using a search engine framework. The search engine framework may be a general search engine framework such as Elasticsearch, Lucence, or Solr, or a similar search engine framework. The knowledge base supports exact match search and fuzzy search (ambiguous search) based on named entities. For example, in the case of Chinese named entities, the name of the entity in the knowledge base is set up with two segments: "original named entity" and "pronunciation form of the name of the entity". Of these, the "Original Proper Name" segment is the Chinese name of the expression, and the "Pronunciation Form of Expression Name" segment is the pronunciation of the expression name (e.g., Chinese pinyin). In the case of English proper nouns, the "Original Proper Name" segment is the English name of the expression, and the "Pronunciation Form of Expression Name" segment is the same as the "Original Proper Name" segment. Furthermore, in embodiments of the present invention, an index may be added and set for each segment in order to improve the search speed.
[0036] Thus, in step 12, the knowledge base is searched based on the named entity candidate in the first text by at least one of the following methods, and relevant information about the named entity candidate in the first text is obtained.
[0037] (1) Use the candidate named entities in the first text as data to precisely match the expression names in the knowledge base, and obtain the first related information of the candidate named entities in the first text. Usually, the first related information includes the expression type and expression description information of the candidate named entity.
[0038] (2) Use the candidate named entities in the first text as data to perform fuzzy matching on the pronunciation of the expression names in the knowledge base, and obtain the second related information of the candidate named entities in the first text. Usually, the second related information includes the expression type and expression description information of the candidate named entity. Here, through fuzzy matching of pronunciation, when there are alternative characters in the candidate named entity, the exact type of the candidate named entity can be identified. An alternative character refers to the situation where one character can be written as another character. For example, in Chinese, "basketball court" is written as "藍球場", where "藍" is an alternative character.
[0039] (3) Use the candidate named entities in the first text as data to perform fuzzy matching on the expression names in the knowledge base that have the same length and a similarity greater than the预定阈值, and obtain the third related information of the candidate named entities in the first text. Usually, the third related information includes the expression type and expression description information of the candidate named entity. Here, through the above matching of length and similarity, when there are misspelled characters in the candidate named entity, the correct type of the candidate named entity can be identified. A misspelled character refers to the situation where one character is written as a non-existent character. For example, by writing the right half of the character "猴" as "候", a non-existent character is formed.
[0040] Through the above methods, at least one expression type and at least one expression description information can be obtained for each candidate named entity in the first text. As a result, a set of expression types corresponding to the candidate named entities can be obtained from at least one expression type, and a set of expression description information corresponding to the candidate named entities can be obtained from at least one expression description information.
[0041] In step 13, the first text is used as the original text, the related information of the named entity candidates in the first text is used as the supplementary text, and the first text and the related information of the named entity candidates in the first text are combined to form the second text.
[0042] Here, there are multiple ways to connect the first text with the related information of the named entity candidates in the first text. For example, the second text is formed by sequentially connecting the first text with the expression type to which the named entity candidates in the first text belong and the expression description information of the named entity candidates. Alternatively, for example, in an embodiment of the present invention, the second text is formed by filling a pre-set template with the first text and the related information of the named entity candidates in the first text. For example, in the case of Chinese, the template format is as follows.
[0043] [CLS] The first text ++E1 is the set of representation types corresponding to E1. E1: The set of representation description information corresponding to E1. +E2 is the set of representation types corresponding to E2. E2: The set of representation description information corresponding to E2. +…+En is the set of representations corresponding to En. En: The set of representation description information corresponding to En. [SEP]
[0044] In the template described above, the underlined portion represents the content to be filled in. Ei represents the i-th named entity candidate in the first text. Here, assume there are n named entity candidates in the first text. "[CLS]" is the start identifier of the second text, "[SEP]" is the end identifier of the second text, and "" is a delimiter used to separate the original text (in this case, the first text) and the added text (in this case, the related information of the named entity candidates in the first text) in the input text.
[0045] Let the character order of the first text be (x1, x2, ..., xn), where xi represents the i-th character of the first text. Two named entity candidates are reproduced from the first text by the named entity recognition model, denoted as representation E1 and representation E2 (assuming Ei is the order span xm...xm+t). Searching for representations E1 and E2 in an external knowledge base, the representation type set for E1 is (T1-1, T1-2, ..., T1-n), the representation type set for E2 is (T2-1, T2-2, ..., T2-n), the representation description information set for E1 is (D1-1, D1-2, ..., D1-n), and the representation description information set for E2 is (D2-1, D2-2, ..., D2-n). In this structure, T1-i represents the i-th representation type of E1 retrieved from the external knowledge base, and T2-i represents the i-th representation type of E2 retrieved from the external knowledge base. D1-i represents the i-th representation description of E1 retrieved from the external knowledge base, and D2-i represents the i-th representation information description of E2 retrieved from the external knowledge base. In the above example, we set the number of representation types and representation description information retrieved to both n. The second text generated based on the above template will be as follows:
[0046] [CLS] (x1,x2,…,xn) + +E1 is (T1-1,T1-2,…,T1-n). E1:(D1-1,D1-2,…,D1-n). E2 is (T2-1,T2-2,…,T2-n). E2:(D2-1,D2-2,…,D2-n). [SEP].
[0047] Here, [CLS] is the start identifier of the input text, [SEP] is the end identifier of the input text, and is the delimiter used to separate the original text from the added text.
[0048] Next, an example of the second text generated by the plate described above is shown.
[0049] Let's assume the first text is "The term 'meter-made' became popular thanks to the Beatles' 'cute Rita,' in which the male singer was captivated by a female traffic officer." Let's assume the named entity candidates obtained by the named entity recognition model are "meter," "made," "Beatles," "cute Rita," and "Rita."
[0050] The search is performed by entering "Mater," "Maid," "Beatles," "Cute Rita," and "Rita" into the knowledge base as potential expressions. The expression types for "Mater" are "Book" and "Other Products." The expression types for "Maid" are "Copyright" and "Other Products," and the expression description for "Maid" is "A female employee who does housework in her employer's home." The expression types for "Beatles" are "Book," "Other Products," and "Band," and the expression description for "Beatles" is "A famous British rock band, commonly known as the Beatles." The expression types for "Cute Rita" are "Copyright," "Other Products," and "Musical Work." The expression description for "Cute Rita" is "An original song written and composed by Lennon-McCartney, first recorded by the Beatles." The expression types for "Rita" are "Artist," "Other Occupation," "Copyright," "Sports Manager," "Other Products," and "Athlete." The expression descriptions for "Rita" are "Female Name," "American Professional Wrestler and Singer," "Surname," and "Israeli Pop Singer and Actress."
[0051] The second text formed by combining this data using the above template is as follows:
[0052] "The term "meter-made" became popular through the Beatles' song "Pretty Rita," in which the male singer was fascinated by a female traffic officer. A meter is a copyrighted work, or other product. A maid is a book, or other product. Maid: A female employee who does housework in her employer's home. The Beatles are a book, or other product, or a band. The Beatles: A famous British rock band, commonly known as the Beatles. Pretty Rita is a book, or other product, or a musical work. Pretty Rita: An original song written and composed by Lennon-McCartney, first recorded by the Beatles. Rita is an artist, or other occupation, author, sports manager, or other product, or athlete. Rita: A female name, American professional wrestler and singer, surname, Israeli pop singer and actress." Furthermore, the embodiments of the present invention do not specifically limit the method for concatenating the first text with the related information of named entity candidates in the first text. The concatenated second text only needs to include the related information of the first text with the named entity candidates in the first text; that is, by introducing the related information of named entity candidates in the first text into the subsequent named entity extraction, the objective of improving the accuracy of named entity extraction is achieved.
[0053] In step 14, the second text is input to a named entity recognition model that identifies named entities from the original text in the input text, and the named entity recognition model identifies named entities from the original text in the second text.
[0054] In this embodiment of the present invention, a named entity recognition model is pre-trained before step 14 to extract named entities from the original text in the input text. Then, in step 14, the second text is input to the named entity recognition model. The named entity recognition model extracts named entities from the original text (i.e., the first text) in the input text (i.e., the second text). In this way, the named entity recognition model extracts named entities from the first text. Here, the named entity specifically includes information such as the name of the entity and the type of the entity.
[0055] Let's continue using the example mentioned above to explain. When the text generated in Step 13, "The word 'meter made' became popular in connection with the Beatles' 'Cute Rita,' in which this male singer was charmed by a female traffic officer. Meter is a copyrighted work, another product. Maid is a book, another product. Maid: A female employee who does housework in her employer's home. Beatles is a book, another product, a band. Beatles: A famous British rock band, commonly known as the Beatles. Cute Rita is a book, another product, a musical work. Cute Rita: An original song written and composed by Lennon-McCartney, first recorded by the Beatles. Rita is an artist, another occupation, author, sports manager, another product, athlete. Rita: A female name, American professional wrestler and singer, surname, Israeli pop singer and actress." is input into the named entity recognition model as the second text, the named entity recognition model extracts a named entity from the original text in the second text, "The word 'meter made' became popular in connection with the Beatles' 'Cute Rita,' in which this male singer was charmed by a female traffic officer." In this example, the named entities extracted are "The Beatles: band; cute Rita: musical works."
[0056] In an embodiment of the present invention, the named entity recognition model is obtained by training using the fourth training data. The fourth training data is generated by concatenating the third training data as the original text and the related information of named entity candidates in the third training data as supplementary text. The third training data is the training data for the named entities and their respective types.
[0057] The training of the named entity recognition model is described below. As shown in Figure 2, the named entity recognition model is trained as follows.
[0058] In step 21, a third training dataset containing named entity recognition information is obtained, and the named entity candidate in the third training dataset is reproduced using a named entity reproduction model.
[0059] In step 22, the knowledge base is used to search for named entity candidates in the third training data and to obtain related information for those named entity candidates in the third training data. Refer to the above explanation for the specific search method.
[0060] In step 23, the third training data is used as the original text, and the related information of the named entity candidates in the third training data is used as supplementary text. The third training data and the related information of the named entity candidates in the third training data are combined to form the fourth training data. The method of combining the data is described above in detail.
[0061] In step 24, the named entity recognition model is trained using the fourth training data.
[0062] Here, based on a pre-training model (for example, a model such as Bert / Albert / Roberta / Ernie), we can construct named entity recognition models based on sequence notation or spans. Specifically, the named entity recognition model first generates a vector representation of the input text using the pre-training model. Here, the input text is the fourth training data. Then, it classifies the representations of the original text within the input text (i.e., performs named entity recognition).
[0063] For example, the fourth training data is input into a pre-trained model (Bert / Albert / Roberta / Ernie, etc.), and the corresponding sequential vector representations of the text (eCLS, e0, e1, e2, ..., es, e0', e1', e2', ..., eSEP) are obtained. Here, eCLS is the start vector representation of the fourth training data, eSEP is the end vector representation of the fourth training data, es is the vector representation of the delimiter between the original text and the appended text, and the other vector representations (e.g., ei and ei') are the vector representations of the tokens in the original text and appended text in the fourth training data. After passing through the pre-trained model, due to the attentional characteristics of the pre-trained model, the tokens in the original text portion have learned the appended text portion. Next, a general named entity recognition algorithm is used to map the token representations of the original text from vectors to representation types. To obtain named entities in the original text, for example, an algorithm based on representation spans may be used, or a sequential representation method (BIO) may be used.
[0064] When training a named entity recognition model using the fourth training data, the macro-average F1 score for all named entity types (macro F1) is used as the optimization metric for model training to obtain the named entity recognition model.
[0065] In the embodiments of the present invention, the second training data and the third training data may be the same training data or different training data. There are no particular limitations.
[0066] In the embodiment of the present invention, by following the steps described above, a named entity recognition model is used to reproduce candidate named entities in the original text, an external knowledge base is searched using the candidate named entities, additional information related to the candidate named entities is obtained, and this information is then combined with the original text to obtain a combined text containing the additional information. In this way, when named entity extraction is performed using the combined text, the accuracy of detailed named entity extraction can be improved because more additional information is introduced. The method described above is applicable to different forms of external knowledge because it easily and effectively introduces external knowledge and utilizes a general-purpose search engine framework. Furthermore, the above method uses a general named entity extraction model, and its architecture is easily implemented.
[0067] Based on the above method, embodiments of the present invention further provide an apparatus for carrying out the above method. As shown in Figure 3, embodiments of the present invention provide a named entity recognition apparatus including the following modules.
[0068] The first reproduction module 301 reproduces candidate named entities in the first text to be extracted using a named entity reproduction model that reproduces named entities of any type in text.
[0069] The first search module 302 searches a knowledge base containing related information for multiple named entities, including their names, types, and descriptions, based on the candidate named entities in the first text, and retrieves the related information for the candidate named entities in the first text.
[0070] The first splicing module 303 uses the first text as the original text and the related information of the named entity candidates in the first text as the supplementary text, and splices the first text and the related information of the named entity candidates in the first text to form the second text.
[0071] The extraction module 304 inputs the second text into a named entity recognition model that extracts named entities from the original text in the input text, and the named entity recognition model extracts named entities from the original text in the second text.
[0072] The above template allows the embodiment of the present invention to improve the accuracy of detailed named entity extraction by introducing more additional information when extracting named entities using spliced text.
[0073] Preferably, the above device is A first acquisition module acquires first training data in which only named entities are marked and the corresponding representation type is not marked, The system further includes a first training module that trains a named entity reproduction model using the first training data, with the named entity recall rate as the optimization metric for model training.
[0074] Preferably, the preceding acquisition module further, We obtain a second training dataset containing named entity notation information, including named entities and their representation types. Based on the named entity recognition information, the represented segments and unrepresented segments in the second training data are identified. The named entity recognition information in the second training data is removed, the represented segments in the second training data are marked as named entities, and the unrepresented segments are marked as unrepresented entities to form the first training data.
[0075] Preferably, the device further includes a build module that, before searching for named entity candidates in the first text in the knowledge base, acquires knowledge data, cleans and organizes the knowledge data, forms formatted data including named entity names, named entity types, and named entity description information, and uses a search engine framework to build a knowledge base based on the formatted data that supports exact match search and fuzzy search based on named terms.
[0076] Preferably, the first search module is Using the named entity candidates in the first text as data, the knowledge base performs an exact match matching with the expression name to obtain the first related information for the named entity candidates in the first text, Using the named entity candidates in the first text as data, the second related information for the named entity candidates in the first text is obtained by fuzzy matching the pronunciation of the expression name in the knowledge base, Using the named entity candidates in the first text as data, a third related information of the named entity candidates in the first text is obtained by fuzzy matching them with expression names of the same length and with similarity greater than a predetermined threshold in the knowledge base, The system retrieves the associated information for a named entity candidate in the first text by searching a knowledge base containing associated information for multiple named entities, including their name, type, and description, based on the named entity candidate in the first text, using at least one of the following methods.
[0077] Preferably, the apparatus is A second acquisition module acquires third training data containing the named entity marking information before reproducing the named entity candidate in the first text to be extracted using the named entity reproduction model, A second reproduction module reproduces named entity candidates in the third training data using the named entity reproduction model, A second search module searches the aforementioned knowledge base based on named entity candidates in the third training data and obtains related information about the named entity candidates in the third training data. A second concatenation module forms a fourth training data by concatenating the third training data and the related information of named entity candidates in the third training data, using the third training data as the original text and the related information of named entity candidates in the third training data as the supplementary text. The system further includes a second training module for training the named entity recognition model using the fourth training data.
[0078] Here, each apparatus / system provided in the above embodiments corresponds to the named entity recognition method described above, and any of the implementation methods of each embodiment can be applied to the embodiment of the apparatus described above to achieve similar technical effects. The apparatus provided in the embodiment of the present invention can implement the steps of the method implemented in the embodiment of the method described above, and achieves similar technical effects. Here, a detailed explanation of the parts and effects that are the same as those of the method embodiment in this embodiment is omitted.
[0079] Figure 4 shows a block diagram illustrating the hardware configuration of a named entity recognition device according to an embodiment of the present invention. As shown in Figure 4, the named entity recognition device 400 comprises a processor 402 and a memory 404 in which computer program instructions are stored.
[0080] When the computer program directive is executed on the processor 402, the following steps are realized: reproducing candidate named entities in the first text to be extracted using a named entity reproduction model that reproduces named entities of any type in text; searching a knowledge base that has related information for multiple named entities, including the name of the entity, the type of entity, and the description of the entity, based on the candidate named entity in the first text, and obtaining the related information for the candidate named entity in the first text; forming a second text by combining the first text and the related information for the candidate named entity in the first text, with the first text as the original text and the related information for the candidate named entity in the first text as the supplementary text; and inputting the second text into a named entity extraction model that extracts named entities from the original text in the input text, and having the named entity extraction model extract named entities from the original text in the second text.
[0081] Here, each apparatus / system provided in the above embodiments corresponds to the named entity recognition method described above, and any of the implementation methods of each embodiment can be applied to the embodiment of the apparatus described above to achieve similar technical effects. The apparatus provided in the embodiment of the present invention can implement the steps of the method implemented in the embodiment of the method described above, and achieves similar technical effects. Here, a detailed explanation of the parts and effects that are the same as those of the method embodiment in this embodiment is omitted.
[0082] Furthermore, as shown in Figure 4, the named entity recognition device 400 includes a network interface 401, an input device 403, a hard disk 405, and a display device 406.
[0083] Each of the above interfaces and devices is connected to one another via a bus architecture. The bus architecture is a bus and bridge that includes any number of interconnections. Specifically, it connects various circuits of one or more central processing units (CPUs) and / or graphics processing units (GPUs), represented by the processor 402, and one or more memory units, represented by the memory 404. The bus architecture also connects various other circuits, such as peripherals, voltage regulators, and power management circuits. The bus architecture is used to connect these devices in a communicative manner. In addition to the data bus, the bus architecture includes a power bus, a control bus, and a status signal bus. These are all known technologies in the field of this invention and will not be described in detail.
[0084] The network interface 401 is connected to a network (such as the Internet or a local area network), receives external knowledge data via the network, and stores the received data on the hard disk 405.
[0085] The input device 403 receives various commands from the user and transmits them to the processor 402 for execution. The input device 403 may be a keyboard or a click device (for example, a mouse, trackball, touch panel, or touchscreen).
[0086] The display device 406 displays the results of the commands executed by the processor 402. For example, it displays the progress of model training.
[0087] Memory 404 stores programs and data necessary for the operation of the operating system, as well as data such as intermediate results from calculations performed by processor 402.
[0088] In embodiments of the present invention, memory 404 is volatile memory or non-volatile memory, or includes both volatile and non-volatile memory. Among these, non-volatile memory is read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory is random-access memory (RAM) used as an external cache. Memory 404 of the apparatus and methods described herein includes, but is not limited to, these memories and any other suitable type of memory.
[0089] In some implementations, memory 404 stores an operating system 4041 and an application program 4042 as executable modules or data structures, subsets thereof, or extensions thereof.
[0090] Within this, the operating system 4041 includes various system programs, such as a framework layer, core library layer, and driving layer, and is used to implement various core business operations and hardware-based tasks. The application program 4042 includes various application programs, such as a web browser, and is used to implement various application operations. The program that executes the method according to this embodiment is included in the application program 4042.
[0091] The methods according to embodiments of the present invention are applied to or implemented by a processor 402. The processor 402 is a type of integrated circuit chip having the function of processing signals. In the implementation process, each step of the method is implemented by hardware integrated logic circuits or software-based instructions within the processor 402. The processor 402 is a general-purpose processor, a digital signal processing unit (DSP), an application-designed integrated circuit (ASIC), a commercially available programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, which can implement or execute each method, step, and logic box disclosed in embodiments of the present invention. General-purpose processors include microprocessors or any general-purpose processors. Each step of the methods according to embodiments of the present invention may be implemented by a hardware decoder, or by a combination of hardware and software that can be directed to the decoder. The software module is stored in a storage medium mature in the art, such as random memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, or registers. The processor 402 reads information from the memory 404, which has a storage medium in which this software is stored, and implements the steps of the above method according to the hardware.
[0092] The embodiments described above are implemented using hardware, software, firmware, middleware, microcode, or a combination thereof. In the case of hardware implementation, the processing unit is implemented using one or more dedicated integrated circuits (ASICs), digital signal processing processors (DSPs), digital signal processing devices (DSPDs), programmable logic circuits (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units that perform the functions of the present invention, or a combination thereof.
[0093] Furthermore, the software implementation is carried out by modules (such as processes and functions) that implement the functions described above. The software code is stored in memory and executed by the processor. Memory can be implemented either internally or externally to the processor.
[0094] Specifically, the computer program is executed on the processor 402 to perform the following steps: first, acquire first training data in which only named entities are marked and the corresponding entity types are not marked, before reproducing candidate named entities in the first text to be extracted using a named entity reproduction model that reproduces named entities of any type in text; and second, train the named entity reproduction model using the first training data with the named entity recall rate as the optimization metric for model training.
[0095] More specifically, the computer program is executed on the processor 402 to acquire training data having named entity marking information including named entities and their representation types as second training data; to identify represented segments and unrepresented segments in the second training data based on the named entity marking information; and to delete the named entity marking information in the second training data, mark the represented segments in the second training data as named entities, and mark the unrepresented segments as unrepresented entities to form first training data.
[0096] More specifically, when the computer program is executed on the processor 402, the following steps are further realized: before searching for named entity candidates in the first text in the knowledge base, knowledge data is acquired, the knowledge data is cleaned and organized, and formatted data is formed that includes the named entity's expression name, expression type, and expression description information; and a search engine framework is used to build a knowledge base based on the formatted data that supports exact match search and fuzzy search based on expression terms.
[0097] More specifically, when the computer program is executed on the processor 402, in order to retrieve related information for a named entity candidate in the first text by searching a knowledge base containing related information for a plurality of named entities, including the name of the entity, the name of the entity, and the description of the entity, based on the named entity candidate in the first text, the following steps are taken: 1) Obtain first related information for the named entity candidate in the first text by performing an exact match matching with the name of the entity in the knowledge base using the named entity candidate in the first text as data; 2) Obtain second related information for the named entity candidate in the first text by performing a fuzzy match with the pronunciation of the name of the entity in the knowledge base using the named entity candidate in the first text as data; and 3) Obtain third related information for the named entity candidate in the first text by performing a fuzzy match with the name of the entity in the knowledge base using the named entity candidate in the first text as data with the name of the entity, which has the same length and a similarity greater than a predetermined threshold.
[0098] More specifically, the computer program is executed on the processor 402 to further realize the following steps: acquiring third training data containing named entity marking information before reproducing named entity candidates in the first text to be extracted using the named entity recognition model, and reproducing named entity candidates in the third training data using the named entity recognition model; searching the knowledge base based on the named entity candidates in the third training data and obtaining related information for the named entity candidates in the third training data; forming fourth training data by combining the third training data and the related information for the named entity candidates in the third training data, using the third training data as the original text and the related information for the named entity candidates in the third training data as supplementary text; and training the named entity extraction model using the fourth training data.
[0099] Furthermore, since the apparatus according to the embodiment of the present invention can realize all the method steps realized in the above-described method embodiment and achieve the same technical effects, a detailed explanation of the parts and effects that are the same as those in the method embodiment of this embodiment will be omitted here.
[0100] Some embodiments of the present invention provide a computer-readable storage medium, a program that stores the data, and the program is executed on a processor to reproduce candidate named entities in a first text to be extracted using a named entity reproduction model that reproduces named entities of any type in text; a knowledge base containing related information for a plurality of named entities, including the name of the entity, the type of entity, and the description of the entity, is searched based on the candidate named entities in the first text to obtain the related information for the candidate named entities in the first text; the first text is used as the original text, the related information for the candidate named entities in the first text is used as the supplementary text, and the first text and the related information for the candidate named entities in the first text are combined to form a second text; and the second text is input to a named entity extraction model that extracts named entities from the original text in the input text, and the named entity extraction model extracts named entities from the original text in the second text.
[0101] When the above program is executed on the processor, all implementation methods for named entity recognition are realized and achieve the same technical effect. To avoid redundancy, the explanation is omitted here.
[0102] Those skilled in the art of the present invention will readily conceive that the units and algorithmic steps of each example described in the embodiments disclosed above may be implemented in electronic hardware, or in a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the invention. Those skilled in the art may implement the above functions in a manner appropriate to their specific application, but should not exceed the scope of the present invention.
[0103] Furthermore, for the sake of convenience and brevity in this explanation, detailed explanations of the specific working processes of the above-mentioned systems, devices, and units are omitted, as it will be obvious to those skilled in the art that these processes can be referenced in the corresponding processes in the embodiments described above.
[0104] It is readily apparent that the methods and apparatus disclosed in multiple embodiments of the present invention can be implemented in other forms. For example, the apparatus described above is merely schematic. For example, the division of units described above is merely one example of a logical function assignment, and other division methods may be adopted in actual implementation. For example, multiple units or modules may be combined, integrated into another system, or some functions may be omitted or not performed. Note that the mutual connections, direct connections, or communicable connections described above are connections via interfaces. Indirect connections or communicable connections between devices or units may be electrical, mechanical, or other forms of connections.
[0105] The units described above as separating members may or may not be physically separated. The members displayed as units may or may not be physical units. That is, they may be in the same location or distributed across multiple network units. Some or all of these units can be selected according to actual needs to achieve the objectives of the embodiments of the present invention.
[0106] Furthermore, each functional unit according to the embodiment of the present invention may be integrated into a single processing unit, may be physically independent, or may be integrated into a single unit consisting of two or more units.
[0107] When the above-described functions are implemented in the form of a software function unit and sold or used as an independent product, the functions can be stored in a computer-readable storage medium. Based on this understanding, the essence of the technical concept of the present invention, or a part that contributes to the prior art, or a part of the said technical concept can be embodied in the form of a software product. This computer software product is stored in a storage medium, contains instructions, and causes a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The above-described storage medium includes various media capable of storing program code, such as USB memory, removable hard disks, ROM, RAM, magnetic disks, or optical disks.
[0108] The above description does not oversimplify the specific implementation of the present invention and does not limit the scope of protection. Modifications or substitutions readily conceivable to those skilled in the art within the scope disclosed herein are included within the scope of the present invention. Therefore, the scope of protection of the present invention should be based on the claims.
Claims
1. A named entity extraction method performed by a named entity extraction device, The process involves using a named entity recognition model that reproduces named entities of any type in the text to reproduce candidate named entities in the first text to be extracted, and A step of searching a knowledge base based on named entity candidate in the first text and obtaining related information for the named entity candidate in the first text, wherein the knowledge base includes related information for a plurality of named entities, and the related information for the named entities includes the named entity's name, type, and description information. The steps include: using the first text as the original text, using the related information of the named entity candidate in the first text as the supplementary text, and concatenating the first text with the related information of the named entity candidate in the first text to obtain a second text; The process includes the steps of inputting the second text into a named entity recognition model that extracts named entities from the original text in the input text, and using the named entity recognition model to extract named entities from the original text in the second text, The named entity reproduction model is a model obtained by evaluating the extraction results by the named entity extraction model using the recall rate. Before reproducing candidate named entities in the first text to be extracted using a named entity recognition model that reproduces any type of named entity in the aforementioned text, The steps include obtaining first training data in which only named entities are labeled, and the corresponding representation types are not labeled, The method further includes the step of training a named entity reproduction model using the first training data, with the named entity recall rate as the optimization metric for model training, The step of obtaining first training data in which the named entities are labeled and the representation type is not labeled is: A step of acquiring second training data having named entity label information, wherein the named entity label information includes a named entity and an entity type, The steps include identifying represented segments and unrepresented segments in the second training data based on the named entity label information, A method for extracting named entities, characterized by comprising the steps of: deleting named entity label information in the second training data; labeling the expressed segments in the second training data as named entities; labeling the unexpressed segments as unnamed entities; and obtaining the first training data.
2. A named entity recognition method performed by a named entity recognition device, The process involves using a named entity recognition model that reproduces named entities of any type in the text to reproduce candidate named entities in the first text to be extracted, and A step of searching a knowledge base based on named entity candidate in the first text and obtaining related information for the named entity candidate in the first text, wherein the knowledge base includes related information for a plurality of named entities, and the related information for the named entities includes the named entity's name, type, and description information. The steps include: using the first text as the original text, using the related information of the named entity candidate in the first text as the supplementary text, and concatenating the first text with the related information of the named entity candidate in the first text to obtain a second text; The process includes the steps of inputting the second text into a named entity recognition model that extracts named entities from the original text in the input text, and using the named entity recognition model to extract named entities from the original text in the second text, The named entity reproduction model is a model obtained by evaluating the extraction results by the named entity extraction model using the recall rate. Before searching the aforementioned knowledge base based on the named entity candidates in the first text, The steps include acquiring knowledge data, cleaning and organizing the said knowledge data, and acquiring formatted data including the named entity name, named entity type, and named entity description information, The process further includes the step of using a search engine framework to build a knowledge base that supports exact match search and fuzzy search based on the aforementioned formatted data, The step of searching the knowledge base based on named entity candidates in the first text and obtaining related information for the named entity candidates in the first text is: The named entity candidates in the first text are used as data, and a matching is performed in the knowledge base to obtain first related information for the named entity candidates in the first text, Using the named entity candidates in the first text as data, the second related information of the named entity candidates in the first text is obtained by fuzzy matching the pronunciation of the expression name in the knowledge base, A method for extracting named entities, characterized by including one of the following: using the named entity candidates in the first text as data, fuzzy matching them with expression names in the knowledge base that have the same length and a similarity greater than a predetermined threshold, to obtain third related information for the named entity candidates in the first text.
3. A named entity recognition method performed by a named entity recognition device, The process involves using a named entity recognition model that reproduces named entities of any type in the text to reproduce candidate named entities in the first text to be extracted, and A step of searching a knowledge base based on named entity candidate in the first text and obtaining related information for the named entity candidate in the first text, wherein the knowledge base includes related information for a plurality of named entities, and the related information for the named entities includes the named entity's name, type, and description information. The steps include: using the first text as the original text, using the related information of the named entity candidate in the first text as the supplementary text, and concatenating the first text with the related information of the named entity candidate in the first text to obtain a second text; The process includes the steps of inputting the second text into a named entity recognition model that extracts named entities from the original text in the input text, and using the named entity recognition model to extract named entities from the original text in the second text, The named entity reproduction model is a model obtained by evaluating the extraction results by the named entity extraction model using the recall rate. Before reproducing candidate named entities in the first text to be extracted using a named entity recognition model that reproduces any type of named entity in the aforementioned text, The steps include obtaining first training data in which only named entities are labeled, and the corresponding representation types are not labeled, The method further includes the step of training a named entity reproduction model using the first training data, with the named entity recall rate as the optimization metric for model training, Before reproducing candidate named entities in the first text to be extracted using the aforementioned named entity recognition model, The steps include: acquiring third training data containing named entity label information, and using the named entity reproduction model to reproduce the named entity candidates in the third training data; The steps include: searching the knowledge base based on named entity candidates in the third training data and obtaining related information for the named entity candidates in the third training data; The steps include: obtaining a fourth training data by combining the third training data and the related information of named entity candidates in the third training data, using the third training data as the original text and the related information of named entity candidates in the third training data as the supplementary text; A method for name recognition, further comprising the step of training the name recognition model using the fourth training data.
4. A named entity recognition model that reproduces named entities of any type in text is used to create a first reproduction module that reproduces candidate named entities in the first text to be extracted, and A first search module that searches a knowledge base based on named entity candidate in the first text and obtains related information for the named entity candidate in the first text, wherein the knowledge base includes related information for a plurality of named entities, and the related information for the named entities includes the named entity's name, name type, and description information, and the first search module, A first concatenation module obtains a second text by concatenating the first text and the associated information of named entity candidates in the first text, with the first text being the original text and the associated information of named entity candidates in the first text being the supplementary text. The system includes a named entity recognition model that extracts named entities from original text in input text, an extraction module that inputs the second text and uses the named entity recognition model to extract named entities from the original text in the second text, and The named entity reproduction model is a model obtained by evaluating the extraction results by the named entity extraction model using the recall rate. A first acquisition module that acquires first training data in which only named entities are labeled and the corresponding representation types are not labeled, The system further includes a first training module that trains a named entity reproduction model using the first training data, with the named entity recall rate as the optimization metric for model training, The aforementioned acquisition module further, Second training data having named entity label information is acquired, and the named entity label information includes the named entity and the representation type. Based on the named entity label information, the represented segments and unrepresented segments in the second training data are identified. A named entity recognition device characterized by deleting named entity label information from the second training data, labeling the expressed segments in the second training data as named entities, labeling the unexpressed segments as unnamed entities, and obtaining the first training data.
5. A first reproduction module that reproduces candidate named entities in a first text to be extracted using a named entity reproduction model that reproduces named entities of any type in text, A first search module that searches a knowledge base based on named entity candidate in the first text and obtains related information for the named entity candidate in the first text, wherein the knowledge base includes related information for a plurality of named entities, and the related information for the named entities includes the named entity's name, name type, and description information, and the first search module, A first concatenation module obtains a second text by concatenating the first text and the associated information of named entity candidates in the first text, with the first text being the original text and the associated information of named entity candidates in the first text being the supplementary text. The system includes a named entity recognition model that extracts named entities from original text in input text, an extraction module that inputs the second text and uses the named entity recognition model to extract named entities from the original text in the second text, and The named entity reproduction model is a model obtained by evaluating the extraction results by the named entity extraction model using the recall rate. The system further includes a build module that, before searching the knowledge base based on named entity candidates in the first text, acquires knowledge data, cleans and organizes the knowledge data, acquires formatted data including named entity names, named entity types, and named entity description information, and uses a search engine framework to build a knowledge base based on the formatted data that supports exact match search and fuzzy search based on named entities, The aforementioned first search module is, The named entity candidates in the first text are used as data, and a matching is performed in the knowledge base to obtain first related information for the named entity candidates in the first text, Using the named entity candidates in the first text as data, the second related information of the named entity candidates in the first text is obtained by fuzzy matching the pronunciation of the expression name in the knowledge base, At least one of the following methods is used to obtain third related information for the named entity candidate in the first text by fuzzy matching the named entity candidate in the first text with an expression name in the knowledge base that has the same length and a similarity greater than a predetermined threshold, using the named entity candidate in the first text as data: A named entity extraction device characterized by searching the knowledge base based on named entity candidates in the first text and obtaining related information for the named entity candidates in the first text.
6. A first reproduction module that reproduces candidate named entities in a first text to be extracted using a named entity reproduction model that reproduces named entities of any type in text, A first search module that searches a knowledge base based on named entity candidate in the first text and obtains related information for the named entity candidate in the first text, wherein the knowledge base includes related information for a plurality of named entities, and the related information for the named entities includes the named entity's name, name type, and description information, and the first search module, A first concatenation module obtains a second text by concatenating the first text and the associated information of named entity candidates in the first text, with the first text being the original text and the associated information of named entity candidates in the first text being the supplementary text. The system includes a named entity recognition model that extracts named entities from original text in input text, an extraction module that inputs the second text and uses the named entity recognition model to extract named entities from the original text in the second text, and The named entity reproduction model is a model obtained by evaluating the extraction results by the named entity extraction model using the recall rate. A first acquisition module that acquires first training data in which only named entities are labeled and the corresponding representation types are not labeled, The system further includes a first training module that trains a named entity reproduction model using the first training data, with the named entity recall rate as the optimization metric for model training, A second acquisition module acquires third training data containing named entity label information before reproducing the named entity candidate in the first text to be extracted using the named entity reproduction model, A second reproduction module reproduces named entity candidates in the third training data using the named entity reproduction model, A second search module searches the aforementioned knowledge base based on named entity candidates in the third training data and obtains related information of the named entity candidates in the third training data. A second concatenation module obtains a fourth training data by concatenating the third training data and the related information of named entity candidates in the third training data, using the third training data as the original text and the related information of named entity candidates in the third training data as the supplementary text. A named entity recognition device further comprising a second training module for training the named entity recognition model using the fourth training data.
7. A program that causes a processor to execute the named entity recognition method according to any one of claims 1 to 3.
Citation Information
Patent Citations
Knowledge processing method and device, electronic equipment and storage medium
CN116910250A
Language processing device, machine learning method, estimation method, and program
JP2023181819A