Ontology construction device, ontology construction method, and ontology construction program
By employing a cluster generation unit and inheritance relationship determination using natural language properties, the ontology construction device addresses interpretability and accuracy issues in automatic ontology construction, resulting in a human-understandable and accurate hierarchical ontology.
Patent Information
- Application Number
- PCT/JP2024/038475
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-07-24
- Filing Date
- 2024-10-29
- Publication Date
- 2026-01-29
AI Technical Summary
Existing automatic ontology construction methods struggle with interpretability and accuracy, as they rely heavily on numerical word vector similarities and word length, leading to unclear hierarchical relationships and inaccurate ontology organization.
The ontology construction device employs a cluster generation unit to group nodes based on shared properties and an inheritance relationship determination unit to establish hierarchical organization, using natural language expressions for properties, making the ontology easier to interpret and more accurate.
This approach allows for the creation of a hierarchical ontology that is both human-understandable and highly accurate, facilitating detailed and systematic knowledge organization.
Smart Images

Figure JP2024038475_29012026_PF_FP_ABST
Abstract
Description
Ontology construction device, ontology construction method, and ontology construction program
[0001] The present disclosure relates to an ontology construction device, an ontology construction method, and an ontology construction program.
[0002] An ontology is a type of data format for structurally representing knowledge. Ontologies are described using an ontology description language such as the Web Ontology Language (OWL) recommended by the World Wide Web Consortium (W3C). In OWL, knowledge is expressed by defining relationships between data using a graph structure in accordance with the Resource Description Framework (RDF) framework, which consists of triples of a subject, a predicate, and an object. The subject and object are also called nodes, and the predicate is also called a property. Because ontologies have a structural format that is easy for humans to understand, they enable the organization and utilization of knowledge. Conventionally, systematized knowledge consisting of detailed and accurate content using ontologies has often been manually constructed by individuals familiar with both domain knowledge and ontology engineering. Therefore, in the practical use of ontologies, automatic construction of ontologies is required. Automatic construction of ontologies is generally performed by a procedure consisting of inputting a sentence, identifying important words, classifying, and hierarchizing. The automatic ontology construction method disclosed in Non-Patent Document 1 organizes knowledge using word vectors. Furthermore, the ontology association information generation device disclosed in Patent Document 1 organizes knowledge by appropriately using attribute information linked to words and word length.
[0003] Japanese Patent Application Laid-Open No. 2001-014166
[0004] Tamaki Oki, Shion Chiba, Yuji Nomura, "Proposal of a semi-automatic ontology construction method for real-world tasks," Materials for the Second Type Research Meeting of the Japanese Society for Artificial Intelligence, 2022, SWO-056, p. 08-
[0005] The word vectors used in Non-Patent Document 1 are vector-based quantifications of the co-occurrence relationships between words in a sentence, and can be used to capture the definitions and meanings of words. Specifically, by measuring the cosine similarity between two word vectors, the semantic similarity between two words corresponding to the two word vectors can be expressed numerically. As a specific example, the similarity between "tuna" and "saury" in multiple contexts where they co-occur is generally higher than the similarity between "tuna" and "soccer ball" in multiple contexts where they co-occur. Therefore, compared to the two words "tuna" and "soccer ball," the two words "tuna" and "saury" have a stronger co-occurrence relationship, so their corresponding word vectors are closer and therefore more similar. Non-Patent Document 1 discloses a method for utilizing the characteristics of such word vectors to classify and hierarchize words in a sentence, and then automatically constructing an ontology. However, this method has the drawback of making it difficult for humans to interpret and control the ontology, since the basis for classification and hierarchization in the constructed ontology depends on the numerical values of the vectors. As a specific example, this method may link words such as "sauna" and "hotel" to the lower level of the word "bath." In this case, because the structuring perspective is unclear, it is not clear whether the constructed ontology is an ontology that describes the facilities that baths have, or an ontology that describes the facilities that have baths.
[0006] Patent Literature 1 discloses a method for generating correspondences between different input ontologies based on attribute information associated with words. In this case, the hierarchical relationships are automatically organized based on the length of the words. Specifically, the shorter the length of the corresponding words, the more abstract the words are, i.e., the shorter the length of the corresponding words, the higher the hierarchical level of the words is determined to be. As a specific example, between "sensor" and "infrared sensor," the former, which has shorter corresponding words, is treated as a more abstract word. However, this method has a problem in that it cannot accurately organize the hierarchical relationships when there is no common string between the words being compared, such as between "product" and "car."
[0007] The present disclosure aims to construct a hierarchical ontology that is easy to interpret and control and has a relatively high degree of accuracy in a technology for automatically constructing an ontology.
[0008] The ontology construction device according to the present disclosure comprises: a cluster generation unit that generates, for each type of node included in a group of triples each consisting of triples created by extracting facts described in an input sentence, aggregating the types of properties associated with the type of node; a cluster generation unit that generates, as each cluster of a plurality of clusters, a cluster indicating each node set and a second property set corresponding to each node set; and an inheritance relationship determination unit that determines, for each two clusters of the plurality of clusters, whether or not there is an overlap of one or more types of elements in the two node sets indicated by each of the two clusters, and whether or not there is an overlap of one or more types of elements in the two second property sets indicated by each of the two clusters.
[0009] According to the present disclosure, the existence of an inheritance relationship is determined based on at least one of the presence or absence of overlap of one or more elements in the two node sets indicated by each of the two clusters and the presence or absence of overlap of one or more elements in the two second property sets indicated by each of the two clusters. Here, the inheritance relationship may be used for hierarchical organization. Furthermore, because properties are expressed in natural language, they are easy to interpret and control, and utilizing properties in hierarchical organization of an ontology results in relatively high accuracy of the hierarchical organization. Therefore, according to the present disclosure, a technology for automatically constructing an ontology can construct a hierarchical ontology that is easy to interpret and control and has relatively high accuracy.
[0010] FIG. 1 is a diagram showing an example of the configuration of an ontology building device 1 according to the first embodiment. FIG. 2 is a diagram showing an example of the hardware configuration of an ontology building device 1 according to the first embodiment. FIG. 3 is a flowchart showing the operation of the ontology building device 1 according to the first embodiment. FIG. 4 is a diagram explaining the processing of a triple extraction unit 11 according to the first embodiment. FIG. 5 is a flowchart showing the operation of a cluster generation unit 12 according to the first embodiment. FIG. 6 is a diagram explaining the processing of a cluster generation unit 12 according to the first embodiment. FIG. 7 is a diagram explaining the processing of a cluster generation unit 12 according to the first embodiment. FIG. 8 is a diagram explaining the processing of a inheritance relationship determination unit 13 according to the first embodiment. FIG. 9 is a diagram explaining the processing of a target word determination unit 14 according to the first embodiment. FIG. 10 is a diagram showing an example of the hardware configuration of an ontology building device 1 according to a modification of the first embodiment. FIG. 11 is a diagram showing an example of the configuration of an ontology building device 1 according to the second embodiment. FIG. 12 is a flowchart showing the operation of an ontology building device 1 according to the second embodiment. FIG. 13 is a diagram explaining the processing of a supplemental triple acquisition unit 16 according to the second embodiment. FIG. 14 is a diagram showing an example of the configuration of an ontology building device 1 according to the third embodiment. FIG. 15 is a flowchart showing the operation of an ontology building device 1 according to the third embodiment. FIG. 16 is a diagram explaining the processing of a cluster selection unit 17 according to the third embodiment. FIG. 17 is a diagram showing an example of the configuration of an ontology building device 1 according to the fourth embodiment. FIG. 10 is a diagram for explaining the processing of a representative word determination unit 14 according to embodiment 4. FIG. 11 is a diagram showing an example of the configuration of an ontology building apparatus 1 according to embodiment 5. FIG. 12 is a diagram for explaining the processing of a cluster generation unit 12 according to embodiment 5. FIG. 13 is a diagram for explaining the processing of a cluster generation unit 12 according to a modified example of embodiment 5.
[0011] In the description of the embodiments and drawings, the same elements and corresponding elements are given the same symbols. The description of elements given the same symbols is omitted or simplified as appropriate. Arrows in the drawings mainly indicate the flow of data or the flow of processing. Furthermore, "unit" may be interpreted as "circuit," "device," "equipment," "process," "step," "procedure," "processing," or "circuitry" as appropriate. The functions of each unit provided in each device may be realized by firmware, software, hardware, or a combination of these.
[0012] First Embodiment Hereinafter, the present embodiment will be described in detail with reference to the drawings.
[0013] ***Description of Configuration*** Fig. 1 shows an example of the configuration of an ontology building system 90 according to this embodiment. As shown in Fig. 1, the ontology building system 90 includes an ontology building device 1, an input device 2, and a language model 3. The ontology building device 1 includes a triple extraction unit 11, a cluster generation unit 12, an inheritance relationship determination unit 13, a representative word determination unit 14, a graph creation unit 15, a triple storage unit 21, a cluster storage unit 22, an inheritance relationship storage unit 23, and a representative word storage unit 24. The input device 2 has a function of inputting an input sentence D1 to the ontology building device 1. The language model 3 is a model that receives language as input and outputs language as output. The language model 3 is, for example, a large-scale language model such as the Generative Pre-trained Transformer (GPT) or the Bidirectional Encoder Representations from Transformers (BERT).
[0014] The triple extraction unit 11 has a function of extracting facts described in the input text D1. As a specific example, the triple extraction unit 11 uses a language model 3 to extract each triple D2 as a fact described in the input text D1. Note that the method for extracting the triple D2 is not limited to the method using the language model 3, and may also be a method using a morphological analysis engine such as MeCab. The triple storage unit 21 stores each triple D2 extracted by the triple extraction unit 11.
[0015] The cluster generation unit 12 has a function of classifying each node by grouping the nodes based on whether they have similar definitions or meanings. In this case, the cluster generation unit 12 generates, for each of the grouped one or more nodes, clusters D3 each indicating a node set indicating the grouped one or more nodes and a property set corresponding to each node set. That is, the cluster generation unit 12 creates each first property set by grouping the types of properties associated with each node type included in the group of triples. Then, the cluster generation unit 12 creates each node set by grouping the types of nodes corresponding to each second property set for each type of second property set. Then, the cluster generation unit 12 generates, as each of the multiple clusters D3, a cluster indicating each node set and a second property set corresponding to each node set. Here, the group of triples consists of each triple D2 created by extracting facts described in the input document D1. The second property set consists of one or more properties included in at least one first property set. The cluster storage unit 22 stores each cluster D3 generated by the cluster generation unit 12.
[0016] The inheritance relationship determination unit 13 has a function of determining the presence or absence of an inheritance relationship D4 between clusters D3 based on at least one of a node set and a property set, thereby determining the hierarchy of each cluster D3. That is, for each two clusters D3 of the plurality of clusters, the inheritance relationship determination unit 13 determines the presence or absence of an inheritance relationship between the two clusters D3 based on at least one of the presence or absence of overlap of one or more types of elements in the two node sets indicated by each of the two clusters D3 and the presence or absence of overlap of one or more types of elements in the two second property sets indicated by each of the two clusters D3. The inheritance relationship storage unit 23 stores each inheritance relationship D4 determined by the inheritance relationship determination unit 13.
[0017] The target word determination unit 14 has a function of determining a target word D5 corresponding to the node set of each cluster D3. In this case, as a specific example, the target word determination unit 14 determines a generic name for the node set as the target word D5 corresponding to the node set. That is, the target word determination unit 14 determines a target word D5 corresponding to the node set indicated by each cluster D3 based on the language model 3 and each element of the node set indicated by each cluster D3. Note that the method for determining the generic name for the node set is not limited to using the language model 3, and may also be a method using a concept dictionary such as WordNet. The target word storage unit 24 stores each target word D5 determined by the target word determination unit 14.
[0018] The graph creation unit 15 has a function of outputting an ontology in graph form based on the contents of the triple storage unit 21, cluster storage unit 22, inheritance relationship storage unit 23, and representative word storage unit 24 in a format such as OWL (Web Ontology Language). That is, the graph creation unit 15 creates a graph showing an ontology based on each triple D2, each cluster D3, and each inheritance relationship D4. The graph creation unit 15 may also create a graph based on each representative word D5.
[0019] 2 shows an example of the hardware configuration of an ontology building device 1 according to this embodiment. The ontology building device 1 is made up of a computer. The ontology building device 1 may also be made up of multiple computers.
[0020] As shown in the figure, the ontology building device 1 is a computer equipped with hardware such as a processor 51, a memory 52, an auxiliary storage device 53, an input / output IF (Interface) 54, and a communication device 55. These pieces of hardware are connected as appropriate via signal lines 59.
[0021] The processor 51 is an integrated circuit (IC) that performs arithmetic processing and controls the hardware of the computer. Specific examples of the processor 51 include a central processing unit (CPU), a digital signal processor (DSP), or a graphics processing unit (GPU). The ontology building device 1 may include multiple processors that replace the processor 51. The multiple processors share the role of the processor 51.
[0022] The memory 52 is typically a volatile storage device, and a specific example is RAM (Random Access Memory). The memory 52 is also called a primary storage device or a main memory. Data stored in the memory 52 is saved in the secondary storage device 53 as needed.
[0023] The auxiliary storage device 53 is typically a non-volatile storage device, and specific examples thereof include a ROM (Read Only Memory), an HDD (Hard Disk Drive), or a flash memory. Data stored in the auxiliary storage device 53 is loaded into the memory 52 as needed. The memory 52 and the auxiliary storage device 53 may be configured integrally.
[0024] The input / output IF 54 is a port to which an input device and an output device are connected. Specific examples of the input / output IF 54 include a USB (Universal Serial Bus) terminal. Specific examples of the input device include a keyboard and a mouse. Specific examples of the output device include a display.
[0025] The communication device 55 is a receiver and a transmitter, and is specifically a communication chip or a NIC (Network Interface Card).
[0026] Each part of the ontology building device 1 may use the input / output IF 54 and the communication device 55 as appropriate when communicating with other devices.
[0027] The auxiliary storage device 53 stores an ontology building program. The ontology building program is a program that causes a computer to realize the functions of each unit included in the ontology building device 1. The ontology building program is loaded into the memory 52 and executed by the processor 51.
[0028] Data used when executing the ontology building program and data obtained by executing the ontology building program are stored in a storage device as appropriate. Each part of the ontology building device 1 uses a storage device as appropriate. Specific examples of the storage device include at least one of the memory 52, the auxiliary storage device 53, a register in the processor 51, and a cache memory in the processor 51. Note that the terms "data" and "information" may have the same meaning. The storage device may be independent of the computer. The functions of the memory 52 and the auxiliary storage device 53 may be realized by other storage devices.
[0029] The ontology building program may be recorded on a computer-readable non-volatile recording medium. Specific examples of the non-volatile recording medium include an optical disk and a flash memory. The ontology building program may be provided as a program product.
[0030] ***Explanation of Operation*** The operating procedure of the ontology building device 1 corresponds to an ontology building method. Also, the program that realizes the operation of the ontology building device 1 corresponds to an ontology building program.
[0031] 3 is a flowchart showing the operation of the ontology building device 1. The operation will be explained using FIG.
[0032] (Step S101) First, the triple extraction unit 11 acquires an input sentence D1 from the input device 2. Next, the triple extraction unit 11 queries the language model 3 to extract each triple D2 present in the input sentence D1. Next, the triple extraction unit 11 stores each triple D2 resulting from the query in the triple storage unit 21. A specific example of processing by the triple extraction unit 11 is shown below. First, the triple extraction unit 11 acquires an input sentence D1, "An air conditioner blows air to maintain a comfortable space," from the input device 2. Note that "air conditioner" is also called "air conditioner." Next, the triple extraction unit 11 creates a prompt, "Please extract triples from the following sentence: An air conditioner blows air to maintain a comfortable space," as a query to the language model 3, and queries the created query to the language model 3. At this time, as a query result, {air conditioner, maintain, comfortable space} and {air conditioner, blow, wind} are each extracted as triples D2, as shown in FIG. 4 . Next, the triple extraction unit 11 receives each triple D2 as a result of the query from the language model 3 and stores each triple D2 in the triple storage unit 21.
[0033] (Step S102) First, the cluster generation unit 12 acquires triple D2 from the triple storage unit 21. Next, the cluster generation unit 12 groups one or more nodes together based on the commonality of their property patterns. Next, the cluster generation unit 12 stores each of the grouped one or more nodes as cluster D3 in the cluster storage unit 22. The detailed processing procedure of the cluster generation unit 12 is shown in FIG. 5.
[0034] (Step S121) The cluster generating unit 12 acquires the triple D2 from the triple storage unit 21.
[0035] (Step S122) The cluster generation unit 12 groups the property types for each node type included in the triple D2. Note that "node type" may also be simply referred to as "node." As a specific example, when {air conditioner, maintain, comfortable space}, {user, operate, air conditioner}, and {company A, develop, air conditioner} are obtained as triples D2 as shown in the upper part of Figure 6, the cluster generation unit 12 groups the properties together as "air conditioner: {maintain, operate, develop}" (corresponding to the property set shown in the lower part of Figure 6). The upper part of Figure 6 corresponds to a group of triples. The lower part of Figure 6 shows a first property set corresponding to each node.
[0036] (Step S123) The cluster generating unit 12 performs the iterative process from step S124 onwards for all the nodes obtained in step S122, for each combination of two nodes in a round-robin manner of nC2 (where n is the number of nodes).
[0037] (Step S124) The cluster generating unit 12 searches for a pattern of properties common between two nodes, where the combination of two nodes is assumed to be a combination that has not yet been selected in the iterative process.
[0038] (Step S125) If there is a common property pattern between the two nodes, the cluster generating unit 12 proceeds to step S126, otherwise the cluster generating unit 12 proceeds to step S124.
[0039] (Step S126) The cluster generation unit 12 groups the node types for each common property pattern and stores the results in the cluster storage unit 22 as cluster D3. As a specific example, as shown in FIG. 7 , the node "air conditioner" and the node "rice cooker" in the output example of step S122 share a common property pattern consisting of "operate" and "develop." Therefore, the cluster generation unit 12 groups the nodes (corresponding to the node set of cluster D3) by treating the combination of "operate" and "develop" as a single property pattern. Similarly, the cluster generation unit 12 searches for common property patterns for the combination of the node "air conditioner" and the node "elevator" and the combination of the node "rice cooker" and the node "elevator," and groups the nodes according to the common property patterns. The lower part of FIG. 7 shows the type of each second property set. The cluster generation unit 12 stores each node grouping result in the cluster storage unit 22 as cluster D3.
[0040] (Step S103) First, the inheritance relationship determination unit 13 acquires each cluster D3 from the cluster storage unit 22. Next, the inheritance relationship determination unit 13 determines the inheritance relationship based on the contents of the property set or node set of each cluster D3. Next, the inheritance relationship determination unit 13 stores the result of the inheritance relationship determination in the inheritance relationship storage unit 23 as an inheritance relationship D4.
[0041] FIG. 8 shows a specific example of processing by the inheritance relationship determination unit 13. First, the inheritance relationship determination unit 13 acquires a cluster D3 having a property set of {operate, develop} and a cluster D3 having a property set of {develop} from the cluster storage unit 22, and determines the inclusion relationship between the two property sets. In the example shown in FIG. 8, {develop} is a subset of {operate, develop}. Next, the inheritance relationship determination unit 13 determines that the latter inherits the properties of the former based on the inclusion relationship between the property sets. Next, the inheritance relationship determination unit 13 creates an inheritance relationship D4 indicating that the property set that is the inheritance source is in a higher hierarchy and the property set that is the inheritance destination is in a lower hierarchy. Note that the inheritance relationship determination unit 13 may determine the inheritance relationship between clusters D3 based on the inclusion relationship between node sets. As a specific example, when the inheritance relationship determination unit 13 acquires a cluster D3 having a node set {air conditioner, rice cooker} and a cluster D3 having a node set {air conditioner, rice cooker, elevator} from the cluster storage unit 22, the inheritance relationship determination unit 13 considers the former to be a more specific node set that is more restricted than the latter, on the basis that the former is a subset of the latter. Next, based on the degree of restriction between the node sets, the inheritance relationship determination unit 13 creates an inheritance relationship D4 that indicates that the property set associated with the former is a lower hierarchical level and the property set associated with the latter is a higher hierarchical level.
[0042] (Step S104) First, the target word determination unit 14 acquires each cluster D3 from the cluster storage unit 22. Next, the target word determination unit 14 queries the language model 3 to determine a generic name for the node set for each cluster D3. Next, the target word determination unit 14 stores the query result from the language model 3 in the target word storage unit 24 as a target word D5. A specific example of processing by the target word determination unit 14 is shown in FIG. 9 . First, when the target word determination unit 14 acquires a cluster D3 having a node set {air conditioner, rice cooker} from the cluster storage unit 22, it creates a prompt such as "Please tell me the generic names of the following words: air conditioner, rice cooker" as a question sentence to query the language model 3. Next, the target word determination unit 14 receives the generic name "home appliance" from the language model 3 as a result of querying the language model 3, and stores the generic name in the target word storage unit 24 as a target word D5 corresponding to the node set.
[0043] (Step S105) First, the graph creation unit 15 acquires a triple D2 from the triple storage unit 21, a cluster D3 from the cluster storage unit 22, an inheritance relationship D4 from the inheritance relationship storage unit 23, and a representative word D5 from the representative word storage unit 24. Next, the graph creation unit 15 converts the acquired data into a graph format in accordance with a pre-specified format such as OWL using a library (such as rdflib) that can be used for ontology construction. Next, the graph creation unit 15 outputs the conversion result as an ontology D6. Note that the graph creation unit 15 may be configured so that the user can set the graph format when it is executed.
[0044] ***Explanation of the Effects of the First Embodiment*** In the first embodiment, an ontology is constructed based on properties described in natural language. Therefore, according to the first embodiment, it is possible to provide knowledge that is human-understandable and that is relatively detailed and relatively accurately systematized. Furthermore, in the ontology construction device 1 according to the first embodiment, the cluster generation unit 12 creates a set for each pattern of properties that are common between nodes, assuming that an ontology is constructed using the properties. Therefore, according to the first embodiment, it is possible to automatically classify (cluster) and hierarchize nodes.
[0045] ***Other Configurations*** <Variation 1> In step S122, when aggregating properties for each node, the cluster generation unit 12 may convert properties linked to objects into the passive voice. As a specific example, when aggregating properties linked to the object "user" of triple D2 {escalator, carry, user}, the cluster generation unit 12 converts "carry" to "be carried."
[0046] Furthermore, in step S122, the cluster generating unit 12 may convert properties that are in the past tense or potential tense into the final tense or attributive tense, etc., in order to normalize the properties. A specific example of a method for converting properties is a method that uses language model 3.
[0047] According to this modification, by appropriately converting properties, it is possible to perform clustering that more accurately captures meanings or definitions in the subsequent cluster generation process.
[0048] <Modification 2> Fig. 10 shows an example of the hardware configuration of an ontology building device 1 according to this modification. The ontology building device 1 includes a processing circuitry 58 instead of the processor 51, the processor 51 and memory 52, the processor 51 and auxiliary storage device 53, or the processor 51, memory 52, and auxiliary storage device 53. The processing circuitry 58 is hardware that realizes at least a part of the components included in the ontology building device 1. The processing circuitry 58 may be dedicated hardware, or may be a processor that executes a program stored in the memory 52.
[0049] When the processing circuitry 58 is dedicated hardware, the processing circuitry 58 may be, for example, a single circuit, a composite circuit, a programmed processor, a parallel programmed processor, an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or a combination thereof. The ontology building device 1 may be provided with multiple processing circuits that replace the processing circuitry 58. The multiple processing circuits share the role of the processing circuitry 58.
[0050] In the ontology building device 1, some of the functions may be realized by dedicated hardware, and the remaining functions may be realized by software or firmware.
[0051] The processing circuitry 58 is realized by, for example, hardware, software, firmware, or a combination of these. The processor 51, memory 52, auxiliary storage device 53, and processing circuitry 58 are collectively referred to as the "processing circuitry." In other words, the functions of the functional components of the ontology building device 1 are realized by the processing circuitry. Ontology building devices 1 according to other embodiments may also have a configuration similar to this modified example.
[0052] Second Embodiment The following mainly describes the differences from the above-described embodiments with reference to the drawings. In the second embodiment, prior knowledge about each node is acquired, which is prior knowledge that cannot be obtained from the input text D1. Furthermore, in the second embodiment, the content of the acquired prior knowledge is normalized in order to effectively utilize the prior knowledge in the cluster generation process.
[0053] ***Description of Configuration*** Fig. 11 is a diagram showing a configuration example of an ontology building system 90 according to embodiment 2. Compared with the ontology building device 1 according to embodiment 1, the ontology building device 1 according to embodiment 2 further includes a supplemental triple acquisition unit 16.
[0054] The supplemental triple acquisition unit 16 has a function of acquiring background knowledge corresponding to each node in the triple D2 as information supplementing the triple D2 extracted by the triple extraction unit 11. In this case, the supplemental triple acquisition unit 16 may utilize each triple D2 and each supplemental triple D7 stored in the triple storage unit 21 to prevent spelling variations. That is, the supplemental triple acquisition unit 16 acquires background knowledge regarding the type of each node from an information source different from the input text D1, normalizes each background knowledge based on each triple D2 to prevent spelling variations, and includes each normalized background knowledge as each triple D2 in the triple group. The background knowledge corresponding to each node is, for example, information indicating the characteristics of each node, such as the definition, interpretation, or explanation of each node.
[0055] ***Explanation of Operation*** Fig. 12 is a flowchart showing an example of the operation of the ontology building device 1. This operation will be explained using Fig. 12.
[0056] (Step S201) First, the supplemental triple acquisition unit 16 acquires triple D2 from the triple storage unit 21. Next, for each node present in triple D2, the supplemental triple acquisition unit 16 queries the language model 3 to generate a supplemental triple D7 corresponding to each node. Note that the method for acquiring the supplemental triple D7 is not limited to a method using the language model 3, and a method using an existing ontology such as ConceptNet may also be used. Next, the supplemental triple acquisition unit 16 stores the results of the query to the language model 3 in the triple storage unit 21. Note that the supplemental triple acquisition unit 16 acquires previously acquired supplemental triples D7 from the triple storage unit 21 in order to normalize the content of the supplemental triple D7 to be acquired.
[0057] A specific example of processing by the supplemental triple acquisition unit 16 is shown below. As a specific example, the supplemental triple acquisition unit 16 first acquires {air conditioner, maintain, comfortable space} as triple D2 from the triple storage unit 21. Next, the supplemental triple acquisition unit 16 creates a prompt saying, "Please output the definition of the following word in triple format: air conditioner" as a question to be queried to the language model 3. Next, the supplemental triple acquisition unit 16 receives a supplemental triple D7, {air conditioner, requires, power}, as shown in FIG. 13 as a result of the query to the language model 3, and stores the supplemental triple D7 in the triple storage unit 21. Thereafter, when the supplemental triple acquisition unit 16 acquires {rice cooker, cook, rice} as triple D2, it creates a prompt using the previously acquired supplemental triple D7 to prevent spelling variations, such as the prompt saying, "Please output the definition of the following word in triple format: rice cooker; in order to prevent spelling variations in the property, please do not use different expressions with similar meanings to the following property: requires" as a question to be queried to the language model 3. By utilizing supplementary triples D7 previously acquired in this way, the supplementary triple acquisition unit 16 prevents the generation of supplementary triples D7 that include properties that have a similar meaning to "require" but are expressed differently, such as {rice cooker, require, power}.
[0058] ***Explanation of Effect of Embodiment 2*** The ontology building device 1 according to embodiment 2 acquires background knowledge corresponding to a node from sources other than the input text D1. Therefore, according to embodiment 2, even if the input text D1 does not provide a sufficient explanation for the node, it is possible to build an ontology that captures the characteristics of the node in relatively detail. Furthermore, by normalizing properties, the ontology building device 1 according to embodiment 2 allows the cluster generation process to function relatively effectively, even if properties are acquired from sources other than the input text D1, which do not have a uniform expression. Therefore, according to embodiment 2, the quality of the output ontology is improved.
[0059] Embodiment 3. The following mainly describes the differences from the above-described embodiments, with reference to the drawings. The difference between embodiment 2 and embodiment 3 is that the content of the ontology to be finally output is controlled by taking into account the source of the property.
[0060] ***Description of Configuration*** Fig. 14 is a diagram showing a configuration example of an ontology building system 90 according to embodiment 3. Compared with the ontology building device 1 according to embodiment 2, the ontology building device 1 according to embodiment 3 further includes a cluster selection unit 17 and a selection information storage unit 25.
[0061] The cluster selection unit 17 has a function of determining whether each cluster D3 generated by the cluster generation unit 12 is a target for ontology creation. That is, the cluster selection unit 17 selects whether each cluster D3 is a target for ontology creation depending on whether the source of each element of the second property set indicated by each cluster D3 is the input sentence D1. Note that each of the triple D2 and the supplemental triple D7 according to the third embodiment further indicates the source of the property. The source is either the input sentence D1 or the language model 3. The cluster selection unit 17 refers to the source of the property indicated by each of the triple D2 and the supplemental triple D7. The selection information storage unit 25 stores selection information D8. The selection information D8 is information indicating the result of the determination made by the cluster selection unit 17 as to whether each cluster D3 is a target for ontology creation.
[0062] With the addition of the cluster selection unit 17, the graph creation unit 15 according to the third embodiment further acquires selection information D8 from the selection information storage unit 25. When converting the data acquired from each storage unit into a graph format, the graph creation unit 15 refers to the selection information D8 and performs processing only on the clusters that are the targets of ontology generation.
[0063] ***Explanation of Operation*** Fig. 15 is a flowchart showing an example of the operation of the ontology building device 1. This operation will be explained using Fig. 15.
[0064] (Step S301) First, the cluster selection unit 17 acquires each triple D2 and each supplemental triple D7 from the triple storage unit 21, each cluster D3 from the cluster storage unit 22, and each inheritance relationship D4 from the inheritance relationship storage unit 23. Next, if two clusters D3 have one or more common nodes but no inheritance relationship, the cluster selection unit 17 determines that each cluster D3 that includes a property extracted from the input text D1 is a target for ontology creation. In this case, the cluster selection unit 17 also determines that each cluster D3 that does not include a property extracted from the input text D1 is not a target for ontology creation. Then, the cluster selection unit 17 stores selection information D8 in the selection information storage unit 25, indicating the result of determining whether each cluster D3 is a target for ontology creation.
[0065] FIG. 16 shows a specific example of processing by the cluster selection unit 17. As a specific example, the cluster selection unit 17 first acquires two clusters D3: a cluster D3 having a node set {air conditioner, rice cooker} and a cluster D3 having a node set {air conditioner, user}. Here, the term "air conditioner" is common between these node sets. The cluster selection unit 17 also checks whether there is an inheritance relationship between the two clusters D3 by referring to the inheritance relationship D4. Since there is no inheritance relationship between the two clusters D3, the cluster selection unit 17 targets each element of the property set associated with each cluster D3 and checks the source of each element by referring to either the triple D2 or the supplementary triple D7 corresponding to each element. Next, the cluster selection unit 17 determines that the cluster D3 including the property "report" is the target for ontology creation because the source corresponding to the property "report" is the input sentence D1. Furthermore, the cluster selection unit 17 determines that cluster D3 including the property "needs" is not a target for ontology creation because the acquisition source corresponding to the property "needs" is language model 3. Thereafter, the cluster selection unit 17 stores each determination result as selection information D8 in the selection information storage unit 25.
[0066] ***Explanation of Effect of Embodiment 3*** Properties generated by the language model 3 are information indicating general definitions or interpretations of nodes. Therefore, clusters including many properties generated by the language model 3 tend to have nodes organized from a general perspective, like an encyclopedia. When there is no inheritance relationship between multiple clusters D3 that share one or more common nodes, i.e., when there are multiple classifications for a node, the ontology building device 1 according to embodiment 3 prioritizes, as an ontology target, a cluster D3 that includes a property obtained from the input text D1. Therefore, according to embodiment 3, it is possible to reduce the possibility of ambiguous node definitions and to output an ontology that emphasizes the context of the input text D1.
[0067] Fourth Embodiment The following mainly describes the differences from the above-described embodiments with reference to the drawings. In the fourth embodiment, characteristic properties and nodes associated with the target node are taken into consideration in the representative word determination process.
[0068] ***Description of Configuration*** FIG. 17 is a diagram showing an example of the configuration of an ontology building system 90 according to the fourth embodiment.
[0069] The target word determination unit 14 according to the fourth embodiment acquires a triple D2 from the triple storage unit 21, and an inheritance relationship D4 from the inheritance relationship storage unit 23. Thereafter, when querying the language model 3 for a target word D5, the target word determination unit 14 creates a prompt taking into consideration characteristic properties and nodes linked to the cluster D3 to be processed. That is, the target word determination unit 14 determines a target word D5 corresponding to the node set indicated by each cluster D3 according to at least one of the characteristics of the elements in the node set indicated by each cluster D3 and the characteristics of the elements in the second property set indicated by each cluster D3.
[0070] ***Explanation of Operation*** The following describes the differences between the processing of the target word determination unit 14 according to the first embodiment and the processing of the target word determination unit 14 according to the fourth embodiment.
[0071] (Step S104) A specific example of processing by the target word determination unit 14 is shown in FIG. 18. First, the target word determination unit 14 obtains, as an acquired cluster, each cluster D3 having at least one of the node sets {air conditioner, rice cooker} from the cluster storage unit 22. Next, the target word determination unit 14 compares the property set of the acquired cluster with the property set of cluster D3 that has an inheritance relationship with the acquired cluster, and finds a unique property {install} in the acquired cluster. Next, the target word determination unit 14 references each triple D2 and finds the node "house" linked to "air conditioner," "rice cooker," and "install." Next, the target word determination unit 14 creates a query to be sent to the language model 3, taking into account the characteristic properties and nodes. Specifically, the target word determination unit 14 creates a prompt as a query to be sent to the language model 3: "Please tell me the generic name of the following words, taking into account the characteristics of 'install' and 'house': air conditioner, rice cooker."
[0072] ***Explanation of Effect of Embodiment 4*** The ontology building device 1 according to Embodiment 4 takes into account characteristic properties and nodes linked to the node being processed in the target word determination process. Therefore, the generated target word D5 is a more specific and more restrictive word. Therefore, according to Embodiment 4, a target word D5 that reflects the context can be obtained, and it is possible to prevent a word that jumps out of context from being determined as the target word D5, thereby improving the quality of the ontology that is ultimately output.
[0073] Fifth Embodiment Hereinafter, differences from the above-described embodiments will be mainly described with reference to the drawings. The fifth embodiment differs from the first embodiment in that each cluster D3 is generated taking into account general-purpose properties.
[0074] ***Description of Configuration*** FIG. 19 is a diagram showing an example of the configuration of an ontology building system 90 according to the fifth embodiment.
[0075] The cluster generating unit 12 according to the fifth embodiment acquires the versatility threshold D9 from the input device 2 and performs clustering based on the versatility threshold D9. That is, the cluster generating unit 12 calculates the versatility of each property type included in each first property set based on at least one of each first property set and the type of node corresponding to each first property set. Then, the cluster generating unit 12 determines whether to generate a cluster D3 including each property type based on the versatility of the corresponding property type and the versatility threshold D9 for each property type. The versatility threshold D9 is a threshold related to versatility.
[0076] ***Explanation of Operation*** The following describes the differences between the processing of the cluster generation unit 12 according to the first embodiment and the processing of the cluster generation unit 12 according to the fifth embodiment.
[0077] (Step S122) After grouping the properties by node, the cluster generation unit 12 counts the number of types of nodes linked to each property. In the example shown in Fig. 20, three types of nodes ("air conditioner," "rice cooker," and "escalator") are linked to the property "develop," and two types of nodes ("air conditioner" and "rice cooker") are linked to the property "operate." Therefore, the number of types of nodes linked to the property "develop" is three, and the number of types of nodes linked to the property "operate" is two.
[0078] (Step S126) When grouping nodes by common property pattern, the cluster generating unit 12 excludes properties for which the number of types of corresponding nodes is equal to or greater than the generality threshold D9 from clustering. The number of types of corresponding nodes is the number of types counted in step S122. In the example shown in FIG. 20 , when the generality threshold D9 is 3, the cluster generating unit 12 excludes the property "develop" from clustering because the number of types of nodes corresponding to the property "develop" is 3, i.e., the number of types of nodes corresponding to the property "develop" is equal to or greater than the generality threshold D9. On the other hand, in this case, the cluster generating unit 12 excludes the property "operate" from clustering because the number of types of nodes corresponding to the property "operate" is 2, i.e., the number of types of nodes corresponding to the property "operate" is less than the generality threshold D9.
[0079] ***Explanation of Effect of Embodiment 5*** The ontology building device 1 according to Embodiment 5 generates cluster D3 taking into consideration general-purpose properties. Specifically, the ontology building device 1 performs clustering using only properties that more accurately represent the characteristics of each node and that have relatively high importance. Therefore, according to Embodiment 5, it is possible to reduce the possibility of clustering together semantically dissimilar nodes, thereby improving the quality of the ontology that is finally output.
[0080] Furthermore, by utilizing the generality threshold D9, it is possible to intentionally limit common properties that would otherwise exist between the clusters D3. Therefore, the generality threshold D9 can be used as a parameter for arbitrarily setting the level of abstraction of the ontology that is ultimately output, i.e., the degree of hierarchical structure. Therefore, according to the fifth embodiment, by appropriately utilizing the generality threshold D9, it is possible to arbitrarily set the degree of hierarchical structure.
[0081] ***Other Configurations*** <Variation 3> As a cluster generation method that takes into account general properties, the cluster generation unit 12 may adopt a method that takes into account the number of types of common properties (the number of elements in a property set). Specifically, in step S126, when grouping nodes, the cluster generation unit 12 may control the cluster generation process by using a generality threshold D9, which is a threshold related to the number of types of common properties. In the example shown in FIG. 21 , the property "develop" is common between the node "rice cooker" and the node "escalator," and the properties "operate" and "develop" are common between the node "air conditioner" and the node "rice cooker." Therefore, when the generality threshold D9 is 1, the cluster generation unit 12 does not generate a cluster consisting of the node "rice cooker" and the node "escalator" because the number of types of properties common between the node "rice cooker" and the node "escalator" is 1, i.e., the number of types of properties common between the node "rice cooker" and the node "escalator" is equal to or less than the generality threshold D9. On the other hand, in this case, the cluster generation unit 12 generates a cluster D3 consisting of the node "air conditioner" and the node "rice cooker" because the number of types of properties common between the node "air conditioner" and the node "rice cooker" is two, that is, the number of types of properties common between the node "air conditioner" and the node "rice cooker" is greater than the versatility threshold D9.
[0082] ***Other Embodiments*** The above-described embodiments can be freely combined, or any of the components of each embodiment can be modified, or any of the components can be omitted from each embodiment. Furthermore, the embodiments are not limited to those shown in embodiments 1 to 5, and various modifications are possible as needed. The procedures described using flowcharts, etc., can be modified as appropriate.
[0083] 1 Ontology construction device, 2 Input device, 3 Language model, 11 Triple extraction unit, 12 Cluster generation unit, 13 Inheritance relationship determination unit, 14 Representative word determination unit, 15 Graph creation unit, 16 Supplementary triple acquisition unit, 17 Cluster selection unit, 21 Triple storage unit, 22 Cluster storage unit, 23 Inheritance relationship storage unit, 24 Representative word storage unit, 25 Selection information storage unit, 51 Processor, 52 Memory, 53 Auxiliary storage device, 54 Input / output IF, 55 Communication device, 58 Processing circuit, 59 Signal line, 90 Ontology construction system, D1 Input sentence, D2 Triple, D3 Cluster, D4 Inheritance relationship, D5 Representative word, D6 Ontology, D7 Supplementary triple, D8 Selection information, D9 Generality threshold.
Claims
1. An ontology construction device comprising: a cluster generation unit that generates, for each type of node included in a group of triples consisting of each triple created by extracting facts described in an input document, a set of first property sets by aggregating the types of properties associated with the type of node; a cluster generation unit that generates, for each type of second property set consisting of one or more properties included in at least one of the first property sets, a cluster indicating each node set and a second property set corresponding to each node set, as each cluster of a plurality of clusters; and an inheritance relationship determination unit that determines, for each two clusters of the plurality of clusters, whether or not there is an overlap of one or more types of elements in the two node sets indicated by each of the two clusters, and whether or not there is an overlap of one or more types of elements in the two second property sets indicated by each of the two clusters.
2. The ontology construction device according to claim 1, further comprising a supplementary triple acquisition unit that acquires background knowledge about the type of each node from an information source different from the input sentence, normalizes each background knowledge based on each triple in order to prevent spelling variations, and includes each normalized background knowledge as a triple in the group of triples.
3. The ontology building device according to claim 2, further comprising a cluster selection unit that selects whether each cluster is a target for ontology creation depending on whether the source of each element of the second property set indicated by each cluster is the input sentence.
4. An ontology building device according to any one of claims 1 to 3, further comprising: a graph creation unit that creates a graph representing the ontology based on each triple, each cluster, and each inheritance relationship.
5. The ontology construction device according to claim 4, further comprising: a representative word determination unit that determines a representative word corresponding to a node set indicated by each cluster based on a language model and each element of the node set indicated by each cluster; and the graph creation unit further creates the graph based on each representative word.
6. An ontology building device as described in claim 5, wherein the representative word determination unit determines a representative word corresponding to the node set indicated by each cluster based on at least one of the characteristics of the elements of the node set indicated by each cluster and the characteristics of the elements of the second property set indicated by each cluster.
7. An ontology construction device according to any one of claims 1 to 6, wherein the cluster generation unit calculates the versatility of each property type included in each first property set based on at least one of each first property set and the type of node corresponding to each first property set, and determines whether or not to generate a cluster including each property type based on the versatility of the corresponding property type and a versatility threshold for each property type.
8. A method of constructing an ontology in which a computer creates first property sets by aggregating, for each node type included in a group of triples consisting of each triple created by extracting facts described in an input document, the types of properties associated with the node type; creates node sets by aggregating, for each type of second property set consisting of one or more properties included in at least one first property set, the types of nodes corresponding to the second property set; generates, for each cluster of a plurality of clusters, a cluster indicating each node set and a second property set corresponding to each node set; and determines, for each two clusters of the plurality of clusters, whether or not there is an overlap of one or more types of elements in the two node sets indicated by each of the two clusters, and whether or not there is an overlap of one or more types of elements in the two second property sets indicated by each of the two clusters.
9. An ontology building program that causes an ontology building device, which is a computer, to execute the following steps: creating each first property set by aggregating the types of properties associated with each node type included in a group of triples consisting of each triple created by extracting facts described in an input document; creating each node set by aggregating the types of nodes corresponding to each type of second property set consisting of one or more properties included in at least one first property set; a cluster generation process that generates, as each cluster of a plurality of clusters, a cluster indicating each node set and a second property set corresponding to each node set; and an inheritance relationship determination process that determines, for each two clusters of the plurality of clusters, whether or not there is an inheritance relationship between two clusters based on at least one of the presence or absence of overlap of one or more types of elements in the two node sets indicated by each of the two clusters and the presence or absence of overlap of one or more types of elements in the two second property sets indicated by each of the two clusters.
Citation Information
Patent Citations
Vocabulary hierarchical structure extraction method, device, and program
JP2008152324A
Document analysis system, document analysis method and program
JP2013137702A