A method, related apparatus and device for entity recognition
By constructing a basic graph network and performing clustering, entity categories are determined using syntactic and semantic features, thus solving the problem of low entity recognition accuracy in existing technologies and achieving higher entity recognition accuracy.
Patent Information
- Application Number
- CN202111027274.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-02
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2041-09-02
AI Technical Summary
Existing entity recognition methods are prone to misidentifying non-entities as entities when dealing with contexts that are not fixed, and they have difficulty capturing the syntactic and semantic relationships between words, resulting in a decrease in recognition accuracy.
By acquiring the syntactic and semantic features of the text to be identified, a basic graph network is constructed, and clustering is performed using weight values to generate a target graph network to determine the entity category, thereby improving the accuracy of entity recognition.
The addition of feature reference information to the base graph network improves the relationship accuracy of the words to be identified, making similar words clearly presented in the target graph network and improving the accuracy of entity recognition.
Smart Images

Figure CN115757687B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the field of artificial intelligence technology, and in particular to an entity recognition method, related apparatus and device. BACKGROUND
[0002] Natural language processing is a core analysis technology in the field of Internet information search, and is widely used in search engines, public opinion monitoring, e-commerce and many other Internet IT industries. Among them, entity recognition is one of the most difficult core problems in the lexical analysis of natural language processing. No matter in the field of search engines or in the field of public opinion monitoring, users pay more attention to the entities of personal names, place names or other proper nouns than to common words, and all entities cannot be recognized by using a dictionary, resulting in great difficulty in recognition. Therefore, entity recognition has always been a research topic of great concern to users.
[0003] At present, the commonly used entity recognition method is mainly to obtain an input text sequence containing entities, and perform entity recognition on the text sequence based on at least two statistical models to obtain all potential entities. Then, an ngram model is constructed according to the context of the entities, and the potential entities are decided according to the ngram model to obtain the final entity recognition result that meets the context.
[0004] However, because the context of the entity is very unstable, many non-entities similar to the context of the entity are easily misjudged by the model. Moreover, because the window of the ngram model is too small, it is difficult to capture information such as syntactic relationship, part-of-speech relationship and other information between words with a long distance, which may result in information loss or incomplete information extraction, thereby reducing the accuracy of entity recognition. SUMMARY
[0005] Embodiments of the present application provide an entity recognition method, related apparatus and device, which are used to increase the feature reference information for constructing a basic graph network, improve the relationship accuracy of the to-be-recognized words in the basic graph network, and then cluster the basic graph network so that the words belonging to the same category can be clearly presented in the target graph network in the form of a category set, thereby accurately obtaining the target entity belonging to the entity category according to the target graph network and improving the accuracy of obtaining the target entity.
[0006] In an aspect, the embodiments of the present application provide an entity recognition method, comprising:
[0007] obtaining a to-be-recognized text, the to-be-recognized text comprising at least two to-be-recognized words;
[0008] obtaining corresponding syntactic relationship features and semantic features of each to-be-recognized word according to the to-be-recognized text, the syntactic relationship features comprising at least one of syntactic relationship features, part-of-speech combination relationship features and semantic dependency relationship features;
[0009] According to the syntactic relationship features and the semantic features corresponding to each to-be-recognized word, a fusion feature corresponding to each to-be-recognized word is obtained;
[0010] According to the fusion feature of each to-be-recognized word and the fusion feature of the sample word, a base graph network is generated, wherein the base graph network includes nodes and node edges, the nodes are mapped from the fusion feature of each to-be-recognized word and the fusion feature of the sample word, each node represents a word, each node edge represents that the similarity between the fusion features of any two words is greater than a preset similarity threshold, each node edge corresponds to a weight value, and each weight value is positively correlated with the similarity between the fusion features of two adjacent words connected by the node;
[0011] According to the weight values, the base graph network is clustered to obtain a target graph network, and the target graph network includes a class set, each class set corresponds to a category, and each class set is a set of nodes belonging to the same category.
[0012] According to the target graph network, a target entity belonging to an entity category in the at least two to-be-recognized words is determined.
[0013] Another aspect of the present application provides an entity recognition device, comprising:
[0014] An acquisition unit is configured to acquire a to-be-recognized text, and the to-be-recognized text includes at least two to-be-recognized words.
[0015] The acquisition unit is further configured to acquire, according to the to-be-recognized text, corresponding syntactic relationship features and semantic features of each to-be-recognized word, wherein the syntactic relationship features include at least one of syntactic relationship features, part-of-speech combination relationship features, and semantic dependency relationship features.
[0016] The acquisition unit is further configured to acquire, according to the syntactic relationship features and the semantic features corresponding to each to-be-recognized word, a fusion feature corresponding to each to-be-recognized word.
[0017] A processing unit is configured to generate, according to the fusion feature of each to-be-recognized word and the fusion feature of the sample word, a base graph network, wherein the base graph network includes nodes and node edges, the nodes are mapped from the fusion feature of each to-be-recognized word and the fusion feature of the sample word, each node represents a word, each node edge represents that the similarity between the fusion features of any two words is greater than a preset similarity threshold, each node edge corresponds to a weight value, and each weight value is positively correlated with the similarity between the fusion features of two adjacent words connected by the node.
[0018] The processing unit is further configured to cluster the base graph network according to the weight values to obtain a target graph network, the target graph network comprising a plurality of class sets, each class set corresponding to a category, and each class set being a set of nodes belonging to the same category.
[0019] The determining unit is configured to determine target entities belonging to the entity category from the at least two to-be-recognized terms according to the target graph network.
[0020] In a possible design, in an implementation of the other aspect of the embodiment of the present application, the processing unit can be specifically configured to:
[0021] construct transition probabilities between the current node and the neighbor nodes connected by the node edges according to the weight values;
[0022] perform random walk on the base graph network according to the transition probabilities to generate a random node sequence;
[0023] perform hierarchical coding on the random node sequence to obtain a hierarchical coding sequence, the hierarchical coding sequence comprising a category coding sequence and an intra-class object coding sequence, the intra-class object coding sequence representing a coding sequence of nodes belonging to the same category;
[0024] aggregate the nodes in the base graph network according to the hierarchical coding sequence to obtain the target graph network.
[0025] In a possible design, in an implementation of the other aspect of the embodiment of the present application, the processing unit can be specifically configured to:
[0026] construct transition probabilities between the current node and the neighbor nodes connected by the node edges according to the weight values;
[0027] obtain a category probability according to the transition probability, an appearance probability of the current node, an appearance probability of the neighbor nodes, and a jump probability, wherein the jump probability represents a probability that the current node randomly selects any one point on the base graph network to jump to, the appearance probability represents a probability that each of the two adjacent nodes corresponding to the transition probability appears in the base graph network, and the category probability represents a probability that the current node and the neighbor nodes belong to the same category;
[0028] aggregate the nodes in the base graph network according to the category probability to obtain the target graph network.
[0029] In a possible design, in an implementation of the other aspect of the embodiment of the present application, the obtaining unit can be specifically configured to:
[0030] perform part-of-speech tagging on each to-be-recognized term in the to-be-recognized text to obtain a part-of-speech tagging sequence;
[0031] convert the part-of-speech sequence into a syntax relationship sequence, where the syntax relationship sequence comprises at least one of a syntactic relationship sequence, a part-of-speech combination relationship sequence, and a semantic dependency relationship sequence;
[0032] perform feature extraction on the syntax relationship sequence to obtain a syntax relationship feature corresponding to each to-be-recognized word;
[0033] According to the to-be-recognized text, an embedding vector of each to-be-recognized word is obtained.
[0034] The embedding vector of each to-be-recognized word is encoded to obtain a semantic feature corresponding to each to-be-recognized word.
[0035] In a possible design, in an implementation of the other aspect of the embodiment of the application, the obtaining unit can be specifically configured to:
[0036] According to the sequence length, a prefix set corresponding to the syntax relationship sequence is obtained, where one prefix corresponds to one subsequence.
[0037] For each prefix in the prefix set, a suffix set corresponding to each prefix is constructed, where the suffix set is used to represent the projection dataset of the prefix.
[0038] According to the syntax relationship sequence, a minimum support degree is obtained, where the minimum support degree is used to represent the minimum frequency of occurrence of a subsequence in the syntax relationship sequence.
[0039] According to the minimum support degree, the prefix set, and the suffix set, a frequent sequence set is obtained, where the frequent sequence set comprises a plurality of frequent sequences.
[0040] According to the frequent sequence, a syntax relationship feature corresponding to each to-be-recognized word is generated.
[0041] In a possible design, in an implementation of the other aspect of the embodiment of the application, the obtaining unit can be specifically configured to:
[0042] The syntax relationship feature and the semantic feature corresponding to each to-be-recognized word are dimensionally spliced to obtain a fusion feature corresponding to each to-be-recognized word.
[0043] In a possible design, in an implementation of the other aspect of the embodiment of the application,
[0044] The obtaining unit is further configured to obtain an entity training sample, where the entity training sample comprises at least two sample words.
[0045] The obtaining unit is further configured to obtain, according to the entity training sample, a corresponding syntax relationship feature and a semantic feature of each sample word, where the syntax relationship feature comprises at least one of a syntactic relationship feature, a part-of-speech combination relationship feature, and a semantic dependency relationship feature.
[0046] The acquisition unit is further configured to acquire the fusion feature corresponding to each sample word according to the syntax relationship feature and the semantic feature corresponding to each sample word.
[0047] The processing unit is further configured to generate an original graph network according to the fusion feature corresponding to each sample word, wherein the original graph network comprises nodes and node edges, each node is obtained by mapping the fusion feature of a sample word, each node represents a sample word, each node edge represents that the similarity between fusion features of any two sample words is greater than a preset similarity threshold, each node edge corresponds to a weight value, and each weight value is positively correlated with the similarity between the fusion features of two adjacent sample words connected by the node.
[0048] The processing unit is further configured to construct a transition probability between a current node and a neighbor node connected by a node edge according to the weight value.
[0049] The processing unit is further configured to perform random walk on the original graph network according to the transition probability to generate a random sample node sequence.
[0050] The processing unit is further configured to perform hierarchical coding on the random sample node sequence to obtain a sample hierarchical coding sequence.
[0051] The processing unit is further configured to acquire the shortest average coding length of each class and in-class object according to the sample hierarchical coding sequence.
[0052] The processing unit is further configured to cluster the shortest average coding length of each class and in-class object to minimize the shortest average coding length of each class and in-class object.
[0053] Another aspect of the present application provides a computer device, comprising a memory, a transceiver, a processor and a bus system;
[0054] The memory is configured to store a program.
[0055] The processor is configured to implement the method of each aspect described above when executing the program in the memory.
[0056] The bus system is configured to connect the memory and the processor to enable the memory and the processor to communicate.
[0057] Another aspect of the present application provides a computer readable storage medium, which stores instructions, when the instructions are run on a computer, enabling the computer to execute the method of each aspect described above.
[0058] Another aspect of the present application provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a network device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the network device to perform the methods provided in the above aspects.
[0059] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
[0060] By obtaining a text to be recognized including at least two words to be recognized, obtaining the corresponding semantic features of each word to be recognized and the grammatical relationship features including at least one of the syntactic relationship features, the part-of-speech combination relationship features and the semantic dependency relationship features according to the text to be recognized, and obtaining the corresponding fusion features of each word to be recognized according to the grammatical relationship features and the semantic features corresponding to each word to be recognized, and then, generating a basic graph network according to the fusion features of each word to be recognized and the fusion features of the sample words, and clustering the basic graph network according to the weight values to obtain a target graph network including multiple class sets, and then, determining the target entity belonging to the entity category in at least two words to be recognized according to the target graph network. Through the above method, by mining the grammatical relationship features corresponding to each word to be identified, including at least one of the syntactic relationship features, part-of-speech combination relationship features and semantic dependency relationship features, and mining the semantic features corresponding to each word to be identified, the grammatical relationship features and the semantic features are integrated to construct a basic graph network, which can increase the feature reference information for constructing the basic graph network and improve the relationship accuracy of the words to be identified in the basic graph network. Then, by clustering the basic graph network, words belonging to the same category can be clearly presented in the target graph network in the form of a class set, so that the target entity belonging to the entity category can be accurately obtained according to the target graph network, thereby improving the accuracy of obtaining the target entity. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] Figure 1 This is a schematic diagram of the structure of the text data control system in the embodiment of the present application;
[0062] Figure 2 This is a flow chart of an embodiment of the method for entity identification in the embodiment of the present application;
[0063] Figure 3 This is another flow chart of the method for entity identification in the embodiment of the present application;
[0064] Figure 4 This is another flow chart of the method for entity identification in the embodiment of the present application;
[0065] Figure 5is another embodiment flow chart of the method for entity recognition in the embodiments of the present application;
[0066] Figure 6 is another embodiment flow chart of the method for entity recognition in the embodiments of the present application;
[0067] Figure 7 is another embodiment flow chart of the method for entity recognition in the embodiments of the present application;
[0068] Figure 8 is a principle flow schematic diagram of the method for entity recognition in the embodiments of the present application;
[0069] Figure 9 is a syntax relationship sequence schematic diagram of the method for entity recognition in the embodiments of the present application;
[0070] Fig. 10(a) is another syntax relationship sequence schematic diagram of the method for entity recognition in the embodiments of the present application;
[0071] Fig. 10(b) is another syntax relationship sequence schematic diagram of the method for entity recognition in the embodiments of the present application;
[0072] Fig. 10(c) is another syntax relationship sequence schematic diagram of the method for entity recognition in the embodiments of the present application;
[0073] Fig. 11(a) is a graph network schematic diagram of the method for entity recognition in the embodiments of the present application;
[0074] Fig. 11(b) is another graph network schematic diagram of the method for entity recognition in the embodiments of the present application;
[0075] Figure 12 is an embodiment schematic diagram of the apparatus for entity recognition in the embodiments of the present application;
[0076] Figure 13 is an embodiment schematic diagram of the computer device in the embodiments of the present application. DETAILED DESCRIPTION
[0077] The embodiments of the present application provide a method for entity recognition, related apparatus and device, which increases the feature reference information for constructing a basic graph network, improves the relationship precision of the word to be recognized in the basic graph network, and then clusters the basic graph network, so that the words belonging to the same category can be explicitly presented in the target graph network in the form of a category set, thereby accurately obtaining the target entity belonging to the entity category according to the target graph network, and improving the accuracy of obtaining the target entity.
[0078] The terms "first", "second", "third", "fourth" and the like in the description and in the claims of the present application and the drawings, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the use of the terms so termed is interchangeable under appropriate circumstances such that the embodiments of the present application described herein are capable of accomplishing functionalities that are either the same or similar to other embodiments of the present application described herein regardless of the ordinals used herein. Moreover, the terms "comprise", "comprising", "corresponding" and "corresponds" and any variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, system, product or apparatus that comprises a list of steps or units are not necessarily limited to those steps or units which are expressly listed, but can include other not expressly listed steps or units.
[0079] With the rapid development of information, artificial intelligence and database gradually walk into all aspects of people's life. Artificial intelligence has wide practical significance in text translation, intelligent question answering and sentiment analysis. The emergence of artificial intelligence greatly facilitates people's work and life. Among them, artificial intelligence is to use mathematical computer or digital computer controlled machine simulation, extension and expansion of human intelligence, perception of environment, acquisition of knowledge and use of knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology of computer science, which tries to understand the essence of intelligence and produce a new intelligent machine that can react in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines, so that machines have the functions of perception, reasoning and decision-making.
[0080] Artificial intelligence is a comprehensive discipline, involving a wide range of fields, both hardware and software technologies. The basic technology of artificial intelligence generally includes sensors, special artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction system and mechatronics technology. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology and machine learning / deep learning. In natural language processing technology, artificial intelligence can be used to process text and reasonably explain the words in the text. And in machine learning / deep learning technology, artificial intelligence can be used to process text and statistically or explain the importance of word frequency or words in the text. The entity recognition method provided in the embodiments of the present application can be realized through natural language processing technology and machine learning technology.
[0081] It should be understood that the entity recognition method provided in the present application can be applied to scenarios where a relationship graph or knowledge graph is constructed by identifying entities. As an example, for example, a relationship graph of people, things and events in a data center can be sorted out by identifying related person entities. As another example, for example, identifying a person name entity in a text can more accurately locate the entry information related to the person. As another example, for example, identifying proper nouns in a text such as the name of a management department can complete the classification of the text or push it to the relevant management department for processing. In the above-mentioned scenarios, in order to complete entity recognition, the solution provided in the prior art is to obtain an input text sequence containing an entity, construct an ngram model according to the context of the entity, and make decisions on potential entities based on the ngram model to obtain the final entity recognition result that conforms to the context. However, because the context in which the entity exists is very unstable, it is easy to cause model misjudgment for many non-entities that are similar to the entity context, thereby reducing the accuracy of entity recognition.
[0082] In order to solve the above problems, this application proposes a method for entity recognition, which is applied to Figure 1 The text data control system shown is shown in Figure 1 , Figure 1 This is a schematic diagram of the structure of the text data control system in the embodiment of the present application. Figure 1 As shown, the server obtains the text to be recognized provided by the terminal device, which includes at least two words to be recognized, and obtains the corresponding semantic features of each word to be recognized and the grammatical relationship features including at least one of the syntactic relationship features, the part-of-speech combination relationship features and the semantic dependency relationship features according to the text to be recognized, and obtains the corresponding fusion features of each word to be recognized according to the grammatical relationship features and the semantic features corresponding to each word to be recognized, and then, generates a basic graph network according to the fusion features of each word to be recognized and the fusion features of the sample words, and clusters the basic graph network according to the weight values to obtain a target graph network including multiple class sets, and then, determines the target entity belonging to the entity category in at least two words to be recognized according to the target graph network. Through the above method, by mining the grammatical relationship features corresponding to each word to be identified, including at least one of the syntactic relationship features, part-of-speech combination relationship features and semantic dependency relationship features, and mining the semantic features corresponding to each word to be identified, the grammatical relationship features and the semantic features are integrated to construct a basic graph network, which can increase the feature reference information for constructing the basic graph network and improve the relationship accuracy of the words to be identified in the basic graph network. Then, by clustering the basic graph network, words belonging to the same category can be clearly presented in the target graph network in the form of a class set, so that the target entity belonging to the entity category can be accurately obtained according to the target graph network, thereby improving the accuracy of obtaining the target entity.
[0083] It is understandable thatFigure 1 In the actual scene, more kinds of terminal devices can participate in the data processing process, such as a personal computer (PC), and the specific number and kind are subject to the actual scene, which is not limited here. In addition, Figure 1 In the actual scene, more kinds of terminal devices can participate in the data processing process, such as a personal computer (PC), and the specific number and kind are subject to the actual scene, which is not limited here. In addition,
[0084] It should be noted that in the present embodiment, the server can be a stand-alone physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms, etc. Basic cloud computing services. The terminal device can be a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto. The terminal device and the server can be directly or indirectly connected through wired or wireless communication, and the terminal device and the server can be connected to form a blockchain network, which is not limited in the present application.
[0085] To solve the above problems, the present application provides a method for entity recognition, which is generally executed by a server or a terminal device. Correspondingly, the device for entity recognition is generally provided in the server or the terminal device.
[0086] It can be understood that the method for entity recognition, related devices and apparatuses disclosed in the present application can be composed of a blockchain, and the server / terminal device is a node on the blockchain. In actual application, data sharing between nodes in the blockchain can be required, and each node can store text data and node data, etc.
[0087] The method for entity recognition in the present application will be introduced below. Please refer to Figure 2 The method for entity recognition in the present embodiment includes:
[0088] In step S101, a text to be recognized is obtained, and the text to be recognized includes at least two words to be recognized;
[0089] In this embodiment, when a user needs to mine or search for an entity in a text, the user can input or search for the to-be-identified text from a webpage through an application interface of a client, so that the to-be-identified text can be processed subsequently, thereby accurately mining or identifying an entity in the to-be-identified text.
[0090] The to-be-identified text can be a text containing at least two words such as a sentence, a paragraph, or an article, and can also be other text forms, which are not limited here.
[0091] For ease of understanding, as shown in Table 1, an example of a to-be-identified text for a data storage method in this embodiment is given, and the name entity in the to-be-identified text is taken as an example for description.
[0092] Table 1
[0093] A song is composed by Xiao Jie B the songwriter of the song is surprisingly Xiao Wen In addition to the executives of C company, Xiao Ma also expresses his opinions As a manager of D company, Xiao Wang makes suggestions
[0094] In step S102, according to the to-be-identified text, the corresponding syntactic relationship features and semantic features of each to-be-identified word are obtained, the syntactic relationship features include at least one of syntactic relationship features, part-of-speech combination relationship features, and semantic dependency relationship features.
[0095] In this embodiment, after obtaining the to-be-identified text, the corresponding syntactic relationship features of each to-be-identified word in the to-be-identified text can be mined based on the syntactic relationship between each word, wherein the syntactic relationship features can be syntactic relationship features, part-of-speech combination relationship features, semantic dependency relationship features, and the like, and can also be other relationship features, which are not limited here. Meanwhile, each to-be-identified word in the to-be-identified text can be vectorized to accurately mine the context-related semantic features of each to-be-identified word, so that the basic graph network can be constructed by fusing the syntactic relationship features and the semantic features, the feature reference information for constructing the basic graph network is increased, the relationship accuracy of the to-be-identified word in the basic graph network is improved, and the accuracy of obtaining the target entity is improved to a certain extent.
[0096] Specifically, as Figure 8As shown, when the text to be recognized is obtained, the calling library or API of the basic tool of the natural language processing task can be used to perform grammatical relationship annotation on each word to be recognized in the text to be recognized, and then the grammatical relationship features in the text to be recognized with grammatical relationship annotation can be accurately mined based on the frequent sequence pattern. In practical applications, frequent sequence patterns can be implemented by a variety of algorithms, which can be prefixspan algorithm or apriori algorithm. In addition, other algorithms that can mine frequent sequences can also be used, such as freespan algorithm. The specific algorithm to be used is determined according to the needs of the actual application and is not limited here.
[0097] Furthermore, each word to be recognized in the text to be recognized is vectorized, specifically by using the word2vec model or the glove model. In addition, other word vector models, such as the ELMo model or the BERT model, are also possible, and the specifics are not limited here, so as to accurately mine the context-related semantic features of each word to be recognized.
[0098] In step S103, a fusion feature corresponding to each word to be recognized is obtained based on the grammatical relationship feature and semantic feature corresponding to each word to be recognized;
[0099] Specifically, if Figure 8 As shown, after obtaining the grammatical relationship features and semantic features corresponding to the words to be identified, the grammatical relationship features including but not limited to syntactic relationship sequence features, part-of-speech combination relationship sequence features, semantic dependency relationship sequence features and other features can be fused with the semantic features related to the context of each word to be identified, so that the fused features corresponding to each word to be identified that are fused with the grammatical relationship features and the semantic features can be obtained, so that each word to be identified can be mapped to a point in space through the fused features corresponding to each word to be identified, to form a basic graph network containing nodes corresponding to each word to be identified, which can increase the feature reference information for constructing the basic graph network, improve the relationship accuracy of the words to be identified in the basic graph network, and thus improve the accuracy of obtaining the target entity to a certain extent.
[0100] In step S104, a basic graph network is generated based on the fusion features of each word to be identified and the fusion features of the sample words, wherein the basic graph network includes nodes and node edges. The nodes are obtained by mapping the fusion features of each word to be identified and the fusion features of the sample words. Each node represents a word. Each node edge represents that the similarity between the fusion features of any two words is greater than a preset similarity threshold. Each node edge corresponds to a weight value, and each weight value is positively correlated with the similarity between the fusion features of two adjacent words connected by the node.
[0101] In this embodiment, after the fusion features of each to-be-recognized word are obtained, the fusion features of sample words that are subjected to syntax relation annotation and semantic relation annotation can be obtained from the relation feature library. Then, the fusion features of each to-be-recognized word and the fusion features of sample words can be mapped to a high-dimensional space to form a plurality of nodes, and the nodes are connected through node edges to form a basic graph network, which can increase the feature reference information for constructing the basic graph network and improve the relation accuracy of the to-be-recognized words in the basic graph network, thereby improving the accuracy of obtaining the target entity to a certain extent.
[0102] Specifically, as shown in Figure 8 When the fusion features of each to-be-recognized word and the fusion features of sample words are obtained, the fusion features of each to-be-recognized word and the fusion features of sample words can be mapped to a high-dimensional space to form a plurality of nodes. For example, a two-dimensional vector is mapped to a two-dimensional space to form a point, which can be represented by an x-axis and a y-axis, so that each node can represent a word.
[0103] Further, the similarity between each word, i.e., the similarity between each node, can be calculated based on the fusion features of each to-be-recognized word and the fusion features of sample words to determine whether there is a node edge between each node, wherein the similarity between each node can be calculated by using cosine similarity, Euclidean distance or other similarity algorithms, which is not limited specifically herein. Then, two nodes with a similarity greater than or equal to a preset similarity threshold are connected through a node edge, and the node edge represents the association relationship between words. The strength (or closeness) of the relation is represented by a weight of each edge, and the greater the weight, the greater the relation strength, i.e., the closer the relationship. The similarity threshold can be set to 0.7, which can be set according to actual application requirements, which is not limited specifically herein.
[0104] For the convenience of understanding, step S104 is further described in detail in combination with FIG. 11. Referring to FIG. 11(a), FIG. 11(a) is a schematic diagram of a base graph network of the method for entity recognition in the embodiment of the present application. In the embodiment, the text to be recognized is taken as an example of a word containing a person name entity. Referring to FIG. 11(a), A1 refers to a word to be recognized, such as Xiao Jie; A2 refers to a word to be recognized that is associated with A1, such as A song; A3 refers to a sample word that is associated with both A1 and A2, such as A lyrics; A4 refers to a sample word that is associated with A1, such as Xiao Lun; and A5 refers to a sample word that is not associated with A1, such as C enterprise. When the fusion features of each word to be recognized and the fusion features of the sample words are obtained, the fusion features of each word to be recognized and the fusion features of the sample words can be mapped to a high-dimensional space to obtain a plurality of nodes as shown by A1, A2, A3, A4 and A5. Then, whether there is a node edge between each node can be determined by calculating the similarity between each node, such as the similarity between A1 and A2, A1 and A3, A2 and A3, and A1 and A4, which are all greater than or equal to a preset similarity threshold. Therefore, A1 and A2, A1 and A3, A2 and A3, and A1 and A4 in FIG. 11(a) are connected by node edges. Similarly, the similarity between A5 and A1 is less than the preset similarity threshold, so there is no node edge between A5 and A1.
[0105] In step S105, the base graph network is clustered according to the weight values to obtain a target graph network. The target graph network includes a class set, each class set corresponds to a category, and each class set is a set of nodes belonging to the same category.
[0106] In step S106, the target entity belonging to the entity category is determined from the at least two words to be recognized according to the target graph network.
[0107] In the embodiment, after the base graph network is obtained, the base graph network can be clustered according to the weight values. It can be understood that the nodes belonging to the same category in the base graph network are aggregated in a class set to form a target graph network, so that the words belonging to the same category can be clearly presented in the target graph network in the form of a class set, thereby the target entity belonging to the entity category can be accurately obtained from the target graph network, and the accuracy of obtaining the target entity is improved.
[0108] Specifically, as Figure 8As shown, when the base graph network is acquired, the base graph network is clustered according to the weight value, specifically, the InfoMap algorithm can be used to divide the communities of each word in the base graph network to complete clustering, or the k-means clustering can be used, or other clustering methods, such as the density-based spatial clustering of application with noise (DBSCAN), in actual application, the clustering method is selected according to the needs, and the specific limitation is not limited here.
[0109] The InfoMap algorithm divides the communities of each word in the base graph network, which can be understood as community discovery of the base graph network. For example, a group of aunties in a community organize to dance in the square. Generally, each auntie will prefer to choose the square dance team in her own community when participating in activities. However, some aunties are very energetic and feel that it is not enough to only participate in the team in her own community, or she is a social person who wants to make more friends through square dancing. Therefore, she may participate in multiple square dance teams in surrounding communities at the same time, and thus a target graph network formed by a community node set with the same interests and people with the same interests can be obtained. Similarly, clustering the base graph network can be understood as aggregating nodes belonging to the same category in the base graph network into the same community. Specifically, the distribution of entities in known sample words, such as person names, in each community can be calculated. InfoMap does not need to specify the number of categories in advance, and can affect the community division result by adjusting the similarity threshold between words step by step, and gradually reclassify the communities to ensure that the communities in the final divided target graph network contain entities in known sample words, such as person names in sample words.
[0110] Further, according to the target graph network, at least two target entities belonging to the entity category in the to-be-recognized words are determined. Specifically, the proportion of entities in known sample words, such as the proportion of person names in sample words, in each community can be calculated according to the final clustering result to divide the communities, and the communities in which the proportion of entities in known sample words is higher than a preset threshold are screened, so that other to-be-recognized words in the community can be determined as target entities, or the category of each class set can be determined according to the annotation information of sample words in each class set, and then the class set of the entity category can be accurately obtained according to the category of each class set, and then the to-be-recognized words in the class set of the entity category are determined as target entities.
[0111] For the convenience of understanding, steps S104 to S106 are further described in detail in combination with FIG. 11. Referring to FIG. 11(b), a schematic diagram of a target graph network of the entity recognition method in the embodiment of the present application is shown. In the embodiment, the text to be recognized is taken as an example of a word containing a person name entity. Referring to FIG. 11(b), when the base graph network is obtained, the base graph network is clustered according to the weight values, to obtain a target graph network in which A1 and A4 belong to the same class set, A2 belongs to a class set, and A3 and A5 belong to the same class set. Then, it can be determined that A1 is also a person name entity according to A4 being a person name entity.
[0112] In the embodiment of the present application, the entity recognition method is provided. Through the above manner, the base graph network is constructed by fusing the syntax relationship features and the semantic features by mining the syntax relationship features corresponding to each word to be recognized, including at least one of the syntax relationship features of the syntactic relationship features, the part-of-speech combination relationship features, and the semantic dependency relationship features, and mining the semantic features corresponding to each word to be recognized. The feature reference information for constructing the base graph network can be increased, and the relationship accuracy of the words to be recognized in the base graph network can be improved. Then, the words belonging to the same category can be clearly presented in the target graph network in the form of a class set by clustering the base graph network, so that the target entity belonging to the entity category can be accurately obtained according to the target graph network, and the accuracy of obtaining the target entity can be improved.
[0113] Optionally, in the above Figure 2 On the basis of the corresponding embodiment, the entity recognition method provided in the embodiment of the present application includes another optional embodiment, as shown in Figure 3 The base graph network is clustered according to the weight values to obtain a target graph network, including:
[0114] In step S301, the transition probability between the current node and the neighbor node connected by the node edge is constructed according to the weight values;
[0115] In step S302, random walk is performed on the base graph network according to the transition probability, to generate a random node sequence;
[0116] In step S303, the random node sequence is hierarchically encoded to obtain a hierarchical encoding sequence. The hierarchical encoding sequence includes a category encoding sequence and an intra-class object encoding sequence. The intra-class object encoding sequence represents the encoding sequence of the nodes belonging to the same category.
[0117] In step S304, the nodes in the base graph network are aggregated according to the hierarchical encoding sequence, to obtain a target graph network.
[0118] Specifically, the embodiment of the present application takes the community division of each word in the basic graph network by the InfoMap algorithm to complete the clustering of the basic graph network as an example, constructs the transition probability between the current node and the neighbor node connected by the node edge according to the weight value, performs random walk on the basic graph network, that is, randomly selects a node in the basic graph network as the current node, then jumps to the neighbor node from the current node according to the transition probability, jumps to the next neighbor node from the neighbor node according to the transition probability between the neighbor node and other neighbor nodes, repeats the process, and constructs the Huffman code according to the transition probability of the random walk to generate a random node sequence.
[0119] Further, the hierarchical coding sequence is obtained by performing hierarchical coding on the random node sequence, where the hierarchical coding method is that a category mark is inserted before the words in the same category, and a termination mark is inserted at the end of the category, the category mark is represented by a separate set of codes, such as 000, 001, and 002, and the words in the category and the termination mark are represented by another set of codes, since the category label is considered, the words in different categories are also represented by the same set of codes, such as 000, 001, 010, 011, and 100, so that the total minimum average coding length of each category and the objects in the category of the hierarchical coding sequence is minimized, then, according to the total minimum average coding length of each category and the objects in the category of the hierarchical coding sequence, the nodes corresponding to each category object are aggregated into a category set to obtain the target graph network.
[0120] Optionally, in the above Figure 2 Based on the corresponding embodiment, the method for entity recognition provided by the embodiment of the present application includes another optional embodiment, as shown in the method for entity recognition provided by the embodiment of the present application includes another optional embodiment, as shown in Figure 4 According to the weight value, the method for clustering the basic graph network to obtain the target graph network includes:
[0121] In step S401, the transition probability between the current node and the neighbor node connected by the node edge is constructed according to the weight value;
[0122] In step S402, the category probability is obtained according to the transition probability, the appearance probability of the current node, the appearance probability of the neighbor node, and the jump probability, where the jump probability represents the probability that the current node randomly selects any point on the basic graph network to jump, the appearance probability represents the probability that each node of the two adjacent nodes corresponding to the transition probability appears in the basic graph network, and the category probability represents the probability that the current node and the neighbor node belong to the same category;
[0123] In step S403, the nodes in the basic graph network are aggregated according to the category probability to obtain the target graph network.
[0124] Specifically, assuming that a specific hierarchical coding scheme has been established, the average coding length of this coding scheme can be calculated. The symbol P is defined as α is the probability of occurrence of object α, q i→ is the probability of occurrence of category i. According to the definition of hierarchical coding, the occurrence of each category sequence must end with the termination mark of the category, so q i→ It is also the occurrence probability of the end mark of category i. It should be noted that the probabilities in this embodiment refer to the globally normalized probabilities.
[0125] Furthermore, since classes and objects within a class use two different sets of encodings, the shortest average encoding lengths of the two can be calculated separately. The shortest average encoding length of a class is shown in the following formula (1):
[0126]
[0127] in,
[0128] Similarly, the shortest average encoding length of objects within each class i is shown in the following formula (2):
[0129]
[0130] in,
[0131] Similarly, by taking the weighted average of the shortest average coding length of the category and the shortest average coding length of the objects within each class i, the total shortest average coding length can be obtained as shown in the following formula (3):
[0132]
[0133] Furthermore, the basic graph network can be regarded as a directed graph, where each word is a node in the graph, and the points on the graph are connected by node edges. For example, two nodes (α, β) are connected by a node edge α→β, and the weight of the edge is the transition probability P α→β , the edge represents the similarity between two nodes, and the edge weight is normalized as the transition probability, so that there is no need to simulate random walks on the real basic graph network. It is only necessary to know the probability of each object in the sequence generated by the random walk as shown in the following formula (4), and then the total shortest average coding length formed by each category of the hierarchical coding sequence and the objects within the class can be minimized:
[0134]
[0135] Further, if there are some isolated areas on the base graph network, if the walk goes into these isolated areas, it can never come out, resulting in the probabilities of points outside the area being all 0. In order to avoid walk failure, a "jump probability" such as τ can be introduced. The jump probability refers to that on the base graph network, a random walk is performed according to the transition probability P α→β with a probability of 1-τ, and a random jump is performed to any point on the base graph network with a probability of τ. Therefore, the appearance probability of the word α is P α , the appearance probability of the word β is P β , the transition probability is P α→β , and the jump probability is τ. Formula (4) can be converted into the following formula (5) shown:
[0136]
[0137] Further, P α can be obtained according to formula (4) and formula (5), and the category probability can be calculated according to the following formula (6) shown:
[0138]
[0139] Further, a search clustering algorithm can be used to make formula (3) as small as possible, and then the nodes corresponding to each category object can be aggregated into a category set to obtain a target graph network. In each search clustering algorithm, q i→ is calculated according to formula (6). The search clustering algorithm can be at least one of a greedy search or simulated annealing.
[0140] Optionally, in the embodiments of the above Figure 2 , another optional embodiment of the entity recognition method provided by the embodiments of the present application is shown in the following formula (7) shown: Figure 5 According to the text to be recognized, the corresponding syntactic relationship features and semantic features of each word to be recognized are obtained, including:
[0141] In step S501, each word to be recognized in the text to be recognized is tagged with a part of speech, and a part of speech tagging sequence is obtained.
[0142] In step S502, the part of speech tagging sequence is converted into a syntactic relationship sequence, wherein the syntactic relationship sequence includes at least one of a syntactic relationship sequence, a part of speech combination relationship sequence, and a semantic dependency relationship sequence.
[0143] In step S503, the syntactic relationship sequence is feature extracted to obtain the corresponding syntactic relationship features of each word to be recognized.
[0144] In step S504, the embedding vector of each word to be recognized is obtained according to the text to be recognized.
[0145] In step S505, the embedding vector of each word to be recognized is encoded to obtain the semantic features corresponding to each word to be recognized.
[0146] Specifically, when the text to be recognized is obtained, the text to be recognized can be first segmented to obtain at least two words to be recognized, as shown in Table 2, which is obtained by segmenting the text to be recognized in Table 1 of the embodiment of the present application:
[0147] Table 2
[0148] A song is composed by Xiao Jie B the songwriter of the song is surprisingly Xiao Wen In addition to the executives of C company, Xiao Ma also expresses his opinions As a manager of D company, Xiao Wang makes suggestions
[0149] Furthermore, by performing part-of-speech tagging on at least two words to be recognized, a part-of-speech tagging sequence can be obtained, as shown in Table 3, which is a part-of-speech tagging sequence obtained by performing part-of-speech tagging on the text to be recognized after word segmentation in Table 2 of the embodiment of the present application:
[0150] Table 3
[0151] / n / u / n / v / n / n / u / n / d / v / n / p / n / u / n / f / w / n / d / v / n / p / n / u / n / w / n / v / n
[0152] Furthermore, the part-of-speech tag sequence can be converted into a grammatical relation sequence, such as Figure 9 As shown, we can follow the principle of tagging from front to back and from far to near, and convert the part-of-speech tagging sequence shown in Table 3 into the syntactic relationship sequence shown in Table 4:
[0153] Table 4
[0154] HEDATTRADSBVVOB HEDATTRADSBVADVVOB HEDADVATTRADATTADVWPSBVADVVOB HEDADVWPPOBATTRADSBVVOB
[0155] Among them, when performing sequence conversion, first mark the sequence from front to back. For example, if "A song" has two syntactic relations, ATT and RAD, then follow the principle of far first and near later. ATT is the syntactic relationship between "A song" and "composer", and RAD is the syntactic relationship between "A song" and "of". Therefore, the ATT relationship is farther than the RAD relationship and is placed in front. According to this principle, the entire syntactic relationship sequence is: HED ATT RAD SBV VOB. Other sequences can be converted in the same way.
[0156] Among them, syntactic relationship analysis is one of the key technologies in natural language processing. The predicate is the core of a sentence, and the dependency relationship between words in the sentence is used to represent the syntactic structure information of the words (dominant → subordinate word), such as SBV represents the subject-predicate relationship, VOB represents the verb-object relationship, IOB represents the indirect object relationship, FOB represents the preposed object, DBL represents the auxiliary modifier, ATT represents the attributive relationship, ADV represents the adverbial-predicate structure, CMP represents the verb-complement structure, COO represents the parallel relationship, POB represents the preposition-object relationship, LAD represents the left-attached relationship, RAD represents the right-attached relationship, etc.
[0157] Similarly, as Figure 10(a) to Figure 10(c) shown, the part-of-speech tagging sequence can also be converted into a semantic dependency relation sequence following the principle of from front to back, far to near first.
[0158] Among them, root represents the center word, Agt represents the agent relation, Exp represents the party relation, Aft represents the feeling relation, Poss represents the possession relation, Pat represents the recipient relation, Cont represents the guest relation, Prod represents the product relation, Orig represents the source relation, Datv represents the involved relation, Comp represents the comparison role, Belg represents the belonging role, Clas represents the class role, Accd represents the basis role, and Reas represents the reason role.
[0159] Further, when the word segmentation processing is performed on the text to be recognized, at least two words to be recognized as shown in Table 2 are obtained, the Word2vec model can be used to perform vectorization processing on the word segmentation result as shown in Table 2 to obtain the word vector of each word to be recognized. Then, the embedding feature, i.e. the embedding vector, converted from each word to be recognized is obtained. Since the word is closely related to the context, the semantics of the context word has a direct relationship with the semantics of the word, so the embedding vector of each word to be recognized can be encoded by an encoder to obtain the semantic feature corresponding to each word to be recognized.
[0160] Optionally, in the above Figure 2 based on the corresponding embodiment, the entity recognition method provided by the embodiment of the present application in another optional embodiment includes that, as Figure 6 shown, the syntax relation sequence includes a plurality of sub-sequences; the syntax relation sequence is subjected to feature extraction to obtain the syntax relation feature corresponding to each word to be recognized, including:
[0161] In step S601, according to the sequence length, a prefix set corresponding to the syntax relation sequence is obtained, wherein one prefix corresponds to one sub-sequence;
[0162] In step S602, for each prefix in the prefix set, a suffix set corresponding to each prefix is constructed, wherein the suffix set is used to represent the projection data set of the prefix;
[0163] In step S603, according to the syntax relation sequence, the minimum support degree is obtained, wherein the minimum support degree is used to represent the minimum frequency of the appearance of the sub-sequence in the syntax relation sequence;
[0164] In step S604, according to the minimum support degree, the prefix set and the suffix set, a frequent sequence set is obtained, wherein the frequent sequence set includes a plurality of frequent sequences;
[0165] In step S605, a grammatical relationship feature corresponding to each word to be recognized is generated according to the frequent sequence.
[0166] Specifically, when obtaining a grammatical relationship sequence, since the results of different syntactic tools and part-of-speech tagging tools are different, it is necessary to use a unified word segmentation and part-of-speech tagging tool, such as Jieba word segmentation, to standardize the obtained grammatical relationship sequence, that is, to unify the annotations in each grammatical relationship sequence. For example, part-of-speech tagged nouns are uniformly marked as n (many part-of-speech tagging tools will mark them as ns\nh\nz\nr, etc., all standardized to n).
[0167] Furthermore, for a grammatical relationship sequence including at least one of a syntactic relationship sequence, a part-of-speech combination relationship sequence, and a semantic dependency relationship sequence, grammatical relationship features are extracted according to a sequence pattern. The embodiment of the present application takes a part-of-speech combination relationship sequence as an example to illustrate the extraction of part-of-speech combination relationship features based on a frequent sequence pattern. Other grammatical relationship features can be extracted in the same way.
[0168] The embodiment of the present application mines the frequent sequence patterns hidden in the part-of-speech combination relationship sequence based on the prefixspan algorithm, takes the part-of-speech combination relationship sequence as the mining object, and uses the multiple minimum support strategy. The calculation method of the minimum support is shown in formula (7):
[0169] min_sup=a×n (7)
[0170] Where n is the number of part-of-speech combination relationship sequences, a is the minimum support rate, and the minimum support rate parameter is adjusted according to the number of part-of-speech combination relationship sequences.
[0171] The specific steps of the prefixspan algorithm to mine the frequent sequence patterns hidden in the part-of-speech combination relationship sequence are as follows:
[0172] 1. Find the context sequence prefix and corresponding projection dataset of the part-of-speech sequence element with a unit length of 1;
[0173] 2. Count the frequency of occurrence of the context sequence prefixes of the part-of-speech sequence elements and add prefixes with support higher than the minimum support threshold to the dataset to obtain the frequent item set sequence pattern;
[0174] 3. Recursively mine all prefixes of length i that meet the minimum support requirement:
[0175] 1) Mine the prefix projection data set. If the projection data is an empty set, return to recursion.
[0176] 2) Statistics of the minimum support of each item in the corresponding projection data set, each single item that meets the support is merged with the current prefix to get a new prefix, and the one that does not meet the support requirement is recursively returned;
[0177] 3) Let i=i+1, and the prefix is each new prefix after merging the single item, and the third step is recursively executed;
[0178] 4, finally return all frequent sequence patterns in the context sequence where the part-of-speech sequence element is located.
[0179] In order to facilitate understanding, the embodiments of the present application take the part-of-speech tagging results in table 3 as an example, and mine the sequence patterns contained in the context where the part-of-speech sequence element is located based on the Prefixspan algorithm, assuming that the minimum support threshold set is 0.4, first count the number of occurrences of all part-of-speech sequence elements, as shown in table 5:
[0180] Table 5
[0181]
[0182]
[0183] Further, filter the part-of-speech sequence elements in table 5 that do not meet the preset support threshold, the minimum support threshold set is 0.4, that is, at least 2 of the 4 part-of-speech sequence elements appear to meet the support threshold, and the filtering result after threshold filtering of table 5 can be obtained as shown in table 6:
[0184] Table 6
[0185] / n / u / n / v / n / u / n / d / v / p / n / u / n / w / d / v / n / p / n / u / n / w / v / n
[0186] Further, based on the sequence pattern algorithm, in table 6, find the context sequence prefix and the corresponding projection data set of the part-of-speech sequence element with a unit length of 1, that is, construct a prefix with its corresponding suffix for the part-of-speech sequence element that meets the threshold, and the result is shown in table 7:
[0187] Table 7
[0188]
[0189] Further, continue to take a prefix " / n" as an example, continue to mine the two-item prefix and the corresponding suffix that meet the minimum support threshold from the results of table 7, and the results are shown in table 8:
[0190] Table 8
[0191]
[0192]
[0193] Further, taking the two-item prefix " / n / u" as an example, the three-item prefixes and corresponding suffixes that satisfy the minimum support threshold are further mined from the results of Table 8, and the results are shown in Table 9:
[0194] Table 9
[0195]
[0196] Further, taking the three-item prefix " / n / u / n" as an example, the four-item prefixes and corresponding suffixes that satisfy the minimum support threshold are further mined from the results of Table 9, and the results are shown in Table 10:
[0197] Table 10
[0198]
[0199] Further, the five-item prefixes and corresponding suffixes that satisfy the minimum support threshold are further mined from the results of Table 10, and the results are shown in Table 11:
[0200] Table 11
[0201]
[0202] Further, the six-item prefixes and corresponding suffixes that satisfy the minimum support threshold are further mined from the results of Table 11, and the results are shown in Table 12:
[0203] Table 12
[0204] Six prefixes Corresponding suffixes / n / u / n / w / d / v / n / n / u / n / w / d / n
[0205] Further, the seven-item prefixes and corresponding suffixes that satisfy the minimum support threshold are further mined from the results of Table 12, and the results are shown in Table 13:
[0206] Table 13
[0207] Seven prefixes Corresponding suffixes / n / u / n / w / d / v / n
[0208] The iteration ends, and frequent sequences of various lengths can be obtained. Similarly, other syntax relationship sequences are mined to obtain corresponding frequent sequences in the same manner.
[0209] It should be noted that the embodiment can extract at least one of the frequent sequence mode, the part-of-speech combination relationship sequence feature, and the semantic dependency relationship sequence feature to obtain the syntax relationship feature of the to-be-identified text. It can be understood that the embodiment is not limited to only these syntax relationship features, and other syntax relationship sequences of the to-be-identified word can use the frequent sequence mode to extract the syntax relationship feature.
[0210] Optionally, in the above Figure 2According to the corresponding embodiment, in another optional embodiment of the entity recognition method provided by the embodiment, the fusion feature corresponding to each to-be-recognized word is obtained according to the syntactic relationship feature and the semantic feature corresponding to each to-be-recognized word, including:
[0211] The syntactic relationship feature and the semantic feature corresponding to each to-be-recognized word are dimensionally spliced to obtain the fusion feature corresponding to each to-be-recognized word.
[0212] Specifically, when the syntactic relationship feature and the semantic feature corresponding to each to-be-recognized word are dimensionally spliced, for example, the syntactic relationship feature is an A feature of 100 dimensions, the semantic feature is a B feature of 120 dimensions, and the spliced fusion feature is 220 dimensions, so that the subsequent can map each to-be-recognized word to a point in space through the fusion feature corresponding to each to-be-recognized word, to form a basic graph network containing nodes corresponding to each to-be-recognized word, can increase the feature reference information for constructing the basic graph network, improve the relationship accuracy of the to-be-recognized word in the basic graph network, and thus can improve the accuracy of obtaining the target entity to a certain extent.
[0213] Optionally, in the above Figure 2 According to the corresponding embodiment, in another optional embodiment of the entity recognition method provided by the embodiment, as Figure 7 shown, the method further includes:
[0214] In step S701, an entity training sample is obtained, and the entity training sample includes at least two sample words.
[0215] In step S702, according to the entity training sample, the corresponding syntactic relationship feature and semantic feature of each sample word are obtained, and the syntactic relationship feature includes at least one of the syntactic relationship feature, the part-of-speech combination relationship feature, and the semantic dependency relationship feature.
[0216] In step S703, according to the syntactic relationship feature and the semantic feature corresponding to each sample word, the fusion feature corresponding to each sample word is obtained.
[0217] In step S704, according to the fusion feature corresponding to each sample word, an original graph network is generated, wherein the original graph network includes nodes and node edges, each node is obtained by mapping the fusion feature of the sample word, each node represents a sample word, each node edge represents that the similarity between the fusion features of any two sample words is greater than a preset similarity threshold, each node edge corresponds to a weight value, and each weight value is positively correlated with the similarity between the fusion features of the two adjacent sample words connected by the node.
[0218] In step S705, a transition probability between the current node and the neighbor node connected by the node edge is constructed according to the weight value;
[0219] In step S706, a random walk is performed on the original graph network according to the transition probability, and a random sample node sequence is generated;
[0220] In step S707, the random sample node sequence is hierarchically encoded to obtain a sample hierarchical encoding sequence;
[0221] In step S708, the shortest average encoding length of each class and intra-class object is obtained according to the sample hierarchical encoding sequence;
[0222] In step S709, the shortest average encoding length of each class and intra-class object is clustered to minimize the shortest average encoding length of each class and intra-class object.
[0223] Specifically, a batch of entity name words can be obtained first, and the present embodiment takes a personal name entity name word as an example for illustration, wherein the personal name entity name word is in the format of: Xiao Zhou, Xiao Fang, Xiao Liu, Xiao Wu, etc., and the obtaining method can be enumeration or crawling the search engine's celebrity entry, etc., which is not specifically limited here, and then the batch of personal name entity name words obtained is taken as an initialization training sample, so that the subsequent model can continuously expand the personal name entity set through iteration.
[0224] Further, after obtaining a batch of personal name entity name words, a batch of texts containing these personal name entities can be obtained by matching various texts (such as news information, search engine entries, search databases, etc.), that is, the matched recalled texts each contain at least one personal name entity, and this batch of texts is taken as an initialization personal name entity training sample, i.e., an entity training sample, as shown in Table 14:
[0225] Table 14
[0226] E the songwriter of the song is surprisingly Xiao Fang F the songwriter of the song is surprisingly Xiao Fang In addition to the executives of G department, Xiao Liu also proposes a plan As a manager of H branch, Xiao Wu proposes a plan
[0227] Further, when the personal name entity training sample is obtained, the personal name entity training sample can be processed for word segmentation and part-of-speech tagging first, to obtain at least two sample words and corresponding part-of-speech tagging results, as shown in Table 15, which are the personal name entity training samples in Table 14 of the present embodiment after word segmentation processing:
[0228] Table 15
[0229] E the songwriter of the song is surprisingly Xiao Fang F the songwriter of the song is surprisingly Xiao Fang In addition to the executives of G department, Xiao Liu also proposes a plan As a manager of H branch, Xiao Wu proposes a plan
[0230] Further, the position of the personal name in the part-of-speech tagging result shown in Table 15 is marked, for example, marked with *, to obtain the part-of-speech tagging result as shown in Table 16:
[0231] Table 16
[0232]
[0233]
[0234] Further, the part-of-speech sequence shown in Table 16 can be converted into a syntactic relation sequence, and the conversion manner is similar to the manner of converting the part-of-speech sequence into the syntactic relation sequence in step S502, which will not be described herein again.
[0235] Further, the syntactic relation sequence is subjected to feature extraction to obtain the syntactic relation features corresponding to each sample word, and the extraction manner is similar to the manner of extracting the syntactic relation features corresponding to each to-be-recognized word from the syntactic relation sequence in steps S601 to S605.
[0236] For ease of understanding, the part-of-speech results in Table 16 are taken as an example, and the Prefixspan algorithm is used to mine the sequence patterns contained in the context of the part-of-speech sequence elements, and it is assumed that the minimum support rate threshold is 0.4. First, the occurrence times of all part-of-speech sequence elements are counted, as shown in Table 17:
[0237] Table 17
[0238] Parts of speech sequence elements Number of occurrences / n 4 / u 4 / v 4 / d 2 / w 2 / p 2 / f 1
[0239] Further, the part-of-speech sequence elements in Table 17 that do not meet the preset support rate threshold are filtered, and the minimum support rate threshold is set to 0.4, that is, at least 2 part-of-speech sequence elements appear to meet the support threshold, and the filtering result after threshold filtering of Table 5 can be obtained, as shown in Table 18:
[0240] Table 18
[0241] / n / u / n / v* / n / u / n / d / v* / p / n / u / n / w* / d / v / n / p / n / u / n / w* / v / n
[0242] Further, the sequence pattern algorithm is used for mining, and in Table 18, the context sequence prefix and the corresponding projection data set of the part-of-speech sequence element with a unit length of 1 are found, that is, the part-of-speech sequence element that meets the threshold is constructed into a prefix and its corresponding suffix, and the result is shown in Table 19:
[0243] Table 19
[0244]
[0245]
[0246] Furthermore, taking the prefix " / n" as an example, we continue to mine two prefixes and corresponding suffixes that meet the minimum support threshold based on the results in Table 19. The results are shown in Table 20:
[0247] Table 20
[0248]
[0249] Furthermore, taking the binary prefix " / n / u" as an example, we continue to mine the three-term prefixes and corresponding suffixes that meet the minimum support threshold based on the results in Table 20. The results are shown in Table 21:
[0250] Table 21
[0251]
[0252]
[0253] Furthermore, taking the three prefixes " / n / u / n" as an example, we continue to mine the four prefixes and corresponding suffixes that meet the minimum support threshold based on the results in Table 21. The results are shown in Table 22:
[0254] Table 22
[0255]
[0256] Furthermore, the results in Table 22 are used to continue mining the five prefixes and corresponding suffixes that meet the minimum support threshold. The results are shown in Table 23:
[0257] Table 23
[0258]
[0259] Furthermore, the results in Table 23 are used to continue mining the six prefixes and corresponding suffixes that meet the minimum support threshold. The results are shown in Table 24:
[0260] Table 24
[0261]
[0262] Furthermore, the results in Table 24 are used to continue mining seven prefixes and corresponding suffixes that meet the minimum support threshold. The results are shown in Table 25:
[0263] Table 25
[0264] Seven prefixes Corresponding suffixes / n / u / n / w* / v / n
[0265] After the iteration, frequent sequences of various lengths can be obtained. Similarly, other grammatical relationship sequences can be mined in the same way to obtain corresponding frequent sequences.
[0266] Further, the manner of obtaining the semantic features of the sample words is similar to the manner of obtaining the semantic features corresponding to each to-be-recognized word in steps S504 to S505, which will not be described herein again.
[0267] Further, the step S703 of obtaining the fusion features corresponding to each sample word according to the syntactic relationship features and the semantic features corresponding to each sample word is similar to the manner of obtaining the fusion features corresponding to each to-be-recognized word according to the syntactic relationship features and the semantic features corresponding to each to-be-recognized word in step S103, which will not be described herein again.
[0268] Further, the manner of generating the original graph network according to the fusion features corresponding to each sample word in step S704 is similar to the manner of generating the basic graph network according to the fusion features of each to-be-recognized word and the fusion features of the sample words in step S104, which will not be described herein again.
[0269] Further, the manner of clustering the shortest average encoding lengths of each class and the intra-class objects in the original graph network to minimize the shortest average encoding lengths of each class and the intra-class objects in steps S705 to S709 is similar to the manner of clustering the basic graph network according to the weight values to obtain the target graph network in steps S401 to S403, which will not be described herein again.
[0270] The entity recognition device in the present application will be described in detail below. Please refer to Figure 12 , Figure 12 FIG. 1 is a schematic diagram of an embodiment of the entity recognition device in the present application. The entity recognition device 20 comprises:
[0271] The obtaining unit 201 is configured to obtain a to-be-recognized text, the to-be-recognized text comprising at least two to-be-recognized words.
[0272] The obtaining unit 201 is further configured to obtain, according to the to-be-recognized text, the syntactic relationship features and the semantic features corresponding to each to-be-recognized word, the syntactic relationship features comprising at least one of the syntactic relationship features, the part-of-speech combination relationship features, and the semantic dependency relationship features.
[0273] The obtaining unit 201 is further configured to obtain, according to the syntactic relationship features and the semantic features corresponding to each to-be-recognized word, the fusion features corresponding to each to-be-recognized word.
[0274] The processing unit 202 is configured to generate a base graph network according to the fusion features of each to-be-recognized word and the fusion features of the sample words, wherein the base graph network comprises nodes and node edges, the nodes are mapped from the fusion features of each to-be-recognized word and the fusion features of the sample words, each node represents a word, each node edge represents that the similarity between the fusion features of any two words is greater than a preset similarity threshold, each node edge corresponds to a weight value, and each weight value is positively correlated with the similarity between the fusion features of two adjacent words connected by the node edge.
[0275] The processing unit 202 is further configured to cluster the base graph network according to the weight values to obtain a target graph network, and the target graph network comprises a class set, each class set corresponds to a category, and each class set is a set of nodes belonging to the same category.
[0276] The determining unit 203 is configured to determine target entities belonging to the entity category from the at least two to-be-recognized words according to the target graph network.
[0277] Optionally, in the above Figure 12 Based on the corresponding embodiments, in another embodiment of the entity recognition device provided by the present embodiment, the processing unit 202 can be specifically configured to:
[0278] According to the weight values, a transition probability between a current node and a neighbor node connected by a node edge is constructed;
[0279] Random walk is performed on the base graph network according to the transition probability to generate a random node sequence;
[0280] The random node sequence is hierarchically encoded to obtain a hierarchical encoding sequence, and the hierarchical encoding sequence comprises a category encoding sequence and an intra-class object encoding sequence, and the intra-class object encoding sequence represents an encoding sequence of nodes belonging to the same category.
[0281] According to the hierarchical encoding sequence, the nodes in the base graph network are aggregated to obtain a target graph network.
[0282] Optionally, in the above Figure 12 Based on the corresponding embodiments, in another embodiment of the entity recognition device provided by the present embodiment, the processing unit 202 can be specifically configured to:
[0283] According to the weight values, a transition probability between a current node and a neighbor node connected by a node edge is constructed;
[0284] According to the transition probability, the appearance probability of the current node, the appearance probability of the neighbor node, and the jump probability, a category probability is obtained, wherein the jump probability is used to represent a probability that the current node randomly selects any one point on the base graph network to jump, the appearance probability represents a probability that each node of the two adjacent nodes corresponding to the transition probability appears in the base graph network, and the category probability represents a probability that the current node and the neighbor node belong to the same category;
[0285] According to the category probability, the nodes in the base graph network are aggregated to obtain a target graph network.
[0286] Optionally, in the above Figure 12 Based on the corresponding embodiment, another embodiment of the entity recognition device provided by the present application can be used for:
[0287] Parses each to-be-recognized word in the to-be-recognized text to obtain a part-of-speech annotation sequence;
[0288] Converts the part-of-speech annotation sequence into a syntax relationship sequence, wherein the syntax relationship sequence includes at least one of a syntactic relationship sequence, a part-of-speech combination relationship sequence, and a semantic dependency relationship sequence;
[0289] Extracts features from the syntax relationship sequence to obtain a syntax relationship feature corresponding to each to-be-recognized word;
[0290] According to the to-be-recognized text, an embedding vector of each to-be-recognized word is obtained;
[0291] Encodes the embedding vector of each to-be-recognized word to obtain a semantic feature corresponding to each to-be-recognized word.
[0292] Optionally, in the above Figure 12 Based on the corresponding embodiment, another embodiment of the entity recognition device provided by the present application can be used for:
[0293] According to the sequence length, a prefix set corresponding to the syntax relationship sequence is obtained, wherein one prefix corresponds to one subsequence;
[0294] For each prefix in the prefix set, a suffix set corresponding to each prefix is constructed, wherein the suffix set is used to represent the projection dataset of the prefix;
[0295] According to the syntax relationship sequence, a minimum support degree is obtained, wherein the minimum support degree is used to represent the minimum frequency of occurrence of a subsequence in the syntax relationship sequence;
[0296] According to the minimum support degree, the prefix set, and the suffix set, a frequent sequence set is obtained, wherein the frequent sequence set includes a plurality of frequent sequences;
[0297] The syntax relationship features corresponding to each to-be-recognized word are generated according to the frequent sequence.
[0298] Optionally, in the above Figure 12 Based on the corresponding embodiment, the obtaining unit 201 in another embodiment of the entity recognition device provided by the embodiment of the present application can be specifically used for:
[0299] The syntax relationship features and the semantic features corresponding to each to-be-recognized word are dimensionally spliced to obtain the fusion features corresponding to each to-be-recognized word.
[0300] Optionally, in the above Figure 12 Based on the corresponding embodiment, in another embodiment of the entity recognition device provided by the embodiment of the present application,
[0301] The obtaining unit 201 is further configured to obtain entity training samples, the entity training samples including at least two sample words.
[0302] The obtaining unit 201 is further configured to obtain, according to the entity training samples, the corresponding syntax relationship features and the semantic features of each sample word, the syntax relationship features including at least one of the syntactic relationship features, the part-of-speech combination relationship features and the semantic dependency relationship features.
[0303] The obtaining unit 201 is further configured to obtain, according to the corresponding syntax relationship features and the semantic features of each sample word, the fusion features corresponding to each sample word.
[0304] The processing unit 202 is further configured to generate a raw graph network according to the fusion features corresponding to each sample word, wherein the raw graph network includes nodes and node edges, each node is obtained by mapping the fusion features of a sample word, each node represents a sample word, each node edge represents that the similarity between the fusion features of any two sample words is greater than a preset similarity threshold, each node edge corresponds to a weight value, and each weight value is positively correlated with the similarity between the fusion features of two adjacent sample words connected by the node.
[0305] The processing unit 202 is further configured to construct a transition probability between a current node and a neighbor node connected by a node edge according to the weight value.
[0306] The processing unit 202 is further configured to perform random walk on the raw graph network according to the transition probability to generate a random sample node sequence.
[0307] The processing unit 202 is further configured to perform hierarchical coding on the random sample node sequence to obtain a sample hierarchical coding sequence.
[0308] The processing unit 202 is further configured to obtain the shortest average encoding length of each class and the in-class object according to the sample hierarchical encoding sequence.
[0309] The processing unit 202 is further configured to cluster the shortest average encoding length of each class and the in-class object, so as to minimize the shortest average encoding length of each class and the in-class object.
[0310] Another aspect of the present application provides another schematic diagram of a computer device, as shown in Figure 13 , Figure 13 The computer device 300 can have great differences due to different configurations or performances, and can include one or more central processing units (CPUs) 310 (for example, one or more processors) and a memory 320, one or more storage media 330 (for example, one or more mass storage devices) storing application programs 331 or data 332. The memory 320 and the storage media 330 can be temporary storage or persistent storage. The programs stored in the storage media 330 can include one or more modules (not shown in the figure), and each module can include a series of instruction operations in the computer device 300. Further, the central processing unit 310 can be configured to communicate with the storage media 330 and execute the series of instruction operations in the storage media 330 on the computer device 300.
[0311] The computer device 300 can further include one or more power supplies 340, one or more wired or wireless network interfaces 350, one or more input and output interfaces 360, and / or one or more operating systems 333, such as Windows Server TM , Mac OS X TM , Unix TM , Linux TM , FreeBSD TM , etc.
[0312] The computer device 300 is further configured to perform the steps in the embodiments as shown in Figure 2 to Figure 7 .
[0313] Another aspect of the present application provides a computer readable storage medium, which stores instructions when executed on a computer, so as to enable the computer to perform the steps in the method described in the embodiments as shown in Figure 2 to Figure 7 .
[0314] Another aspect of the present application provides a computer program product containing instructions which, when executed on a computer or processor, cause the computer or processor to carry out the steps of the method as described above. Figure 2 to Figure 7 The steps in the method described in the illustrated embodiments.
[0315] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described system, device and unit can refer to the corresponding processes in the foregoing method embodiments, which will not be repeated here.
[0316] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interface, device or unit, and can be electrical, mechanical or other forms.
[0317] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on a plurality of network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.
[0318] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0319] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.
Claims
1. A method for entity recognition, characterized in that: include: Acquire a text to be recognized, wherein the text to be recognized includes at least two words to be recognized; Acquire, based on the text to be recognized, corresponding grammatical relationship features and semantic features of each word to be recognized, wherein the grammatical relationship features include at least one of syntactic relationship features, part-of-speech combination relationship features, and semantic dependency relationship features; Obtaining the fusion features corresponding to each word to be recognized based on the grammatical relationship features and semantic features corresponding to each word to be recognized; Generate a basic graph network based on the fusion features of each word to be identified and the fusion features of the sample words, wherein the basic graph network includes nodes and node edges, the nodes are obtained by mapping the fusion features of each word to be identified and the fusion features of the sample words, each node represents a word, each node edge represents that the similarity between the fusion features of any two words is greater than a preset similarity threshold, each node edge corresponds to a weight value, and each weight value is positively correlated with the similarity between the fusion features of two adjacent words connected by the node; Clustering the base graph network according to the weight values to obtain a target graph network, wherein the target graph network includes a set of clusters, each cluster corresponding to a category, and each cluster being a set of nodes belonging to the same category; According to the target graph network, a target entity belonging to an entity category in the at least two words to be recognized is determined.
2. The method according to claim 1, characterized in that The clustering of the basic graph network according to the weight values to obtain a target graph network includes: Constructing a transition probability between the current node and the neighboring node connected by the node edge according to the weight value; Perform a random walk on the basic graph network according to the transition probability to generate a random node sequence; Performing hierarchical coding on the random node sequence to obtain a hierarchical coding sequence, wherein the hierarchical coding sequence includes a category coding sequence and an intra-category object coding sequence, wherein the intra-category object coding sequence represents a coding sequence of nodes belonging to the same category; According to the hierarchical coding sequence, the nodes in the basic graph network are aggregated to obtain the target graph network.
3. The method according to claim 1, characterized in that The clustering of the basic graph network according to the weight values to obtain a target graph network includes: Constructing a transition probability between the current node and the neighboring node connected by the node edge according to the weight value; Obtain the category probability based on the transition probability, the occurrence probability of the current node, the occurrence probability of the neighboring nodes, and the jump probability, wherein the jump probability is used to represent the probability corresponding to the current node randomly selecting any point on the basic graph network for jumping, the occurrence probability represents the probability of each of the two adjacent nodes corresponding to the transition probability appearing in the basic graph network, and the category probability represents the probability that the current node and the neighboring node belong to the same category; According to the category probabilities, the nodes in the base graph network are aggregated to obtain the target graph network.
4. The method according to claim 1, wherein The step of obtaining the corresponding grammatical relationship features and semantic features of each word to be recognized based on the text to be recognized includes: Performing part-of-speech tagging on each word to be identified in the text to be identified to obtain a part-of-speech tag sequence; Converting the part-of-speech tag sequence into the grammatical relationship sequence, wherein the grammatical relationship sequence includes at least one of a syntactic relationship sequence, a part-of-speech combination relationship sequence, and a semantic dependency relationship sequence; Performing feature extraction on the grammatical relationship sequence to obtain a grammatical relationship feature corresponding to each word to be recognized; Obtaining an embedding vector for each word to be recognized based on the text to be recognized; The embedding vector of each word to be recognized is encoded to obtain a semantic feature corresponding to each word to be recognized.
5. The method according to claim 4, characterized in that The grammatical relation sequence includes a plurality of subsequences; The feature extraction of the grammatical relationship sequence to obtain the grammatical relationship feature corresponding to each word to be recognized includes: Obtaining a prefix set corresponding to the grammatical relationship sequence according to the sequence length, wherein one prefix corresponds to one subsequence; For each prefix in the prefix set, construct a suffix set corresponding to each prefix, wherein the suffix set is used to represent a projection data set of the prefix; Obtaining a minimum support according to the grammatical relationship sequence, wherein the minimum support is used to represent the minimum frequency of occurrence of a subsequence in the grammatical relationship sequence; Acquire a frequent sequence set according to the minimum support, the prefix set, and the suffix set, wherein the frequent sequence set includes multiple frequent sequences; A grammatical relationship feature corresponding to each of the words to be recognized is generated according to the frequent sequence.
6. The method according to any one of claims 1 to 5, characterized in that The step of obtaining the fusion feature corresponding to each word to be recognized based on the grammatical relationship feature and semantic feature corresponding to each word to be recognized includes: The grammatical relationship features and semantic features corresponding to each word to be recognized are dimensionally spliced to obtain the fusion features corresponding to each word to be recognized.
7. The method according to claim 1, characterized in that The method further comprises: Obtaining an entity training sample, wherein the entity training sample includes at least two sample words; According to the entity training sample, obtaining corresponding grammatical relationship features and semantic features of each sample word, wherein the grammatical relationship features include at least one of syntactic relationship features, part-of-speech combination relationship features, and semantic dependency relationship features; Obtain the fusion features corresponding to each sample word based on the grammatical relationship features and semantic features corresponding to each sample word; Generate an original graph network based on the fusion features corresponding to each sample word, wherein the original graph network includes nodes and node edges, each node is obtained by mapping the fusion features of the sample words, each node represents a sample word, each node edge represents that the similarity between the fusion features of any two sample words is greater than a preset similarity threshold, each node edge corresponds to a weight value, and each weight value is positively correlated with the similarity between the fusion features of two adjacent sample words connected by the node; Constructing a transition probability between the current node and the neighboring node connected by the node edge according to the weight value; Perform a random walk on the original graph network according to the transition probability to generate a random sample node sequence; Performing hierarchical coding on the random sample node sequence to obtain a sample hierarchical coding sequence; Obtaining the shortest average coding length for each class and object within the class according to the sample hierarchical coding sequence; Clustering is performed on the shortest average coding length of each class and the objects within the class to minimize the shortest average coding length of each class and the objects within the class.
8. An entity recognition device, characterized in that: include: An acquisition unit, configured to acquire a text to be recognized, wherein the text to be recognized includes at least two words to be recognized; The acquisition unit is further configured to acquire, based on the text to be recognized, corresponding grammatical relationship features and semantic features of each word to be recognized, wherein the grammatical relationship features include at least one of syntactic relationship features, part-of-speech combination relationship features, and semantic dependency relationship features; The acquisition unit is further configured to acquire a fusion feature corresponding to each to-be-recognized word based on the grammatical relationship feature and semantic feature corresponding to each to-be-recognized word; a processing unit, configured to generate a basic graph network based on the fusion features of each to-be-recognized word and the fusion features of the sample words, wherein the basic graph network includes nodes and node edges, the nodes being obtained by mapping the fusion features of each to-be-recognized word and the fusion features of the sample words, each node representing a word, each node edge representing that the similarity between the fusion features of any two words is greater than a preset similarity threshold, each node edge corresponding to a weight value, and each weight value being positively correlated with the similarity between the fusion features of two adjacent words connected by the node; The processing unit is further configured to cluster the base graph network according to the weight values to obtain a target graph network, wherein the target graph network includes a set of clusters, each cluster set corresponds to a category, and each cluster set is a set of nodes belonging to the same category; A determination unit is used to determine a target entity belonging to an entity category among the at least two words to be identified based on the target graph network.
9. A computer device, characterized in that: include: memories, transceivers, processors, and bus systems; Wherein, the memory is used to store programs; The processor is configured to implement the method according to any one of claims 1 to 7 when executing the program in the memory; The bus system is used to connect the memory and the processor so that the memory and the processor can communicate with each other.
10. A computer-readable storage medium comprising instructions, which, when executed on a computer, causes the computer to perform the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Entity attribute information extraction method and device based on syntactic dependency
CN107957991A
Heterogeneous ontology matching method and system based on graph
CN108536796A