WO2020108641A1 - 本体建立方法、装置及存储介质 - Google Patents
本体建立方法、装置及存储介质 Download PDFInfo
- Publication number
- WO2020108641A1 WO2020108641A1 PCT/CN2019/122159 CN2019122159W WO2020108641A1 WO 2020108641 A1 WO2020108641 A1 WO 2020108641A1 CN 2019122159 W CN2019122159 W CN 2019122159W WO 2020108641 A1 WO2020108641 A1 WO 2020108641A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- node
- degree
- words
- word
- type
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/36—Creation of semantic tools, e.g. ontology or thesauri
Definitions
- This application relates to the technical field of big data processing, and in particular to an ontology creation method, device, and storage medium.
- Ontology is a data structure, which is used to explain certain documents in a standard and standardized manner, so that these documents can be shared according to the ontology.
- the ontology includes multiple concepts and the conceptual relationship between two concepts that are related in multiple concepts, and the conceptual relationship is directional.
- the direction of the conceptual relationship is used to indicate the attribution relationship between the two concepts.
- creating an ontology for multiple documents describing umbrellas the ontology includes multiple concepts, such as umbrellas, utensils, umbrella handles, and so on.
- Embodiments of the present application provide an ontology creation method, device, and storage medium, which can improve the efficiency of ontology creation.
- the technical solution is as follows:
- a method for establishing an ontology includes:
- each multi-group includes two words of the first type and one word of the second type, the words of the first type refer to Words indicating the attributes of the object itself, the second type of words refers to words used to indicate the association relationship between different objects;
- an ontology for the at least one document is established.
- the determining two concepts corresponding to the two first-type words in each multi-group of the plurality of multi-groups, and the conceptual relationship corresponding to the second-type words in each multi-group include: :
- the reference database includes each of the multiple words
- the concepts represented by the words and the conceptual relationship between different concepts, the multi-group A is any one of the multi-groups;
- the searching for two concepts corresponding to the two first-class words in the multi-group A from the reference database includes:
- first-type word B of the two first-type words in the multi-group A determine words in the at least one document that have the same meaning as the first-type word B, and the first-type word B is Any one of the two first-class words;
- the concept corresponding to the word B of the first type is searched from the reference database.
- the method further includes:
- the method further includes:
- LDA Latent Dirichlet Allocation, latent Dirichlet distribution
- Target path Selecting a target path from the multiple paths according to the path lengths of the multiple paths, the target path including at least one conceptual relationship;
- the establishing an ontology for the at least one document according to the plurality of semantic relation data sets includes:
- a semantic relationship graph is established, a node in the semantic relationship graph corresponds to a concept in the multiple semantic relationship groups, and between two nodes in the semantic relationship graph Is the conceptual relationship between the corresponding two concepts, and the direction between the two nodes is the direction indicated by the conceptual relationship between the corresponding two concepts, each node is configured with Out Degree, and the in-degree of each node refers to the number of other nodes pointing to the corresponding node, and the out-degree of each node refers to the number of other nodes pointing to the corresponding node;
- the resulting semantic relationship graph is used as the ontology established for the at least one document.
- the cropping the first node includes:
- Determining at least one node in the semantic relationship graph, the document position of the concept corresponding to the at least one node in the at least one document and the word indicated by the concept corresponding to the first node The document positions in the at least one document are adjacent;
- the degree of connection between any two nodes is used to indicate the degree of association between the two nodes.
- the determining the node with the largest degree of connection with the first node among the at least one node includes:
- the first formula is:
- the Wi and the Wj are respectively two nodes for determining the degree of connection
- the Sim(Wi, Wj) is the similarity between the node Wi and the node Wj
- the Rel(Wi, Wj) Is the correlation between the node Wi and the node Wj
- the ⁇ and the ⁇ are the weighting coefficient configured for the similarity and the weighting coefficient configured for the correlation, respectively, the sum of the ⁇ and the ⁇ is 1 ;
- a node having the highest degree of connectivity with the first node among the at least one node is determined.
- the determining, according to the degree of connectivity determined according to the first formula, the node with the largest degree of connectivity with the first node among the at least one node includes:
- the maximum degree of connectivity determined according to the first formula after the update is less than the degree of connectivity threshold, then return to the step of adjusting the values of the ⁇ and the ⁇ until the determined maximum degree of connectivity is greater than Or equal to the connectivity threshold, and the node corresponding to the maximum connectivity determined last time is determined as the node with the largest connectivity among the at least one node and the first node.
- the method further includes:
- the isolated node is configured to point to one in the semantic relationship graph with an in-degree equal to 0 and an out-degree greater than 0 At the node, get the updated semantic relationship diagram;
- an operation of cropping any first node with an in-degree equal to 0 and an out-degree greater than 0 is performed.
- the determining multiple groups based on the at least one document includes:
- the plurality of multi-groups are determined according to the part of speech of each of the plurality of words and the document position of each word in the at least one document.
- an ontology building device comprising:
- An obtaining module configured to obtain at least one document used to build the ontology, and determine a plurality of multi-groups according to the at least one document, each multi-group includes two words of the first type and one word of the second type, Words refer to words used to indicate the attributes of the objects themselves, and the second type of words refer to words used to indicate the association between different objects;
- a determining module configured to determine two concepts respectively corresponding to two first-type words in each multi-group of the plurality of multi-groups, and a conceptual relationship corresponding to second-type words in each plurality of tuples, Use the determined two concepts to replace the corresponding two first-type words, and use the determined concept relations to replace the corresponding second-type words to obtain multiple semantic relationship data sets;
- the establishment module is used to establish an ontology for the at least one document according to the plurality of semantic relation data sets.
- the determination module includes:
- the first search unit is configured to search for two concepts corresponding to the two first-type words in the multi-group A from the reference database for the multi-group A in the multiple multi-groups, the reference database Including the concept represented by each word in multiple words and the conceptual relationship between different concepts, the multi-group A is any one of the multiple multi-groups;
- the second searching unit is configured to continue searching for the concept relationship corresponding to the second type of words in the multi-group A from the reference database according to the two concepts found.
- the first search unit is used to:
- the concept corresponding to the word B of the first type is searched from the reference database.
- the first search unit is also used to:
- the device further includes:
- the creating unit is configured to create a concept for the first-type word B through the LDA algorithm if the concept corresponding to the first-type word B is not found from the reference database.
- the second search unit is used to:
- Target path Selecting a target path from the multiple paths according to the path lengths of the multiple paths, the target path including at least one conceptual relationship;
- the establishment module includes:
- the establishment unit is configured to establish a semantic relationship graph according to the multiple semantic relationship data groups, a node in the semantic relationship map corresponds to a concept in the multiple semantic relationship groups, and two in the semantic relationship map
- the relationship between the two nodes is the conceptual relationship between the corresponding two concepts, and the direction between the two nodes is the direction indicated by the conceptual relationship between the corresponding two concepts, each node
- a cropping unit configured to crop any first node whose in-degree is equal to 0 and whose out-degree is greater than 0;
- a setting unit configured to cut all in-degrees in the semantic relation graph equal to 0 and out-degrees greater than 0 when all the first nodes with in-degrees equal to 0 and out-degrees greater than 0 are clipped
- the in-degree of the other nodes pointed by the first node is set to 0;
- the cropping unit is further configured to return to execute any first node with an in-degree equal to 0 and an out-degree greater than 0 for other nodes except the first node that has been cropped.
- the cropping unit is used to:
- Determining at least one node in the semantic relationship graph, the document position of the concept corresponding to the at least one node in the at least one document and the word indicated by the concept corresponding to the first node The document positions in the at least one document are adjacent;
- the degree of connection between any two nodes is used to indicate the degree of association between the two nodes.
- the cropping unit is also used to:
- the first formula is:
- the Wi and the Wj are respectively two nodes for determining the degree of connection
- the Sim(Wi, Wj) is the similarity between the node Wi and the node Wj
- the Rel(Wi, Wj) Is the correlation between the node Wi and the node Wj
- the ⁇ and the ⁇ are the weighting coefficient configured for the similarity and the weighting coefficient configured for the correlation, respectively, the sum of the ⁇ and the ⁇ is 1 ;
- a node having the highest degree of connectivity with the first node among the at least one node is determined.
- the cropping unit is also used to:
- the maximum degree of connectivity determined according to the first formula after the update is less than the degree of connectivity threshold, then return to the step of adjusting the values of the ⁇ and the ⁇ until the determined maximum degree of connectivity is greater than Or equal to the connectivity threshold, and the node corresponding to the maximum connectivity determined last time is determined as the node with the largest connectivity among the at least one node and the first node.
- the establishment module further includes:
- a configuration unit configured to configure the isolated node to point to the semantic relationship graph whose in-degree is equal to 0 and out if there is an isolated node with an in-degree equal to 0 and an out-degree equal to 0 At a node with a degree greater than 0, the updated semantic relationship graph is obtained;
- the cropping unit is also used to perform an operation of cropping any first node whose in-degree is equal to 0 and whose out-degree is greater than 0 based on the updated semantic relationship graph.
- the acquisition module includes:
- the word segmentation processing unit is used to perform word segmentation processing on each document in the at least one document to obtain multiple words
- a first determining unit configured to determine the part of speech of each of the plurality of words
- the second determining unit is configured to determine the plurality of multivariate groups based on the part of speech of each of the plurality of words and the document position of each word in the at least one document.
- an ontology building device comprising:
- Memory for storing processor executable instructions
- the processor is configured to perform the steps of any of the methods described in the first aspect above.
- a computer-readable storage medium having instructions stored on the computer-readable storage medium, which when executed by a processor implements the steps of any of the methods of the first aspect described above.
- a computer program product containing instructions, which when executed on a computer, causes the computer to perform the steps of any method described in the first aspect above.
- multiple multi-groups are determined according to the at least one document, multiple semantic relation data groups are determined according to the multiple multi-groups, and then multiple semantic relation data groups are established according to Ontology for at least one document.
- Ontology In the whole process of building ontology, no human participation is needed, which improves the efficiency of building ontology.
- FIG. 1 is a flowchart of an ontology establishment method provided by an embodiment of the present application
- FIG. 2 is a flowchart of a method for querying concepts and concept relationships provided by embodiments of the present application
- FIG. 3 is a schematic diagram of a conceptual diagram provided by an embodiment of the present application.
- FIG. 4 is a schematic diagram of an ontology building device provided by an embodiment of the present application.
- FIG. 5 is a schematic structural diagram of a terminal provided by an embodiment of the present application.
- FIG. 6 is a schematic structural diagram of a server provided by an embodiment of the present application.
- FIG. 1 is a flowchart of an ontology creation method provided by an embodiment of the present application. As shown in Figure 1, the method includes the following steps:
- Step 101 Obtain at least one document for building ontology, and determine a plurality of multi-groups according to the at least one document, each multi-group includes two words of the first type and one word of the second type, the words of the first type refer to Words indicating the attributes of the objects themselves, and words of the second type refer to words indicating the association relationship between different objects.
- each multi-group includes two words of the first type and one word of the second type.
- the words of the first type refer to words used to indicate the attributes of the object itself, such as nouns.
- the second type of words refers to words used to indicate the association between different objects, such as verbs.
- the words included in each multi-group are words in at least one document, which can ensure that the ontology created subsequently is obtained based on the information in at least one document, and the accuracy of the built ontology is improved.
- the ontology creation method provided by the embodiment of the present application may be executed by the terminal, and at this time, at least one document used for establishing the ontology may be previously input to the terminal by the administrator.
- the ontology creation method provided by the embodiment of the present application may also be executed by a server. At this time, at least one document used to establish the ontology may be uploaded to the server by the administrator in advance through the terminal.
- the embodiments of the present application are not limited herein.
- determining multiple multi-groups according to at least one document may be: performing word segmentation processing on each document in at least one document to obtain multiple words; determining the part of speech of each of the multiple words; according to The part-of-speech of each word in the plurality of words and the document position of each word in at least one document determine a plurality of plural groups.
- the word segmentation processing for at least one document may use the word segmentation method based on the forward maximum matching in the string matching, and of course, other word segmentation methods may also be used, which is not limited herein in the embodiments of the present application.
- each word may have different parts of speech
- multiple words can be divided according to the position of each word in the document to obtain multiple word sequences, for example, all words in a piece of text can be combined into one word sequence .
- the implementation of determining the part-of-speech of each word in the plurality of words may be: for any word sequence, according to the different part-of-speech corresponding to each word included in the word sequence, combining different parts-of-speech to obtain the A plurality of parts-of-speech sequences of a word sequence, and each part-of-speech sequence includes a part-of-speech corresponding to the words in the word sequence.
- the probability of each part-of-speech sequence in the multiple parts-of-speech sequences is judged by the evaluation function, the part-of-speech sequence with the highest probability is selected from the multiple parts-of-speech sequences, and the part-of-speech in the part-of-speech sequence with the highest probability is determined as the part-of-speech of the corresponding word.
- the multiple words after the word segmentation process are arranged in order of position in the document, the multiple words are determined based on the part of speech of each of the multiple words and the document position of each word in at least one document.
- the implementation of the multi-group can be: for any first type of words, find the second type of words after the first type and adjacent to the first type of words in multiple words, and then continue to search and sort in the After the second type of word and a word of the first type adjacent to the second type of word, combine these three words to get a multi-group.
- At least one document may have other parts-of-speech words, such as adverbs or prepositions, in addition to the first-type words and the second-type words, and these other parts-of-speech words do not contribute much to building the ontology, Therefore, before word segmentation processing is performed on each document in at least one document, at least one document may be further subjected to useless word filtering operation to filter out useless words in at least one document.
- other parts-of-speech words such as adverbs or prepositions
- step 101 may be performed by a computing model based on a distributed computing framework.
- at least one document is divided into different partitions, and the above step 101 may be executed in parallel between each partition, thereby increasing the speed of building the ontology.
- dividing at least one document into different partitions may refer to dividing each document into a partition, or may refer to dividing several adjacent paragraphs into a partition, or dividing a paragraph into a partition, this application is implemented Examples are not limited here.
- step 102 is performed in units of partitions, that is, each partition executes step 102 in parallel according to the documents classified into itself.
- Step 102 Determine the two concepts corresponding to the two first-type words in each multi-group and the conceptual relationship corresponding to the second-type words in each multi-group, and then determine the determined The two concepts respectively replace the corresponding two first-type words, and replace the determined concept relations with the corresponding second-type words to obtain multiple semantic relationship data sets.
- step 102 may be performed based on the reference database. That is, based on the reference database, the two concepts corresponding to the two first-type words in each multi-group and the conceptual relationship corresponding to the second-type words in each multiple tuple are determined.
- the following multiple Multi-element group A in multi-element group is used as an example to explain how to determine two concepts corresponding to two first-type words in a multi-element group, and the conceptual relationship corresponding to the second-type word in each multiple tuple.
- the multi-group A is any multi-group among the multi-groups.
- Step 1021 Find two concepts respectively corresponding to the two first-type words in the multi-group A from the reference database.
- the reference database includes the concepts represented by each word in the multiple words and the conceptual relationship between different concepts.
- the reference database may be a HowNet database.
- HowNet database is a concept that uses the concepts represented by Chinese and English words as a description object to reveal the relationship between concepts and concepts and the attributes of concepts.
- database HowNet database uses KDML (Knowledge database mark-up language, knowledge system description language), using a nested structure to describe concepts and attributes of concepts. That is to say, a complex concept is explained with a simpler concept, and a simpler concept is explained with a simpler concept until it can be expressed with a meaning source, which refers to the most basic unit that can express the meaning of a word.
- KDML Knowledge database mark-up language, knowledge system description language
- FIG. 3 is a schematic diagram of a conceptual diagram provided by an embodiment of the present application.
- facilities, domain ⁇ sports
- sports ⁇ , location ⁇ compete
- KDML expressed the meaning: the venue is a facility, the domain to which the facility belongs is the sports domain, the facility is the location of the game, and the facility is also the place to exercise ( Location). In other words, the stadium is a place for sports competitions and fitness exercises.
- a concept in the reference database may correspond to one word in at least one document, or may correspond to multiple words in at least one document.
- the words “rice bowl”, “career”, and “errand” are multiple words with similar meanings, and they represent the same concept. Therefore, to find two concepts corresponding to the two first-class words in the multi-group A from the reference database may be implemented as follows: for the first-class word B in the two first-class words in the multi-group A, determine At least one document that has the same meaning as the first-type word B; if there is no word in the at least one document that has the same meaning as the first-type word B, the first-type word B is found in the reference database. concept. Among them, the first-type word B is any one of the two first-type words in the multi-group A.
- At least one document has words with the same meaning as the first-type word B, determine the number of occurrences of the first-type word B and words with the same meaning as the first-type word B in at least one document; From the first type of word B, and words with the same meaning as the first type of word B, determine the word with the largest number of occurrences; find the concept corresponding to the word with the largest number of occurrences from the reference database, and use the found concept The concept corresponding to the first type of word B.
- the words with the same meaning as the first type of word B in the above implementation means: Words in the partition where the first type of word B is located have the same meaning as the first type of word B.
- the LDA Latent Dirichlet Allocation, latent Dirichlet distribution
- LDA algorithm is the first Category B creates a concept.
- LDA algorithm is an important model for text semantic analysis.
- the implementation of creating a concept for the first type of word B through the LDA algorithm can be: conceptually modeling all the words in the LDA list of the partition where the first type of word B is located to obtain a concept tree for the LDA list , Add the concept tree to the reference database, and then look up the concept corresponding to the first type of word B from the reference database, which is equivalent to creating a concept for the first type of word B.
- Step 1022 Based on the two concepts found, continue to search for the concept relationship corresponding to the second type of words in the multi-group A from the reference database.
- step 1022 may be: determining the found from the reference database Multiple paths are obtained from the path between the two concepts; according to the path length of the multiple paths, a target path is selected from the multiple paths, and the target path includes at least one concept relationship; from at least one concept relationship, select a multi-group The conceptual relationship with the highest similarity between the second-type words in A, and the selected conceptual relationship is determined as the conceptual relationship corresponding to the second-type words in the multi-group A.
- the implementation of selecting a target path from the multiple paths may be as follows: the path with the largest path length among the multiple paths is used as the target path.
- the target path may also be determined according to other principles, which is not limited herein.
- each semantic relation data group includes two concepts and the conceptual relationship between the two concepts, at least one The body of the document.
- Step 103 Create an ontology for at least one document according to multiple semantic relation data sets.
- each semantic relationship data group includes two concepts and the conceptual relationship between the two concepts
- the mesh structure data indicated by the multiple semantic relationship data groups can be directly targeted Ontology of at least one document.
- the same concept may exist between different partitions, resulting in bloated network structure data indicated by multiple semantic relation data groups, which is not conducive to other users from Query information in the mesh data indicated by multiple semantic relation data groups. Therefore, in the embodiment of the present application, the mesh structure data indicated by the multiple semantic relation data groups can also be tailored to improve the versatility of the established ontology.
- the implementation method of cutting the network structure data indicated by multiple semantic relationship data groups may be: according to multiple semantic relationship data groups, a semantic relationship graph is established, and a node in the semantic relationship graph corresponds to multiple semantic relationships A concept in the group, the relationship between two nodes in the semantic relationship diagram is the conceptual relationship between the corresponding two concepts, and the direction between the two nodes is the conceptual relationship between the corresponding two concepts
- each node is configured with an in-degree and an out-degree
- the in-degree of each node refers to the number of other nodes pointing to the node
- the out-degree of each node refers to the node The number of other nodes pointed to.
- the first node For any first node with an in-degree equal to 0 and an out-degree greater than 0, the first node is clipped; when all the first nodes with an in-degree equal to 0 and an out-degree greater than 0 are clipped on the semantic relationship graph , Set the in-degree of all nodes pointed to by nodes whose in-degree is equal to 0 and whose out-degree is greater than 0 in the semantic relationship graph to 0; for nodes other than the first node that has been clipped, return to execute Any first node whose in-degree is equal to 0 and whose out-degree is greater than 0, the step of trimming the first node until all nodes in the semantic relationship graph are traversed, and the resulting semantic relationship graph is taken as at least one The ontology created by the document.
- establishing a semantic relationship graph according to multiple semantic relationship data groups refers to correlating the concepts in the multiple semantic relationship data groups according to the conceptual relationship, and the resulting data system is called a semantic relationship graph.
- a breadth-first approach is used to traverse all the nodes in the semantic relationship graph.
- breadth first refers to processing first the nodes whose in-degree is equal to 0 and the out-degree is greater than 0, and then the nodes directly pointed by the nodes whose in-degree is equal to 0 and the out-degree is greater than 0.
- other traversal methods can also be used to traverse the nodes in the semantic relationship graph, such as the depth-first traversal method, which will not be described one by one in the embodiments of the present application.
- cropping the first node may be: determining at least one node in the semantic relationship graph, and the position of the word indicated by the concept corresponding to the at least one node in the document in at least one document The term indicated by the concept corresponding to the first node is adjacent to the document position in at least one document; determine the node with the highest degree of connection to the first node among the at least one node, delete and delete at least one node to determine Nodes other than the node, and delete the relationship between the other nodes and the first node.
- At least one node means that the word indicated by the corresponding concept and the word indicated by the concept corresponding to the first node are in the same partition.
- the degree of connection between any two nodes is used to indicate the degree of association between the two nodes.
- the node with the highest degree of connection with the first node is determined in at least one node May be implemented as follows: determining the degree of connectivity between each node in the at least one node and the first node based on the first formula, and determining the degree of connectivity between the first node and the first node according to the degree of connectivity determined according to the first formula The node with the highest degree of node connectivity.
- the first formula is:
- Wi and Wj are the two nodes used to determine the connection degree respectively
- Joint(Wi, Wj) represents the connection degree between the node Wi and the node Wj
- Sim(Wi, Wj) is the node Wi and the node Wj
- the similarity between Rel(Wi, Wj) is the correlation between the node Wi and the node Wj
- ⁇ and ⁇ are the weighting coefficients configured for the similarity and the weighting coefficients configured for the correlation
- ⁇ and ⁇ The sum is 1.
- the similarity between the node Wi and the node Wj can be determined by the length of the path between the node Wi and the node Wj in the semantic relationship graph, and the embodiments of the present application will not be described in detail here.
- the correlation between Wi and the node Wj may be determined by the number of occurrences of the word corresponding to the node Wi and the word corresponding to the node Wj in at least one document.
- the number of occurrences of the words corresponding to the node Wi and the words corresponding to the node Wj in at least one document refers to the words corresponding to the node Wi and the words corresponding to the node Wj
- the connection degree determination method provided in the embodiment of the present application can make the connection degree combine the word-sentence context and the similarity relationship contained in the reference database, thereby making the determined conceptual relationship more in line with the relationship between the two words relationship.
- the node with the highest connection degree can be directly determined.
- This implementation manner is simple to operate and easy to implement.
- the maximum connection does not meet the specified requirements, so that the maximum connection is directly determined according to the above implementation method
- the node may not be able to represent the node with the highest correlation with the first node.
- the maximum connectivity among the connectivity determined according to the first formula is less than the connectivity threshold, adjust the values of ⁇ and ⁇ to obtain the updated first formula; based on the updated first formula, determine at least The connection between each node in a node and the first node; if the maximum connection in the connection determined according to the updated first formula is less than the connection threshold, then return to the value of performing adjustment ⁇ and ⁇ Until the determined maximum connectivity is greater than or equal to the connectivity threshold, the node corresponding to the last determined maximum connectivity is determined as the node with the largest connectivity among the at least one node and the first node.
- the conceptual relationship corresponding to the second type of words in the multi-group A may be null, so there may be isolated nodes in the semantic relationship graph whose in-degree is equal to 0 and out-degree is also equal to 0. For these isolated nodes, these isolated nodes can be merged into other nodes first, and then the semantic relationship graph is clipped.
- multiple multi-groups are determined according to the at least one document, multiple semantic relation data groups are determined according to the multiple multi-groups, and then multiple semantic relation data groups are established according to Ontology for at least one document.
- Ontology In the whole process of building ontology, no human participation is needed, which improves the efficiency of building ontology.
- FIG. 4 is an ontology creation device provided by an embodiment of the present application. As shown in FIG. 4, the device 400 includes:
- the obtaining module 401 is used to obtain at least one document for establishing the ontology, and determine a plurality of multi-groups according to the at least one document, each multi-group includes two words of the first type and one word of the second type, the words of the first type Refers to the words used to describe the properties of the object itself, the second type of words refers to the words used to indicate the association between different objects;
- the determining module 402 is used to determine two concepts corresponding to the two first-type words in each multi-group and the concept relations corresponding to the second-type words in each multi-group, and Replace the determined two concepts with the corresponding two first-type words, and replace the determined concept relations with the corresponding second-type words to obtain multiple semantic relationship data sets;
- the establishment module 403 is used to establish an ontology for at least one document according to multiple semantic relation data sets.
- the determination module 402 includes:
- the first search unit is used to search for two concepts corresponding to the two first-class words in the multi-group A from the reference database for any multi-group A in the multi-group.
- the reference database refers to A database describing the concepts represented by each word in multiple words and the conceptual relationship between different concepts;
- the second searching unit is used to continue searching for the concept relationship corresponding to the second type of words in the multi-group A from the reference database according to the two concepts found.
- the first search unit is used to:
- the concept corresponding to the first-type word B is searched from the reference database.
- the first search unit is also used to:
- At least one document has a word with the same meaning as the first-type word B, determine the number of occurrences of the first-type word B and words with the same meaning as the first-type word B in at least one document;
- the device 400 further includes:
- a creating unit is used to create a concept for the first-type word B through the LDA algorithm if the concept corresponding to the first-type word B is not found from the reference database.
- the second search unit is used to:
- the target path includes at least one conceptual relationship
- the concept relationship with the greatest similarity between the second type words in the multi-group A is selected from the at least one concept relationship, and the selected concept relationship is determined as the concept relationship corresponding to the second type words in the multi-group A.
- the establishment module 403 includes:
- the establishment unit is used to establish a semantic relationship graph based on multiple semantic relationship data groups.
- a node in the semantic relationship map corresponds to a concept in the multiple semantic relationship groups.
- the relationship between the two nodes in the semantic relationship graph is The conceptual relationship between the corresponding two concepts, and the direction between the two nodes is the direction indicated by the conceptual relationship between the corresponding two concepts, each node is configured with an in-degree and out-degree, and each The in-degree of each node refers to the number of nodes pointing to each node, and the out-degree of each node refers to the number of nodes pointing to each node;
- the cropping unit is used to crop the first node for any first node whose in-degree is equal to 0 and whose out-degree is greater than 0;
- the setting unit is used to cut the nodes pointed to by all nodes whose in-degree is equal to 0 and whose out-degree is greater than 0 when all nodes with an in-degree equal to 0 and an out-degree greater than 0 are clipped
- the in-degree of the point is set to 0;
- the cropping unit is also used to perform the step of cropping the first node for any first node whose in-degree is equal to 0 and whose out-degree is greater than 0, except for the nodes that have been clipped, until After traversing all the nodes in the speech relationship graph, the resulting semantic relationship graph is used as the ontology established for at least one document.
- the cutting unit is used to:
- Identify the node with at least one node that has the highest degree of connectivity with the first node delete the other nodes except the determined node in at least one node, and delete the other nodes and the first node relationship.
- the cropping unit is also used for:
- the first formula is:
- Wi and Wj are the two nodes used to determine the connectivity
- Sim(Wi, Wj) is the similarity between the node Wi and the node Wj
- Rim(Wi, Wj) is the node Wi and the node Wj
- ⁇ and ⁇ are weighting coefficients configured for similarity and weighting coefficients configured for correlation, respectively, the sum of ⁇ and ⁇ is 1;
- the node with the highest degree of connectivity to the first node among at least one node is determined.
- the cropping unit is also used for:
- the maximum connectivity in the connectivity determined according to the updated first formula is less than the connectivity threshold, then return to the step of adjusting the values of ⁇ and ⁇ until the determined maximum connectivity is greater than or equal to the connectivity threshold, and the final The node corresponding to the maximum connectivity determined at a time is determined as the node with the largest connectivity to the first node among the at least one node.
- the establishment module further includes:
- the configuration unit is used to configure an isolated node to point to a node whose in-degree is equal to 0 and whose out-degree is greater than 0 in the semantic relationship graph if there is an isolated node with an in-degree equal to 0 and an out-degree equal to 0 Click to get the updated semantic relationship diagram;
- the cropping unit is also used to perform an operation of cropping the first node for any first node whose in-degree is equal to 0 and whose out-degree is greater than 0 based on the updated semantic relationship graph.
- the obtaining module 401 includes:
- the word segmentation processing unit is used to perform word segmentation processing on each document in at least one document to obtain multiple words
- the first determining unit is used to determine the part of speech of each of the multiple words
- the second determining unit is configured to determine a plurality of multi-groups based on the part of speech of each of the plurality of words and the document position of each word in at least one document.
- multiple multi-groups are determined according to the at least one document, multiple semantic relation data groups are determined according to the multiple multi-groups, and then multiple semantic relation data groups are established according to Ontology for at least one document.
- Ontology In the whole process of building ontology, no human participation is needed, which improves the efficiency of building ontology.
- the ontology building device provided in the above embodiments only uses the division of the above functional modules as an example to illustrate the creation of the ontology.
- the above functions can be allocated by different functional modules according to needs.
- the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
- the ontology building device and the ontology building method embodiment provided in the above embodiments belong to the same concept. For the implementation process, refer to the method embodiments, which will not be repeated here.
- FIG. 5 is a structural block diagram of a terminal 500 provided by an embodiment of the present application.
- the terminal 500 may be: a smart phone, a tablet computer, an MP3 player (Moving Pictures Experts Group Audio III), motion picture expert compression standard audio level 3), MP4 (Moving Pictures Experts Group Audio Audio Layer IV, motion picture expert compression standard audio Level 4) Player, laptop or desktop computer.
- the terminal 500 may also be called other names such as user equipment, portable terminal, laptop terminal, and desktop terminal.
- the terminal 500 includes a processor 501 and a memory 502.
- the processor 501 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so on.
- the processor 501 may adopt at least one hardware form of DSP (Digital Signal Processing, digital signal processing), FPGA (Field-Programmable Gate Array), PLA (Programmable Logic Array). achieve.
- the processor 501 may also include a main processor and a coprocessor.
- the main processor is a processor for processing data in a wake-up state, also known as a CPU (Central Processing Unit, central processor); the coprocessor is A low-power processor for processing data in the standby state.
- the processor 501 may be integrated with a GPU (Graphics Processing Unit, image processor), and the GPU is used to render and draw content that needs to be displayed on the display screen.
- the processor 501 may further include an AI (Artificial Intelligence, artificial intelligence) processor, which is used to process computing operations related to machine learning.
- AI Artificial Intelligence, artificial intelligence
- the memory 502 may include one or more computer-readable storage media, which may be non-transitory.
- the memory 502 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices.
- the non-transitory computer-readable storage medium in the memory 502 is used to store at least one instruction that is executed by the processor 501 to implement the ontology establishment provided by the method embodiment in the present application method.
- the terminal 500 may optionally further include: a peripheral device interface 503 and at least one peripheral device.
- the processor 501, the memory 502 and the peripheral device interface 503 may be connected by a bus or a signal line.
- Each peripheral device may be connected to the peripheral device interface 503 through a bus, a signal line, or a circuit board.
- the peripheral device includes at least one of a radio frequency circuit 504, a touch display screen 505, a camera 506, an audio circuit 507, a positioning component 508, and a power supply 509.
- the peripheral device interface 503 may be used to connect at least one peripheral device related to I/O (Input/Output) to the processor 501 and the memory 502.
- the processor 501, the memory 502, and the peripheral device interface 503 are integrated on the same chip or circuit board; in some other embodiments, any one of the processor 501, the memory 502, and the peripheral device interface 503 or Both can be implemented on a separate chip or circuit board, which is not limited in this embodiment.
- the radio frequency circuit 504 is used to receive and transmit RF (Radio Frequency) signals, also called electromagnetic signals.
- the radio frequency circuit 504 communicates with a communication network and other communication devices through electromagnetic signals.
- the radio frequency circuit 504 converts the electrical signal into an electromagnetic signal for transmission, or converts the received electromagnetic signal into an electrical signal.
- the radio frequency circuit 504 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and so on.
- the radio frequency circuit 504 can communicate with other terminals through at least one wireless communication protocol.
- the wireless communication protocol includes but is not limited to: metropolitan area networks, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and/or WiFi (Wireless Fidelity, wireless fidelity) networks.
- the radio frequency circuit 504 may further include NFC (Near Field Communication) related circuits, which is not limited in this application.
- the display screen 505 is used to display UI (User Interface).
- the UI may include graphics, text, icons, video, and any combination thereof.
- the display screen 505 also has the ability to collect touch signals on or above the surface of the display screen 505.
- the touch signal can be input to the processor 501 as a control signal for processing.
- the display screen 505 can also be used to provide virtual buttons and/or virtual keyboards, also called soft buttons and/or soft keyboards.
- the display screen 505 there may be one display screen 505, which is provided with the front panel of the terminal 500; in other embodiments, there may be at least two display screens 505, which are respectively provided on different surfaces of the terminal 500 or have a folded design; In still other embodiments, the display screen 505 may be a flexible display screen, which is disposed on the curved surface or the folding surface of the terminal 500. Even, the display screen 505 can also be set as a non-rectangular irregular figure, that is, a special-shaped screen.
- the display screen 505 may be made of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode, organic light emitting diode) and other materials.
- the camera component 506 is used to collect images or videos.
- the camera assembly 506 includes a front camera and a rear camera.
- the front camera is set on the front panel of the terminal, and the rear camera is set on the back of the terminal.
- the camera assembly 506 may also include a flash.
- the flash can be a single-color flash or a dual-color flash. Dual color temperature flash refers to the combination of warm light flash and cold light flash, which can be used for light compensation at different color temperatures.
- the audio circuit 507 may include a microphone and a speaker.
- the microphone is used to collect sound waves of the user and the environment, and convert the sound waves into electrical signals and input them to the processor 501 for processing, or input them to the radio frequency circuit 504 to implement voice communication.
- the microphone can also be an array microphone or an omnidirectional acquisition microphone.
- the speaker is used to convert the electrical signal from the processor 501 or the radio frequency circuit 504 into sound waves.
- the speaker can be a traditional thin-film speaker or a piezoelectric ceramic speaker.
- the speaker When the speaker is a piezoelectric ceramic speaker, it can not only convert electrical signals into sound waves audible by humans, but also convert electrical signals into sound waves inaudible to humans for distance measurement and other purposes.
- the audio circuit 507 may also include a headphone jack.
- the positioning component 508 is used to locate the current geographic location of the terminal 500 to implement navigation or LBS (Location Based Service).
- the positioning component 508 may be a positioning component based on the GPS (Global Positioning System) of the United States, the Beidou system of China, the Grenas system of Russia, or the Galileo system of the European Union.
- the power supply 509 is used to supply power to various components in the terminal 500.
- the power source 509 may be alternating current, direct current, disposable batteries, or rechargeable batteries.
- the rechargeable battery may support wired charging or wireless charging.
- the rechargeable battery can also be used to support fast charging technology.
- the terminal 500 further includes one or more sensors 510.
- the one or more sensors 510 include, but are not limited to: an acceleration sensor 511, a gyro sensor 512, a pressure sensor 513, a fingerprint sensor 514, an optical sensor 515, and a proximity sensor 516.
- the acceleration sensor 511 can detect the magnitude of acceleration on the three coordinate axes of the coordinate system established with the terminal 500.
- the acceleration sensor 511 can be used to detect components of gravity acceleration on three coordinate axes.
- the processor 501 may control the touch display screen 505 to display the user interface in a landscape view or a portrait view according to the gravity acceleration signal collected by the acceleration sensor 511.
- the acceleration sensor 511 can also be used for game or user movement data collection.
- the gyro sensor 512 can detect the body direction and rotation angle of the terminal 500, and the gyro sensor 512 can cooperate with the acceleration sensor 511 to collect a 3D motion of the user on the terminal 500. Based on the data collected by the gyro sensor 512, the processor 501 can realize the following functions: motion sensing (such as changing the UI according to the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.
- the pressure sensor 513 may be disposed on the side frame of the terminal 500 and/or the lower layer of the touch display screen 505.
- the processor 501 can perform left-right hand recognition or shortcut operation according to the grip signal collected by the pressure sensor 513.
- the processor 501 controls the operability control on the UI interface according to the user's pressure operation on the touch display screen 505.
- the operability control includes at least one of a button control, a scroll bar control, an icon control, and a menu control.
- the fingerprint sensor 514 is used to collect the user's fingerprint, and the processor 501 identifies the user's identity according to the fingerprint collected by the fingerprint sensor 514, or the fingerprint sensor 514 identifies the user's identity based on the collected fingerprint. When the user's identity is recognized as a trusted identity, the processor 501 authorizes the user to perform related sensitive operations, including unlocking the screen, viewing encrypted information, downloading software, paying, and changing settings.
- the fingerprint sensor 514 may be provided on the front, back, or side of the terminal 500. When a physical button or manufacturer logo is provided on the terminal 500, the fingerprint sensor 514 may be integrated with the physical button or manufacturer logo.
- the optical sensor 515 is used to collect the ambient light intensity.
- the processor 501 can control the display brightness of the touch display 505 according to the ambient light intensity collected by the optical sensor 515. Exemplarily, when the ambient light intensity is high, the display brightness of the touch display screen 505 is increased; when the ambient light intensity is low, the display brightness of the touch display screen 505 is reduced.
- the processor 501 can also dynamically adjust the shooting parameters of the camera assembly 506 according to the ambient light intensity collected by the optical sensor 515.
- the proximity sensor 516 also called a distance sensor, is usually provided on the front panel of the terminal 500.
- the proximity sensor 516 is used to collect the distance between the user and the front of the terminal 500.
- the processor 501 controls the touch display 505 to switch from the bright screen state to the breathing screen state; when the proximity sensor 516 detects When the distance from the user to the front of the terminal 500 gradually becomes larger, the processor 501 controls the touch display 505 to switch from the breath-hold state to the bright-screen state.
- FIG. 5 does not constitute a limitation on the terminal 500, and may include more or fewer components than shown, or combine certain components, or adopt different component arrangements.
- Embodiments of the present application also provide a non-transitory computer-readable storage medium.
- the terminal can execute the ontology creation method provided in the foregoing embodiment.
- An embodiment of the present application also provides a computer program product containing instructions, which, when it runs on a terminal, causes the terminal to execute the ontology creation method provided in the foregoing embodiment.
- the server may be a server in a background server cluster.
- the server 600 includes a central processing unit (CPU) 601, a system memory 604 including a random access memory (RAM) 602 and a read-only memory (ROM) 603, and a system bus 605 connecting the system memory 604 and the central processing unit 601.
- the server 600 also includes a basic input/output system (I/O system) 606 that helps transfer information between various devices in the computer, and a mass storage device 607 for storing the operating system 613, application programs 614, and other program modules 615 .
- I/O system basic input/output system
- the basic input/output system 606 includes a display 608 for displaying information and an input device 609 for a user to input information, such as a mouse and a keyboard.
- the display 608 and the input device 609 are both connected to the central processing unit 601 through the input and output controller 610 connected to the system bus 605.
- the basic input/output system 606 may also include an input-output controller 610 for receiving and processing input from a number of other devices such as a keyboard, mouse, or electronic stylus.
- the input output controller 610 also provides output to a display screen, printer, or other type of output device.
- the mass storage device 607 is connected to the central processing unit 601 through a mass storage controller (not shown) connected to the system bus 605.
- the mass storage device 607 and its associated computer-readable medium provide non-volatile storage for the server 600. That is, the mass storage device 607 may include a computer-readable medium (not shown) such as a hard disk or CD-ROM drive.
- Computer-readable media may include computer storage media and communication media.
- Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data.
- Computer storage media include RAM, ROM, EPROM, EEPROM, flash memory, or other solid-state storage technologies, CD-ROM, DVD, or other optical storage, tape cassettes, magnetic tape, magnetic disk storage, or other magnetic storage devices.
- RAM random access memory
- ROM read-only memory
- EPROM Erasable programmable read-only memory
- EEPROM electrically erasable programmable read-only memory
- flash memory or other solid-state storage technologies
- CD-ROM, DVD or other optical storage
- tape cassettes magnetic tape
- magnetic disk storage or other magnetic storage devices.
- computer storage medium is not limited to the above types.
- the above-mentioned system memory 604 and mass storage device 607 may be collectively referred to as a memory.
- the server 600 may also be operated by a remote computer connected to the network through a network such as the Internet. That is, the server 600 can be connected to the network 612 through the network interface unit 611 connected to the system bus 605, or the network interface unit 611 can also be used to connect to other types of networks or remote computer systems (not shown).
- the above memory also includes one or more programs.
- One or more programs are stored in the memory and configured to be executed by the CPU.
- the one or more programs include instructions for performing the ontology creation method provided by the above embodiment.
- An embodiment of the present application further provides a non-transitory computer-readable storage medium, and when the instructions in the storage medium are executed by the processor of the server, the mobile server can execute the ontology creation method provided by the foregoing embodiment.
- An embodiment of the present application also provides a computer program product containing instructions, which, when it runs on a server, causes the server to execute the ontology creation method provided by the foregoing embodiment.
- the program may be stored in a computer-readable storage medium.
- the mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Machine Translation (AREA)
Abstract
Description
Claims (26)
- 一种本体建立方法,其特征在于,所述方法包括:获取用于建立本体的至少一个文档,根据所述至少一个文档确定多个多元组,每个多元组包括两个第一类词语和一个第二类词语,所述第一类词语是指用于指示对象自身属性的词语,所述第二类词语是指用于指示不同对象之间的关联关系的词语;确定所述多个多元组中每个多元组中的两个第一类词语分别对应的两个概念,以及每个多个元组中的第二类词语对应的概念关系,采用确定的两个概念分别替换对应的两个第一类词语,采用确定的概念关系替换对应的第二类词语,得到多个语义关系数据组;根据所述多个语义关系数据组,建立针对所述至少一个文档的本体。
- 如权利要求1所述的方法,其特征在于,所述确定所述多个多元组中每个多元组中的两个第一类词语分别对应的两个概念,以及每个多元组中的第二类词语对应的概念关系,包括:对于所述多个多元组中的多元组A,从参考数据库中查找与所述多元组A中的两个第一类词语分别对应的两个概念,所述参考数据库包括多个词语中每个词语对应的概念以及不同概念之间的概念关系,所述多元组A为所述多个多元组中任一个;根据查找到的两个概念,从所述参考数据库中继续查找与所述多元组A中的第二类词语对应的概念关系。
- 如权利要求2所述的方法,其特征在于,所述从参考数据库中查找所述多元组A中的两个第一类词语分别对应的两个概念,包括:对于所述多元组A中两个第一类词语中的第一类词语B,确定所述至少一个文档中词义与所述第一类词语B的词义相同的词语,所述第一类词语B为所述两个第一类词语中任一个;如果所述至少一个文档中不存在词义与所述第一类词语B的词义相同的词语,则从所述参考数据库中查找所述第一类词语B对应的概念。
- 如权利要求3所述的方法,其特征在于,所述确定所述至少一个文档中词义与所述第一类词语B的词义相同的词语之后,还包括:如果所述至少一个文档中存在词义与所述第一类词语B的词义相同的词语,则确定所述第一类词语B,以及词义与所述第一类词语B的词义相同的词语分别在所述至少一个文档中的出现次数;从所述第一类词语B,以及词义与所述第一类词语B的词义相同的词语中,确定出现次数最大的词语;从所述参考数据库中查找所述出现次数最大的词语对应的概念,将查找到的概念作为所述第一类词语B对应的概念。
- 如权利要求3或4所述的方法,其特征在于,所述方法还包括:如果没有从所述参考数据库中查找到所述第一类词语B对应的概念,则通过潜在狄利克雷分布LDA算法为所述第一类词语B创建一个概念。
- 如权利要求2所述的方法,其特征在于,所述根据查找到的两个概念,从所述参考数据库中继续查找与所述多元组A中的第二类词语对应的概念关系,包括:从所述参考数据库中确定所述查找到的两个概念之间的路径,得到多条路径;根据所述多条路径的路径长度,从所述多条路径中选择一条目标路径,所述目标路径中包括至少一个概念关系;从所述至少一个概念关系中选择与所述多元组A中的第二类词语之间相似度最大的概念关系,将选择的概念关系确定为与所述多元组A中的第二类词语对应的概念关系。
- 如权利要求1所述的方法,其特征在于,所述根据所述多个语义关系数据组,建立针对所述至少一个文档的本体,包括:根据所述多个语义关系数据组,建立语义关系图,所述语义关系图中的一个结点对应所述多个语义关系组中的一个概念,所述语义关系图中两个结点之间的关系为对应的两个概念之间的概念关系,且所述两个结点之间的方向为对 应的两个概念之间的概念关系所指示的方向,每个结点配置有入度和出度,且每个结点的入度是指指向相应结点的其他结点的数量,每个结点的出度是指相应结点指向的其他结点的数量;对于入度等于0且出度大于0的任一第一结点,对所述第一结点进行裁剪;当对所述语义关系图中所有入度等于0且出度大于0的第一结点均裁剪完时,将所述语义关系图中所有入度等于0且出度大于0的第一结点指向的其他结点的入度设置为0;对除已经裁剪的第一结点之外的其他结点,返回执行对于入度等于0且出度大于0的任一第一结点,对所述第一结点进行裁剪的步骤,直至遍历完所述语音关系图中的所有结点,将最终得到的语义关系图作为针对所述至少一个文档建立的本体。
- 如权利要求7所述的方法,其特征在于,所述对所述第一结点进行裁剪,包括:确定所述语义关系图中的至少一个结点,所述至少一个结点对应的概念所指示的词语在所述至少一个文档中的文档位置与所述第一结点对应的概念所指示的词语在所述至少一个文档中的文档位置相邻;确定所述至少一个结点中与所述第一结点连接度最大的结点,删除所述至少一个结点中除确定出的结点之外的其他结点,以及所述其他结点与所述第一结点之间的关系,任意两个结点之间的连接度用于指示所述两个结点之间的关联程度。
- 如权利要求9所述的方法,其特征在于,所述根据按照所述第一公式确定的连接度,确定所述至少一个结点中与所述第一结点连接度最大的结点,包括:如果按照所述第一公式确定的连接度中的最大连接度小于连接度阈值,则调整所述α和所述β的数值,得到更新之后的第一公式;基于更新之后的第一公式确定所述至少一个结点中每个结点与所述第一结点之间的连接度;如果按照所述更新之后的第一公式确定的连接度中的最大连接度小于所述连接度阈值,则返回执行调整所述α和所述β的数值的步骤,直至确定出的最大连接度大于或等于所述连接度阈值,将最后一次确定出的最大连接度对应的结点确定为所述至少一个结点中与所述第一结点连接度最大的结点。
- 如权利要求7所述的方法,其特征在于,所述对于入度等于0且出度大于0的任一第一结点,对所述第一结点进行裁剪之前,还包括:如果所述语义关系图中存在入度等于0且出度也等于0的孤立结点,将所述孤立结点配置为指向所述语义关系图中的入度等于0且出度大于0的一个结点上,得到更新之后的语义关系图;基于更新之后的语义关系图,执行对于入度等于0且出度大于0的任一第一结点,对所述第一结点进行裁剪的操作。
- 如权利要求1所述的方法,其特征在于,所述根据所述至少一个文档确定多个多元组,包括:对所述至少一个文档中每个文档进行分词处理,得到多个词语;确定所述多个词语中每个词语的词性;根据所述多个词语中每个词语的词性和每个词语在所述至少一个文档中的文档位置,确定所述多个多元组。
- 一种本体建立装置,其特征在于,所述装置包括:获取模块,用于获取用于建立本体的至少一个文档,根据所述至少一个文档确定多个多元组,每个多元组包括两个第一类词语和一个第二类词语,所述第一类词语是指用于指示对象自身属性的词语,所述第二类词语是指用于指示不同对象之间的关联关系的词语;确定模块,用于确定所述多个多元组中每个多元组中的两个第一类词语分别对应的两个概念,以及每个多个元组中的第二类词语对应的概念关系,采用确定的两个概念分别替换对应的两个第一类词语,采用确定的概念关系替换对应的第二类词语,得到多个语义关系数据组;建立模块,用于根据所述多个语义关系数据组,建立针对所述至少一个文档的本体。
- 如权利要求13所述的装置,其特征在于,所述确定模块包括:第一查找单元,用于对于所述多个多元组中的多元组A,从参考数据库中查找与所述多元组A中的两个第一类词语分别对应的两个概念,所述参考数据库包括多个词语中每个词语所代表的概念以及不同概念之间的概念关系,所述多元组A为所述多个多元组中任一个;第二查找单元,用于根据查找到的两个概念,从所述参考数据库中继续查找与所述多元组A中的第二类词语对应的概念关系。
- 如权利要求14所述的装置,其特征在于,所述第一查找单元,用于:对于所述多元组A中两个第一类词语中的第一类词语B,确定所述至少一个文档中词义与所述第一类词语B的词义相同的词语,所述第一类词语B为所述两个第一类词语中任一个;如果所述至少一个文档中不存在词义与所述第一类词语B的词义相同的词语,则从所述参考数据库中查找所述第一类词语B对应的概念。
- 如权利要求15所述的装置,其特征在于,所述第一查找单元,还用于:如果所述至少一个文档中存在词义与所述第一类词语B的词义相同的词语, 则确定所述第一类词语B,以及词义与所述第一类词语B的词义相同的词语分别在所述至少一个文档中的出现次数;从所述第一类词语B,以及词义与所述第一类词语B的词义相同的词语中,确定出现次数最大的词语;从所述参考数据库中查找所述出现次数最大的词语对应的概念,并将查找到的概念作为所述第一类词语B对应的概念。
- 如权利要求15或16所述的装置,其特征在于,所述装置还包括:创建单元,用于如果没有从所述参考数据库中查找到所述第一类词语B对应的概念,则通过潜在狄利克雷分布LDA算法为所述第一类词语B创建一个概念。
- 如权利要求14所述的装置,其特征在于,所述第二查找单元,用于:从所述参考数据库中确定所述查找到的两个概念之间的路径,得到多条路径;根据所述多条路径的路径长度,从所述多条路径中选择一条目标路径,所述目标路径中包括至少一个概念关系;从所述至少一个概念关系中选择与所述多元组A中的第二类词语之间相似度最大的概念关系,将选择的概念关系确定为与所述多元组A中的第二类词语对应的概念关系。
- 如权利要求13所述的装置,其特征在于,所述建立模块包括:建立单元,用于根据所述多个语义关系数据组,建立语义关系图,所述语义关系图中的一个结点对应所述多个语义关系组中的一个概念,所述语义关系图中两个结点之间的关系为对应的两个概念之间的概念关系,且所述两个结点之间的方向为对应的两个概念之间的概念关系所指示的方向,每个结点配置有入度和出度,且每个结点的入度是指指向相应结点的其他结点的数量,每个结点的出度是指相应结点指向的其他结点的数量;裁剪单元,用于对于入度等于0且出度大于0的任一第一结点,对所述第一结点进行裁剪;设置单元,用于当对所述语义关系图中所有入度等于0且出度大于0的第一结点均裁剪完时,将所述语义关系图中所有入度等于0且出度大于0的第一结点指向的其他结点的入度设置为0;所述裁剪单元,还用于对除已经裁剪的第一结点之外的其他结点,返回执行对于入度等于0且出度大于0的任一第一结点,对所述第一结点进行裁剪的步骤,直至遍历完所述语音关系图中的所有结点,将最终得到的语义关系图作为针对所述至少一个文档建立的本体。
- 如权利要求19所述的装置,其特征在于,所述裁剪单元,用于:确定所述语义关系图中的至少一个结点,所述至少一个结点对应的概念所指示的词语在所述至少一个文档中的文档位置与所述第一结点对应的概念所指示的词语在所述至少一个文档中的文档位置相邻;确定所述至少一个结点中与所述第一结点连接度最大的结点,删除所述至少一个结点中除确定出的结点之外的其他结点,以及所述其他结点与所述第一结点之间的关系,任意两个结点之间的连接度用于指示所述两个结点之间的关联程度。
- 如权利要求21所述的装置,其特征在于,所述裁剪单元,还用于:如果按照所述第一公式确定的连接度中的最大连接度小于连接度阈值,则 调整所述α和所述β的数值,得到更新之后的第一公式;基于更新之后的第一公式确定所述至少一个结点中每个结点与所述第一结点之间的连接度;如果按照所述更新之后的第一公式确定的连接度中的最大连接度小于所述连接度阈值,则返回执行调整所述α和所述β的数值的步骤,直至确定出的最大连接度大于或等于所述连接度阈值,将最后一次确定出的最大连接度对应的结点确定为所述至少一个结点中与所述第一结点连接度最大的结点。
- 如权利要求19所述的装置,其特征在于,所述建立模块还包括:配置单元,用于如果所述语义关系图中存在入度等于0且出度也等于0的孤立结点,将所述孤立结点配置为指向所述语义关系图中的入度等于0且出度大于0的一个结点上,得到更新之后的语义关系图;所述裁剪单元,还用于基于更新之后的语义关系图,执行对于入度等于0且出度大于0的任一第一结点,对所述第一结点进行裁剪的操作。
- 如权利要求13所述的装置,其特征在于,所述获取模块包括:分词处理单元,用于对所述至少一个文档中每个文档进行分词处理,得到多个词语;第一确定单元,用于确定所述多个词语中每个词语的词性;第二确定单元,用于根据所述多个词语中每个词语的词性和每个词语在所述至少一个文档中的文档位置,确定所述多个多元组。
- 一种本体建立装置,其特征在于,所述装置包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为执行上述权利要求1至权利要求12中的任一项权利要求所述的方法的步骤。
- 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有指令,所述指令被处理器执行时实现上述权利要求1至权利要求12中的 任一项权利要求所述的方法的步骤。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201811459195.0 | 2018-11-30 | ||
| CN201811459195.0A CN111259161B (zh) | 2018-11-30 | 2018-11-30 | 本体建立方法、装置及存储介质 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2020108641A1 true WO2020108641A1 (zh) | 2020-06-04 |
Family
ID=70852655
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2019/122159 Ceased WO2020108641A1 (zh) | 2018-11-30 | 2019-11-29 | 本体建立方法、装置及存储介质 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN111259161B (zh) |
| WO (1) | WO2020108641A1 (zh) |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20040054672A1 (en) * | 2002-09-03 | 2004-03-18 | International Business Machines Corporation | Information search support system, application server, information search method, and program product |
| CN101681353A (zh) * | 2007-03-30 | 2010-03-24 | 纽科股份有限公司 | 用于知识导航和发现的数据结构、系统和方法 |
| CN101710343A (zh) * | 2009-12-11 | 2010-05-19 | 北京中机科海科技发展有限公司 | 一种基于文本挖掘的本体自动构建系统及方法 |
| CN103207856A (zh) * | 2013-04-03 | 2013-07-17 | 同济大学 | 一种本体概念及层次关系生成方法 |
| CN106445990A (zh) * | 2016-06-25 | 2017-02-22 | 上海大学 | 事件本体构建方法 |
| CN108491385A (zh) * | 2018-03-16 | 2018-09-04 | 广西师范大学 | 一种基于依存关系的教学领域本体自动生成方法与装置 |
-
2018
- 2018-11-30 CN CN201811459195.0A patent/CN111259161B/zh active Active
-
2019
- 2019-11-29 WO PCT/CN2019/122159 patent/WO2020108641A1/zh not_active Ceased
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20040054672A1 (en) * | 2002-09-03 | 2004-03-18 | International Business Machines Corporation | Information search support system, application server, information search method, and program product |
| CN101681353A (zh) * | 2007-03-30 | 2010-03-24 | 纽科股份有限公司 | 用于知识导航和发现的数据结构、系统和方法 |
| CN101710343A (zh) * | 2009-12-11 | 2010-05-19 | 北京中机科海科技发展有限公司 | 一种基于文本挖掘的本体自动构建系统及方法 |
| CN103207856A (zh) * | 2013-04-03 | 2013-07-17 | 同济大学 | 一种本体概念及层次关系生成方法 |
| CN106445990A (zh) * | 2016-06-25 | 2017-02-22 | 上海大学 | 事件本体构建方法 |
| CN108491385A (zh) * | 2018-03-16 | 2018-09-04 | 广西师范大学 | 一种基于依存关系的教学领域本体自动生成方法与装置 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN111259161B (zh) | 2022-02-08 |
| CN111259161A (zh) | 2020-06-09 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN109918669B (zh) | 实体确定方法、装置及存储介质 | |
| WO2020224222A1 (zh) | 目标群组检测方法、装置、计算机设备及存储介质 | |
| CN110807325B (zh) | 谓词识别方法、装置及存储介质 | |
| CN113222771B (zh) | 一种基于知识图谱确定目标群体的方法、装置及电子设备 | |
| CN113569042B (zh) | 文本信息分类方法、装置、计算机设备及存储介质 | |
| CN110837557B (zh) | 摘要生成方法、装置、设备及介质 | |
| CN114706846B (zh) | 查询数据的方法、装置、设备及存储介质 | |
| WO2022057435A1 (zh) | 基于搜索的问答方法及存储介质 | |
| CN111061803A (zh) | 任务处理方法、装置、设备及存储介质 | |
| CN111324699A (zh) | 语义匹配的方法、装置、电子设备及存储介质 | |
| CN113032587B (zh) | 多媒体信息推荐方法、系统、装置、终端和服务器 | |
| CN109917988B (zh) | 选中内容显示方法、装置、终端及计算机可读存储介质 | |
| CN109902089B (zh) | 利用异构索引的查询方法、装置、电子设备及介质 | |
| CN111475611B (zh) | 词典管理方法、装置、计算机设备及存储介质 | |
| CN113783909B (zh) | 数据需求的生成方法、装置、终端、服务器及存储介质 | |
| WO2021218634A1 (zh) | 内容推送 | |
| CN114283049B (zh) | 图像处理方法、装置、计算机设备及存储介质 | |
| CN113704448B (zh) | 模型训练方法、文本推送方法、装置、计算机设备及介质 | |
| CN111597823A (zh) | 中心词提取方法、装置、设备及存储介质 | |
| CN112000900A (zh) | 推荐景点信息的方法、装置、电子设备及存储介质 | |
| CN113947687B (zh) | 档案生成方法、装置及存储介质 | |
| CN111984738A (zh) | 数据关联方法、装置、设备及存储介质 | |
| WO2020108641A1 (zh) | 本体建立方法、装置及存储介质 | |
| CN117591746A (zh) | 资源推荐方法、装置、计算机设备及存储介质 | |
| CN109918566B (zh) | 查询方法、装置、电子设备及介质 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 19891189 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 19891189 Country of ref document: EP Kind code of ref document: A1 |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 19891189 Country of ref document: EP Kind code of ref document: A1 |
|
| 32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 01.12.2021) |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 19891189 Country of ref document: EP Kind code of ref document: A1 |