KNOWLEDGE GRAPH GENERATION DEVICE, KNOWLEDGE GRAPH GENERATION METHOD, AND KNOWLEDGE GRAPH GENERATION PROGRAM
Patent Information
- Application Number
- JP2023554350
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2023-02-08
- Publication Date
- 2025-01-15
- Estimated Expiration
- 2043-02-08
AI Technical Summary
Knowledge graphs struggle to effectively handle unstructured data such as natural sentences due to issues like constructing incorrect relationships and high computational load during automatic construction.
A knowledge graph generation device that represents words in natural sentences as nodes and inter-word relationships as edges, using similarity calculations and causal connections to generate high-quality knowledge graphs by selecting and modifying word sets based on similarity thresholds and context analysis.
Enables the creation of high-quality knowledge graphs from natural sentences by accurately recognizing sentence structures and inferring contextually plausible connections, reducing computational load and improving the quality of generated graphs.
Smart Images

Figure 00000018_0000 
Figure 00000018_0001 
Figure 00000019_0000
Abstract
Description
[Technical field]
[0001] The present disclosure relates to a technology for generating a knowledge graph of natural language. [Background technology]
[0002] Patent Document 1 discloses a method for generating a knowledge graph. Due to the lack of expressive power of knowledge graphs, it is difficult for knowledge graphs to play an effective role when applied to business scenarios such as relational mining. The method of Patent Document 1 includes steps (1) to (3). In step (1), an initial knowledge graph is obtained. The initial knowledge graph includes a plurality of nodes having connection relationships. In step (2), a number of target map elements that satisfy the set attribute information requirements and include at least one of a target node and a target edge are determined based on the initial knowledge graph. In step (3), a knowledge graph is generated by merging multiple target map elements. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] JP 2012-178079 A Summary of the Invention [Problem to be solved by the invention]
[0004] Knowledge graphs can represent complex relationships between data. Therefore, they can be used as a recommendation or analysis tool. In such use cases, knowledge graphs are usually created manually (e.g. by experts). However, the larger the knowledge graph, the higher the workload tends to be. Therefore, a method to solve this problem by automatically constructing the knowledge graph has been proposed. Automatic construction is an effective method when the input data on which the knowledge graph is based is structured. On the other hand, when it comes to unstructured data such as natural language, automatic construction has issues such as the construction of invalid relationships in relational analysis between data and high computational load.
[0005] An object of the present disclosure is to enable the generation of high-quality knowledge graphs as knowledge graphs of natural language. [Means for solving the problem]
[0006] The knowledge graph generation device of the present disclosure includes: a graph generation unit that generates graph data of a knowledge graph that indicates each of words included in a plurality of natural sentences as a node and indicates, for each of the natural sentences among the plurality of natural sentences, inter-word relationships between word pairs in the natural sentence as edges; a similarity calculation unit that calculates a similarity between the words for each word pair of the words in one of the natural sentences and the words in the other of the natural sentences for each natural sentence pair among the plurality of natural sentences; a causal connection unit that selects a word set that satisfies a selection condition based on the similarity of each of the word sets in each of the natural sentence sets, generates a modifier for each of the words in the selected word set based on the natural sentence corresponding to the word, and, when a common modifier is generated for the selected word set, adds to the graph data an interpolation node indicating the word of the modifier and an interpolation edge indicating an inter-word relationship between each word of the selected word set and the word of the modifier. Effect of the Invention
[0007] According to the present disclosure, it is possible to generate a high-quality knowledge graph as a knowledge graph of natural language. [Brief description of the drawings]
[0008] [Figure 1] FIG. 1 is a configuration diagram of a knowledge graph generation device 100 according to a first embodiment. [Diagram 2] FIG. 1 is a functional configuration diagram of a knowledge graph generation device 100 according to a first embodiment. [Diagram 3] 3 is a flowchart of a knowledge graph generation method in the first embodiment. [Figure 4] FIG. 2 shows an example of a natural language table 211 according to the first embodiment. [Diagram 5] FIG. 2 is a diagram showing an example of a knowledge graph 201 according to the first embodiment. [Figure 6] FIG. 2 shows an example of graph data 221 according to the first embodiment. [Figure 7] FIG. 2 shows an example of a similarity table 224 according to the first embodiment. [Figure 8] 11 is a flowchart of step S130 in the first embodiment. [Figure 9] 13 is a flowchart of step S140 in the first embodiment. [Figure 10] FIG. 2 shows an example of graph data 221 according to the first embodiment. [Figure 11] FIG. 2 is a diagram showing an example of a knowledge graph 201 according to the first embodiment. [Figure 12] FIG. 11 is a configuration diagram of a knowledge graph generation device 100 according to a second embodiment. [Figure 13] FIG. 11 is a functional configuration diagram of a knowledge graph generation device 100 according to a second embodiment. [Figure 14] 11 is a flowchart of a knowledge graph generation method in the second embodiment. [Figure 15] FIG. 11 is a diagram showing an example of graph data 221 according to the second embodiment. [Figure 16] FIG. 13 is a diagram showing an example of an important node table 225 according to the second embodiment. [Figure 17] FIG. 13 is a diagram showing an example of a knowledge graph 201 in the second embodiment. [Figure 18] FIG. 11 shows an example of a similarity table 224 according to the second embodiment. [Figure 19] 13 is a flowchart of a knowledge graph generation method in an example of the second embodiment. [Figure 20] FIG. 11 is a configuration diagram of a knowledge graph generation device 100 according to a third embodiment. [Figure 21] FIG. 11 is a functional configuration diagram of a knowledge graph generation device 100 according to a third embodiment. [Figure 22] 13 is a flowchart of a knowledge graph generation method in the third embodiment. [Figure 23] 13 is a flowchart of step S310 in the third embodiment. [Figure 24] FIG. 13 is a diagram showing an example of a thesaurus database 240 according to the third embodiment. [Diagram 25] FIG. 13 is a diagram showing an example of a node table 222 according to the third embodiment. [Figure 26] FIG. 13 shows an example of an edge table 223 according to the third embodiment. [Figure 27] FIG. 13 is a diagram showing an example of a knowledge graph 201 in the third embodiment. [Figure 28] 13 is a flowchart of a knowledge graph generation method in an example of the third embodiment. [Figure 29] FIG. 13 is a configuration diagram of a knowledge graph generation device 100 according to a fourth embodiment. [Diagram 30] FIG. 13 is a functional configuration diagram of a knowledge graph generation device 100 according to a fourth embodiment. [Diagram 31] 13 is a flowchart of a knowledge graph generation method in the fourth embodiment. [Diagram 32] 13 is a flowchart of step S410 in the fourth embodiment. [Diagram 33] FIG. 13 is a diagram showing an example of a natural language table 211 in the fourth embodiment. [Diagram 34] FIG. 13 is a diagram showing an example of a reliability table 251 according to the fourth embodiment. [Diagram 35] 13 is a flowchart of a knowledge graph generation method in an example of the fourth embodiment. [Diagram 36]FIG. 1 is a hardware configuration diagram of a knowledge graph generation device 100 according to an embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0009] In the embodiments and drawings, the same or corresponding elements are denoted by the same reference numerals. Descriptions of elements denoted by the same reference numerals as those of the elements described above will be omitted or simplified as appropriate. Arrows in the drawings mainly indicate data flow or processing flow.
[0010] Embodiment 1 The knowledge graph generation device 100 will be described with reference to FIGS.
[0011] ***Terminology Explanation*** An "ontology" is a graph structure that defines the relationships between data. An ontology is equivalent to a class. A "knowledge graph" is an ontology that is linked to real-world data. A knowledge graph corresponds to a combination of classes and instances, or to an instance. A "triple" is an element of a knowledge graph and consists of two points (nodes) and a line (edge). An edge connects two nodes. In a knowledge graph, a node represents a word, and an edge represents a relationship between words.
[0012] ***Configuration Description*** The configuration of the knowledge graph generation device 100 will be described with reference to FIG. The knowledge graph generation device 100 is a computer including hardware such as a processor 101, a memory 102, an auxiliary storage device 103, and an input / output interface 104. These pieces of hardware are connected to each other via signal lines.
[0013] The processor 101 is an IC that performs arithmetic processing and controls other hardware. For example, the processor 101 is a CPU. IC is an abbreviation for Integrated Circuit. CPU is an abbreviation for Central Processing Unit.
[0014] The memory 102 is a volatile or non-volatile storage device. The memory 102 is also called a primary storage device or a main memory. For example, the memory 102 is a RAM. Data stored in the memory 102 is saved in the secondary storage device 103 as necessary. RAM is an abbreviation for Random Access Memory.
[0015] The auxiliary storage device 103 is a non-volatile storage device. For example, the auxiliary storage device 103 is a ROM, a HDD, a flash memory, or a combination of these. Data stored in the auxiliary storage device 103 is loaded into the memory 102 as needed. ROM is an abbreviation for Read Only Memory. HDD is an abbreviation for Hard Disk Drive.
[0016] The input / output interface 104 is a port to which an input device and an output device are connected. For example, the input / output interface 104 is a USB terminal, the input device is a keyboard, a mouse, and a communication device, and the output device is a display and a communication device. Input and output of the knowledge graph generation device 100 is performed using the input / output interface 104. USB is an abbreviation for Universal Serial Bus.
[0017] The knowledge graph generation device 100 includes components such as a graph generation unit 110, a similarity calculation unit 120, and a causal connection unit 130. These components are realized by software.
[0018] The auxiliary storage device 103 stores a knowledge graph generation program for causing a computer to function as the graph generation unit 110, the similarity calculation unit 120, and the causal connection unit 130. The knowledge graph generation program is loaded into the memory 102 and executed by the processor 101. The auxiliary storage device 103 further stores an OS. At least a part of the OS is loaded into the memory 102 and executed by the processor 101. The processor 101 executes a knowledge graph generation program while executing the OS. OS is an abbreviation for Operating System.
[0019] Input and output data of the knowledge graph generation program is stored in the storage unit 200. The auxiliary storage device 103 functions as the storage unit 200. However, a storage device such as the memory 102, a register in the processor 101, or a cache memory in the processor 101 may function as the storage unit 200 instead of the auxiliary storage device 103 or together with the auxiliary storage device 103.
[0020] The knowledge graph generation program can be recorded (stored) in a computer-readable manner on a non-volatile recording medium such as an optical disk or a flash memory.
[0021] FIG. 2 shows the functional configuration of the knowledge graph generation device 100. The natural language database 210, the graph database 220, and the language model 230 may be managed by the knowledge graph generation device 100 or may be managed externally. The details of each will be described later.
[0022] ***Explanation of Operation*** The operation procedure of the knowledge graph generation device 100 corresponds to a knowledge graph generation method, and also corresponds to a processing procedure by a knowledge graph generation program.
[0023] The knowledge graph generation method will be described with reference to FIG. In step S 110 , the graph generating unit 110 receives a plurality of natural language sentences 212 , generates a natural language sentence table 211 , and stores the natural language sentence table 211 in the natural language sentence database 210 . The natural text 212 is a text written using a natural language. In the natural language sentence table 211, a plurality of natural language sentences 212 are registered.
[0024] 4 shows an example of the natural language table 211. "ID" means an identifier. A natural sentence (ID1) and a natural sentence (ID2) are registered in the natural sentence table 211. The natural sentence (ID1) means the natural sentence 212 of ID1, and the natural sentence (ID2) means the natural sentence 212 of ID2. The natural sentence (ID1) is "The monitoring care solution determines the condition of the care recipient in bed." The natural sentence (ID2) is "The vibration sensor detects the movement of people."
[0025] Returning to FIG. 3, the description of step S110 will continue. The graph generating unit 110 generates graph data 221 for a plurality of natural sentences 212 and stores the graph data 221 in a graph database 220 . The graph data 221 is data of the knowledge graph 201. The knowledge graph 201 includes two or more nodes and one or more edges. Each node indicates a word included in the natural text 212. Each edge indicates a relationship between words of a word pair included in the natural text 212. The relationship between words is represented by a lexical phrase (such as a predicate, a verb, or a case particle) that connects words.
[0026] The graph data 221 includes a node table 222 and an edge table 223 . The node table 222 indicates the nodes of each of the words contained in the plurality of natural sentences 212 . The edge table 223 indicates, for each natural sentence 212, the edges of each word pair contained in the natural sentence 212.
[0027] FIG. 5 shows an example of a knowledge graph 201. FIG. 5 shows a knowledge graph 201 for a natural text (ID1) and a natural text (ID2).
[0028] FIG. 6 shows an example of the graph data 221. The graph data 221 includes a node table 222 and an edge table 223 . The node table 222 shows the nodes of each of the words contained in the natural sentence (ID1) and the natural sentence (ID2). The edge table 223 shows the edges of each word pair in the natural sentence (ID1) and the edges of each word pair in the natural sentence (ID2).
[0029] Returning to FIG. 3, the description of step S110 will continue. Words (nodes) are extracted from the natural sentence 212 by syntactically and lexically analyzing the natural sentence 212 . Inter-word relationships (edges) are extracted from the natural text 212 by analyzing dependencies between words in the natural text 212 . At this time, the language model 230 is used. The language model 230 is a trained model created in advance. The graph generation unit 110 inputs the natural text 212 and calculates the language model 230. This results in words (nodes) and inter-word relationships (edges) extracted from the natural text 212. The language model 230 has a function of extracting words (nodes) and inter-word relationships (edges) from the natural text 212.
[0030] In step S120, the similarity calculation unit 120 calculates a similarity between words for each pair of natural sentences in the plurality of natural sentences 212, between a word pair of one natural sentence 212 and a word of the other natural sentence 212.
[0031] The similarity is calculated as follows: First, the similarity calculation unit 120 refers to the node table 222 and obtains an embedding vector of each word indicated as a node. Specifically, the similarity calculation unit 120 inputs the word and calculates the language model 230. This results in an embedding vector of the word. The language model 230 has a function of calculating the embedding vector of the word. Then, for each word set in each natural sentence set, the similarity calculation unit 120 calculates the cosine similarity of the word set by using the embedding vector of each word in the word set.
[0032] The explanation of step S120 will be continued. The similarity calculation unit 120 generates a similarity table 224 for a plurality of natural sentences 212 and stores the similarity table 224 in the graph database 220 . The similarity table 224 indicates the similarity of each word set in each natural sentence set.
[0033] FIG. 7 shows an example of the similarity table 224. The similarity table 224 indicates that the similarity between the word "state" in the natural sentence (ID1) and the word "movement" in the natural sentence (ID2) is "0.7."
[0034] Returning to FIG. 3, the description will continue from step S130. In step S130, the causal connection unit 130 connects similar nodes in each natural sentence set based on the similarity between each word set in each natural sentence set.
[0035] Step S130 will be described in detail with reference to FIG. In step S131, the causal connection section 130 refers to the similarity table 224. Then, the causal connection unit 130 selects a word set that satisfies the first selection condition based on the similarity between each word set in each natural sentence set. A word set that satisfies the first selection condition is a word set that corresponds to a similarity greater than a first threshold value.
[0036] In FIG. 7, when the first threshold is smaller than 0.7, the causal connection unit 130 selects the pair of the word "state" in the natural sentence (ID1) and the word "movement" in the natural sentence (ID2).
[0037] Returning to FIG. 8, the explanation will be continued. Each of the word sets selected in step S131 is referred to as a first word set.
[0038] In step S132, for each first word pair, the causal connection unit 130 replaces a node corresponding to one word of the first word pair, among the nodes indicated in the graph data 221, with a node indicating the other word of the first word pair.
[0039] In FIG. 6, when the pair of the word “state” in the natural sentence (ID1) and the word “movement” in the natural sentence (ID2) is the first word pair, the causal connection unit 130, for example, rewrites the word “movement” in the natural sentence (ID2) shown in each of the node table 222 and the edge table 223 to “state.”
[0040] Returning to FIG. 3, step S140 will be described. In step S140, the causal connection unit 130 adds an interpolation node and an interpolation edge to the graph data 221 based on the similarity between each word set in each natural sentence set. Then, the causal connection unit 130 outputs the graph data 221 .
[0041] Step S140 will be described in detail with reference to FIG. In step S141, the causal connection unit 130 selects a word set that satisfies a second selection condition based on the similarity between each word set in each natural sentence set. A word set that satisfies the second selection condition is a word set that corresponds to a similarity that is greater than the second threshold and less than or equal to the first threshold.
[0042] In FIG. 7, when the second threshold is smaller than 0.7 and the first threshold is equal to or larger than 0.7, the causal connection unit 130 selects the pair of the word "state" in the natural sentence (ID1) and the word "movement" in the natural sentence (ID2).
[0043] Returning to FIG. 9, the explanation will be continued. Each of the word sets selected in step S141 is referred to as a second word set.
[0044] In step S 142 , the causal connection unit 130 refers to the natural language table 211 . Then, for each word in each second word set, the causal connection unit 130 generates a modifier for the word based on the natural sentence 212 corresponding to the word. Specifically, the causal connection unit 130 obtains a modified sentence by inputting a word and natural sentence 212 and operating the language model 230, and extracts a modifier from the modified sentence. The modified sentence is the natural sentence 212 in which the input word is modified. The language model 230 has a function of generating a modified sentence.
[0045] In step S143, the causal connection unit 130 adds an interpolation node and an interpolation edge to the graph data 221 for each second word pair for which a common modifier is obtained. An interpolation node is a node that indicates a modifier word. The interpolation edge is an edge that indicates an inter-word relationship between each word in the second word set and the modifier word.
[0046] FIG. 10 shows an example of the graph data 221. Assume that the pair of the word "state" in the natural language sentence (ID1) and the word "movement" in the natural language sentence (ID2) is a second word pair, and that the common modifier in the second word pair is "physical." In this case, the causal connection unit 130 adds a node indicating the modifier word "body" to the node table 222 (see the bold lines). In addition, the causal connection unit 130 adds an edge indicating the inter-word relationship between the modifier word "body" and the word "state" in the natural sentence (ID1), and an edge indicating the inter-word relationship between the modifier word "body" and the word "movement" in the natural sentence (ID2) to the edge table 223 (see the bold lines).
[0047] FIG. 11 shows an example of a knowledge graph 201. FIG. 11 shows a knowledge graph 201 for a natural text (ID1) and a natural text (ID2). The bold parts correspond to the interpolation nodes and edges.
[0048] Returning to FIG. 9, step S144 will be described. In step S144, the causal connection unit 130 outputs the graph data 221 to which the interpolation nodes and interpolation edges have been added. For example, the causal connection unit 130 generates a knowledge graph 201 based on the graph data 221, and displays the knowledge graph 201 on a display.
[0049] ***Advantages of the First Embodiment*** The first embodiment can correctly recognize the structure of natural language and automatically build a high-quality knowledge graph. In the first embodiment, document generation is performed so as to extend the original sentences in the graph, and potential common words can be extracted. The first embodiment is capable of extracting potential common words between graphs constructed from sentences, and treating the extracted words as interpolation nodes to connect the graphs.
[0050] In the conventional technology, when connecting graphs that include abstract words, it is not possible to grasp the potential words that the abstract words point to, and therefore the quality of the generated knowledge graph is low. In the first embodiment, a contextually plausible word is inferred by a document generation process, and an interpolation node is generated using the inferred word. This provides the effect of making semantically correct connections and increasing the amount of information for recommendation or analysis by making potential words explicit. As a result, a high-quality knowledge graph can be generated.
[0051] Embodiment 2 The knowledge graph generation device 100 will be described with reference to FIGS. 12 to 19, focusing mainly on the points that differ from the first embodiment.
[0052] ***Configuration Description*** The configuration of the knowledge graph generation device 100 will be described with reference to FIG. The knowledge graph generation device 100 further includes an element called an important node identification unit 140. The knowledge graph generation program further causes the computer to function as an important node identification unit 140 .
[0053] FIG. 13 shows the functional configuration of the knowledge graph generation device 100.
[0054] ***Explanation of Operation*** The knowledge graph generation method will be described with reference to FIG. In step S210, the graph generating unit 110 generates graph data 221 of a plurality of natural sentences 212. Step S210 is the same as step S110 in the first embodiment.
[0055] FIG. 15 shows an example of the graph data 221. The node table 222 shows the nodes of each of the words contained in the natural sentence (ID1) and the natural sentence (ID2). The edge table 223 shows the edges of each word pair in the natural sentence (ID1) and the edges of each word pair in the natural sentence (ID2).
[0056] Returning to FIG. 14, the description will continue from step S220. In step S220, the important node identification unit 140 identifies important nodes based on edge information of edges related to each node in the knowledge graph 201.
[0057] The edge information is, for example, the number of edges connected to a node and the inter-word relationships indicated by the edges. The important node identification unit 140 refers to the edge table 223 to acquire edge information.
[0058] An important node is a node that satisfies certain conditions regarding edge information. The words indicated by the important nodes are called important words. Similarity is calculated for word pairs consisting of important words.
[0059] A node that satisfies a specific condition is, for example, a node to which two or more edges are directed, and which includes an edge that indicates a verb as an inter-word relationship among the two or more edges directed thereto. Assume that there are two or more edges leading to the word "state" in the natural text (ID1) in Fig. 15. The lexical phrase "discriminate" in the inter-word relationship indicated by the edge leading from the word "caregiving solution" in the natural text (ID1) to the word "state" in the natural text (ID1) is a verb. In this case, the important node identification unit 140 selects the node indicating the word "state" in the natural text (ID1) as an important node. Also, assume that there are two or more edges leading to the word "movement" in the natural sentence (ID2). The lexical phrase "detect" in the inter-word relationship indicated by the edge leading from the word "vibration sensor" in the natural sentence (ID2) to the word "movement" in the natural sentence (ID2) is a verb. In this case, the important node identification unit 140 selects the node indicating the word "movement" in the natural sentence (ID2) as an important node.
[0060] Returning to FIG. 14, the explanation of step S220 will be continued. The important node identification unit 140 generates an important node table 225 for the plurality of natural sentences 212 and stores the important node table 225 in the graph database 220 . The important node table 225 indicates the nodes (important nodes) of the important words contained in the plurality of natural sentences 212 .
[0061] FIG. 16 shows an example of the important nodes table 225. The important node table 225 shows the nodes (important nodes) of the important word "state" in the natural sentence (ID1) and the important word "movement" in the natural sentence (ID2).
[0062] Returning to FIG. 14, the description will continue from step S230. In step S 230 , the similarity calculation section 120 refers to the important node table 225 . Then, the similarity calculation unit 120 calculates the similarity for each natural sentence set made up of natural sentences 212 including an important word among the natural sentence sets in the plurality of natural sentences 212. Specifically, the similarity calculation unit 120 calculates the similarity between important words for each word pair of an important word in one natural sentence 212 and an important word in the other natural sentence 212 . The method for calculating the similarity is the same as the method used in step S120 in the first embodiment.
[0063] FIG. 17 shows an example of a knowledge graph 201. The word "state" in the natural text (ID1) and the word "movement" in the natural text (ID2) are important words. In this case, the similarity calculation unit 120 calculates the similarity between the pair of the important word "state" in the natural text (ID1) and the important word "movement" in the natural text (ID2).
[0064] Returning to FIG. 14, the description of step S230 will continue. The similarity calculation unit 120 generates a similarity table 224 for a plurality of natural sentences 212 and stores the similarity table 224 in the graph database 220 .
[0065] FIG. 18 shows an example of the similarity table 224. The similarity table 224 indicates the similarity between a pair of an important word "state" in a natural sentence (ID1) and an important word "movement" in a natural sentence (ID2).
[0066] Returning to FIG. 14, the description will continue from step S240. In step S240, the causal connection unit 130 connects similar nodes of each natural sentence set based on the similarity of each important word set of each natural sentence set. Step S240 corresponds to step S130 (first embodiment) for the key word set. Specifically, the causal connection unit 130 selects a key word pair that satisfies the first selection condition. Then, the causal connection unit 130 replaces a node of one of the key words in the selected key word pair with a node indicating the other key word in the selected key word pair.
[0067] ***Effects of the second embodiment*** The second embodiment is an embodiment in which, in similarity calculation between different graphs, the objects to be calculated are controlled based on edge information. In the second embodiment, by controlling the calculation target, it is possible to reduce the calculation load regardless of the scale of the input.
[0068] In the conventional technology, similarity is calculated for all combinations of word vectors or sentence vectors extracted from a graph, which increases the computational load in proportion to the size of the graph. In the second embodiment, the calculation target can be controlled using edge information. As a result, the calculation load can be reduced according to requirements such as calculation resources, regardless of the scale of the graph.
[0069] ***Example of the second embodiment*** The second embodiment may be implemented in combination with the first embodiment. FIG. 19 shows a flowchart of a knowledge graph generation method according to the second embodiment in combination with the first embodiment. Steps S210 to S240 are as described in the second embodiment. In step S250, the causal connection unit 130 adds an interpolation node and an interpolation edge to the graph data 221 based on the similarity between each important word set of each natural sentence set. Step S250 corresponds to step S140 (first embodiment) for the key word set.
[0070] Embodiment 3 The embodiment in which abstract words in the natural text 212 are replaced with more specific words will be described below with reference to Figs. 20 to 28, mainly with respect to the points that differ from the first embodiment.
[0071] The configuration of the knowledge graph generation device 100 will be described with reference to FIG. The knowledge graph generation device 100 further includes an element called a normalization unit 150. The knowledge graph generation program further causes the computer to function as a normalization unit 150.
[0072] FIG. 21 shows the functional configuration of the knowledge graph generation device 100. The thesaurus database 240 may be managed by the knowledge graph generation device 100 or may be managed externally. The contents of the thesaurus database 240 will be described later.
[0073] ***Explanation of Operation*** The knowledge graph generation method will be described with reference to FIG. Step S110 is as described in the first embodiment. After step S110, the process proceeds to step S310.
[0074] In step S310, the normalization unit 150 normalizes each of the words included in the plurality of natural sentences 212.
[0075] Step S310 will be described in detail with reference to FIG. In step S311, the normalization unit 150 determines a substitute word for each word included in the plurality of natural sentences 212 based on the context of the natural sentences 212 in which the word is included. An alternative word is a word that takes the place of the target word in the natural sentence 212 .
[0076] The alternative words are determined as follows. First, the normalization unit 150 selects each of the nodes shown in the node table 222. The words shown in the selected nodes are called target words. Next, the normalization unit 150 obtains a natural sentence 212 including the target word from the natural sentence table 211 . Next, the normalization unit 150 masks the target word in the acquired natural sentence 212 . Next, the normalization unit 150 inputs the natural sentence 212 in which the target word is masked and calculates the language model 230. As a result, the natural sentence 212 in which the alternative word is written in the masked portion is obtained. The obtained natural sentence 212 is called an alternative sentence. The language model 230 has a function of generating an alternative sentence. Then, the normalization unit 150 extracts alternative words from the alternative sentences.
[0077] In step S312, the normalization unit 150 acquires, for each word included in the plurality of natural sentences 212, a synonym for the alternative word from the thesaurus database 240. In the thesaurus database 240, synonyms for each word are registered.
[0078] FIG. 24 shows an example of the thesaurus database 240. The thesaurus database 240 includes a synonym table 241 . The synonym table 241 shows synonyms for each word.
[0079] When the substitute word is "movement", the normalization unit 150 obtains a synonym "movement" for "movement".
[0080] Returning to FIG. 23, step S313 will be described. In step S313, for each substitute word for which a synonym has been obtained, the normalization unit 150 replaces the node of the target word corresponding to the substitute word with a node indicating the synonym. In addition, the normalization unit 150 replaces the edge related to the target word with an edge related to the synonym.
[0081] FIG. 25 shows an example of the node table 222. When a synonym "movement" for the alternative word of the word "state" in the natural sentence (ID1) is acquired, the normalization unit 150 replaces the node of the word "state" in the natural sentence (ID1) with a node indicating the synonym "movement."
[0082] FIG. 26 shows an example of the edge table 223. When a synonym "movement" for an alternative word of the word "state" in the natural sentence (ID1) is acquired, the normalization unit 150 replaces an edge related to the word "state" in the natural sentence (ID1) with an edge related to the synonym "movement."
[0083] FIG. 27 shows an example of a knowledge graph 201. Assume that the alternative word for the word "state" in the natural language (ID1) is "movement." Also assume that a synonym for the alternative word "movement" is "movement." In this case, the node of the word "state" in the natural language (ID1) is replaced with a node indicating the synonym "movement." This normalizes the abstract word "state" in the natural language (ID1).
[0084] Returning to FIG. 22, the explanation will be continued. After step S310, the process proceeds to step S120. Steps S120 to S140 are the same as those described in the first embodiment.
[0085] ***Effects of the Third Embodiment*** The third embodiment is a form in which the meaning of an abstract word is captured and normalized to an appropriate word. In the third embodiment, the sentence generation process can replace abstract words with words that are contextually plausible and highly specific.
[0086] Conventional techniques assign a single expression to abstract words whose meanings change depending on the context, which can lead to misrepresentations in the context and degrade the quality of the knowledge graph. In the third embodiment, contextually plausible words are inferred and normalized through document generation processing, resulting in a higher quality knowledge graph than the prior art.
[0087] ***Example of the third embodiment*** The third embodiment may be implemented in combination with the second embodiment. FIG. 28 shows a flowchart of a knowledge graph generation method according to the third embodiment in combination with the second embodiment. Step S210 is as explained in the second embodiment. Step S310 is as explained in the third embodiment. Steps S220 to S240 are the same as those described in the second embodiment.
[0088] The third embodiment may be implemented in combination with an example of the second embodiment.
[0089] Embodiment 4 The embodiment for preventing the use of natural sentences 212 that are considered to have an incorrect sentence structure will be described below with reference to Figs. 29 to 35, focusing mainly on the differences from the first embodiment.
[0090] ***Configuration Description*** The configuration of the knowledge graph generation device 100 will be described with reference to FIG. The knowledge graph generation device 100 further includes an element called a filtering unit 160. The knowledge graph generation program further causes the computer to function as a filtering unit 160.
[0091] FIG. 30 shows the functional configuration of the knowledge graph generation device 100. The reliability database 250 may be managed by the knowledge graph generation device 100 or may be managed externally. The contents of the reliability database 250 will be described later.
[0092] ***Explanation of Operation*** The knowledge graph generation method will be described with reference to FIG. In step S410, the filtering unit 160 receives a plurality of natural sentences 212, and identifies, from the plurality of natural sentences 212, natural sentences 212 having a low reliability. Then, the filtering unit 160 stores in the natural language database 210 a natural language table 211 in which a plurality of natural language sentences 212 are registered, excluding the natural language sentences 212 with low reliability.
[0093] Step S410 will be described in detail with reference to FIG. In step S411, the filtering unit 160 receives a plurality of natural sentences 212. The plurality of natural sentences 212 includes one or more natural sentences 212 for each of a plurality of issuers. A publisher is a person or organization that publishes one or more natural language sentences 212 .
[0094] In step S412, the filtering unit 160 evaluates the sentence structure of each of the natural sentences 212 of each issuer. Syntax analysis and the like are used to evaluate the sentence structure.
[0095] For example, if a double negation, a slash-less word, or a roundabout phrase is included in the natural sentence 212, the sentence structure of the natural sentence 212 is invalid. A double negation means that there are two negation words.
[0096] The explanation of step S412 will be continued. The filtering unit 160 generates a natural language table 211 and stores the natural language table 211 in the natural language database 210. In the natural language table 211, for each natural language sentence 212, the natural language sentence 212, an evaluation result, and issuer information are registered.
[0097] FIG. 33 shows an example of the natural language table 211. The natural language table 211 shows the evaluation results and issuer information for each of the natural language (ID1) and the natural language (ID2). The issuer information is information that identifies an issuer. The issuer is identified by a name, a domain name, or the like.
[0098] Returning to FIG. 32, the explanation continues from step S413. In step S413, the filtering unit 160 refers to the natural sentence table 211 and calculates the reliability of each issuer based on the evaluation result of the natural sentence 212 of each issuer. For example, the filtering unit 160 calculates the ratio of natural sentences 212 having a valid sentence structure as the reliability.
[0099] The explanation of step S413 will be continued. The filtering unit 160 generates a reliability table 251 and stores the reliability table 251 in a reliability database 250 . In the reliability table 251, the reliability of each issuer is registered.
[0100] FIG. 34 shows an example of the reliability table 251. As shown in FIG. The reliability table 251 indicates the reliability of each of issuers "Company A" and "Company B."
[0101] Returning to FIG. 32, the explanation will be continued. When a new natural sentence 212 is issued, the reliability registered in the reliability table 251 is updated. For example, the filtering unit 160 registers in the reliability table 251 an average of the reliability registered in the reliability table 251 and the reliability for the new natural sentence 212 as a new reliability.
[0102] In step S414, the filtering unit 160 refers to the reliability table 251 and identifies non-reliable issuers based on the reliability of each issuer. An untrusted issuer is one that does not meet the trust conditions for trustworthiness. An issuer that does not meet the trust condition is one whose trust level is below a threshold.
[0103] In step S415, the filtering unit 160 excludes the natural sentences 212 of untrusted issuers from the plurality of natural sentences 212. Specifically, the filtering unit 160 deletes the natural text 212 of the untrusted issuer from the natural text table 211.
[0104] Returning to FIG. 31, the description continues from step S420. In step S 420 , the graph generating unit 110 generates graph data 221 for the plurality of natural sentences 212 registered in the natural sentence table 211 . The method for generating the graph data 221 is the same as the method in step S110 in the first embodiment.
[0105] After step S420, the process proceeds to step S120. Steps S120 to S140 are the same as those described in the first embodiment.
[0106] ***Effects of the fourth embodiment*** The fourth embodiment is an embodiment in which the trustworthiness of a document issuer obtained by evaluating a sentence structure is used for filtering natural sentences. In the fourth embodiment, an incorrect sentence structure is defined, and the ratio of sentences with a correct sentence structure among a set of sentences acquired from a certain document issuer is calculated as the reliability.
[0107] In conventional technology, in order to estimate the accuracy (credibility) of unknown information from a collected set of sentences, reliability is calculated using a group of known information that is known to be correct in advance. When generating a graph using dependency analysis, if an invalid sentence structure is input, the quality of the generated knowledge graph may be degraded. However, the reliability of the conventional technology does not guarantee the correctness of the sentence structure. In the fourth embodiment, an incorrect sentence structure is defined, a reliability is calculated based on the definition, and the reliability is used for filtering. Therefore, input of an incorrect sentence structure is suppressed, and the quality of the knowledge graph is improved.
[0108] ***Example of the fourth embodiment*** The fourth embodiment may be implemented in combination with the second embodiment. FIG. 35 shows a flowchart of a knowledge graph generation method according to the fourth embodiment in combination with the second embodiment. Steps S410 and S420 are as described in the fourth embodiment. Steps S220 to S240 are as described in the second embodiment.
[0109] The fourth embodiment may be implemented in combination with an example of the second embodiment.
[0110] The fourth embodiment may be implemented in combination with the third embodiment or an example of the third embodiment.
[0111] ***Supplementary explanation of implementation form*** The hardware configuration of the knowledge graph generation device 100 will be described with reference to FIG. The knowledge graph generation device 100 includes a processing circuit 109 . The processing circuit 109 is hardware that realizes the graph generation unit 110 , the similarity calculation unit 120 , the causal connection unit 130 , the important node identification unit 140 , the normalization unit 150 , and the filtering unit 160 . The processing circuitry 109 may be dedicated hardware, or may be a processor 101 that executes a program stored in the memory 102 .
[0112] When the processing circuitry 109 is dedicated hardware, the processing circuitry 109 may be, for example, a single circuit, a multiple circuit, a programmed processor, a parallel programmed processor, an ASIC, an FPGA, or a combination thereof. ASIC is an abbreviation for Application Specific Integrated Circuit. FPGA is an abbreviation for Field Programmable Gate Array.
[0113] The knowledge graph generation device 100 may include multiple processing circuits replacing the processing circuit 109.
[0114] In the processing circuit 109, some functions may be realized by dedicated hardware, and the remaining functions may be realized by software or firmware.
[0115] In this way, the functions of the knowledge graph generation device 100 can be realized by hardware, software, firmware, or a combination of these.
[0116] Each embodiment is an example of a preferred embodiment, and is not intended to limit the technical scope of the present disclosure. Each embodiment may be implemented in part or in combination with other embodiments. The procedures described using flow charts, etc. may be modified as appropriate.
[0117] The "part" of each element of the knowledge graph generation device 100 may be read as a "processing," a "step," a "circuit," or a "circuitry." [Explanation of symbols]
[0118] 100 knowledge graph generating device, 101 processor, 102 memory, 103 auxiliary storage device, 104 input / output interface, 109 processing circuit, 110 graph generating unit, 120 similarity calculation unit, 130 causal connection unit, 140 important node identification unit, 150 normalization unit, 160 filtering unit, 200 memory unit, 201 knowledge graph, 210 natural language database, 211 natural language table, 212 natural language, 220 graph database, 221 graph data, 222 node table, 223 edge table, 224 similarity table, 225 important node table, 230 language model, 240 thesaurus database, 241 synonym table, 250 reliability database, 251 reliability table.
Claims
1. a graph generation unit that generates graph data of a knowledge graph that indicates each of words included in a plurality of natural sentences as a node and indicates, for each of the natural sentences among the plurality of natural sentences, inter-word relationships between word pairs in the natural sentence as edges; a similarity calculation unit that calculates a similarity between the words for each word pair of the words in one of the natural sentences and the words in the other of the natural sentences for each natural sentence pair among the plurality of natural sentences; a causal connection unit that selects a word set that satisfies a selection condition based on the similarity of each of the word sets in each of the natural sentence sets, generates a modifier for each of the words in the selected word set based on the natural sentence corresponding to the word, and, when a common modifier is generated for the selected word set, adds to the graph data an interpolation node indicating the word of the modifier and an interpolation edge indicating an inter-word relationship between each word of the selected word set and the word of the modifier; A knowledge graph generation device comprising:
2. The knowledge graph generation device includes an important node identification unit that identifies each of the nodes in the knowledge graph that satisfies a specific condition based on edge information of the edges related to each of the nodes, as an important node; the similarity calculation unit calculates, for each natural sentence set consisting of the natural sentences including the important word indicated by the important node among the natural sentence sets in the plurality of natural sentences, a similarity between the important words of one of the natural sentences and the important word of the other of the natural sentences as the similarity between the words; The causal connection part is selecting a word set that satisfies a first selection condition based on the similarity between each of the word sets in each of the natural sentence sets as a first word set, and replacing the node of one of the words in the first word set among the nodes shown in the graph data with a node showing the other word in the first word set; a word set that satisfies a second selection condition, which is the selection condition, based on the similarity of each of the word sets in each of the natural sentence sets, is selected as a second word set, the modifier is generated for each of the words in the second word set, and when the modifier common to the second word set is generated, the interpolation node and the interpolation edge are added to the graph data. The knowledge graph generation device according to claim 1 .
3. a normalization unit that determines, for each of the words included in the plurality of natural sentences, an alternative word to replace the word based on a context of the natural sentence in which the word is included, obtains a synonym for the alternative word from a thesaurus database in which synonyms for the word are registered for each word, and replaces, for each of the alternative words for which the synonym is obtained, the node of the word corresponding to the alternative word with a node indicating the synonym. The knowledge graph generation device according to claim 1 .
4. a filtering unit that evaluates a sentence structure of the natural sentence for each of a plurality of issuers that issue the natural sentences, calculates a reliability of the issuer based on an evaluation result of the natural sentence of the issuer for each of the issuers, identifies an issuer among the plurality of issuers that does not satisfy a reliability condition based on the reliability of each of the plurality of issuers, and excludes the natural sentences of the identified issuers from the plurality of natural sentences. The knowledge graph generation device according to any one of claims 1 to 3.
5. A filtering unit that evaluates the sentence structure of the natural sentence for each of a plurality of issuers that issue natural sentences, calculates the reliability of each issuer based on the evaluation result of the natural sentence of the issuer, and identifies issuers among the plurality of issuers that do not satisfy a reliability condition based on the reliability of each of the plurality of issuers. a graph generating unit that generates graph data of a knowledge graph that indicates each of the words included in a plurality of natural sentences excluding the natural sentence of the identified issuer as a node and indicates, for each of the natural sentences among the plurality of natural sentences, inter-word relationships of word pairs in the natural sentence as edges; an important node identification unit that identifies each of the nodes that satisfy a specific condition based on edge information of the edges related to each of the nodes in the knowledge graph as an important node; a similarity calculation unit that calculates a similarity between important words for each word pair of the important words of one natural sentence and the important words of the other natural sentence for each natural sentence pair of the natural sentences including the important words indicated by the important nodes among the natural sentence pairs of the plurality of natural sentences; a causal connection unit that selects a word set that satisfies a selection condition based on the similarity between each of the word sets in each of the natural sentence sets, and replaces the node of one of the words in the selected word set among the nodes shown in the graph data with a node showing the other word in the selected word set; A knowledge graph generation device comprising:
6. a normalization unit that determines, for each of the words included in the plurality of natural sentences, an alternative word to replace the word based on a context of the natural sentence in which the word is included, obtains a synonym for the alternative word from a thesaurus database in which synonyms for the word are registered for each word, and replaces, for each of the alternative words for which the synonym is obtained, the node of the word corresponding to the alternative word with a node indicating the synonym. The knowledge graph generation device according to claim 5 . Equipped
7. generating graph data of a knowledge graph in which each word included in a plurality of natural sentences is represented as a node and each inter-word relationship of each word pair in the natural sentence is represented as an edge for each natural sentence among the plurality of natural sentences; calculating a similarity between the words for each word pair of the plurality of natural sentences, the words being one of the natural sentences and the words being another of the natural sentences; A word set satisfying a selection condition is selected based on the similarity of each of the word sets in each of the natural sentence sets, and for each of the words in the selected word set, a modifier for the word is generated based on the natural sentence corresponding to the word, and when a common modifier is generated for the selected word set, an interpolation node indicating the word of the modifier and an interpolation edge indicating an inter-word relationship between each word of the selected word set and the word of the modifier are added to the graph data. How knowledge graphs are generated.
8. For each of a plurality of issuers that issue natural language sentences, a sentence structure of the natural language sentence of each of the issuers is evaluated, a reliability of each issuer is calculated based on the evaluation result of the issuer's natural language sentence, and an issuer among the plurality of issuers that does not satisfy a reliability condition is identified based on the reliability of each of the plurality of issuers, generating graph data of a knowledge graph in which each word included in a plurality of natural sentences excluding the natural sentence of the identified issuer is shown as a node, and each inter-word relationship of each word pair in the natural sentence is shown as an edge for each natural sentence among the plurality of natural sentences; Identifying each of the nodes that satisfy a specific condition based on edge information of the edges related to each of the nodes in the knowledge graph as an important node; For each natural sentence set of natural sentences including an important word indicated by the important node among the natural sentence sets of the plurality of natural sentences, a similarity between the important words is calculated for each word set of the important word of one natural sentence and the important word of the other natural sentence; A word set that satisfies a selection condition is selected based on the similarity of each of the word sets in each of the natural sentence sets, and the node of one of the words in the selected word set among the nodes shown in the graph data is replaced with a node showing the other word in the selected word set. How knowledge graphs are generated.
9. a graph generation process for generating graph data of a knowledge graph in which each word included in a plurality of natural sentences is represented as a node and each inter-word relationship between word pairs in the natural sentence is represented as an edge for each natural sentence among the plurality of natural sentences; a similarity calculation process for calculating a similarity between each word pair of the words in one of the natural sentences and the words in the other natural sentence for each natural sentence pair among the plurality of natural sentences; a causal connection process of selecting a word set that satisfies a selection condition based on the similarity of each of the word sets in each of the natural sentence sets, generating a modifier for each of the words in the selected word set based on the natural sentence corresponding to the word, and adding, to the graph data, an interpolation node indicating the word of the modifier and an interpolation edge indicating an inter-word relationship between each word of the selected word set and the word of the modifier when the common modifier is generated for the selected word set; A knowledge graph generation program for causing a computer to execute the above.
10. A filtering process comprising: evaluating the sentence structure of each of a plurality of issuers that issue natural texts, calculating the reliability of each issuer based on the evaluation results of the issuer's natural texts, and identifying issuers among the plurality of issuers that do not satisfy a reliability condition based on the reliability of each of the plurality of issuers; a graph generation process for generating graph data of a knowledge graph in which each word included in a plurality of natural sentences excluding the natural sentence of the identified issuer is shown as a node, and each inter-word relationship of each word pair in the natural sentence is shown as an edge for each natural sentence among the plurality of natural sentences; an important node identification process for identifying each of the nodes that satisfy a specific condition based on edge information of the edges related to each of the nodes in the knowledge graph as an important node; a similarity calculation process for calculating a similarity between important words for each word pair of the important words of one natural sentence and the important words of the other natural sentence for each natural sentence pair of the natural sentences including the important words indicated by the important nodes among the natural sentence pairs of the plurality of natural sentences; a causal connection process for selecting a word pair that satisfies a selection condition based on the similarity between each of the word pairs in each of the natural sentence pairs, and replacing the node of one of the words in the selected word pair among the nodes shown in the graph data with a node showing the other word in the selected word pair; A knowledge graph generation program for causing a computer to execute the above.