A semantic disambiguation method and device combined with knowledge graph, and intelligent learning device
By combining the semantic disambiguation method of knowledge graph, the problem of high semantic analysis failure rate in intelligent learning devices is solved, the accuracy and speed of semantic understanding are improved, and the promotion and application of intelligent educational equipment is promoted.
Patent Information
- Application Number
- CN201910325404.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-04-22
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2039-04-22
AI Technical Summary
The existing technology has high semantic analysis failure rate in human-computer interaction scenarios, resulting in inaccurate semantic understanding of intelligent learning devices, affecting user experience and product promotion.
The semantic disambiguation method combined with the knowledge graph is adopted to improve the accuracy and speed of semantic understanding through word segmentation, part-of-speech annotation, extract polysynonyms and their related words, and use large-scale corpus and domain knowledge graphs to calculate and interpret point information.
It significantly improves the accuracy and semantic disambiguation speed of machine semantic understanding of text, enhances the accuracy of semantic understanding of intelligent learning devices and the accuracy of multisense definitions, and promotes the promotion and application of intelligent educational equipment.
Smart Images

Figure CN111859974B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of semantic technology, and in particular to a semantic disambiguation method and device combined with a knowledge graph, and an intelligent learning device. Background Art
[0002] With the continuous development of society, more and more smart learning devices, such as tutoring machines and student tablets, are widely used in families. People use such devices to assist children in learning. For example, when they encounter exercises that they cannot solve or knowledge points that they do not understand during the learning process, they can input relevant questions or knowledge points through voice or text, and search for corresponding answers and knowledge explanations in smart learning devices.
[0003] At present, in human-computer interaction scenarios, accurately understanding the semantics of input information is the basis for making correct responses. If the semantic parsing failure rate of a product is high, it will lead to a poor user experience and be detrimental to the promotion and use of the product.
[0004] To obtain the correct semantics, we must first correctly understand the meaning of the key words in the input information. Word sense disambiguation is an important semantic technology. Its goal is to determine the specific meaning of each polysemous word in a specific context. Existing word sense disambiguation methods are based on semantic dictionaries. They use semantic dictionaries to search for the meaning of each word, a set of synonyms, etc., and then combine them with the context to obtain the meaning of the polysemous word itself in the text. Summary of the invention
[0005] The purpose of the present invention is to provide a semantic disambiguation method and device combined with a knowledge graph, and an intelligent learning device, which not only improves the accuracy of the machine's understanding of text semantics, but also improves the machine's semantic disambiguation speed, thereby facilitating the promotion and application of intelligent educational equipment.
[0006] The technical solution provided by the present invention is as follows:
[0007] A semantic disambiguation method combined with a knowledge graph comprises: segmenting a target text and tagging the words obtained after the segmentation with parts of speech; when polysemous words exist in the words, extracting the polysemous words and their corresponding related words from the words; and interpreting the polysemous words according to the polysemous words, the related words, and the domain knowledge graph.
[0008] Further preferably, the extracting of polysemous words and their corresponding related words from the words includes: extracting polysemous words and candidate words that meet a preset part-of-speech range from the words; calculating the point mutual information between the candidate words and the polysemous words based on a large-scale corpus; and selecting candidate words whose point mutual information is greater than a preset threshold as related words of the polysemous words.
[0009] Further preferably, the calculation formula of the point mutual information is:
[0010]
[0011] Among them, PMI(W1=w1,W2=w2) represents the point mutual information value of the two words w1 and w2, P(w1,w2) represents the number of times w1 and w2 appear together, P(w1) represents the number of times w1 appears, and P(w2) represents the number of times w2 appears.
[0012] Further preferably, interpreting the polysemous word based on the polysemous word, the related words, and the domain knowledge graph includes: obtaining the entity corresponding to the polysemous word on the domain knowledge graph based on the polysemous word; traversing all triples of the entity to find the triples matching the related words; and determining the interpretation of the polysemous word based on the matching triples.
[0013] Further preferably, before determining the meaning of the polysemous word based on matching triples, the method also includes: when all triples of the entity are traversed and no triple matching the related word is found, obtaining synonyms of the related word based on a preset vocabulary; and traversing all triples of the entity to find a triple matching the synonym of the related word.
[0014] The present invention also provides a semantic disambiguation device combined with a knowledge graph, comprising: a text segmentation module, used to segment the target text and perform part-of-speech tagging on the words obtained after the segmentation; a related word extraction module, used to extract the polysemous words and their corresponding related words from the words when there are polysemous words in the words; and a matching interpretation module, used to interpret the polysemous words according to the polysemous words, the related words, and the domain knowledge graph.
[0015] Further preferably, the related word extraction module is further used to extract polysemous words and candidate words that meet a preset part-of-speech range from the words; and, based on a large-scale corpus, calculate the point mutual information between the candidate words and the polysemous words; and, select candidate words whose point mutual information is greater than a preset threshold as related words of the polysemous words.
[0016] Further preferably, the matching and interpretation module includes: a search and matching unit, used to obtain the entity corresponding to the polysemous word on the domain knowledge graph according to the polysemous word; and traverse all triples of the entity to find the triple that matches the related word; a word interpretation unit, used to determine the interpretation of the polysemous word based on the matching triples.
[0017] Further preferably, the search and matching unit is further used to obtain synonyms of the related words according to a preset vocabulary when no triples matching the related words are found after traversing all triples of the entity; and to traverse all triples of the entity to find triples matching the synonyms of the related words.
[0018] The present invention also provides an intelligent learning device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the semantic disambiguation method combined with a knowledge graph as described in any one of the above items when executing the computer program.
[0019] The semantic disambiguation method and device combined with knowledge graph and intelligent learning device provided by the present invention can bring the following beneficial effects:
[0020] 1. The present invention combines knowledge graphs for semantic disambiguation, which not only improves the semantic disambiguation speed of the machine, but also improves the accuracy of the machine's understanding of text semantics, compared with the traditional method based only on dictionaries, which is conducive to the promotion and application of intelligent educational equipment.
[0021] 2. The present invention identifies the correlation between two words through a large-scale corpus, and extracts related words of polysemous words according to the correlation between the two words. This method extracts related words more accurately, thereby improving the accuracy of the interpretation of polysemous words.
[0022] 3. The present invention searches for matching triples in the knowledge graph based on polysemous words and their related words or synonyms of related words, which can improve the search success rate of matching triples, thereby improving the semantic understanding accuracy of intelligent learning devices. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The following will explain the preferred implementation mode in a clear and understandable manner with reference to the accompanying drawings, and further explain the above-mentioned characteristics, technical features, advantages and implementation methods of a semantic disambiguation method and device combined with a knowledge graph.
[0024] Figure 1 It is a flow chart of an embodiment of a semantic disambiguation method combined with a knowledge graph of the present invention;
[0025] Figure 2 is a flow chart of another embodiment of a semantic disambiguation method combined with a knowledge graph of the present invention;
[0026] Figure 3 is a flow chart of another embodiment of a semantic disambiguation method combined with a knowledge graph of the present invention;
[0027] Figure 4 is a flow chart of another embodiment of a semantic disambiguation method combined with a knowledge graph of the present invention;
[0028] Figure 5 It is a structural schematic diagram of an embodiment of a semantic disambiguation device combined with a knowledge graph of the present invention;
[0029] Figure 6 is a structural schematic diagram of another embodiment of a semantic disambiguation device combined with a knowledge graph of the present invention;
[0030] Figure 7 It is a structural schematic diagram of an embodiment of an intelligent learning device of the present invention.
[0031] Description of Figure Numbers:
[0032] 100. Semantic disambiguation device, 110. Text segmentation module, 120. Related word extraction module, 130. Matching interpretation module, 131. Search matching unit, 132. Word interpretation unit, 200. Intelligent learning device, 210. Memory, 220. Processor, 230. Computer program. DETAILED DESCRIPTION
[0033] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the specific implementation methods of the present invention will be described below with reference to the accompanying drawings. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings and other implementation methods can be obtained based on these drawings without creative work.
[0034] In order to simplify the drawings, only the parts related to the present invention are schematically shown in each figure, and they do not represent the actual structure of the product. In addition, in order to simplify the drawings and facilitate understanding, in some figures, only one of the parts with the same structure or function is schematically drawn or marked. In this article, "one" not only means "only one", but also means "more than one".
[0035] In one embodiment of the present invention, Figure 1 As shown, a semantic disambiguation method combined with a knowledge graph includes:
[0036] Step S100 performs word segmentation on the target text and performs part-of-speech tagging on the words obtained after the word segmentation.
[0037] Specifically, the target text refers to a text to be semantically parsed, and is segmented or sentence-divided, with a length limited to a certain range, such as one or two sentence lengths.
[0038] First, the target text is segmented to obtain all possible words that match the preset vocabulary, so that multiple segmentation results will be obtained; then the optimal segmentation result is determined based on the preset statistical language model, usually by calculating the probability of occurrence of each segmentation result, and selecting the segmentation result with the largest probability of occurrence to segment the target text, thus solving the ambiguity problem in word segmentation.
[0039] For example, for the text string "Nanjing Yangtze River Bridge", we first perform a term search, search according to the preset vocabulary, find all matching terms (Nanjing, city, Yangtze River, bridge, Nanjing, Yangtze River Bridge, mayor, river, bridge, river bridge, bridge), and get a variety of segmentation results:
[0040] Result 1: Nanjing\City\Yangtze River\Bridge; Result 2: Nanjing\Yangtze River\Bridge; Result 3: Nanjing\Yangtze River\Bridge; Result 4: Nanjing\Mayor\Yangtze River\Bridge; Result 5: Nanjing\Mayor\Yangtze River\Bridge;
[0041] Then we perform a path search and find the optimal path based on the statistical language model. The language model score of "Nanjing City\Yangtze River\Bridge" is the highest, so this segmentation is the optimal segmentation.
[0042] Each word is obtained according to the result of the optimal segmentation, and each word is tagged with the part of speech.
[0043] You can use open source toolkits (such as NLP Parser from Stanford University in the United States) to perform word segmentation and part-of-speech tagging on the text.
[0044] Step S200: When there are polysemous words in the word, extract the polysemous words and their corresponding related words from the word.
[0045] Specifically, for example, the target text is "Apple's founder Steve Jobs", and after word segmentation, we get "Apple (noun)\of (structural auxiliary word)\founder (noun)\Steve Jobs (noun)". According to the interpretation of each word in the preset word library, it is judged whether there are polysemous words. Among them, the word "Apple" has multiple meanings according to the interpretation of the preset word library. It may be a kind of fruit, or it may be a kind of mobile phone or mobile phone brand. It can be concluded that the word is a polysemous word with multiple meanings. In order to further determine the meaning of the polysemous word in the text, it is necessary to extract words with high relevance to the polysemous word from the words after word segmentation as related words. Related words will make a great contribution to the meaning of polysemous words. There are many ways to extract related words. For example, method 1 is to select according to the rule "related words are nouns, verbs, or adjectives", so that some useless words such as auxiliary words and pronouns can be filtered out; method 2 is to evaluate the relevance of each word after word segmentation (non-polysemous words themselves) with polysemous words, and select words with relevance higher than a certain threshold as related words. Extracting relevant words can reduce the interference of irrelevant words, reduce the cost of subsequent searches, and increase the speed of correct interpretation.
[0046] Taking the target text "Steve Jobs, the founder of Apple" as an example, the polysemous word is determined to be "apple". According to the rule "related words are nouns, verbs, or adjectives", "founder" and "Steve Jobs" are selected as related words of "apple".
[0047] For another example, the text “The color of this apple is very red”, the word segmentation results in “this (demonstrative pronoun) apple (noun)’s (structural auxiliary word) color (noun) is very red (adjective)”, and “apple” is a polysemous word. According to the rule “related words are nouns, verbs, or adjectives”, we can select “color” and “very red” as the related words of “apple”.
[0048] Step S300 interprets the polysemous word according to the polysemous word, the related words, and the domain knowledge graph.
[0049] Specifically, the knowledge graph describes the complex relationships between concepts and entities in the objective world in a structured form. The knowledge graph is a network composed of nodes and node relationships. Concepts and entities in the objective world can be used as nodes in the knowledge graph. The knowledge graph mainly contains nodes, relationships, and triples. Each triple represents a piece of knowledge, that is, there is a certain relationship or attribute between two nodes, which is represented by (head node, relationship or attribute, tail node). For example, (Hangzhou, located in, China) represents the knowledge that "Hangzhou is located in China", and (apple, color, red) represents "the color attribute of apple is red".
[0050] Domain knowledge graphs include public domain knowledge graphs, professional domain knowledge graphs, and subdivided domain knowledge graphs. Professional domain or subdivided domain knowledge graphs are more targeted and professional. For semantic analysis of professional texts, searching in the corresponding professional domain knowledge graphs will increase the success rate of determining semantics and increase the search speed. For example, for semantic analysis of a medical text, priority is given to searching in the medical knowledge graph; for semantic analysis of primary school students' speech problems, searching in the primary school education knowledge graph will make it easier to obtain the correct semantics.
[0051] Taking the target text as "Apple's founder Steve Jobs" and the polysemous word "apple" as an example, "founder" and "Steve Jobs" are related words. Based on "apple", "founder" and "Steve Jobs", search the knowledge graph to see if there is a triple containing two or three of them. Assuming that there is a triple (Apple, founder, Steve Jobs) (the meaning of this triple is that the founder of Apple is Steve Jobs) that matches it, based on the meaning of this triple, it can be determined that the "Apple" in the target text refers to Apple Inc., a company that designs and produces mobile phones.
[0052] In this embodiment, related words with a high correlation with the polysemous word are extracted from the target text, and the polysemous word and its related words are searched in a suitable domain knowledge graph. When a matching triple is found, the semantics of the polysemous word can be accurately determined based on the knowledge of the matching triple. Compared with the traditional semantic disambiguation method based only on dictionaries, this not only improves the accuracy of the machine's semantic understanding of the text, but also improves the machine's semantic disambiguation speed, which is conducive to the promotion and application of intelligent educational equipment based on machine semantic understanding.
[0053] In another embodiment of the present invention, Figure 2 As shown, a semantic disambiguation method combined with a knowledge graph includes:
[0054] Step S100 performs word segmentation on the target text and performs part-of-speech tagging on the words obtained after the word segmentation.
[0055] Step S210: When there are polysemous words in the word, the polysemous words and candidate words that meet the preset part-of-speech range are extracted from the word.
[0056] Step S220: calculating the point mutual information between the candidate word and the polysemous word based on a large-scale corpus;
[0057] The calculation formula of the point mutual information is:
[0058]
[0059] Among them, PMI(W1=w1,W2=w2) represents the point mutual information value of the two words w1 and w2, P(w1,w2) represents the number of times w1 and w2 appear together, P(w1) represents the number of times w1 appears, and P(w2) represents the number of times w2 appears.
[0060] Step S230 selects candidate words whose point mutual information is greater than a preset threshold as related words of the polysemous word.
[0061] Specifically, the preset part-of-speech range is a condition that the part-of-speech of the candidate word must satisfy. Considering that the parts-of-speech of the elements that constitute the triples in the knowledge graph are mainly nouns, verbs, and adjectives, the preset part-of-speech range is generally set according to this rule.
[0062] Pointwise Mutual Information (PMI) is a useful information metric in information theory, which is used to measure the correlation between two things. In this invention, it is used to measure the correlation between two words. Based on a large-scale corpus, the number of times each word appears and the number of times two words appear together in the same corpus are counted, and the pointwise mutual information value between words is calculated based on the above statistical information.
[0063] First, for the words after word segmentation, candidate words (excluding the polysemous word itself) are selected according to the preset part-of-speech range, and the point mutual information value between each candidate word and the polysemous word is calculated. The candidate words whose point mutual information value is not higher than the preset threshold are filtered out, and the remaining candidate words are used as related words of the polysemous word.
[0064] Step S300 interprets the polysemous word according to the polysemous word, the related words, and the domain knowledge graph.
[0065] In this embodiment, a large-scale corpus is used to identify the correlation between two words, and related words of a polysemous word are extracted according to the correlation between the two words. This method extracts related words more accurately, thereby improving the accuracy of the interpretation of polysemous words.
[0066] In another embodiment of the present invention, Figure 3 As shown, a semantic disambiguation method combined with a knowledge graph includes:
[0067] Step S100 performs word segmentation on the target text and performs part-of-speech tagging on the words obtained after the word segmentation.
[0068] Step S210: when there are polysemous words in the word, extract the polysemous words and candidate words that meet the preset part of speech range from the word;
[0069] Step S220: calculating the point mutual information between the candidate word and the polysemous word according to a large-scale corpus;
[0070] The calculation formula of the point mutual information is:
[0071]
[0072] Among them, PMI(W1=w1,W2=w2) represents the point mutual information value of the two words w1 and w2, P(w1,w2) represents the number of times w1 and w2 appear together, P(w1) represents the number of times w1 appears, and P(w2) represents the number of times w2 appears.
[0073] Step S230 selects candidate words whose point mutual information is greater than a preset threshold as related words of the polysemous word.
[0074] Step S310 obtains entities corresponding to the polysemous words on the domain knowledge graph according to the polysemous words.
[0075] Step S320 traverses all triples of the entity to find a triple that matches the related word.
[0076] Step S360 determines the interpretation of the polysemous word according to the matching triples.
[0077] Specifically, when searching for polysemous words and their related words in the domain knowledge graph, first find the entity corresponding to the polysemous word based on the polysemous word. For example, the polysemous word "apple" may correspond to three entities "apple", "Apple Inc.", and "Apple mobile phone". Find all triples of these three entities, match "apple" (polysemous word) with the two related words "founder" and "Jobs" with each triple found, select the triple with the highest matching degree as the matching triple, and obtain the matching triple (Apple Inc., founder, Jobs). According to the meaning of the matching triple, it can be determined that the "apple" in the target text refers to Apple Inc., a company that designs and produces mobile phones.
[0078] For example, the text "The color of this apple is very red" has a polysemous word "apple" and related words "color" and "very red". The polysemous word "apple" corresponds to three entities "apple", "Apple Company" and "Apple mobile phone" in the domain knowledge graph. Find all triples of these three entities, match "apple" (polysemous word) with the two related words "color" and "very red" with each triple found, and get matching triples (apple, color, red). According to the meaning of the matching triples, it can be determined that the "apple" in the target text is a fruit.
[0079] This embodiment introduces a method for searching for matching triples in a knowledge graph based on polysemous words and related words.
[0080] In another embodiment of the present invention, Figure 4As shown, a semantic disambiguation method combined with a knowledge graph includes:
[0081] Step S100 performs word segmentation on the target text and performs part-of-speech tagging on the words obtained after the word segmentation.
[0082] Step S210: when there are polysemous words in the word, extract the polysemous words and candidate words that meet the preset part of speech range from the word;
[0083] Step S220: calculating the point mutual information between the candidate word and the polysemous word based on a large-scale corpus;
[0084] The calculation formula of the point mutual information is:
[0085]
[0086] Among them, PMI(W1=w1,W2=w2) represents the point mutual information value of the two words w1 and w2, P(w1,w2) represents the number of times w1 and w2 appear together, P(w1) represents the number of times w1 appears, and P(w2) represents the number of times w2 appears.
[0087] Step S230 selects candidate words whose point mutual information is greater than a preset threshold as related words of the polysemous word.
[0088] Step S310 obtains entities corresponding to the polysemous words on the domain knowledge graph according to the polysemous words.
[0089] Step S330 traverses all triples of the entity to determine whether a triple matching the related word is found; if found, jump to step S360;
[0090] Step S340: obtaining synonyms of the related words according to a preset word library;
[0091] Step S350 traverses all triples of the entity to find triples that match the synonyms of the related word.
[0092] Step S360 determines the interpretation of the polysemous word according to the matching triples.
[0093] Specifically, when the related words are not accurate enough, it may be impossible to find matching triples in the knowledge graph based on polysemous words and related words. At this time, selecting synonyms of the related words to search can improve the search success rate of matching triples.
[0094] In this embodiment, when the search for matching triples in the knowledge graph based on polysemous words and related words is unsuccessful, synonyms of polysemous words and related words are selected for search, which can improve the search success rate of matching triples.
[0095] In another embodiment of the present invention, Figure 5 As shown, a semantic disambiguation device 100 combined with a knowledge graph includes:
[0096] The text segmentation module 110 is used to segment the target text and perform part-of-speech tagging on the words obtained after the segmentation.
[0097] Specifically, the target text refers to a text to be semantically parsed, and is segmented or sentence-divided, with a length limited to a certain range, such as one or two sentence lengths.
[0098] First, the target text is segmented to obtain all possible words that match the preset vocabulary, so that multiple segmentation results will be obtained; then the optimal segmentation result is determined based on the preset statistical language model, usually by calculating the probability of occurrence of each segmentation result, and selecting the segmentation result with the largest probability of occurrence to segment the target text, thus solving the ambiguity problem in word segmentation.
[0099] For example, for the text string "Nanjing Yangtze River Bridge", we first perform a term search, search according to the preset vocabulary, find all matching terms (Nanjing, city, Yangtze River, bridge, Nanjing, Yangtze River Bridge, mayor, river, bridge, river bridge, bridge), and get a variety of segmentation results:
[0100] Result 1: Nanjing\City\Yangtze River\Bridge; Result 2: Nanjing\Yangtze River\Bridge; Result 3: Nanjing\Yangtze River\Bridge; Result 4: Nanjing\Mayor\Yangtze River\Bridge; Result 5: Nanjing\Mayor\Yangtze River\Bridge;
[0101] Then we perform a path search and find the optimal path based on the statistical language model. The language model score of "Nanjing City\Yangtze River\Bridge" is the highest, so this segmentation is the optimal segmentation.
[0102] Each word is obtained according to the result of the optimal segmentation, and each word is tagged with the part of speech.
[0103] You can use open source toolkits (such as NLP Parser from Stanford University in the United States) to perform word segmentation and part-of-speech tagging on the text.
[0104] The related word extraction module 120 is used to extract the polysemous words and their corresponding related words from the word when there are polysemous words in the word.
[0105] For example, the target text is "Apple's founder Steve Jobs", and after word segmentation, we get "Apple (noun)\of (structural particle)\founder (noun)\Steve Jobs (noun)". According to the interpretation of each word in the preset word library, determine whether there are polysemous words. Among them, the word "Apple" has multiple meanings according to the interpretation of the preset word library. It may be a kind of fruit, or it may be a kind of mobile phone or mobile phone brand. It can be concluded that the word is a polysemous word with multiple meanings. In order to further determine the meaning of the polysemous word in the text, it is necessary to extract words with high relevance to the polysemous word from the words after word segmentation as related words. Related words will make a great contribution to the meaning of polysemous words. There are many ways to extract related words. For example, method 1, select according to the rule "related words are nouns, verbs, or adjectives", so that some useless words such as particles, pronouns, etc. can be filtered out; method 2, evaluate the relevance of each word after word segmentation (non-polysemous words themselves) with polysemous words, and select words with relevance higher than a certain threshold as related words. Extracting relevant words can reduce the interference of irrelevant words, reduce the cost of subsequent searches, and increase the speed of correct interpretation.
[0106] Taking the target text "Steve Jobs, the founder of Apple" as an example, the polysemous word is determined to be "apple". According to the rule "related words are nouns, verbs, or adjectives", "founder" and "Steve Jobs" are selected as related words of "apple".
[0107] For another example, the text “The color of this apple is very red”, the word segmentation results in “this (demonstrative pronoun) apple (noun)’s (structural auxiliary word) color (noun) is very red (adjective)”, and “apple” is a polysemous word. According to the rule “related words are nouns, verbs, or adjectives”, we can select “color” and “very red” as the related words of “apple”.
[0108] The matching interpretation module 130 is used to interpret the polysemous word according to the polysemous word, the related words, and the domain knowledge graph.
[0109] Specifically, the knowledge graph describes the complex relationships between concepts and entities in the objective world in a structured form. The knowledge graph is a network composed of nodes and node relationships. Concepts and entities in the objective world can be used as nodes in the knowledge graph. The knowledge graph mainly contains nodes, relationships and triples. Each triple represents a piece of knowledge, that is, there is a certain relationship or attribute between two nodes, which is represented by (head node, relationship or attribute, tail node). For example, (Hangzhou, located in, China) represents the knowledge that "Hangzhou is located in China", and (apple, color, red) represents "the color attribute of apple is red".
[0110] Domain knowledge graphs include public domain knowledge graphs, professional domain knowledge graphs, and subdivided domain knowledge graphs. Professional domain or subdivided domain knowledge graphs are more targeted and professional. For semantic analysis of professional texts, searching in the corresponding professional domain knowledge graphs will increase the success rate of determining semantics and increase the search speed. For example, for semantic analysis of a medical text, priority is given to searching in the medical knowledge graph; for semantic analysis of primary school students' speech problems, searching in the primary school education knowledge graph will make it easier to obtain the correct semantics.
[0111] Taking the target text as "Apple's founder Steve Jobs" and the polysemous word "apple" as an example, "founder" and "Steve Jobs" are related words. Based on "apple", "founder" and "Steve Jobs", search the knowledge graph to see if there is a triple containing two or three of them. Assuming that there is a triple (Apple, founder, Steve Jobs) (the meaning of this triple is that the founder of Apple is Steve Jobs) that matches it, based on the meaning of this triple, it can be determined that the "Apple" in the target text refers to Apple Inc., a company that designs and produces mobile phones.
[0112] In this embodiment, related words with a high correlation with the polysemous word are extracted from the target text, and the polysemous word and its related words are searched in a suitable domain knowledge graph. When a matching triple is found, the semantics of the polysemous word can be accurately determined based on the knowledge of the matching triple. Compared with the traditional semantic disambiguation method based only on dictionaries, this not only improves the accuracy of the machine's semantic understanding of the text, but also improves the machine's semantic disambiguation speed, which is conducive to the promotion and application of intelligent educational equipment based on machine semantic understanding.
[0113] In another embodiment of the present invention, Figure 5 As shown, a semantic disambiguation device 100 combined with a knowledge graph includes:
[0114] The text segmentation module 110 is used to segment the target text and perform part-of-speech tagging on the words obtained after the segmentation.
[0115] The related word extraction module 120 is used to extract the polysemous words and candidate words that meet the preset part-of-speech range from the word when there are polysemous words in the word; and, based on a large-scale corpus, calculate the point mutual information between the candidate words and the polysemous words; and select the candidate words whose point mutual information is greater than a preset threshold as the related words of the polysemous words.
[0116] The related word extraction module calculates the point mutual information between two words according to the following formula:
[0117]
[0118] Among them, PMI(W1=w1,W2=w2) represents the point mutual information value of the two words w1 and w2, P(w1,w2) represents the number of times w1 and w2 appear together, P(w1) represents the number of times w1 appears, and P(w2) represents the number of times w2 appears.
[0119] Specifically, the preset part-of-speech range is a condition that the part-of-speech of the candidate word must satisfy. Considering that the parts-of-speech of the elements that constitute the triples in the knowledge graph are mainly nouns, verbs, and adjectives, the preset part-of-speech range is generally set according to this rule.
[0120] Pointwise Mutual Information (PMI) is a useful information metric in information theory, which is used to measure the correlation between two things. In this invention, it is used to measure the correlation between two words. Based on a large-scale corpus, the number of times each word appears and the number of times two words appear together in the same corpus are counted, and the pointwise mutual information value between words is calculated based on the above statistical information.
[0121] First, for the words after word segmentation, candidate words (excluding the polysemous word itself) are selected according to the preset part-of-speech range, and the point mutual information value between each candidate word and the polysemous word is calculated. The candidate words whose point mutual information value is not higher than the preset threshold are filtered out, and the remaining candidate words are used as related words of the polysemous word.
[0122] The matching interpretation module 130 is used to interpret the polysemous word according to the polysemous word, the related words, and the domain knowledge graph.
[0123] In this embodiment, a large-scale corpus is used to identify the correlation between two words, and related words of a polysemous word are extracted according to the correlation between the two words. This method extracts related words more accurately, thereby improving the accuracy of the interpretation of polysemous words.
[0124] In another embodiment of the present invention, Figure 6 As shown, a semantic disambiguation device 100 combined with a knowledge graph includes:
[0125] The text segmentation module 110 is used to segment the target text and perform part-of-speech tagging on the words obtained after the segmentation.
[0126] The related word extraction module 120 is used to extract the polysemous words and candidate words that meet the preset part-of-speech range from the word when there are polysemous words in the word; and, based on a large-scale corpus, calculate the point mutual information between the candidate words and the polysemous words; and select the candidate words whose point mutual information is greater than a preset threshold as the related words of the polysemous words.
[0127] The related word extraction module calculates the point mutual information between two words according to the following formula:
[0128]
[0129] Among them, PMI(W1=w1,W2=w2) represents the point mutual information value of the two words w1 and w2, P(w1,w2) represents the number of times w1 and w2 appear together, P(w1) represents the number of times w1 appears, and P(w2) represents the number of times w2 appears.
[0130] The matching interpretation module 130 is used to interpret the polysemous word according to the polysemous word, the related words, and the domain knowledge graph.
[0131] The matching and interpretation module 130 includes a search and matching unit 131 and a word interpretation unit 132;
[0132] The search and matching unit 131 is used to obtain the entity corresponding to the polysemous word on the domain knowledge graph according to the polysemous word; and traverse all triples of the entity to find the triple that matches the related word;
[0133] The word interpretation unit 132 is used to determine the interpretation of the polysemous word according to the matching triples.
[0134] Specifically, when searching for polysemous words and their related words in the domain knowledge graph, first find the entity corresponding to the polysemous word based on the polysemous word. For example, the polysemous word "apple" may correspond to three entities "apple", "Apple Inc.", and "Apple mobile phone". Find all triples of these three entities, match "apple" (polysemous word) with the two related words "founder" and "Jobs" with each triple found, select the triple with the highest matching degree as the matching triple, and obtain the matching triple (Apple Inc., founder, Jobs). According to the meaning of the matching triple, it can be determined that the "apple" in the target text refers to Apple Inc., a company that designs and produces mobile phones.
[0135] For example, the text "The color of this apple is very red" has a polysemous word "apple" and related words "color" and "very red". The polysemous word "apple" corresponds to three entities "apple", "Apple Company" and "Apple mobile phone" in the domain knowledge graph. Find all triples of these three entities, match "apple" (polysemous word) with the two related words "color" and "very red" with each triple found, and get matching triples (apple, color, red). According to the meaning of the matching triples, it can be determined that the "apple" in the target text is a fruit.
[0136] In another embodiment of the present invention, Figure 6 As shown, a semantic disambiguation device 100 combined with a knowledge graph includes:
[0137] The text segmentation module 110 is used to segment the target text and perform part-of-speech tagging on the words obtained after the segmentation.
[0138] The related word extraction module 120 is used to extract the polysemous words and candidate words that meet the preset part-of-speech range from the word when there are polysemous words in the word; and, based on a large-scale corpus, calculate the point mutual information between the candidate words and the polysemous words; and select the candidate words whose point mutual information is greater than a preset threshold as the related words of the polysemous words.
[0139] The related word extraction module calculates the point mutual information between two words according to the following formula:
[0140]
[0141] Among them, PMI(W1=w1,W2=w2) represents the point mutual information value of the two words w1 and w2, P(w1,w2) represents the number of times w1 and w2 appear together, P(w1) represents the number of times w1 appears, and P(w2) represents the number of times w2 appears.
[0142] A matching and interpretation module 130, configured to interpret the polysemous word according to the polysemous word, the related words, and the domain knowledge graph;
[0143] The matching and interpretation module 130 includes a search and matching unit 131 and a word interpretation unit 132;
[0144] Among them, the search and matching unit 131 is used to obtain the entity corresponding to the polysemous word on the domain knowledge graph according to the polysemous word; and, traverse all triples of the entity to determine whether a triple matching the related word is found; if a matching triple is found, it is further processed by the word interpretation unit; if a triple matching the related word is not found, the synonyms of the related word are obtained according to the preset vocabulary; all triples of the entity are traversed to find a triple matching the synonyms of the related word.
[0145] The word interpretation unit 132 is used to determine the interpretation of the polysemous word according to the matching triples.
[0146] Specifically, when the related words are not accurate enough, it may be impossible to find matching triples in the knowledge graph based on polysemous words and related words. At this time, selecting synonyms of the related words to search can improve the search success rate of matching triples.
[0147] In this embodiment, when the search for matching triples in the knowledge graph based on polysemous words and related words is unsuccessful, synonyms of polysemous words and related words are selected for search, which can improve the search success rate of matching triples.
[0148] In one embodiment of the present invention, Figure 7 As shown, an intelligent learning device 200 includes a memory 210 and a processor 220. The memory 210 is used to store a computer program 230. When the processor runs the computer program, the semantic disambiguation method combined with the knowledge graph as described above is implemented.
[0149] As an example, the processor implements steps S100 to S300 according to the above record when executing the computer program.
[0150] In addition, when the processor executes the computer program, the functions of the modules and units in the semantic disambiguation device 100 described above are realized. As another example, when the processor executes the computer program, the functions of the text segmentation module 110, the related word extraction module 120, and the matching interpretation module 130 are realized.
[0151] Optionally, according to the specific needs of completing the present invention, the computer program can be divided into one or more modules / units. Each module / unit can be a series of computer program instruction segments that can complete a specific function. The computer program instruction segment is used to describe the execution process of the computer program in the semantic disambiguation device 100. As an example, the computer program can be divided into various modules / units in a virtual device, such as a text segmentation module, a related word extraction module, and a matching interpretation module. Accordingly, the text segmentation module is used to segment the target text and perform part-of-speech tagging on the words obtained after segmentation; the related word extraction module is used to extract polysemous words and their corresponding related words from the words when there are polysemous words in the words; the matching interpretation module is used to interpret the polysemous words according to the polysemous words, the related words, and the domain knowledge graph.
[0152] The processor is used to implement semantic disambiguation by executing the computer program. As needed, the processor can be a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), a general-purpose processor or other logic device.
[0153] The memory may be any internal storage unit and / or external storage device capable of storing data and programs. For example, the memory may be a plug-in hard disk, a smart memory card (SMC), a secure digital (SD) card, or a flash memory card. The memory is used to store computer programs, other programs of the semantic disambiguation device 100, and data. The memory may also be used to temporarily store data that has been output or is to be output.
[0154] The intelligent learning device 200 can be a tutoring machine, a tablet terminal, a desktop computer, a notebook, a PDA, a mobile phone, etc. As required, the intelligent learning device 200 can also include input and output devices, display devices, network access devices and buses, etc. The intelligent learning device 200 can also be a single-chip microcomputer, or a computing device integrating a central processing unit (CPU) and a graphics processing unit (GPU).
[0155] It can be understood by those skilled in the art that the above-mentioned division of units and modules for realizing corresponding functions is for the purpose of convenience of explanation and narration. According to the application requirements, the above-mentioned units and modules are further divided or combined, that is, the internal structure of the device / equipment is re-divided and combined to realize the above-mentioned recorded functions. Each unit and module in the above-mentioned embodiment can adopt a separate physical unit, or two or more units and modules can be integrated into one physical unit. Each unit and module in the above-mentioned embodiment can adopt hardware and / or software functional units to realize the corresponding functions. The direct coupling, indirect coupling or communication connection between the multiple units, components and modules in the above-mentioned embodiments can be realized through a bus or an interface; the coupling and connection between multiple units or devices can be electrical, mechanical or similar. Accordingly, the specific names of the various units and modules in the above-mentioned embodiments are only for the convenience of description and distinction, and are not used to limit the scope of protection of this application.
[0156] It should be noted that the above embodiments can be freely combined as needed. The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered as the protection scope of the present invention.
Claims
1. A semantic disambiguation method combined with knowledge graph, characterized in that: include: Segment the target text and tag the words obtained after segmentation; When there are polysemous words in the word, extract the polysemous words and candidate words that meet the preset part of speech range from the word; Calculating point mutual information between the candidate word and the polysemous word based on a large-scale corpus; Select candidate words whose point mutual information is greater than a preset threshold as related words of the polysemous word; According to the polysemous word, obtaining an entity corresponding to the polysemous word on the domain knowledge graph; Traversing all triples of the entity and finding triples matching the related words; The meaning of the polysemous word is determined according to the matching triples.
2. A semantic disambiguation method combined with a knowledge graph according to claim 1, characterized in that: The calculation formula of the point mutual information is: Among them, PMI(W1=w1,W2=w2) represents the point mutual information value of the two words w1 and w2, P(w1,w2) represents the number of times w1 and w2 appear together, P(w1) represents the number of times w1 appears, and P(w2) represents the number of times w2 appears.
3. A semantic disambiguation method combined with a knowledge graph according to claim 1, characterized in that: Before determining the meaning of the polysemous word according to the matching triples, the method further includes: When all triples of the entity are traversed and no triple matching the related word is found, a synonym of the related word is obtained according to a preset word library; All triples of the entity are traversed to find triples that match the synonyms of the related word.
4. A semantic disambiguation device combined with a knowledge graph, characterized in that: include: The text segmentation module is used to segment the target text and perform part-of-speech tagging on the words obtained after segmentation; A related word extraction module is used to extract polysemous words and candidate words that meet the preset part of speech range from the words when there are polysemous words in the words; and, calculating the point mutual information between the candidate word and the polysemous word based on a large-scale corpus; and, selecting candidate words whose point mutual information is greater than a preset threshold as related words of the polysemous word; A matching interpretation module, used for interpreting the polysemous word according to the polysemous word, the related words, and the domain knowledge graph; The matching interpretation module includes: A search and matching unit is used to obtain an entity corresponding to the polysemous word on the domain knowledge graph according to the polysemous word; and traverse all triples of the entity to find a triple that matches the related word; The word interpretation unit is used to determine the interpretation of the polysemous word according to the matching triples.
5. The semantic disambiguation device combined with a knowledge graph according to claim 4, characterized in that: The search and matching unit is further used to obtain synonyms of the related words according to a preset vocabulary when no triples matching the related words are found after traversing all triples of the entity; and to traverse all triples of the entity to find triples matching the synonyms of the related words.
6. An intelligent learning device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor runs the computer program, the steps of the semantic disambiguation method combined with a knowledge graph as described in any one of claims 1 to 3 are implemented.
