WO2020001373A1 - 一种本体构建方法及装置 - Google Patents

一种本体构建方法及装置 Download PDF

Info

Publication number
WO2020001373A1
WO2020001373A1 PCT/CN2019/092170 CN2019092170W WO2020001373A1 WO 2020001373 A1 WO2020001373 A1 WO 2020001373A1 CN 2019092170 W CN2019092170 W CN 2019092170W WO 2020001373 A1 WO2020001373 A1 WO 2020001373A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
event
word
entity
ontology
Prior art date
Application number
PCT/CN2019/092170
Other languages
English (en)
French (fr)
Inventor
展丽霞
邵勇
王圣
Original Assignee
杭州海康威视数字技术股份有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 杭州海康威视数字技术股份有限公司 filed Critical 杭州海康威视数字技术股份有限公司
Publication of WO2020001373A1 publication Critical patent/WO2020001373A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/237Lexical tools
    • G06F40/242Dictionaries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/268Morphological analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities

Definitions

  • the present application relates to the field of computer application technology, and in particular, to a method and a device for constructing an ontology.
  • Ontology is a clear formal specification of a shared conceptual model. In simple terms, ontology is an accurate mathematical description of some conceptual models. This description can be used as a consensus between users to provide users with more intelligent knowledge. Atlas.
  • Ontology can include entities, events, and relationships.
  • entities refer to concepts with recognized meanings, such as names of people, places, etc.
  • Events refer to events that occur in a particular space-time, are participated by several objects, and exhibit certain characteristics
  • One thing usually includes event elements such as event participants, time of occurrence, means of occurrence, place of occurrence, etc.
  • Relationship refers to the relationship between entities and entities, such as the employment relationship between people.
  • Ontologies constructed by existing solutions include entities, events, and relationships between entities.
  • This application provides a method for constructing an ontology, which makes the ontology constructed more complete.
  • An embodiment of the present application provides a method for constructing an ontology.
  • the method includes:
  • Extracting entity data and event data from the text data to be processed Extracting entity data and event data from the text data to be processed
  • the extracting entity data from the text data to be processed includes:
  • determining the part of speech of the word by corpus marking the word includes:
  • the transition probability, state probability, and feature weight of the word are obtained from the feature template library obtained in advance; according to the transition probability, state probability, and feature weight, the probability of the word being a different part of speech is calculated respectively; The part of speech that satisfies the preset first probability condition is used as the part of speech of the word.
  • the extracting event data from the text data to be processed includes:
  • Candidate event data is identified from the to-be-processed text data; wherein the candidate event data includes one or more of the following: an event occurrence time, a participant, an event evolution state, an event occurrence environment, and an event occurrence condition;
  • the identified candidate event data is filtered according to a preset event extraction rule, and the filtered candidate event data is used as event data.
  • predicting an entity relationship between the entity data based on the text data to be processed includes:
  • an output result obtained includes an initial probability vector, a transition matrix, and a state matrix of a syntax component of each word in the first sample data;
  • the use of the pre-trained syntactic structure model to mark the syntactic component of each word in the text data to be processed includes:
  • the method before predicting the semantic role of each word by using a semantic role labeling model obtained in advance according to the syntactic component of each word marked, the method further includes:
  • the semantic role labeling model obtained in advance is used to predict the semantic role of each word.
  • the predicting the semantic role of each word by using a semantic role labeling model obtained in advance according to the syntactic component of each word marked includes:
  • analysis processing includes one or more of the following: word segmentation processing, part-of-speech tagging processing, and syntax analysis processing;
  • deletion rule delete the data that will not be used as a semantic role in the analyzed second sample data to obtain training data
  • a preset second training model is trained to obtain a semantic role labeling model.
  • the performing semantic analysis on the event data and generating an event system network composed of event relationships between the event data based on the analysis results includes:
  • the performing semantic analysis on the event data and constructing an event occurrence sequence based on the analysis result includes:
  • For each event data perform semantic reference resolution on the event data to determine the semantics of the event data
  • the occurrence order of each event data is determined, and the event occurrence sequence is constructed according to the occurrence order.
  • determining a semantic relationship between event data based on the event occurrence sequence, and generating an event system network composed of event relationships between the event data includes:
  • An event relationship between the event data is determined according to an event transition probability between the event data, and an event system network composed of the event relationship between the event data is generated.
  • the method further includes:
  • the ontology is displayed.
  • the obtaining includes the entity data, the event data, the entity relationship, and the ontology of the event system network, including:
  • the entity data, the event data, the entity relationship, and the event system network are mapped to the ontology template to obtain an ontology.
  • the method further includes:
  • An embodiment of the present application further provides an ontology construction device, where the device includes:
  • a data acquisition device configured to acquire text data to be processed
  • An information extraction module configured to extract entity data and event data from the text data to be processed
  • An entity relationship extraction module configured to predict an entity relationship between the entity data based on the text data to be processed
  • An event relationship extraction module is used to perform semantic analysis on the event data, and based on the analysis result, generate an event system network composed of event relationships between the event data, and obtain the entity data, the event data, The entity relationship and the ontology of the event system network are described.
  • the information extraction module is specifically configured to:
  • the information extraction module is specifically configured to:
  • the transition probability, state probability, and feature weight of the word are obtained from the feature template library obtained in advance; according to the transition probability, state probability, and feature weight, the probability of the word being different part of speech is calculated respectively; The part of speech that satisfies the preset first probability condition is used as the part of speech of the word.
  • the information extraction module is specifically configured to:
  • Candidate event data is identified from the to-be-processed text data; wherein the candidate event data includes one or more of the following: an event occurrence time, a participant, an event evolution state, an event occurrence environment, and an event occurrence condition;
  • the identified candidate event data is filtered according to a preset event extraction rule, and the filtered candidate event data is used as event data.
  • the entity relationship extraction module is specifically configured to:
  • an output result obtained includes an initial probability vector, a transition matrix, and a state matrix of a syntax component of each word in the first sample data;
  • the entity relationship extraction module is specifically configured to:
  • the entity relationship extraction module is further configured to:
  • the entity relationship extraction module is specifically configured to:
  • the semantic role labeling model obtained in advance is used to predict the semantic role of each word.
  • the entity relationship extraction module is specifically configured to:
  • analysis processing includes one or more of the following: word segmentation processing, part-of-speech tagging processing, and syntax analysis processing;
  • deletion rule delete the data that will not be used as a semantic role in the analyzed second sample data to obtain training data
  • a preset second training model is trained to obtain a semantic role labeling model.
  • the event relationship extraction module is specifically configured to:
  • the event relationship extraction module is specifically configured to:
  • For each event data perform semantic reference resolution on the event data to determine the semantics of the event data
  • the occurrence order of each event data is determined, and the event occurrence sequence is constructed according to the occurrence order.
  • the event relationship extraction module is specifically configured to:
  • An event relationship between the event data is determined according to an event transition probability between the event data, and an event system network composed of the event relationship between the event data is generated.
  • the device further includes:
  • An ontology evaluation module is configured to evaluate the ontology using a preset evaluation rule to obtain an evaluation result; determine whether the ontology meets a preset expected condition according to the evaluation result; if the expected condition is satisfied, then Display the ontology.
  • the device further includes:
  • a template mapping module is configured to obtain an ontology template; and map the entity data, the event data, the entity relationship, and the event system network into the ontology template to obtain an ontology template.
  • the template mapping module is further configured to:
  • An embodiment of the present application further provides an electronic device including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete communication with each other through the communication bus;
  • the processor is configured to implement any of the ontology construction methods described above when executing a program stored in the memory.
  • An embodiment of the present invention further provides a computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the ontology construction of any one of the foregoing is implemented. method.
  • An embodiment of the present application further provides a computer program product containing instructions, which when executed on a computer, causes the computer to execute any of the ontology construction methods described above.
  • the ontology construction method and device provided in the embodiments of the present application predict the entity relationship between the obtained entity data and the obtained entity data by extracting the entity data and event data from the text data to be processed.
  • Event data is subjected to semantic analysis.
  • an event system network composed of event relationships between event data is generated, and an ontology including entity data, event data, entity relationships, and event system network is obtained.
  • the ontology constructed in this solution includes entity data, event data, entity relationships, and event system networks, which is more complete than the ontology constructed in existing solutions. Implementation of any product or method of this application does not necessarily require that all the advantages described above be achieved at the same time.
  • FIG. 1 is a schematic flowchart of an ontology construction method according to an embodiment of the present application
  • FIG. 2 is another schematic flowchart of an ontology construction method according to an embodiment of the present application.
  • FIG. 3 is a schematic structural diagram of an ontology construction device according to an embodiment of the present application.
  • FIG. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
  • the constructed ontology includes: entities, events, and relationships between entities.
  • the entity refers to some concepts with recognized meanings, such as person names, place names, etc .
  • events usually include event participants, time of occurrence, means of occurrence, place of occurrence, etc .
  • the relationship between entities refers to entities Relevance, such as the employment relationship between people.
  • the embodiment of the present application provides a method for constructing an ontology, and a computer, a server, or other electronic devices can use this method to construct an ontology.
  • event system network can reflect the relationship between events, for example, the event A and the event B
  • the relationship may be causal, or in other words, the occurrence of event B may be caused by the occurrence of event A.
  • Extracting entity data and event data from the text data to be processed Extracting entity data and event data from the text data to be processed
  • the ontology constructed in this solution includes entity data, event data, entity relationships, and event system networks, which is more complete than the ontology constructed in existing solutions.
  • a schematic flowchart of an ontology construction method includes the following steps:
  • users need to organize and generalize various information in a certain field or query certain information in a certain field.
  • the user may need to understand the relationship network between people, or Need to know the people with whom you are dealing.
  • a variety of information in the field usually comes from a large amount of original text data. If these raw text data are processed by means of manual processing, it will consume a lot of time and energy.
  • the ontology of the field can be constructed. Through the ontology of the field, the organization and analysis of various information in the field can be conveniently realized, and at the same time, functions such as information query can be provided for users.
  • the text data to be processed can be obtained first, where the text data to be processed is some text data after word segmentation processing, and the text data to be processed includes a large number of words.
  • the text data to be processed may be directly obtained, or the original text data may be obtained first, and natural text processing methods such as preprocessing and word segmentation processing may be performed on the obtained original text data to obtain the text data to be processed. This embodiment of the present application does not limit this.
  • the text data to be processed can be obtained in the following ways:
  • the original text data includes data in various flat files searched, various network data collected using web crawler technology, and data provided by users. Then, you can clean and fuse these original text data, remove a large amount of junk data contained in it, integrate the filtered useful data, standardize the original text data obtained from various channels, and eliminate heterogeneous data in different formats.
  • the differences between the files convert the original text data into processable structured data or unstructured text data to obtain a data asset pool.
  • word segmentation processing can be performed on the text data in the data asset pool, the words in these text data are identified, and the text data to be processed is obtained.
  • the process of word segmentation of text data in the data asset pool and the process of identifying words in these text data can use the shortest path algorithm:
  • the obtained original text data is segmented, and the original text data is divided into a plurality of word string data.
  • an association graph between the word string data is constructed.
  • the association graph is calculated to obtain the word frequency probability of each related word in the word string data.
  • the word frequency probability of each related word of the word string data eliminate the ambiguity generated when segmenting the original text data. For example, suppose the original text data is "my exact address is here", When segmenting the original text data, it may be segmented into "I ⁇ Indeed ⁇ Cut ⁇ Address ⁇ here ⁇ here". Ambiguity is generated during the segmentation process, so ambiguity removal is needed to more accurately identify the original Words in text data.
  • entity text and event extraction may be performed on the text data to be processed, and entity data and event data may be obtained from the text data to be processed.
  • entity extraction and event extraction of the text data to be processed may be performed simultaneously or sequentially according to a certain sequence, which is not limited in the embodiment of the present application.
  • the entity data refers to some concepts with recognized meanings, such as a person's name, a place name, etc.
  • the event data refers to a thing having multiple event elements.
  • the entity data in the ontology can be someone, such as "Zhang San”, “Li Si”, etc., or a place, such as "Beijing City "," a certain hotel ", etc.
  • each entity data also has its corresponding attributes, such as the gender and age of" Zhang San “, or the area and time zone of" Beijing "; event data can be people and What happened between people, for example, "Zhang San attacked Li Si on September 13", the event data includes the following types of event elements: the subject object “Zhang San”, the object object “Li Si”, the event means “Attack” and event time "September 13th”, the event data can also be events between people and places, such as "Zhang San checked into a certain hotel on September 13th", the event data includes The following event elements: the main object “Zhang San", the object object "a certain hotel", the event means "check-in", and the event time "September 13th.”
  • entity data may be extracted from the text data to be processed in the following manner:
  • the part of speech of each word can be a noun, a verb, an adjective, and so on.
  • a conditional random field model can be used to obtain the transition probability, state probability, and feature weight of the word from a feature template library obtained in advance, and then according to the transition probability and state probability And feature weights, respectively calculate the probability that the word is a different part of speech; use the part of speech that satisfies the preset first probability condition as the part of speech of the word, for example, the part of speech with the highest probability can be used as the part of speech of the word.
  • the transition probability of a word refers to the probability that the next word of each word in the text data to be processed corresponds to different parts of speech. For example, if the current word is a verb, then the next word can be calculated as The probability of a noun is x1, the probability of being a verb is x2, and so on.
  • the state probability is the probability that the i-th position is marked as a part of speech, for example, the probability that the first word of each sentence is a noun is y1, the probability that the second word of each sentence is a verb is y2, and so on.
  • the weight mainly reflects the probability corresponding to different parts of speech of the word, for example, the probability of the current word being a noun is m1, the probability of being a verb is m2, and so on.
  • the probability of each word being different in part of speech can be calculated from the transition probability, state probability, and feature weight of each word.
  • words that do not exist in the preset dictionary can be filtered out as candidate entity data, where the preset dictionary refers to a default dictionary preset in natural language processing technology, and in the preset dictionary
  • the included words can be considered as known words and cannot be used as candidate entity data.
  • candidate entity data can be extracted according to a preset entity extraction rule to obtain entity data.
  • This process is also a process of establishing a correspondence relationship between each attribute of an entity and the entity.
  • the entity extraction rules can be set according to the needs of the user. For example, if an ontology about interpersonal relationships is to be constructed, then in this ontology, only entities such as "people" can be used instead of "location" Class entity; or, you can set the template of the entity, for example, for each "person", you can only have his age and gender attributes, and do not need other attributes such as his hometown, constellation, etc., if someone has only The age attribute has no gender attribute. Then, the gender attribute of the person can be marked as empty. In this way, the entity data required by the user and having a uniform format can be obtained. On the one hand, it reduces the amount of calculation during the ontology construction process, and on the other hand, it facilitates the storage and query of entity data.
  • extracting event data from the text data to be processed may be directly implemented by performing text extraction on the text data to be processed.
  • candidate event data can be identified directly from the text data to be processed, where each candidate event data consists of one or more event elements, such as: event occurrence time, participants, event evolution status, event occurrence environment And event conditions.
  • event elements such as: event occurrence time, participants, event evolution status, event occurrence environment And event conditions.
  • the identified candidate event data can be filtered according to a preset event extraction rule, and the filtered candidate event data is used as the event data.
  • the event extraction rule can also be set according to the user's needs. For example, If you want to build an ontology of interpersonal relationships, then in this ontology, you can only have the type of events where the participant is "human” and not the type of events where the participant is "machine”; or you can The data template is set, for example, for each event, as long as its participants, event evolution state, and other factors such as the time of the event, the environment of the event and the conditions of the event, etc., What we get is event data that users need and has a uniform format, which further reduces the amount of calculation in the ontology construction process. Moreover, according to different elements of the event data, the event data can be classified and stored, which further facilitates subsequent query of the event data.
  • the context of the entity data in the text data to be processed can be used to predict the relationship between the entity data to obtain the entity relationship.
  • the entity relationship between entity data can be a person-to-person relationship, for example, the entity relationship between "Zhang San” and “Li Si” For “employment relationship”, the entity relationship between "Zhang San” and “Wang Wu” is a colleague relationship, etc .; or, the entity relationship between entity data can be a relationship between people and places, for example, “Zhang San”
  • the entity relationship with “School A” is “Alma Mater and Student”, and the entity relationship between "Li Si” and “School A” is also "Alma Mater and Student”, then it can be inferred that Zhang San “and” Li
  • the entity relationship between "four” is “alumni”, and so on.
  • the relationship between entity data can be predicted in the following ways:
  • the first step is to use the pre-trained syntactic structure model to label the syntactic components of each word in the text data to be processed.
  • the syntactic component of each word refers to the composition of the word in the sentence to which it belongs, including subject, predicate, object, adverbial, and so on.
  • the syntactic structure model is obtained by training a preset first training model by using first sample data.
  • the first training model may be a Markov model, a neural network model, or other models used for machine learning. The application embodiment does not limit this.
  • the second step is to predict the semantic roles of each word by using the pre-trained semantic role labeling model according to the syntactic components of each word.
  • Semantic role mainly refers to the semantic role relationship between words whose syntactic components are marked as predicates and other words, mainly including agents, agents, objects, experiencers, beneficiaries, tools, places, goals and sources.
  • the semantic role labeling model is obtained by training a preset second training model by using second sample data.
  • the second training model may be a support vector machine model, a KNN (K-Nearest Neighbour, nearest neighbor classification) model, or Other models for performing machine learning are not limited in this embodiment of the present application.
  • the first sample data and the second sample data are usually different data.
  • the data used to train the syntactic structure model is referred to as the first sample data, and will be used to train the semantic role.
  • the data of the labeled model is called the second sample data.
  • the third step is to determine the semantic role of the extracted entity data according to the predicted semantic role of each word, and analyze the entity relationship between the entity data.
  • the semantic role of each word has been obtained.
  • the semantic role of each word in the text data to be processed can be matched with the extracted entity data to determine each The semantic role of entity data.
  • the semantic role of the entity data can be analyzed to obtain the entity relationship between the entity data.
  • the words “Zhang San” and “Li Si” can be used with the entity data extracted in the previous step. Matching, the semantic roles of the words “Zhang San” and “Li Si” are converted into the semantic roles of the two entity data "Zhang San” and “Li Si”. Then, you can analyze the semantic roles of these two entity data in combination with preset entity relationship extraction rules, for example, according to the semantic roles of "Zhang San” and “Li Si” and the event means themselves, that is, the agent, The victim and the predicate "attack” can determine the entity relationship between "Zhang San” and “Li Si” as the perpetrator and the victim.
  • entity relationship extraction can also use other methods for entity relationship extraction, such as the kernel function-based entity relationship extraction method.
  • This method directly uses the original form of the string as the processing object and implements it by calculating the kernel function between any two processing objects.
  • Entity relationship extraction another example is an entity relationship extraction method based on deep learning. This method proposes to use a recursive neural network to implement entity relationship extraction. First, the text data to be processed is syntactically parsed, and then the vector representation is learned for each node on the syntax tree.
  • S104 Perform semantic analysis on the event data, and based on the analysis result, generate an event system network composed of event relationships between the event data, and obtain an ontology including entity data, event data, entity relationships, and event system networks.
  • the extracted event data can be semantically analyzed. Based on the semantics of the event data, the semantic relationship between the event data can be extracted to generate an event system network composed of the event relationships between the event data.
  • semantic analysis can be performed on the extracted event data, and based on the analysis results, an event sequence is constructed.
  • each event data when performing semantic analysis, each event data can be semantically resolved, and the meanings of pronouns such as “you”, “me” and “he” in the event data can be clarified, so that the semantic analysis can be improved.
  • Accuracy After obtaining the semantics of each event data, you can use natural language inference algorithms to further determine the order of occurrence of each event data, and then according to the order of occurrence of event data, you can construct an event occurrence sequence.
  • the event occurrence sequence refers to the conversion of each event Data is a sequence of events connected in the order in which they occur.
  • the event relationship between the event data can be determined based on the constructed event sequence, and an event system network composed of the event relationship between the event data is generated.
  • the event relationship includes causality, adjoint relationship, and inheritance. Relationships and more.
  • a directed acyclic graph can be constructed on the basis of this. Further, the obtained directed acyclic graph can be calculated by using algorithms such as a Bayesian network model, and the data between each event can be obtained.
  • the event transition probability is the probability that a certain event data may further develop from the event data to other event data. Then, according to the event transition probability between the event data, the event relationship between the event data can be determined, and an event system network composed of the event relationship between the event data can be generated.
  • the corresponding event transition probability is different. For example, if event data A and event data B are causal, then the relationship between event data A and event data B The event transition probability may be 50%. If it is an adjoint relationship, the event transition probability between event data A and event data B may be 20%, etc.
  • the event transition probability corresponding to each event relationship can be determined based on A large amount of data is obtained through experiments, which is not limited in the embodiments of the present application.
  • the text data to be processed is analyzed, and the entity data, event data, entity relationship, and event system network are obtained.
  • the ontology is obtained. Since the ontology includes the event system network, the resulting ontology is a network structure, which can better reflect the relationship between entity data and event data than the hierarchical structure in the prior art.
  • an ontology template can be preset. Similar to the event data template and the event data template, the ontology template sets the data format required by the ontology, such as the specific attributes of each entity data. What are there, what are the specific elements of each event data, what are the entity relationships between entity data, what are the event relationships between event data, and so on. Then, the obtained entity data, event data, entity relationship, and event system network can be mapped to a preset ontology template. In this way, the data in the obtained ontology is more standardized and further convenient for users to query.
  • the above-mentioned preset ontology template can also be updated at any time according to the needs of the user, and the required entity data, event data, entity relationship, and the format of the event system network are added or deleted to obtain a new ontology template, and then the new ontology template can be added.
  • the entity data, event data, entity relationships, and event system network are mapped to the new ontology template to obtain a new ontology, thereby realizing the update and upgrade of the ontology, and reducing the loss of information due to the solidification of the ontology template.
  • the pre-set evaluation rules can be used to evaluate the ontology. For example, you can use some expert knowledge to evaluate the accuracy of the entity data, event data, entity relations, and event system network in the ontology, determine whether the data extracted by the ontology from the text data to be processed is consistent with common sense, and so on.
  • the evaluation result it can be determined whether the obtained ontology meets the preset expected conditions, and if the expected conditions are satisfied, the ontology is displayed.
  • the entity data, event data, entity relationships, and event system network in the ontology can be drawn as a relationship diagram, and the knowledge map in the ontology can be visually displayed to the user, which is convenient for users to browse.
  • the ontology construction method predicts the entity relationship between the entity data in the acquired semantic metadata by extracting the entity data and the event data from the text data to be processed, and The event data in the semantic metadata is subjected to semantic analysis. Based on the analysis results, an event system network composed of event relationships between event data is generated, and an ontology including entity data, event data, entity relationships, and event system network is obtained. It can be seen that the ontology constructed in this solution includes entity data, event data, entity relationships, and event system networks, which is more complete than the ontology constructed in existing solutions.
  • FIG. 2 another schematic flowchart of an ontology construction method according to an embodiment of the present application includes the following steps:
  • users need to organize and generalize various information in a certain field or query certain information in a certain field.
  • the user may need to understand the relationship network between people, or Need to know the people with whom you are dealing.
  • a variety of information in the field usually comes from a large amount of original text data. If these raw text data are processed by means of manual processing, it will consume a lot of time and energy.
  • the ontology of the field can be constructed. Through the ontology of the field, the organization and analysis of various information in the field can be conveniently realized, and at the same time, functions such as information query can be provided for users.
  • the text data to be processed can be obtained first, where the text data to be processed is some text data after word segmentation processing, and the text data to be processed includes a large number of words.
  • the text data to be processed may be directly obtained, or the original text data may be obtained first, and natural text processing methods such as preprocessing and word segmentation processing may be performed on the obtained original text data to obtain the text data to be processed. This embodiment of the present application does not limit this.
  • entity text and event extraction may be performed on the text data to be processed, and entity data and event data may be obtained from the text data to be processed.
  • entity extraction and the event extraction of the text data to be processed may be performed simultaneously or sequentially in a certain order, which is not limited in the embodiment of the present application.
  • entity data refers to some concepts with recognized meanings, such as person names, place names, etc.
  • event data refers to a thing with multiple event elements.
  • the entity data in the ontology can be someone, such as "Zhang San”, “Li Si”, etc., or a place, such as "Beijing City "," a certain hotel ", etc.
  • each entity data also has its corresponding attributes, such as the gender and age of" Zhang San “, or the area and time zone of" Beijing "; event data can be people and What happened between people, for example, "Zhang San attacked Li Si on September 13", the event data includes the following types of event elements: the subject object “Zhang San”, the object object “Li Si”, the event means “Attack” and event time "September 13th”, the event data can also be events between people and places, such as "Zhang San checked into a certain hotel on September 13th", the event data includes The following event elements: the main object “Zhang San", the object object "a certain hotel", the event means "check-in", and the event time "September 13th.”
  • entity data can be extracted from the text data to be processed in the following ways:
  • candidate entity data can be extracted according to preset entity extraction rules to obtain entity data, which is to establish the attributes between entities and entities. Correspondence.
  • extracting event data from the text data to be processed may be directly implemented by performing text extraction on the text data to be processed.
  • candidate event data can be identified directly from the text data to be processed, where each candidate event data consists of one or more event elements, such as: event occurrence time, participants, event evolution status, event occurrence environment And event conditions. Then, the identified candidate event data can be filtered according to a preset event extraction rule, and the filtered candidate event data is used as the event data.
  • S203 Use the syntactic structure model obtained in advance to mark the syntactic component of each word in the text data to be processed.
  • the syntactic component of each word refers to the constituent components of the word in the sentence to which it belongs, including subject, predicate, object, adverbial, and so on.
  • the syntactic structure model is obtained by training a preset first training model by using first sample data
  • the first training model may be a Markov model, a neural network model, or other machine for
  • the learning model is not limited in the embodiment of the present application.
  • the obtained first sample data is input into a preset first training model, and the output result obtained includes an initial probability vector, a transition matrix, and a state matrix of the syntactic component of each word in the first sample data.
  • the probability vector refers to the probability that each word in the first sample data corresponds to a different syntactic component in the sentence to which it belongs in the current state.
  • the transition matrix refers to the conversion of each word from a certain syntactic component in the first sample data. Is the probability of another syntactic component, the state matrix refers to all possible syntactic components corresponding to the word.
  • the preset condition may refer to a limit on the number of iterations during model training. For example, when the number of iterations reaches 500, the syntactic structure model may be considered to have been trained; or the preset condition may also refer to training obtained Limitation of the accuracy of the model.
  • the first sample data is divided into training data and test data, and the test data is used to determine whether the syntactic component output of the trained model is accurate. If the accuracy rate reaches a preset threshold, It can be considered that the syntactic structure model has been trained.
  • the initial probability vector, transition matrix, and state matrix of each word in the text data to be processed can be obtained, and then corresponding algorithms such as Viterbi algorithm can be used according to the output results of the model. , Calculate the probability of the syntactic component of each word in the text data to be processed, and use the highest probability as the syntactic component of the word to label the word.
  • S204 Predict the semantic role of each word by using the semantic role labeling model obtained in advance according to the syntactic component of each word that is marked.
  • the semantic role mainly refers to the semantic role relationship between the words whose syntactic components are marked as predicates and other words, mainly including agents, agents, objects, experiencers, beneficiaries, tools, places, goals and sources. Wait.
  • the text data to be processed after syntactic component annotation can be input into a pre-trained semantic role labeling model, and a variety of semantic roles can be calculated between the words labeled as predicates of each syntactic component and other words.
  • the probability corresponding to each time is that the semantic role that satisfies the preset second probability condition is used as the semantic role between the word marked as a predicate and other words.
  • the semantic role with the highest probability can be used as the syntactic component.
  • the semantic role labeling model is obtained by training a preset second training model through the second sample data.
  • the second training model may be a support vector machine model, KNN (K-Nearest Neighbour, nearest neighbor classification). Models or other models for performing machine learning are not limited in this embodiment of the present application. Specifically, the following steps can be adopted to obtain a semantic role labeling model:
  • the semantic role data training data is obtained. Using the training data to train a preset second training model, a semantic role labeling model can be obtained. Since the training data has undergone the above processing, the recognition performance of the obtained semantic role labeling model will also be improved.
  • the first sample data and the second sample data are usually different data.
  • the data used to train the syntactic structure model is referred to as the first sample data, and will be used to train the semantic role.
  • the data of the labeled model is called the second sample data.
  • step S203 the syntax component of each word calculated by using the syntax structure model in the text data to be processed is not unique, there may be a calculation error, and the syntax component of each word will affect the syntax of other words related to it.
  • the composition has an influence. For example, if the word A is a predicate, then the probability that the next word of A is an object is 50%, and if A is an adverbial, then the probability that the next word of A is an object is 10%. Will have a greater impact on subsequent calculation results.
  • the disambiguation of the syntactic component labeling result is obtained to obtain a corrected syntactic component of each word.
  • the probability of each word being marked as a different syntactic component can be obtained first, then the probability of each word is multiplied, and each word in the case where the product of the probabilities in the entire sentence is the largest
  • the syntactic component of each word is used as the corrected syntactic component of each word; or, the user can also perform manual review to determine whether the marked result of the syntactic component is accurate, and so on.
  • S205 Determine the semantic role of the extracted entity data according to the predicted semantic role of each word, and analyze the entity relationship between the entity data.
  • the semantic role of each word has been obtained. After that, according to the semantic role of each word in the text data to be processed, it can be matched with the extracted entity data to determine each entity data. Semantic role. Further, the semantic role of the entity data can be analyzed to obtain the entity relationship between the entity data.
  • the words “Zhang San” and “Li Si” can be used with the entity data extracted in the previous step. Matching, the semantic roles of the words “Zhang San” and “Li Si” are converted into the semantic roles of the two entity data "Zhang San” and “Li Si”. Then, you can analyze the semantic roles of these two entity data in combination with preset entity relationship extraction rules, for example, according to the semantic roles of "Zhang San” and “Li Si” and the event means themselves, that is, the agent, The victim and the predicate "attack” can determine the entity relationship between "Zhang San” and “Li Si” as the perpetrator and the victim.
  • S206 Perform semantic analysis on the event data, and construct an event occurrence sequence based on the analysis result.
  • the event data in the text data to be processed is extracted, the event data can be further analyzed semantically, and based on the analysis results, an event occurrence sequence is constructed.
  • each event data when performing semantic analysis, each event data can be semantically resolved, and the meanings of pronouns such as "you", “me” and “he” in the event data can be clarified. Accuracy. After obtaining the semantics of each event data, you can use natural language inference algorithms to further determine the order of occurrence of each event data, and then according to the order of occurrence of event data, you can construct an event occurrence sequence.
  • the event occurrence sequence refers to the conversion of each event Data is a sequence of events connected in the order in which they occur.
  • S207 Determine an event relationship between event data based on the event occurrence sequence, and generate an event system network composed of event relationships between event data, and obtain the entity data, the event data, the entity relationship, and the event data.
  • the ontology of the event system network is described; among them, the event relationship includes one or more of the following: causality, adjoint relationship, and inheritance relationship.
  • Transition probability that is, the probability that a certain event data may further develop from the event data to other event data. Then, according to the event transition probability between the event data, the event relationship between the event data can be determined, and an event system network composed of the event relationship between the event data can be generated.
  • the corresponding event transition probability is different. For example, if event data A and event data B are causal, then the relationship between event data A and event data B The event transition probability may be 50%. If it is an adjoint relationship, the event transition probability between event data A and event data B may be 20%, etc.
  • the event transition probability corresponding to each event relationship can be determined based on A large amount of data is obtained through experiments, which is not limited in the embodiments of the present application.
  • the text data to be processed is analyzed, and the entity data, event data, entity relationship, and event system network are obtained.
  • the ontology is obtained. Because the event system network is included in the ontology, the resulting ontology is a network structure, which can better reflect the relationship between entity data and event data than the hierarchical structure in the prior art.
  • an ontology template can be preset. Similar to the event data template and the event data template, the ontology template sets the data format required by the ontology, such as the specific attributes of each entity data. What are there, what are the specific elements of each event data, what are the entity relationships between entity data, what are the event relationships between event data, and so on. Then, the obtained entity data, event data, entity relationship, and event system network can be mapped to a preset ontology template. In this way, the data in the obtained ontology is more standardized and further convenient for users to query.
  • the above-mentioned preset ontology template can also be updated at any time according to the needs of the user, and the required entity data, event data, entity relationship, and the format of the event system network are added or deleted to obtain a new ontology template, and then the new ontology template can be added.
  • the entity data, event data, entity relationships, and event system network are mapped to the new ontology template to obtain a new ontology, thereby realizing the update and upgrade of the ontology, and reducing the loss of information due to the solidification of the ontology template.
  • the pre-set evaluation rules can be used to evaluate the ontology. For example, you can use some expert knowledge to evaluate the accuracy of the entity data, event data, entity relations, and event system network in the ontology, determine whether the data extracted by the ontology from the text data to be processed is consistent with common sense, and so on.
  • the evaluation result it can be determined whether the obtained ontology meets the preset expected conditions, and if the expected conditions are satisfied, the ontology is displayed.
  • the entity data, event data, entity relationships, and event system network in the ontology can be drawn as a relationship diagram, and the knowledge map in the ontology can be visually displayed to the user, which is convenient for users to browse.
  • the ontology construction method predicts the entity relationship between the entity data in the acquired semantic metadata by extracting the entity data and the event data from the text data to be processed, and The event data in the semantic metadata is subjected to semantic analysis. Based on the analysis results, an event system network composed of event relationships between event data is generated, and an ontology including entity data, event data, entity relationships, and event system network is obtained. It can be seen that the ontology constructed in this solution includes entity data, event data, entity relationships, and event system networks, which is more complete than the ontology constructed in existing solutions.
  • an embodiment of the present application further provides an ontology construction device.
  • FIG. 3 it is a schematic structural diagram of an ontology construction device according to an embodiment of the present application.
  • the device includes:
  • a data acquiring device 310 configured to acquire text data to be processed
  • An information extraction module 320 configured to extract entity data and event data from the text data to be processed
  • An entity relationship extraction module 330 configured to predict an entity relationship between the entity data based on the text data to be processed
  • An event relationship extraction module 340 is configured to perform semantic analysis on the event data, and based on the analysis result, generate an event system network composed of event relationships between the event data, to obtain the entity data, the event data, The entity relationship and the ontology of the event system network.
  • the information extraction module 320 is specifically configured to:
  • the information extraction module 320 is specifically configured to:
  • the transition probability, state probability, and feature weight of the word are obtained from the feature template library obtained in advance; according to the transition probability, state probability, and feature weight, the probability of the word being a different part of speech is calculated respectively; The part of speech that satisfies the preset first probability condition is used as the part of speech of the word.
  • the information extraction module 320 is specifically configured to:
  • Candidate event data is identified from the to-be-processed text data; wherein the candidate event data includes one or more of the following: an event occurrence time, a participant, an event evolution state, an event occurrence environment, and an event occurrence condition;
  • the identified candidate event data is filtered, and the filtered candidate event data is used as the event data.
  • the entity relationship extraction module 330 is specifically configured to:
  • the following steps may be adopted to obtain the syntactic structure model:
  • an output result obtained includes an initial probability vector, a transition matrix, and a state matrix of a syntax component of each word in the first sample data;
  • the entity relationship extraction module is specifically configured to:
  • the entity relationship extraction module 330 is further configured to:
  • the entity relationship extraction module is specifically configured to:
  • the semantic role labeling model obtained in advance is used to predict the semantic role of each word.
  • the entity relationship extraction module 330 is specifically configured to:
  • analysis processing includes one or more of the following: word segmentation processing, part-of-speech tagging processing, and syntax analysis processing;
  • deletion rule delete the data that will not be used as a semantic role in the analyzed second sample data to obtain training data
  • a preset second training model is trained to obtain a semantic role labeling model.
  • the event relationship extraction module 340 is specifically configured to:
  • the event relationship extraction module 340 is specifically configured to:
  • For each event data perform semantic reference resolution on the event data to determine the semantics of the event data
  • the occurrence order of each event data is determined, and the event occurrence sequence is constructed according to the occurrence order.
  • the event relationship extraction module 340 is specifically configured to:
  • An event relationship between the event data is determined according to an event transition probability between the event data, and an event system network composed of the event relationship between the event data is generated.
  • the apparatus further includes:
  • the template mapping module 350 is configured to obtain an ontology template; and map the entity data, the event data, the entity relationship, and the event system network into the ontology template to obtain an ontology.
  • the module mapping module 350 is further configured to:
  • the apparatus further includes:
  • An ontology evaluation module 360 is configured to evaluate the ontology using a preset evaluation rule to obtain an evaluation result; determine whether the ontology meets a preset expected condition according to the evaluation result; and if the expected condition is satisfied, Then display the ontology.
  • the ontology construction device provided by the embodiment of the present application predicts the entity relationship between the entity data in the acquired semantic metadata by extracting the entity data and the event data from the text data to be processed, and The event data in the semantic metadata is subjected to semantic analysis. Based on the analysis results, an event system network composed of event relationships between event data is generated, and an ontology including entity data, event data, entity relationships, and event system network is obtained. It can be seen that the ontology constructed in this solution includes entity data, event data, entity relationships, and event system networks, which is more complete than the ontology constructed in existing solutions.
  • An embodiment of the present application further provides an electronic device, as shown in FIG. 4, including a processor 401, a communication interface 402, a memory 403, and a communication bus 404, where the processor 401, the communication interface 402, and the memory 403 pass through the communication bus 404.
  • the processor 401 is configured to execute the following steps when executing a program stored in the memory 403:
  • Extracting entity data and event data from the text data to be processed Extracting entity data and event data from the text data to be processed
  • the communication bus mentioned in the above electronic device may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc.
  • PCI Peripheral Component Interconnect
  • EISA Extended Industry Standard Architecture
  • the communication bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, the figure only uses a thick line, but it does not mean that there is only one bus or one type of bus.
  • the communication interface is used for communication between the aforementioned electronic device and other devices.
  • the memory may include random access memory (Random Access Memory, RAM), and may also include non-volatile memory (Non-Volatile Memory, NVM), such as at least one disk memory.
  • NVM non-Volatile Memory
  • the memory may also be at least one storage device located far from the foregoing processor.
  • the above processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc .; it may also be a digital signal processor (Digital Signal Processing, DSP), special integration Circuit (Application Specific Integrated Circuit, ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
  • CPU central processing unit
  • NP network processor
  • DSP Digital Signal Processing
  • ASIC Application Specific Integrated Circuit
  • FPGA Field-Programmable Gate Array
  • a computer-readable storage medium stores instructions, and when the computer-readable storage medium runs on the computer, the computer executes any one of the foregoing embodiments.
  • the ontology construction method is also provided.
  • a computer program product containing instructions is also provided, which when executed on a computer, causes the computer to execute the ontology construction method according to any one of the above embodiments.
  • the computer program product includes one or more computer instructions.
  • the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
  • the computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be from a website site, a computer, a server, or a data center.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server, a data center, or the like that includes one or more available medium integration.
  • the available medium may be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk (Solid State Disk (SSD)), and the like.
  • the ontology construction method predicts the entity relationship between the entity data in the acquired semantic metadata by extracting the entity data and the event data from the text data to be processed, and The event data in the semantic metadata is subjected to semantic analysis. Based on the analysis results, an event system network composed of event relationships between event data is generated, and an ontology including entity data, event data, entity relationships, and event system network is obtained. It can be seen that the ontology constructed in this solution includes entity data, event data, entity relationships, and event system networks, which is more complete than the ontology constructed in existing solutions.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Machine Translation (AREA)

Abstract

一种本体构建方法,该方法包括:获取待处理文本数据(S101);从所述待处理文本数据中抽取实体数据和事件数据(S102);基于所述待处理文本数据,预测所述实体数据之间的实体关系(S103);对所述事件数据进行语义分析,基于分析结果,生成由所述事件数据之间的事件关系组成的事件体系网络,得到包括所述实体数据、所述事件数据、所述实体关系及所述事件体系网络的本体(S104)。该方法中构建的本体包括实体数据、事件数据、实体关系及事件体系网络,构建的本体更加完善。

Description

一种本体构建方法及装置
本申请要求于2018年6月26日提交中国专利局、申请号为201810670149.9发明名称为“一种本体构建方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机应用技术领域,特别是涉及一种本体构建方法及装置。
背景技术
在数据处理领域中,为了把现实世界中的具体事物抽象并组织为某一数据库支持的数据模型,通常需要把现实世界中的客观对象抽象为某一种信息结构,这种信息结构并不依赖于具体的计算机系统,不是某一个数据库支持的数据模型,而是概念级的模型,称为概念模型。被用户之间共同认可的概念模型则被称为共享概念模型。
本体是共享概念模型的明确形式化规范说明,简单来说,本体是对某些概念模型的一种精确的数学描述,这种描述可以作为用户之间的共识,为用户提供更智能化的知识图谱。
本体中可以包括实体、事件和关系,其中,实体是指一些具备公认意义的概念,比如人名、地名等;事件是指在某个特定时空发生的、由若干对象参与、表现出若干动作特征的一件事情,通常包括事件参与对象、发生时间、发生手段、发生地点等事件要素;关系是指实体与实体之间的关联,比如说人与人之间的雇佣关系。
现有方案构建的本体包括实体、事件、实体与实体之间的关系。
发明内容
本申请提供了一种本体构建方法,使得构建得到的本体更加完善。
具体技术方案如下:
本申请实施例提供了一种本体构建方法,所述方法包括:
获取待处理文本数据;
从所述待处理文本数据中抽取实体数据和事件数据;
基于所述待处理文本数据,预测所述实体数据之间的实体关系;
对所述事件数据进行语义分析,基于分析结果,生成由所述事件数据之间的事件关系组成的事件体系网络,得到包括所述实体数据、所述事件数据、所述实体关系及所述事件体系网络的本体。
可选的,所述从所述待处理文本数据中抽取实体数据,包括:
针对所述待处理文本数据中的每个词语,通过对该词语进行语料标注,确定该词语的词性;
筛选出词性为名词、且具有语义信息的词语,作为待处理词语;
从所述待处理词语中,筛选出不存在于预设词典中的词语,作为候选实体数据;
根据预设的实体抽取规则,对所述候选实体数据进行抽取,得到实体数据。
可选的,所述针对每个词语,通过对该词语进行语料标注,确定该词语的词性,包括:
针对每个词语,从预先获取的特征模板库中,获取该词语的转移概率、状态概率和特征权重;根据所述转移概率、状态概率和特征权重,分别计算该词语为不同词性的概率;将满足预设第一概率条件的词性作为该词语的词性。
可选的,所述从所述待处理文本数据中抽取事件数据,包括:
从所述待处理文本数据中识别出候选事件数据;其中,所述候选事件数据包括以下一项或多项:事件的发生时间、参与方、事件演变状态、事件发生环境和事件发生条件;
根据预设的事件抽取规则,对识别出的候选事件数据进行筛选,将筛选出的候选事件数据作为事件数据。
可选的,所述基于所述待处理文本数据,预测所述实体数据之间的实体关系,包括:
利用预先训练得到的句法结构模型,标注每个词语在所述待处理文本数据中的句法成分;
根据所标注的每个词语的句法成分,利用预先训练得到的语义角色标注 模型,预测所述每个词语的语义角色;
根据所预测的每个词语的语义角色,确定所抽取的实体数据的语义角色,分析所述实体数据之间的实体关系。
可选的,采用如下步骤,训练得到所述句法结构模型:
获取第一样本数据;
将所述第一样本数据输入预设的第一训练模型,得到的输出结果中包括所述第一样本数据中每个词语的句法成分的初始概率向量、转移矩阵和状态矩阵;
判断输出结果是否满足预设条件,如果不满足,对所述预设的第一训练模型进行迭代调整,直至输出结果满足预设条件,得到所述句法结构模型;
所述利用预先训练得到的句法结构模型,标注每个词语在所述待处理文本数据中的句法成分,包括:
将所述待处理文本数据输入所述句法结构模型,得到每个词语的初始概率向量、转移矩阵和状态矩阵;
根据每个词语的初始概率向量、转移矩阵和状态矩阵,标注每个词语在所述待处理文本数据中的句法成分。
可选的,在根据所标注的每个词语的句法成分,利用预先训练得到的语义角色标注模型,预测所述每个词语的语义角色之前,所述方法还包括:
消除所标注的每个词语的句法成分在所述待处理文本数据中的歧义,得到每个词语的校正句法成分;
所述根据所标注的每个词语的句法成分,利用预先训练得到的语义角色标注模型,预测所述每个词语的语义角色,包括:
根据所述每个实体数据的校正句法成分,利用预先训练得到的语义角色标注模型,预测所述每个词语的语义角色。
可选的,所述根据所标注的每个词语的句法成分,利用预先训练得到的语义角色标注模型,预测所述每个词语的语义角色,包括:
将句法成分标注后的待处理文本数据输入预先训练得到的语义角色标注模型,计算每个句法成分被标注为谓语的词语与其它词语之间存在的多种语义角色的概率;将满足预设第二概率条件的语义角色作为该句法成分被标注 为谓语的词语与其它词语之间的语义角色。
可选的,采用如下步骤,训练得到所述语义角色标注模型:
获取第二样本数据;
对所获取的第二样本数据进行分析处理;其中,所述分析处理包括以下一项或多项:分词处理、词性标注处理和句法分析处理;
根据预设的删除规则,删除经过分析处理的第二样本数据中不会作为语义角色的数据,得到训练数据;
利用所述训练数据,对预设的第二训练模型进行训练,得到语义角色标注模型。
可选的,所述对所述事件数据进行语义分析,基于分析结果,生成由所述事件数据之间的事件关系组成的事件体系网络,包括:
对所述事件数据进行语义分析,基于分析结果,构建事件发生序列;
基于所述事件发生序列,确定各个事件数据之间的事件关系,生成由所述事件数据之间的事件关系组成的事件体系网络;其中,所述事件关系包括以下一项或多项:因果关系、伴随关系和顺承关系。
可选的,所述对所述事件数据进行语义分析,基于分析结果,构建事件发生序列,包括:
针对每个事件数据,对该事件数据进行语义指代消解,确定该事件数据的语义;
根据每个事件数据的语义,确定每个事件数据的发生顺序,根据所述发生顺序,构建事件发生序列。
可选的,所述基于所述事件发生序列,确定各个事件数据之间的语义关系,生成由所述事件数据之间的事件关系组成的事件体系网络,包括:
根据所述事件发生序列,构建有向无环图;
基于所述有向无环图,计算得到各个事件数据之间的事件转移概率;
根据所述各个事件数据之间的事件转移概率,确定各个事件数据之间的事件关系,生成由所述事件数据之间的事件关系组成的事件体系网络。
可选的,所述方法还包括:
利用预先设定的评价规则,对所述本体进行评价,得到评价结果;
根据所述评价结果,判断所述本体是否满足预设期望条件;
若满足所述期望条件,则对所述本体进行展示。
可选的,所述得到包括所述实体数据、所述事件数据、所述实体关系及所述事件体系网络的本体,包括:
获取本体模板;
将所述实体数据、所述事件数据、所述实体关系及所述事件体系网络映射至所述本体模板中,得到本体。
可选的,在所述将所述实体数据、所述事件数据、所述实体关系及所述事件体系网络映射至原始本体模板中,得到本体之后,所述方法还包括:
对所述本体模板进行更新,得到新的本体模板;
将所述实体数据、所述事件数据、所述实体关系及所述事件体系网络映射至所述新的本体模板中,得到新的本体。
本申请实施例还提供了一种本体构建装置,所述装置包括:
数据获取装置,用于获取待处理文本数据;
信息抽取模块,用于从所述待处理文本数据中抽取实体数据和事件数据;
实体关系抽取模块,用于基于所述待处理文本数据,预测所述实体数据之间的实体关系;
事件关系抽取模块,用于对所述事件数据进行语义分析,基于分析结果,生成由所述事件数据之间的事件关系组成的事件体系网络,得到包括所述实体数据、所述事件数据、所述实体关系及所述事件体系网络的本体。
可选的,所述信息抽取模块,具体用于:
针对所述待处理文本数据中的每个词语,通过对该词语进行语料标注,确定该词语的词性;
筛选出词性为名词、且具有语义信息的词语,作为待处理词语;
从所述待处理词语中,筛选出不存在于预设词典中的词语,作为候选实体数据;
根据预设的实体抽取规则,对所述候选实体数据进行抽取,得到实体数据。
可选的,所述信息抽取模块,具体用于:
针对每个词语,从预先获取的特征模板库中,获取该词语的转移概率、状态概率和特征权重;根据所述转移概率、状态概率和特征权重,分别计算该词语为不同词性的概率;将满足预设第一概率条件的词性作为该词语的词性。
可选的,所述信息抽取模块,具体用于:
从所述待处理文本数据中识别出候选事件数据;其中,所述候选事件数据包括以下一项或多项:事件的发生时间、参与方、事件演变状态、事件发生环境和事件发生条件;
根据预设的事件抽取规则,对识别出的候选事件数据进行筛选,将筛选出的候选事件数据作为事件数据。
可选的,所述实体关系抽取模块,具体用于:
利用预先训练得到的句法结构模型,标注每个词语在所述待处理文本数据中的句法成分;
根据所标注的每个词语的句法成分,利用预先训练得到的语义角色标注模型,预测所述每个词语的语义角色;
根据所预测的每个词语的语义角色,确定所抽取的实体数据的语义角色,分析所述实体数据之间的实体关系。
可选的,采用如下步骤,训练得到所述句法结构模型:
获取第一样本数据;
将所述第一样本数据输入预设的第一训练模型,得到的输出结果中包括所述第一样本数据中每个词语的句法成分的初始概率向量、转移矩阵和状态矩阵;
判断输出结果是否满足预设条件,如果不满足,对所述预设的第一训练模型进行迭代调整,直至输出结果满足预设条件,得到所述句法结构模型;
所述实体关系抽取模块,具体用于:
将所述待处理文本数据输入所述句法结构模型,得到每个词语的初始概率向量、转移矩阵和状态矩阵;根据每个词语的初始概率向量、转移矩阵和状态矩阵,标注每个词语在所述待处理文本数据中的句法成分。
可选的,所述实体关系抽取模块,还用于:
消除所标注的每个词语的句法成分在所述待处理文本数据中的歧义,得到每个词语的校正句法成分;
所述实体关系抽取模块,具体用于:
根据所述每个实体数据的校正句法成分,利用预先训练得到的语义角色标注模型,预测所述每个词语的语义角色。
可选的,所述实体关系抽取模块,具体用于:
将句法成分标注后的待处理文本数据输入预先训练得到的语义角色标注模型,计算每个句法成分被标注为谓语的词语与其它词语之间存在的多种语义角色的概率;将满足预设第二概率条件的语义角色作为该句法成分被标注为谓语的词语与其它词语之间的语义角色。
可选的,采用如下步骤,训练得到所述语义角色标注模型:
获取第二样本数据;
对所获取的第二样本数据进行分析处理;其中,所述分析处理包括以下一项或多项:分词处理、词性标注处理和句法分析处理;
根据预设的删除规则,删除经过分析处理的第二样本数据中不会作为语义角色的数据,得到训练数据;
利用所述训练数据,对预设的第二训练模型进行训练,得到语义角色标注模型。
可选的,所述事件关系抽取模块,具体用于:
对所述事件数据进行语义分析,基于分析结果,构建事件发生序列;
基于所述事件发生序列,确定各个事件数据之间的事件关系,生成由所述事件数据之间的事件关系组成的事件体系网络;其中,所述事件关系包括以下一项或多项:因果关系、伴随关系和顺承关系。
可选的,所述事件关系抽取模块,具体用于:
针对每个事件数据,对该事件数据进行语义指代消解,确定该事件数据的语义;
根据每个事件数据的语义,确定每个事件数据的发生顺序,根据所述发生顺序,构建事件发生序列。
可选的,所述事件关系抽取模块,具体用于:
根据所述事件发生序列,构建有向无环图;
基于所述有向无环图,计算得到各个事件数据之间的事件转移概率;
根据所述各个事件数据之间的事件转移概率,确定各个事件数据之间的事件关系,生成由所述事件数据之间的事件关系组成的事件体系网络。
可选的,所述装置还包括:
本体评价模块,用于利用预先设定的评价规则,对所述本体进行评价,得到评价结果;根据所述评价结果,判断所述本体是否满足预设期望条件;若满足所述期望条件,则对所述本体进行展示。
可选的,所述装置还包括:
模板映射模块,用于获取本体模板;将所述实体数据、所述事件数据、所述实体关系及所述事件体系网络映射至所述本体模板中,得到本体。
可选的,所述模板映射模块,还用于:
对所述本体模板进行更新,得到新的本体模板;
将所述实体数据、所述事件数据、所述实体关系及所述事件体系网络映射至所述新的本体模板中,得到新的本体。
本申请实施例还提供了一种电子设备,包括处理器、通信接口、存储器和通信总线,其中,处理器,通信接口,存储器通过通信总线完成相互间的通信;
存储器,用于存放计算机程序;
处理器,用于执行存储器上所存放的程序时,实现上述任一所述的本体构建方法。
本发明实施例还提供了一种计算机可读存储介质,其特征在于,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现上述任一所述的本体构建方法。
本申请实施例还提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述任一所述的本体构建方法。
由上述的技术方案可见,本申请实施例提供的本体构建方法及装置,通过从待处理文本数据中抽取实体数据和事件数据,预测所获取的实体数据之间的实体关系,以及对所获取的事件数据进行语义分析,基于分析结果,生 成由事件数据之间的事件关系组成的事件体系网络,得到包括实体数据、事件数据、实体关系及事件体系网络的本体。可见,本方案中构建的本体包括实体数据、事件数据、实体关系及事件体系网络,相比于现有方案构建的本体更加完善。实施本申请的任一产品或方法并不一定需要同时达到以上所述的所有优点。
附图说明
为了更清楚地说明本申请实施例和现有技术的技术方案,下面对实施例和现有技术中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本申请实施例提供的一种本体构建方法的流程示意图;
图2为本申请实施例提供的一种本体构建方法的另一种流程示意图;
图3为本申请实施例提供的一种本体构建装置的结构示意图;
图4为本申请实施例提供的一种电子设备的结构示意图。
具体实施方式
为使本申请的目的、技术方案、及优点更加清楚明白,以下参照附图并举实施例,对本申请进一步详细说明。显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
现有技术中,构建的本体中包括:实体、事件、实体与实体之间的关系。其中,实体是指一些具备公认意义的概念,比如人名、地名等;事件通常包括事件参与对象、发生时间、发生手段、发生地点等;实体与实体之间的关系是指实体与实体之间的关联,比如说人与人之间的雇佣关系等。
相比于现有技术,本申请实施例提供了一种本体构建方法,计算机、服务器或其他电子设备可以利用该方法构建得到本体。
利用该方法构建的本体中,除了实体数据、事件数据、实体与实体之间的关系,还包括事件体系网络,其中,事件体系网络可以体现事件之间的关 系,例如,事件A与事件B之间可能为因果关系,或者说,因为事件A的发生,才可能导致事件B的发生。
下面从总体上对本申请实施例提供的本体构建方法进行说明。
获取待处理文本数据;
从所述待处理文本数据中抽取实体数据和事件数据;
基于所述待处理文本数据,预测所述实体数据之间的实体关系;
对所述事件数据进行语义分析,基于分析结果,生成由所述事件数据之间的事件关系组成的事件体系网络,得到包括所述实体数据、所述事件数据、所述实体关系及所述事件体系网络的本体。
由以上可见,本方案中构建的本体包括实体数据、事件数据、实体关系及事件体系网络,相比于现有方案构建的本体更加完善。
下面将通过具体的实施例,对本申请实施例提供的本体构建方法进行详细描述。
如图1所示,为本申请实施例提供的一种本体构建方法的流程示意图,包括如下步骤:
S101:获取待处理文本数据。
有时,用户需要对某一领域内的各种信息进行组织概括或对某一领域内的某种信息进行查询,例如,在人际交往领域,用户可能需要了解人与人之间的关系网络,或者需要了解与某人有交往的人群。领域内的各种信息通常来源于大量的原始文本数据,如果借助人工处理的方式来处理这些原始文本数据,会耗费大量的时间和精力。
在这种情况下,可以构建该领域的本体,通过该领域的本体,可以方便的实现对该领域内各种信息的组织和分析,同时能为用户提供信息查询等功能。
在构建本体时,可以先获取待处理文本数据,其中,待处理文本数据是一些经过分词处理后的文本数据,在待处理文本数据中,包括大量的词语。在本申请实施例中,可以直接获取待处理文本数据,也可以先获取原始文本数据,通过对所获取的原始文本数据进行预处理、分词处理等自然语言处理 方法,从而得到待处理文本数据,本申请实施例对此不做限定。
在一种实现方式中,可以通过如下方式获取待处理文本数据:
首先,获取原始文本数据,原始文本数据中包括搜索到的各种平面文件中的数据、利用网络爬虫技术采集到的各种网络数据以及用户提供的数据等等。然后,可以对这些原始文本数据进行清洗和融合,剔除其中包含的大量垃圾数据,对筛选出的有用的数据进行整合,对各个渠道得到的原始文本数据进行规范化处理,消除不同格式的异构数据文件之间的差异,将原始文本数据转化为可处理的结构化数据或非结构化文本数据,得到数据资产池。
进而,可以对数据资产池中的文本数据进行分词处理,识别出这些文本数据中的词语,也就得到了待处理文本数据。其中,对数据资产池中的文本数据进行分词处理,识别出这些文本数据中的词语的过程,可以采用最短路径算法:
对所获取的原始文本数据进行切分处理,将原始文本数据切分为多个词串数据,根据词串数据之间的关联关系,构建词串数据之间的关联图。然后,利用预设的词频概率算法,对关联图进行计算,得到词串数据的每个关联词的词频概率。针对每个词串数据,根据该词串数据的每个关联词的词频概率,消除在对原始文本数据进行切分时产生的歧义,例如,假设原始文本数据为“我的确切地址在这里”,对该原始文本数据进行切分时,可能会切分为“我\的确\切\地址\在\这里”,切分过程中产生了歧义,因此需要进行歧义消除,从而更准确的识别出原始文本数据中的词语。
或者,也可以采用n元语法模型方法、最大匹配算法、交叉歧义算法等方式,本申请实施例对此不作限定。
S102:从待处理文本数据中抽取实体数据和事件数据。
获取到待处理文本数据之后,进一步的,可以对待处理文本数据进行实体抽取和事件抽取,从待处理文本数据中获取实体数据和事件数据。其中,对待处理文本数据的实体抽取和事件抽取可以同时进行,也可以按照一定的顺序先后进行,本申请实施例对此不作限定。
在本申请实施例中,实体数据是指一些具备公认意义的概念,比如人名、地名等,事件数据则是指一个具有多种事件要素的事情。
举例而言,如果要构建一个人际关系领域的本体,那么,在该本体中,实体数据可以为某个人,例如“张三”、“李四”等,也可以为某个地点,例如“北京市”、“某某酒店”等,同时,每个实体数据还有其对应的属性,例如“张三”的性别、年龄等,或者“北京市”的面积、时区等;事件数据可以为人与人之间发生的事情,例如“张三在九月十三号攻击李四”,在该事件数据中包括以下几种事件要素:主体对象“张三”、客体对象“李四”、事件手段“攻击”以及事件时间“九月十三号”,事件数据也可以为人与地点之间发生的事情,例如“张三在九月十三号入住了某某酒店”,在该事件数据中包括以下几种事件要素:主体对象“张三”、客体对象“某某酒店”、事件手段“入住”以及事件时间“九月十三号”。
具体的,在一种实现方式中,可以通过如下方式从待处理文本数据中抽取实体数据:
首先,对待处理文本数据中的每个词语进行语料标注,确定每个词语的词性,其中,每个词语的词性可以为名词、动词、形容词等等。具体的,在进行语料标注时,可以先针对每个词语,利用条件随机场模型从预先获取的特征模板库中,获取该词语的转移概率、状态概率和特征权重,然后根据转移概率、状态概率和特征权重,分别计算该词语为不同词性的概率;将满足预设第一概率条件的词性作为该词语的词性,比如,可以将概率最大的词性作为该词语的词性。
其中,词语的转移概率是指在待处理文本数据中,每个词语的下一个词语为各个不同词性时所对应的的概率,例如,假设当前词语为动词,那么,就可以计算下一个词语为名词的概率为x1,为动词的概率为x2,等等。状态概率是第i个位置标记为某个词性的概率,例如,每个句子的第一个词语为名词的概率为y1,每个句子的第二个词语为动词的概率为y2,等等。权重主要体现该词语为不同词性所对应的的概率,例如,当前词语为名词的概率为m1,为动词的概率为m2,等等。利用维特比算法,可以通过每个词语的转移概率、状态概率和特征权重,计算该词语为不同词性的概率。
然后,筛选出词性为名词的词语,识别这些词语的语义信息,比如,可以识别出“张三”是人名,“北京市”是地名,而“非常”没有语义信息,等 等,其中,识别出的具有语义信息的词语,就可以作为待处理词语。
进一步的,可以从待处理词语中,筛选出不存在于预设词典中的词语,作为候选实体数据,其中,预设词典是指自然语言处理技术中预置的默认词典,在预设词典中包括的词语,都可以认为是已知的词语,而不能作为候选实体数据。
进而,可以根据预设的实体抽取规则,对候选实体数据进行抽取,得到实体数据,这一过程也就是建立实体的各个属性与实体之间的对应关系的过程。其中,实体抽取规则可以根据用户的需求自行设定,例如,如果要构建一个关于人际关系的本体,那么,在该本体中,可以只要“人”这一类实体,而不要“地点”这一类实体;或者,可以对实体的模板进行设定,例如,对每一个“人”来说,可以只要他的年龄和性别属性,而不需要他的籍贯、星座等其他属性,如果某人只有年龄属性,没有性别属性,那么,可以将这个人的性别属性标记为空,这样,得到的是用户所需要的、而且具有统一的格式的实体数据。一方面减少了本体构建过程中的计算量,另一方面也便于对实体数据的存储和查询。
在本申请实施例中,从待处理文本数据中抽取事件数据可以直接通过对待处理文本数据进行文本抽取来实现。
首先,可以直接从待处理文本数据中识别出候选事件数据,其中,每个候选事件数据由一项或多项事件要素组成,例如:事件的发生时间、参与方、事件演变状态、事件发生环境和事件发生条件等。
然后,可以根据预设的事件抽取规则,对识别出的候选事件数据进行筛选,将筛选出的候选事件数据作为事件数据,类似的,事件抽取规则也可以根据用户的需求自行设定,例如,如果要构建一个关于人际关系的本体,那么,在该本体中,可以只要参与方为“人”的这一类事件,而不要参与方为“机器”的这一类事件;或者,可以对事件数据的模板进行设定,例如,对每一个事件来说,可以只要它的参与方、事件演变状态,而不需要他的事件的发生时间、事件发生环境和事件发生条件等其他要素,这样,得到的是用户所需要的、而且具有统一的格式的事件数据,进一步的减少了本体构建过程中的计算量。而且,根据事件数据的不同的要素,可以对事件数据进行分 类存储,进一步便于后续对事件数据的查询。
S103:基于待处理文本数据,预测实体数据之间的实体关系。
得到实体数据之后,就可以结合实体数据在待处理文本数据中的上下文,对实体数据之间的关系进行预测,得到实体关系。
延续上述例子,假设所构建的本体是关于人际关系领域的,那么,实体数据之间的实体关系可以为人与人之间的关系,例如,“张三”与“李四”之间的实体关系为“雇佣关系”,“张三”与“王五”之间的实体关系是同事关系等等;或者,实体数据之间的实体关系可以为人与地点之间的关系,例如,“张三”与“学校A”之间的实体关系为“母校与学生”,“李四”与“学校A”之间的实体关系也为“母校与学生”,那么,可以推断出张三”与“李四”之间的实体关系为“校友”,等等。
在一种实现方式中,可以采用如下方式对实体数据之间的关系进行预测:
第一步,利用预先训练得到的句法结构模型,标注每个词语在待处理文本数据中的句法成分。每个词语的句法成分是指该词语在其所属的句子中的组成成分,包括主语、谓语、宾语、状语等等。其中,句法结构模型是通过第一样本数据对预设的第一训练模型进行训练得到的,第一训练模型可以为马尔科夫模型、神经网络模型或其他用于进行机器学习的模型,本申请实施例对此不做限定。
第二步,根据所标注的每个词语的句法成分,利用预先训练得到的语义角色标注模型,预测每个词语的语义角色。语义角色主要是指句法成分被标注为谓语的词语与其他词语之间的语义角色关系,主要包括施事者、受事者、客体、经验者、受益者、工具、处所、目标和来源等。
举例而言,假设待处理文本数据为:“张三/攻击/李四”,经过句法成分标注,待处理文本数据中,“张三”为主语,“攻击”为谓语,“李四”为宾语,则根据“张三”和“李四”与谓语“攻击”之间的关系,可以将“张三”的语义角色标注为施事者,也就是某一动作的主动方,将“李四”的语义角色标注为受事者,也就是某一动作的被动方。
其中,语义角色标注模型是通过第二样本数据对预设的第二训练模型进行训练得到的,第二训练模型可以为支持向量机模型、KNN(K-Nearest  Neighbour,最邻近规则分类)模型或其他用于进行机器学习的模型,本申请实施例对此不做限定。
在本申请实施例中,第一样本数据和第二样本数据通常是不同的数据,为了便于描述,将用于训练句法结构模型的数据称为第一样本数据,将用于训练语义角色标注模型的数据称为第二样本数据。
第三步,根据所预测的每个词语的语义角色,确定所抽取的实体数据的语义角色,分析实体数据之间的实体关系。在上一步骤中,已经得到了每个词语的语义角色,在此之后,可以根据待处理文本数据中的每个词语的语义角色,与抽取出的实体数据之间进行匹配,从而确定每个实体数据的语义角色。进一步的,可以对实体数据的语义角色进行分析,从而得到实体数据之间的实体关系。
例如,延续上述例子,在确定“张三”和“李四”两个词语的语义角色之后,可以将“张三”和“李四”两个词语与之前的步骤中抽取出的实体数据进行匹配,将“张三”和“李四”两个词语的语义角色转换为“张三”和“李四”两个实体数据的语义角色。然后,可以结合预设的实体关系抽取规则,对这两个实体数据的语义角色进行分析,比如,根据“张三”和“李四”的语义角色以及事件手段本身,也就是施事者、受事者以及谓语“攻击”,可以确定出“张三”和“李四”之间的实体关系为加害者与受害者。
或者,还可以采用其他的方式进行实体关系抽取,例如基于核函数的实体关系抽取方法,该方法直接使用字符串的原始形式作为处理对象,通过计算任何两个处理对象之间的核函数来实现实体关系抽取;再比如基于深度学习的实体关系抽取方法,该方法提出使用递归神经网络来实现实体关系抽取,首先对待处理文本数据进行句法解析,然后为句法树上的每个节点学习向量表示,再通过递归神经网络,从句法树最低端的词向量开始,按照待处理文本数据的句法结构迭代合并,最终得到待处理文本数据中每个句子的向量表示,进一步进行实体关系分类;本申请实施例对此不做限定。
S104:对事件数据进行语义分析,基于分析结果,生成由事件数据之间的事件关系组成的事件体系网络,得到包括实体数据、事件数据、实体关系及事件体系网络的本体。
进一步的,可以对提取出的事件数据进行语义分析,基于事件数据的语义,可以提取出事件数据之间的语义关系,从而生成由事件数据之间的事件关系组成的事件体系网络。
具体的,第一步,可以对提取出的事件数据进行语义分析,基于分析结果,构建事件发生序列。
其中,在进行语义分析时,可以对每个事件数据进行语义指代消解,明确事件数据中的“你”、“我”、“他”等代词所指代的含义,这样,可以提高语义分析的准确性。得到每个事件数据的语义后,可以利用自然语言推理算法,进一步确定每个事件数据的发生顺序,然后根据事件数据的发生顺序,就可以构建事件发生序列,事件发生序列是指将每个事件数据按照发生顺序连接的事件序列。
举例而言,“张三在九月十三号入住了某某酒店”和“他在九月十四号从这里离开”为两个事件数据,根据待处理文本中的上下文关系,首先进行语义指代消解,“他”和“这里”分别指代的是“张三”和“某某酒店”,也就是说,“他在九月十四号从这里离开”的语义为“张三在九月十四号从某某酒店离开”,进一步的,从这两个事件数据中可以推理出事件的发生顺序,张三一定是先入住某某酒店,才能从某某酒店离开,即事件发生序列为从“张三在九月十三号入住了某某酒店”到“他在九月十四号从这里离开”。
第二步,可以基于所构建的事件发生序列,确定各个事件数据之间的事件关系,生成由事件数据之间的事件关系组成的事件体系网络,其中,事件关系包括因果关系、伴随关系和顺承关系等等。
其中,得到事件发生序列后,可以以此为依据,构建有向无环图,进一步的,可以利用贝叶斯网络模型等算法对得到的有向无环图进行计算,得到各个事件数据之间的事件转移概率,也就是针对某一个事件数据而言,可能从该事件数据进一步发展为其他事件数据的概率。然后,就可以根据各个事件数据之间的事件转移概率,确定各个事件数据之间的事件关系,生成由事件数据之间的事件关系组成的事件体系网络。
举例而言,对于每一种事件关系,其所对应的事件转移概率都是不同的,比如,如果事件数据A和事件数据B之间是因果关系,那么事件数据A和事 件数据B之间的事件转移概率可能为50%,如果是伴随关系,那么事件数据A和事件数据B之间的事件转移概率可能为20%,等等,具体的每种事件关系所对应的事件转移概率可以根据对大量数据的实验得到,本申请实施例对此不做限定。
通过以上步骤,对待处理文本数据进行分析,得到了实体数据、事件数据、实体关系及事件体系网络,换句话说,也就得到了本体。由于本体中包括了事件体系网络,因此得到的本体是网络结构,相比于现有技术中的层级结构,更能体现出实体数据和事件数据之间的关系。
在一种实现方式中,可以预设本体模板,与事件数据的模板和事件数据的模板类似,本体模板中设定了本体所需要的数据的格式,比如每个实体数据所具备的具体的属性有哪些、每个事件数据所具备的具体的要素有哪些、实体数据之间的实体关系可能有哪些、事件数据之间的事件关系可能有哪些,等等。然后,可以将得到的实体数据、事件数据、实体关系及事件体系网络映射至预设的本体模板中,这样,得到的本体中的数据更规范,进一步方便用户的查询。
而且,上述预设的本体模板还可以随时根据用户的需求进行更新,对所需要的实体数据、事件数据、实体关系及事件体系网的格式进行增加或删除,得到新的本体模板,然后可以将实体数据、事件数据、实体关系及事件体系网络映射至新的本体模板中,得到新的本体,从而实现了对本体的更新和升级,减少由于本体模板固化导致的信息丢失。
进一步的,在得到本体后,可以利用预先设定的评价规则,对本体进行评价。比如,可以利用一些专家知识,对本体中的实体数据、事件数据、实体关系及事件体系网络的准确度进行评价,判断本体从待处理文本数据中抽取的这些数据是否符合常理,等等。
根据评价结果,可以判断出得到的本体是否满足预设期望条件,若满足期望条件,则对本体进行展示。在展示时,可以将本体中的实体数据、事件数据、实体关系及事件体系网络绘制为关系图,可视化的向用户展示本体中的知识图谱,便于用户浏览。
由以上可见,本申请实施例提供的本体构建方法,通过从待处理文本数 据中抽取实体数据和事件数据,预测所获取的语义元数据中的实体数据之间的实体关系,以及对所获取的语义元数据中的事件数据进行语义分析,基于分析结果,生成由事件数据之间的事件关系组成的事件体系网络,得到包括实体数据、事件数据、实体关系及事件体系网络的本体。可见,本方案中构建的本体包括实体数据、事件数据、实体关系及事件体系网络,相比于现有方案构建的本体更加完善。
如图2所示,为本申请实施例提供的一种本体构建方法的另一种流程示意图,包括如下步骤:
S201:获取待处理文本数据。
有时,用户需要对某一领域内的各种信息进行组织概括或对某一领域内的某种信息进行查询,例如,在人际交往领域,用户可能需要了解人与人之间的关系网络,或者需要了解与某人有交往的人群。领域内的各种信息通常来源于大量的原始文本数据,如果借助人工处理的方式来处理这些原始文本数据,会耗费大量的时间和精力。
在这种情况下,可以构建该领域的本体,通过该领域的本体,可以方便的实现对该领域内各种信息的组织和分析,同时能为用户提供信息查询等功能。
在构建本体时,可以先获取待处理文本数据,其中,待处理文本数据是一些经过分词处理后的文本数据,在待处理文本数据中,包括大量的词语。在本申请实施例中,可以直接获取待处理文本数据,也可以先获取原始文本数据,通过对所获取的原始文本数据进行预处理、分词处理等自然语言处理方法,从而得到待处理文本数据,本申请实施例对此不做限定。
S202:从待处理文本数据中抽取实体数据和事件数据。
获取到待处理文本数据之后,进一步的,可以对待处理文本数据进行实体抽取和事件抽取,从待处理文本数据中获取实体数据和事件数据。其中,对待处理文本数据进行实体抽取和事件抽取可以同时进行,也可以按照一定的顺序先后进行,本申请实施例对此不作限定。
在本申请实施例中,实体数据是指一些具备公认意义的概念,比如人名、 地名等,事件数据则是指一个具有多种事件要素的事情。
举例而言,如果要构建一个人际关系领域的本体,那么,在该本体中,实体数据可以为某个人,例如“张三”、“李四”等,也可以为某个地点,例如“北京市”、“某某酒店”等,同时,每个实体数据还有其对应的属性,例如“张三”的性别、年龄等,或者“北京市”的面积、时区等;事件数据可以为人与人之间发生的事情,例如“张三在九月十三号攻击李四”,在该事件数据中包括以下几种事件要素:主体对象“张三”、客体对象“李四”、事件手段“攻击”以及事件时间“九月十三号”,事件数据也可以为人与地点之间发生的事情,例如“张三在九月十三号入住了某某酒店”,在该事件数据中包括以下几种事件要素:主体对象“张三”、客体对象“某某酒店”、事件手段“入住”以及事件时间“九月十三号”。
在一种实现方式中,可以通过如下方式从待处理文本数据中抽取实体数据:
首先,对待处理文本数据中的每个词语进行语料标注,确定每个词语的词性,然后,筛选出词性为名词的词语,识别这些词语的语义信息,进一步的,可以从待处理词语中,筛选出不存在于预设词典中的词语,作为候选实体数据,进而,可以根据预设的实体抽取规则,对候选实体数据进行抽取,得到实体数据,也就是建立实体的各个属性与实体之间的对应关系。
在本申请实施例中,从待处理文本数据中抽取事件数据可以直接通过对待处理文本数据进行文本抽取来实现。
首先,可以直接从待处理文本数据中识别出候选事件数据,其中,每个候选事件数据由一项或多项事件要素组成,例如:事件的发生时间、参与方、事件演变状态、事件发生环境和事件发生条件等。然后,可以根据预设的事件抽取规则,对识别出的候选事件数据进行筛选,将筛选出的候选事件数据作为事件数据。
S203:利用预先训练得到的句法结构模型,标注每个词语在待处理文本数据中的句法成分。
其中,每个词语的句法成分是指该词语在其所属的句子中的组成成分,包括主语、谓语、宾语、状语等等。
在一种实现方式中,句法结构模型是通过第一样本数据对预设的第一训练模型进行训练得到的,第一训练模型可以为马尔科夫模型、神经网络模型或其他用于进行机器学习的模型,本申请实施例对此不做限定。
将所获取的第一样本数据输入预设的第一训练模型,得到的输出结果中包括第一样本数据中每个词语的句法成分的初始概率向量、转移矩阵和状态矩阵,其中,初始概率向量指的是当前状态下,第一样本数据中每个词语在其所属的句子中对应不同句法成分的概率,转移矩阵是指第一样本数据中每个词语从某一句法成分转化为另一句法成分的概率,状态矩阵是指该词语对应的所有可能的句法成分。
同时,判断输出结果是否满足预设条件,如果不满足,则对预设的第一训练模型进行迭代调整,直至输出结果满足预设条件,这样,就得到了句法结构模型。其中,预设条件可以是指对模型训练过程中的迭代次数限制,例如,当迭代次数达到500次,则可以认为句法结构模型已经训练完成;或者,预设条件还可以是指对训练得到的模型的准确度的限制,例如,将第一样本数据分为训练数据和测试数据两部分,利用测试数据判断训练得到的模型输出的句法成分结果是否准确,如果准确率达到预设的阈值,则可以认为句法结构模型已经训练完成。
将待处理文本数据输入至句法结构模型中,可以得到待处理文本数据中每个词语的初始概率向量、转移矩阵和状态矩阵,进而可以根据模型的输出结果,利用相应的算法,比如维特比算法,计算出待处理文本数据中每个词语的句法成分的概率,将概率最大的作为词语的句法成分,对词语进行标注。
S204:根据所标注的每个词语的句法成分,利用预先训练得到的语义角色标注模型,预测每个词语的语义角色。
其中,语义角色主要是指句法成分被标注为谓语的词语与其他词语之间的语义角色关系,主要包括施事者、受事者、客体、经验者、受益者、工具、处所、目标和来源等。
在一种实现方式中,可以将进行句法成分标注后的待处理文本数据输入预先训练得到的语义角色标注模型,计算每个句法成分被标注为谓语的词语与其它词语之间为各种语义角色时分别对应的概率,将满足预设第二概率条 件的语义角色作为该句法成分被标注为谓语的词语与其它词语之间的语义角色,比如,可以将概率最大的语义角色作为该句法成分被标注为谓语的词语与其它词语之间的语义角色。
举例而言,假设待处理文本数据为:“张三/攻击/李四”,经过句法成分标注,待处理文本数据中,“张三”为主语,“攻击”为谓语,“李四”为宾语,将上述句法成分标注后的待处理文本数据输入预先训练得到的语义角色标注模型,可以计算出“攻击”与“张三”和“李四”之间为各种语义角色的概率,比如,“张三”的语义角色标注为施事者的概率为90%,被标注为工具的概率为5%,则选择满足预设第二概率条件的语义角色,比如选择概率最大的语义角色,也就说,将“张三”的语义角色标注为施事者,类似的,将“李四”的语义角色标注为受事者。
其中,语义角色标注模型是通过第二样本数据对预设的第二训练模型进行训练得到的,其中,第二训练模型可以为支持向量机模型、KNN(K-Nearest Neighbour,最邻近规则分类)模型或其他用于进行机器学习的模型,本申请实施例对此不做限定。具体的,可以采用如下步骤,训练得到语义角色标注模型:
先获取第二样本数据,然后对所获取的第二样本数据进行分词处理、词性标注处理和句法分析处理等操作,再根据预设的删除规则,删除经过上述处理的第二样本数据中不会作为语义角色的数据,得到训练数据,利用训练数据,对预设的第二训练模型进行训练,就可以得到语义角色标注模型。由于训练数据经过了上述处理过程,因此得到的语义角色标注模型的识别性能也会有所提高。
在本申请实施例中,第一样本数据和第二样本数据通常是不同的数据,为了便于描述,将用于训练句法结构模型的数据称为第一样本数据,将用于训练语义角色标注模型的数据称为第二样本数据。
在步骤S203中,利用句法结构模型计算出的每个词语在待处理文本数据中的句法成分不是唯一的,可能存在计算错误,而且,每个词语的句法成分会对与其相关的其他词语的句法成分产生影响,比如,如果词语A为谓语,那么A的下一个词语为宾语的可能性为50%,而如果A为状语,那么A的下一 个词语为宾语的可能性为10%,这样,会对后续的计算结果产生较大的影响。
在一种实现方式中,可以在利用所标注的每个词语的句法成分进行下一步计算之前,对句法成分标注结果进行歧义消除,得到每个词语的校正句法成分,根据所标注的每个词语的校正句法成分,利用预先训练得到的语义角色标注模型,预测每个词语的语义角色,从而提高所预测的语义角色的准确性。
其中,在进行歧义消除时,可以先获取每个词语被标注为不同句法成分的概率,然后,将各个词语的概率相乘,将整个句子中各个概率的乘积为最大的情况下的每个词语的句法成分作为每个词语的校正句法成分;或者,也可以由用户进行人工评审,判断句法成分标注结果是否准确,等等。
S205:根据所预测的每个词语的语义角色,确定所抽取的实体数据的语义角色,分析实体数据之间的实体关系。
在S204中,已经得到了每个词语的语义角色,在此之后,可以根据待处理文本数据中的每个词语的语义角色,与抽取出的实体数据之间进行匹配,从而确定每个实体数据的语义角色。进一步的,可以对实体数据的语义角色进行分析,从而得到实体数据之间的实体关系。
例如,延续上述例子,在确定“张三”和“李四”两个词语的语义角色之后,可以将“张三”和“李四”两个词语与之前的步骤中抽取出的实体数据进行匹配,将“张三”和“李四”两个词语的语义角色转换为“张三”和“李四”两个实体数据的语义角色。然后,可以结合预设的实体关系抽取规则,对这两个实体数据的语义角色进行分析,比如,根据“张三”和“李四”的语义角色以及事件手段本身,也就是施事者、受事者以及谓语“攻击”,可以确定出“张三”和“李四”之间的实体关系为加害者与受害者。
S206:对事件数据进行语义分析,基于分析结果,构建事件发生序列。
提取出待处理文本数据中的事件数据之后,可以进一步对事件数据进行语义分析,基于分析结果,构建事件发生序列。
其中,在进行语义分析时,可以对每个事件数据进行语义指代消解,明确事件数据中的“你”、“我”、“他”等代词所指代的含义,这样,可以提高语义分析的准确性。得到每个事件数据的语义后,可以利用自然语言推理算 法,进一步确定每个事件数据的发生顺序,然后根据事件数据的发生顺序,就可以构建事件发生序列,事件发生序列是指将每个事件数据按照发生顺序连接的事件序列。
举例而言,“张三在九月十三号入住了某某酒店”和“他在九月十四号从这里离开”为两个事件数据,根据待处理文本中的上下文关系,首先进行语义指代消解,“他”和“这里”分别指代的是“张三”和“某某酒店”,也就是说,“他在九月十四号从这里离开”的语义为“张三在九月十四号从某某酒店离开”,进一步的,从这两个事件数据中可以推理出事件的发生顺序,张三一定是先入住某某酒店,才能从某某酒店离开,即事件发生序列为从“张三在九月十三号入住了某某酒店”到“他在九月十四号从这里离开”。
S207:基于事件发生序列,确定各个事件数据之间的事件关系,生成由事件数据之间的事件关系组成的事件体系网络,得到包括所述实体数据、所述事件数据、所述实体关系及所述事件体系网络的本体;其中,事件关系包括以下一项或多项:因果关系、伴随关系和顺承关系。
得到事件发生序列后,可以以此为依据,构建有向无环图,进一步的,可以利用贝叶斯网络模型等算法对得到的有向无环图即行计算,得到各个事件数据之间的事件转移概率,也就是针对某一个事件数据而言,可能从该事件数据进一步发展为其他事件数据的概率。然后,就可以根据各个事件数据之间的事件转移概率,确定各个事件数据之间的事件关系,生成由事件数据之间的事件关系组成的事件体系网络。
举例而言,对于每一种事件关系,其所对应的事件转移概率都是不同的,比如,如果事件数据A和事件数据B之间是因果关系,那么事件数据A和事件数据B之间的事件转移概率可能为50%,如果是伴随关系,那么事件数据A和事件数据B之间的事件转移概率可能为20%,等等,具体的每种事件关系所对应的事件转移概率可以根据对大量数据的实验得到,本申请实施例对此不做限定。
通过以上步骤,对待处理文本数据进行分析,得到了实体数据、事件数据、实体关系及事件体系网络,换句话说,也就得到了本体。由于本体中包括了事件体系网络,因此得到的本体是网络结构,相比于现有技术中的层级 结构,更能体现出实体数据和事件数据之间的关系。
在一种实现方式中,可以预设本体模板,与事件数据的模板和事件数据的模板类似,本体模板中设定了本体所需要的数据的格式,比如每个实体数据所具备的具体的属性有哪些、每个事件数据所具备的具体的要素有哪些、实体数据之间的实体关系可能有哪些、事件数据之间的事件关系可能有哪些,等等。然后,可以将得到的实体数据、事件数据、实体关系及事件体系网络映射至预设的本体模板中,这样,得到的本体中的数据更规范,进一步方便用户的查询。
而且,上述预设的本体模板还可以随时根据用户的需求进行更新,对所需要的实体数据、事件数据、实体关系及事件体系网的格式进行增加或删除,得到新的本体模板,然后可以将实体数据、事件数据、实体关系及事件体系网络映射至新的本体模板中,得到新的本体,从而实现了对本体的更新和升级,减少由于本体模板固化导致的信息丢失。
进一步的,在得到本体后,可以利用预先设定的评价规则,对本体进行评价。比如,可以利用一些专家知识,对本体中的实体数据、事件数据、实体关系及事件体系网络的准确度进行评价,判断本体从待处理文本数据中抽取的这些数据是否符合常理,等等。
根据评价结果,可以判断出得到的本体是否满足预设期望条件,若满足期望条件,则对本体进行展示。在展示时,可以将本体中的实体数据、事件数据、实体关系及事件体系网络绘制为关系图,可视化的向用户展示本体中的知识图谱,便于用户浏览。
由以上可见,本申请实施例提供的本体构建方法,通过从待处理文本数据中抽取实体数据和事件数据,预测所获取的语义元数据中的实体数据之间的实体关系,以及对所获取的语义元数据中的事件数据进行语义分析,基于分析结果,生成由事件数据之间的事件关系组成的事件体系网络,得到包括实体数据、事件数据、实体关系及事件体系网络的本体。可见,本方案中构建的本体包括实体数据、事件数据、实体关系及事件体系网络,相比于现有方案构建的本体更加完善。
与上述本体构建方法相对应,本申请实施例还提供了一种本体构建装置。
如图3所示,为本申请实施例提供的一种本体构建装置的结构示意图,该装置包括:
数据获取装置310,用于获取待处理文本数据;
信息抽取模块320,用于从所述待处理文本数据中抽取实体数据和事件数据;
实体关系抽取模块330,用于基于所述待处理文本数据,预测所述实体数据之间的实体关系;
事件关系抽取模块340,用于对所述事件数据进行语义分析,基于分析结果,生成由所述事件数据之间的事件关系组成的事件体系网络,得到包括所述实体数据、所述事件数据、所述实体关系及所述事件体系网络的本体。
在一种实现方式中,信息抽取模块320,具体用于:
针对所述待处理文本数据中的每个词语,通过对该词语进行语料标注,确定该词语的词性;
筛选出词性为名词、且具有语义信息的词语,作为待处理词语;
从所述待处理词语中,筛选出不存在于预设词典中的词语,作为候选实体数据;
根据预设的实体抽取规则,对所述候选实体数据进行抽取,得到实体数据。
在一种实现方式中,信息抽取模块320,具体用于:
针对每个词语,从预先获取的特征模板库中,获取该词语的转移概率、状态概率和特征权重;根据所述转移概率、状态概率和特征权重,分别计算该词语为不同词性的概率;将满足预设第一概率条件的词性作为该词语的词性。
在一种实现方式中,信息抽取模块320,具体用于:
从所述待处理文本数据中识别出候选事件数据;其中,所述候选事件数据包括以下一项或多项:事件的发生时间、参与方、事件演变状态、事件发生环境和事件发生条件;
根据预设的事件抽取规则,对识别出的候选事件数据进行筛选,将筛选 出的候选事件数据作为事件数据。
在一种实现方式中,实体关系抽取模块330,具体用于:
利用预先训练得到的句法结构模型,标注每个词语在所述待处理文本数据中的句法成分;
根据所标注的每个词语的句法成分,利用预先训练得到的语义角色标注模型,预测所述每个词语的语义角色;
根据所预测的每个词语的语义角色,确定所抽取的实体数据的语义角色,分析所述实体数据之间的实体关系。
在一种实现方式中,可以采用如下步骤,训练得到所述句法结构模型:
获取第一样本数据;
将所述第一样本数据输入预设的第一训练模型,得到的输出结果中包括所述第一样本数据中每个词语的句法成分的初始概率向量、转移矩阵和状态矩阵;
判断输出结果是否满足预设条件,如果不满足,对所述预设的第一训练模型进行迭代调整,直至输出结果满足预设条件,得到所述句法结构模型;
所述实体关系抽取模块,具体用于:
将所述待处理文本数据输入所述句法结构模型,得到每个词语的初始概率向量、转移矩阵和状态矩阵;根据每个词语的初始概率向量、转移矩阵和状态矩阵,标注每个词语在所述待处理文本数据中的句法成分。
在一种实现方式中,实体关系抽取模块330,还用于:
消除所标注的每个词语的句法成分在所述待处理文本数据中的歧义,得到每个词语的校正句法成分;
所述实体关系抽取模块,具体用于:
根据所述每个实体数据的校正句法成分,利用预先训练得到的语义角色标注模型,预测所述每个词语的语义角色。
在一种实现方式中,实体关系抽取模块330,具体用于:
将句法成分标注后的待处理文本数据输入预先训练得到的语义角色标注模型,计算每个句法成分被标注为谓语的词语与其它词语之间存在的多种语义角色的概率;将满足预设第二概率条件的语义角色作为该句法成分被标注 为谓语的词语与其它词语之间的语义角色。
在一种实现方式中,可以采用如下步骤,训练得到所述语义角色标注模型:
获取第二样本数据;
对所获取的第二样本数据进行分析处理;其中,所述分析处理包括以下一项或多项:分词处理、词性标注处理和句法分析处理;
根据预设的删除规则,删除经过分析处理的第二样本数据中不会作为语义角色的数据,得到训练数据;
利用所述训练数据,对预设的第二训练模型进行训练,得到语义角色标注模型。
在一种实现方式中,事件关系抽取模块340,具体用于:
对所述事件数据进行语义分析,基于分析结果,构建事件发生序列;
基于所述事件发生序列,确定各个事件数据之间的事件关系,生成由所述事件数据之间的事件关系组成的事件体系网络;其中,所述事件关系包括以下一项或多项:因果关系、伴随关系和顺承关系。
在一种实现方式中,事件关系抽取模块340,具体用于:
针对每个事件数据,对该事件数据进行语义指代消解,确定该事件数据的语义;
根据每个事件数据的语义,确定每个事件数据的发生顺序,根据所述发生顺序,构建事件发生序列。
在一种实现方式中,事件关系抽取模块340,具体用于:
根据所述事件发生序列,构建有向无环图;
基于所述有向无环图,计算得到各个事件数据之间的事件转移概率;
根据所述各个事件数据之间的事件转移概率,确定各个事件数据之间的事件关系,生成由所述事件数据之间的事件关系组成的事件体系网络。
在一种实现方式中,所述装置还包括:
模板映射模块350,用于获取本体模板;将所述实体数据、所述事件数据、所述实体关系及所述事件体系网络映射至所述本体模板中,得到本体。
在一种实现方式中,模块映射模块350还用于:
对所述本体模板进行更新,得到新的本体模板;
将所述实体数据、所述事件数据、所述实体关系及所述事件体系网络映射至所述新的本体模板中,得到新的本体。
在一种实现方式中,所述装置还包括:
本体评价模块360,用于利用预先设定的评价规则,对所述本体进行评价,得到评价结果;根据所述评价结果,判断所述本体是否满足预设期望条件;若满足所述期望条件,则对所述本体进行展示。
由以上可见,本申请实施例提供的本体构建装置,通过从待处理文本数据中抽取实体数据和事件数据,预测所获取的语义元数据中的实体数据之间的实体关系,以及对所获取的语义元数据中的事件数据进行语义分析,基于分析结果,生成由事件数据之间的事件关系组成的事件体系网络,得到包括实体数据、事件数据、实体关系及事件体系网络的本体。可见,本方案中构建的本体包括实体数据、事件数据、实体关系及事件体系网络,相比于现有方案构建的本体更加完善。
本申请实施例还提供了一种电子设备,如图4所示,包括处理器401、通信接口402、存储器403和通信总线404,其中,处理器401,通信接口402,存储器403通过通信总线404完成相互间的通信,
存储器403,用于存放计算机程序;
处理器401,用于执行存储器403上所存放的程序时,实现如下步骤:
获取待处理文本数据;
从所述待处理文本数据中抽取实体数据和事件数据;
基于所述待处理文本数据,预测所述实体数据之间的实体关系;
对所述事件数据进行语义分析,基于分析结果,生成由所述事件数据之间的事件关系组成的事件体系网络,得到包括所述实体数据、所述事件数据、所述实体关系及所述事件体系网络的本体。
上述电子设备提到的通信总线可以是外设部件互连标准(Peripheral Component Interconnect,PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,EISA)总线等。该通信总线可以分为地址总线、数 据总线、控制总线等。为便于表示,图中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
通信接口用于上述电子设备与其他设备之间的通信。
存储器可以包括随机存取存储器(Random Access Memory,RAM),也可以包括非易失性存储器(Non-Volatile Memory,NVM),例如至少一个磁盘存储器。可选的,存储器还可以是至少一个位于远离前述处理器的存储装置。
上述的处理器可以是通用处理器,包括中央处理器(Central Processing Unit,CPU)、网络处理器(Network Processor,NP)等;还可以是数字信号处理器(Digital Signal Processing,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。
在本发明提供的又一实施例中,还提供了一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述实施例中任一所述的本体构建方法。
在本发明提供的又一实施例中,还提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述实施例中任一所述的本体构建方法。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个 可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘Solid State Disk(SSD))等。
由以上可见,本申请实施例提供的本体构建方法,通过从待处理文本数据中抽取实体数据和事件数据,预测所获取的语义元数据中的实体数据之间的实体关系,以及对所获取的语义元数据中的事件数据进行语义分析,基于分析结果,生成由事件数据之间的事件关系组成的事件体系网络,得到包括实体数据、事件数据、实体关系及事件体系网络的本体。可见,本方案中构建的本体包括实体数据、事件数据、实体关系及事件体系网络,相比于现有方案构建的本体更加完善。
需要说明的是,在文本中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
本说明书中的各个实施例均采用相关的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于装置实施例、电子设备实施例、存储介质实施例和计算机程序产品实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
以上所述仅为本申请的较佳实施例而已,并非用于限定本申请的保护范围。凡在本申请的精神和原则之内所作的任何修改、等同替换、改进等,均包含在本申请的保护范围内。

Claims (32)

  1. 一种本体构建方法,其特征在于,所述方法包括:
    获取待处理文本数据;
    从所述待处理文本数据中抽取实体数据和事件数据;
    基于所述待处理文本数据,预测所述实体数据之间的实体关系;
    对所述事件数据进行语义分析,基于分析结果,生成由所述事件数据之间的事件关系组成的事件体系网络,得到包括所述实体数据、所述事件数据、所述实体关系及所述事件体系网络的本体。
  2. 根据权利要求1所述的方法,其特征在于,所述从所述待处理文本数据中抽取实体数据,包括:
    针对所述待处理文本数据中的每个词语,通过对该词语进行语料标注,确定该词语的词性;
    筛选出词性为名词、且具有语义信息的词语,作为待处理词语;
    从所述待处理词语中,筛选出不存在于预设词典中的词语,作为候选实体数据;
    根据预设的实体抽取规则,对所述候选实体数据进行抽取,得到实体数据。
  3. 根据权利要求2所述的方法,其特征在于,所述针对每个词语,通过对该词语进行语料标注,确定该词语的词性,包括:
    针对每个词语,从预先获取的特征模板库中,获取该词语的转移概率、状态概率和特征权重;根据所述转移概率、状态概率和特征权重,分别计算该词语为不同词性的概率;将满足预设第一概率条件的词性作为该词语的词性。
  4. 根据权利要求1所述的方法,其特征在于,所述从所述待处理文本数据中抽取事件数据,包括:
    从所述待处理文本数据中识别出候选事件数据;其中,所述候选事件数据包括以下一项或多项:事件的发生时间、参与方、事件演变状态、事件发生环境和事件发生条件;
    根据预设的事件抽取规则,对识别出的候选事件数据进行筛选,将筛选 出的候选事件数据作为事件数据。
  5. 根据权利要求1所述的方法,其特征在于,所述基于所述待处理文本数据,预测所述实体数据之间的实体关系,包括:
    利用预先训练得到的句法结构模型,标注每个词语在所述待处理文本数据中的句法成分;
    根据所标注的每个词语的句法成分,利用预先训练得到的语义角色标注模型,预测所述每个词语的语义角色;
    根据所预测的每个词语的语义角色,确定所抽取的实体数据的语义角色,分析所述实体数据之间的实体关系。
  6. 根据权利要求5所述的方法,其特征在于,采用如下步骤,训练得到所述句法结构模型:
    获取第一样本数据;
    将所述第一样本数据输入预设的第一训练模型,得到的输出结果中包括所述第一样本数据中每个词语的句法成分的初始概率向量、转移矩阵和状态矩阵;
    判断输出结果是否满足预设条件,如果不满足,对所述预设的第一训练模型进行迭代调整,直至输出结果满足预设条件,得到所述句法结构模型;
    所述利用预先训练得到的句法结构模型,标注每个词语在所述待处理文本数据中的句法成分,包括:
    将所述待处理文本数据输入所述句法结构模型,得到每个词语的初始概率向量、转移矩阵和状态矩阵;
    根据每个词语的初始概率向量、转移矩阵和状态矩阵,标注每个词语在所述待处理文本数据中的句法成分。
  7. 根据权利要求5所述的方法,其特征在于,在根据所标注的每个词语的句法成分,利用预先训练得到的语义角色标注模型,预测所述每个词语的语义角色之前,所述方法还包括:
    消除所标注的每个词语的句法成分在所述待处理文本数据中的歧义,得到每个词语的校正句法成分;
    所述根据所标注的每个词语的句法成分,利用预先训练得到的语义角色 标注模型,预测所述每个词语的语义角色,包括:
    根据所述每个实体数据的校正句法成分,利用预先训练得到的语义角色标注模型,预测所述每个词语的语义角色。
  8. 根据权利要求5所述的方法,其特征在于,所述根据所标注的每个词语的句法成分,利用预先训练得到的语义角色标注模型,预测所述每个词语的语义角色,包括:
    将句法成分标注后的待处理文本数据输入预先训练得到的语义角色标注模型,计算每个句法成分被标注为谓语的词语与其它词语之间存在的多种语义角色的概率;将满足预设第二概率条件的语义角色作为该句法成分被标注为谓语的词语与其它词语之间的语义角色。
  9. 根据权利要求5所述的方法,其特征在于,采用如下步骤,训练得到所述语义角色标注模型:
    获取第二样本数据;
    对所获取的第二样本数据进行分析处理;其中,所述分析处理包括以下一项或多项:分词处理、词性标注处理和句法分析处理;
    根据预设的删除规则,删除经过分析处理的第二样本数据中不会作为语义角色的数据,得到训练数据;
    利用所述训练数据,对预设的第二训练模型进行训练,得到语义角色标注模型。
  10. 根据权利要求1所述的方法,其特征在于,所述对所述事件数据进行语义分析,基于分析结果,生成由所述事件数据之间的事件关系组成的事件体系网络,包括:
    对所述事件数据进行语义分析,基于分析结果,构建事件发生序列;
    基于所述事件发生序列,确定各个事件数据之间的事件关系,生成由所述事件数据之间的事件关系组成的事件体系网络;其中,所述事件关系包括以下一项或多项:因果关系、伴随关系和顺承关系。
  11. 根据权利要求10所述的方法,其特征在于,所述对所述事件数据进行语义分析,基于分析结果,构建事件发生序列,包括:
    针对每个事件数据,对该事件数据进行语义指代消解,确定该事件数据 的语义;
    根据每个事件数据的语义,确定每个事件数据的发生顺序,根据所述发生顺序,构建事件发生序列。
  12. 根据权利要求10所述的方法,其特征在于,所述基于所述事件发生序列,确定各个事件数据之间的语义关系,生成由所述事件数据之间的事件关系组成的事件体系网络,包括:
    根据所述事件发生序列,构建有向无环图;
    基于所述有向无环图,计算得到各个事件数据之间的事件转移概率;
    根据所述各个事件数据之间的事件转移概率,确定各个事件数据之间的事件关系,生成由所述事件数据之间的事件关系组成的事件体系网络。
  13. 根据权利要1所述的方法,其特征在于,所述方法还包括:
    利用预先设定的评价规则,对所述本体进行评价,得到评价结果;
    根据所述评价结果,判断所述本体是否满足预设期望条件;
    若满足所述期望条件,则对所述本体进行展示。
  14. 根据权利要求1所述的方法,其特征在于,所述得到包括所述实体数据、所述事件数据、所述实体关系及所述事件体系网络的本体,包括:
    获取本体模板;
    将所述实体数据、所述事件数据、所述实体关系及所述事件体系网络映射至所述本体模板中,得到本体。
  15. 根据权利要求14所述的方法,其特征在于,在所述将所述实体数据、所述事件数据、所述实体关系及所述事件体系网络映射至原始本体模板中,得到本体之后,所述方法还包括:
    对所述本体模板进行更新,得到新的本体模板;
    将所述实体数据、所述事件数据、所述实体关系及所述事件体系网络映射至所述新的本体模板中,得到新的本体。
  16. 一种本体构建装置,其特征在于,所述装置包括:
    数据获取装置,用于获取待处理文本数据;
    信息抽取模块,用于从所述待处理文本数据中抽取实体数据和事件数据;
    实体关系抽取模块,用于基于所述待处理文本数据,预测所述实体数据 之间的实体关系;
    事件关系抽取模块,用于对所述事件数据进行语义分析,基于分析结果,生成由所述事件数据之间的事件关系组成的事件体系网络,得到包括所述实体数据、所述事件数据、所述实体关系及所述事件体系网络的本体。
  17. 根据权利要求16所述的装置,其特征在于,所述信息抽取模块,具体用于:
    针对所述待处理文本数据中的每个词语,通过对该词语进行语料标注,确定该词语的词性;
    筛选出词性为名词、且具有语义信息的词语,作为待处理词语;
    从所述待处理词语中,筛选出不存在于预设词典中的词语,作为候选实体数据;
    根据预设的实体抽取规则,对所述候选实体数据进行抽取,得到实体数据。
  18. 根据权利要求17所述的装置,其特征在于,所述信息抽取模块,具体用于:
    针对每个词语,从预先获取的特征模板库中,获取该词语的转移概率、状态概率和特征权重;根据所述转移概率、状态概率和特征权重,分别计算该词语为不同词性的概率;将满足预设第一概率条件的词性作为该词语的词性。
  19. 根据权利要求16所述的装置,其特征在于,所述信息抽取模块,具体用于:
    从所述待处理文本数据中识别出候选事件数据;其中,所述候选事件数据包括以下一项或多项:事件的发生时间、参与方、事件演变状态、事件发生环境和事件发生条件;
    根据预设的事件抽取规则,对识别出的候选事件数据进行筛选,将筛选出的候选事件数据作为事件数据。
  20. 根据权利要求16所述的装置,其特征在于,所述实体关系抽取模块,具体用于:
    利用预先训练得到的句法结构模型,标注每个词语在所述待处理文本数 据中的句法成分;
    根据所标注的每个词语的句法成分,利用预先训练得到的语义角色标注模型,预测所述每个词语的语义角色;
    根据所预测的每个词语的语义角色,确定所抽取的实体数据的语义角色,分析所述实体数据之间的实体关系。
  21. 根据权利要求20所述的装置,其特征在于,采用如下步骤,训练得到所述句法结构模型:
    获取第一样本数据;
    将所述第一样本数据输入预设的第一训练模型,得到的输出结果中包括所述第一样本数据中每个词语的句法成分的初始概率向量、转移矩阵和状态矩阵;
    判断输出结果是否满足预设条件,如果不满足,对所述预设的第一训练模型进行迭代调整,直至输出结果满足预设条件,得到所述句法结构模型;
    所述实体关系抽取模块,具体用于:
    将所述待处理文本数据输入所述句法结构模型,得到每个词语的初始概率向量、转移矩阵和状态矩阵;根据每个词语的初始概率向量、转移矩阵和状态矩阵,标注每个词语在所述待处理文本数据中的句法成分。
  22. 根据权利要求20所述的装置,其特征在于,所述实体关系抽取模块,还用于:
    消除所标注的每个词语的句法成分在所述待处理文本数据中的歧义,得到每个词语的校正句法成分;
    所述实体关系抽取模块,具体用于:
    根据所述每个实体数据的校正句法成分,利用预先训练得到的语义角色标注模型,预测所述每个词语的语义角色。
  23. 根据权利要求20所述的装置,其特征在于,所述实体关系抽取模块,具体用于:
    将句法成分标注后的待处理文本数据输入预先训练得到的语义角色标注模型,计算每个句法成分被标注为谓语的词语与其它词语之间存在的多种语义角色的概率;将满足预设第二概率条件的语义角色作为该句法成分被标注 为谓语的词语与其它词语之间的语义角色。
  24. 根据权利要求20所述的装置,其特征在于,采用如下步骤,训练得到所述语义角色标注模型:
    获取第二样本数据;
    对所获取的第二样本数据进行分析处理;其中,所述分析处理包括以下一项或多项:分词处理、词性标注处理和句法分析处理;
    根据预设的删除规则,删除经过分析处理的第二样本数据中不会作为语义角色的数据,得到训练数据;
    利用所述训练数据,对预设的第二训练模型进行训练,得到语义角色标注模型。
  25. 根据权利要求16所述的装置,其特征在于,所述事件关系抽取模块,具体用于:
    对所述事件数据进行语义分析,基于分析结果,构建事件发生序列;
    基于所述事件发生序列,确定各个事件数据之间的事件关系,生成由所述事件数据之间的事件关系组成的事件体系网络;其中,所述事件关系包括以下一项或多项:因果关系、伴随关系和顺承关系。
  26. 根据权利要求25所述的装置,其特征在于,所述事件关系抽取模块,具体用于:
    针对每个事件数据,对该事件数据进行语义指代消解,确定该事件数据的语义;
    根据每个事件数据的语义,确定每个事件数据的发生顺序,根据所述发生顺序,构建事件发生序列。
  27. 根据权利要求25所述的装置,其特征在于,所述事件关系抽取模块,具体用于:
    根据所述事件发生序列,构建有向无环图;
    基于所述有向无环图,计算得到各个事件数据之间的事件转移概率;
    根据所述各个事件数据之间的事件转移概率,确定各个事件数据之间的事件关系,生成由所述事件数据之间的事件关系组成的事件体系网络。
  28. 根据权利要16所述的装置,其特征在于,所述装置还包括:
    本体评价模块,用于利用预先设定的评价规则,对所述本体进行评价,得到评价结果;根据所述评价结果,判断所述本体是否满足预设期望条件;若满足所述期望条件,则对所述本体进行展示。
  29. 根据权利要求16所述的装置,其特征在于,所述装置还包括:
    模板映射模块,用于获取本体模板;将所述实体数据、所述事件数据、所述实体关系及所述事件体系网络映射至所述本体模板中,得到本体。
  30. 根据权利要求29所述的装置,其特征在于,所述模板映射模块,还用于:
    对所述本体模板进行更新,得到新的本体模板;
    将所述实体数据、所述事件数据、所述实体关系及所述事件体系网络映射至所述新的本体模板中,得到新的本体。
  31. 一种电子设备,其特征在于,包括处理器、通信接口、存储器和通信总线,其中,处理器,通信接口,存储器通过通信总线完成相互间的通信;
    存储器,用于存放计算机程序;
    处理器,用于执行存储器上所存放的程序时,实现权利要求1~15任一所述的方法步骤。
  32. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现权利要求1~15任一所述的方法步骤。
PCT/CN2019/092170 2018-06-26 2019-06-21 一种本体构建方法及装置 WO2020001373A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810670149.9 2018-06-26
CN201810670149.9A CN110717034A (zh) 2018-06-26 2018-06-26 一种本体构建方法及装置

Publications (1)

Publication Number Publication Date
WO2020001373A1 true WO2020001373A1 (zh) 2020-01-02

Family

ID=68986288

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/092170 WO2020001373A1 (zh) 2018-06-26 2019-06-21 一种本体构建方法及装置

Country Status (2)

Country Link
CN (1) CN110717034A (zh)
WO (1) WO2020001373A1 (zh)

Cited By (45)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111400451A (zh) * 2020-03-16 2020-07-10 北京百度网讯科技有限公司 信息抽取方法、信息抽取装置和电子设备
CN111414482A (zh) * 2020-03-20 2020-07-14 北京百度网讯科技有限公司 一种事件论元抽取方法、装置以及电子设备
CN111460831A (zh) * 2020-03-27 2020-07-28 科大讯飞股份有限公司 事件确定方法、相关设备及可读存储介质
CN111581396A (zh) * 2020-05-06 2020-08-25 西安交通大学 一种基于多维特征融合与依存句法的事件图谱构建系统及方法
CN111582488A (zh) * 2020-04-23 2020-08-25 傲林科技有限公司 一种事件推演方法及装置
CN111611561A (zh) * 2020-06-09 2020-09-01 中国电子科技集团公司第二十八研究所 一种面向边缘分级用户的认证授权统一管控方法
CN111666379A (zh) * 2020-06-11 2020-09-15 腾讯科技(深圳)有限公司 一种事件元素提取方法和装置
CN111680508A (zh) * 2020-06-08 2020-09-18 北京百度网讯科技有限公司 文本的处理方法和装置
CN111694924A (zh) * 2020-06-17 2020-09-22 合肥中科类脑智能技术有限公司 一种事件抽取方法和系统
CN111767388A (zh) * 2020-05-07 2020-10-13 北京理工大学 一种候选池生成方法
CN111767334A (zh) * 2020-06-30 2020-10-13 北京百度网讯科技有限公司 信息抽取方法、装置、电子设备及存储介质
CN111814476A (zh) * 2020-06-09 2020-10-23 北京捷通华声科技股份有限公司 一种实体关系的抽取方法和装置
CN111832316A (zh) * 2020-06-30 2020-10-27 北京小米松果电子有限公司 语义识别的方法、装置、电子设备和存储介质
CN111859903A (zh) * 2020-07-30 2020-10-30 苏州思必驰信息科技有限公司 事件同指模型训练方法、事件同指消解方法
CN111881294A (zh) * 2020-07-30 2020-11-03 本识科技(深圳)有限公司 一种语料标注系统、方法及存储介质
CN111881288A (zh) * 2020-05-19 2020-11-03 杭州中奥科技有限公司 笔录信息真假的判断方法、装置、存储介质及电子设备
CN111966890A (zh) * 2020-06-30 2020-11-20 北京百度网讯科技有限公司 基于文本的事件推送方法、装置、电子设备和存储介质
CN112084531A (zh) * 2020-09-10 2020-12-15 杭州中奥科技有限公司 数据敏感程度分级方法、装置、设备及存储介质
CN112085104A (zh) * 2020-09-10 2020-12-15 杭州中奥科技有限公司 一种事件特征提取方法、装置、存储介质及电子设备
CN112149427A (zh) * 2020-10-12 2020-12-29 腾讯科技(深圳)有限公司 动词短语蕴含图谱的构建方法及相关设备
CN112329468A (zh) * 2020-11-03 2021-02-05 中国平安财产保险股份有限公司 异质关系网络的构建方法、装置、计算机设备及存储介质
CN112434532A (zh) * 2020-11-05 2021-03-02 西安交通大学 一种支持人机双向理解的电网环境模型及建模方法
CN112528046A (zh) * 2020-12-25 2021-03-19 网易(杭州)网络有限公司 新的知识图谱的构建方法、装置和信息检索方法、装置
CN112541095A (zh) * 2020-11-30 2021-03-23 北京奇艺世纪科技有限公司 视频标题生成方法、装置、电子设备及存储介质
CN112559656A (zh) * 2020-12-09 2021-03-26 河海大学 基于水文事件的事理图谱构建方法
CN112651447A (zh) * 2020-12-29 2021-04-13 广东电网有限责任公司电力调度控制中心 一种基于本体的资源分类标注方法及系统
CN112651234A (zh) * 2020-12-18 2021-04-13 中国科学院信息工程研究所 一种半开放信息抽取的方法及装置
CN112668336A (zh) * 2020-05-14 2021-04-16 北京金山数字娱乐科技有限公司 一种基于任务模型的词语处理方法
CN112765980A (zh) * 2021-02-01 2021-05-07 广州市刑事科学技术研究所 一种面向警情笔录的事件论元角色抽取方法和装置
CN112966079A (zh) * 2021-03-02 2021-06-15 中国电子科技集团公司第二十八研究所 一种用于对话系统的面向事件画像的文本分析方法
CN113065353A (zh) * 2021-03-16 2021-07-02 北京金堤征信服务有限公司 实体识别方法及装置
CN113268595A (zh) * 2021-05-24 2021-08-17 中国电子科技集团公司第二十八研究所 一种基于实体关系抽取的结构化机场警报处理方法
CN113536784A (zh) * 2021-01-05 2021-10-22 腾讯科技(深圳)有限公司 文本处理方法、装置、计算机设备和存储介质
CN113554174A (zh) * 2021-08-11 2021-10-26 上海明略人工智能(集团)有限公司 一种因果关系抽取方法、系统、电子设备及介质
CN113688253A (zh) * 2021-08-12 2021-11-23 浙江大学 一种层次感知的时态知识图谱表示学习方法
CN113806486A (zh) * 2021-09-23 2021-12-17 深圳市北科瑞声科技股份有限公司 长文本相似度的计算方法及装置、存储介质、电子装置
CN114492377A (zh) * 2021-12-30 2022-05-13 永中软件股份有限公司 一种事件角色的标注方法和计算机设备、计算机可读存储介质
CN114548086A (zh) * 2020-11-26 2022-05-27 税友软件集团股份有限公司 一种事件文本数据处理方法及相关装置
CN115292523A (zh) * 2022-08-04 2022-11-04 中国科学院空天信息创新研究院 一种基于图表示学习的时空信息推理方法
WO2023051399A1 (zh) * 2021-09-28 2023-04-06 浙江大学 一种基于本体指导的生成式事件抽取方法
CN116303996A (zh) * 2023-05-25 2023-06-23 江西财经大学 基于多焦点图神经网络的主题事件抽取方法
CN116451678A (zh) * 2023-06-15 2023-07-18 阿里巴巴(中国)有限公司 数据关系识别及数据表整合方法
CN116737967A (zh) * 2023-08-15 2023-09-12 中国标准化研究院 一种基于自然语言的知识图谱构建和完善系统及方法
CN116992870A (zh) * 2023-09-26 2023-11-03 山东省计算中心(国家超级计算济南中心) 基于非对称核函数的文本信息实体关系抽取方法及系统
CN117252262A (zh) * 2023-09-28 2023-12-19 四川大学 知识图谱构建与专利信息检索方法及装置

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111400431A (zh) * 2020-03-20 2020-07-10 北京百度网讯科技有限公司 一种事件论元抽取方法、装置以及电子设备
CN112286916A (zh) * 2020-10-22 2021-01-29 北京锐安科技有限公司 一种数据处理方法、装置、设备及存储介质
CN112860864B (zh) * 2021-02-05 2022-11-08 陕西师范大学 一种基于概念图的故事语义可视化呈现方法
CN114610954B (zh) * 2022-03-09 2022-11-25 上海弘玑信息技术有限公司 信息处理方法及装置、存储介质和电子设备
CN114742055A (zh) * 2022-03-29 2022-07-12 北京感易智能科技有限公司 数据处理方法、装置、电子设备、介质及程序产品

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103207860A (zh) * 2012-01-11 2013-07-17 北大方正集团有限公司 舆情事件的实体关系抽取方法和装置
CN103617280A (zh) * 2013-12-09 2014-03-05 苏州大学 一种中文事件信息挖掘方法和系统
CN104331480A (zh) * 2014-11-07 2015-02-04 苏州大学 一种中文事件触发词的抽取系统及方法
CN105938495A (zh) * 2016-04-29 2016-09-14 乐视控股(北京)有限公司 实体关系识别方法及装置

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040133583A1 (en) * 2002-11-20 2004-07-08 Tingey Kenneth B. system architecture and method for entering and accessing entity data in events accounting
CN101446943A (zh) * 2008-12-10 2009-06-03 苏州大学 一种中文处理中基于语义角色信息的指代消解方法
CN101777071A (zh) * 2010-01-08 2010-07-14 华中师范大学 用于构建教育技术领域本体库的术语标注系统
CN105468605B (zh) * 2014-08-25 2019-04-12 济南中林信息科技有限公司 一种实体信息图谱生成方法及装置
CN104462326A (zh) * 2014-12-02 2015-03-25 百度在线网络技术(北京)有限公司 人物关系分析方法、提供人物信息的方法及装置
US9886665B2 (en) * 2014-12-08 2018-02-06 International Business Machines Corporation Event detection using roles and relationships of entities
CN106445990B (zh) * 2016-06-25 2019-10-11 上海大学 事件本体构建方法
CN107704637B (zh) * 2017-11-20 2019-12-13 中国人民解放军国防科技大学 一种面向突发事件的知识图谱构建方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103207860A (zh) * 2012-01-11 2013-07-17 北大方正集团有限公司 舆情事件的实体关系抽取方法和装置
CN103617280A (zh) * 2013-12-09 2014-03-05 苏州大学 一种中文事件信息挖掘方法和系统
CN104331480A (zh) * 2014-11-07 2015-02-04 苏州大学 一种中文事件触发词的抽取系统及方法
CN105938495A (zh) * 2016-04-29 2016-09-14 乐视控股(北京)有限公司 实体关系识别方法及装置

Cited By (83)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111400451B (zh) * 2020-03-16 2023-05-09 北京百度网讯科技有限公司 信息抽取方法、信息抽取装置和电子设备
CN111400451A (zh) * 2020-03-16 2020-07-10 北京百度网讯科技有限公司 信息抽取方法、信息抽取装置和电子设备
CN111414482A (zh) * 2020-03-20 2020-07-14 北京百度网讯科技有限公司 一种事件论元抽取方法、装置以及电子设备
CN111414482B (zh) * 2020-03-20 2024-02-20 北京百度网讯科技有限公司 一种事件论元抽取方法、装置以及电子设备
CN111460831A (zh) * 2020-03-27 2020-07-28 科大讯飞股份有限公司 事件确定方法、相关设备及可读存储介质
CN111460831B (zh) * 2020-03-27 2024-04-19 科大讯飞股份有限公司 事件确定方法、相关设备及可读存储介质
CN111582488A (zh) * 2020-04-23 2020-08-25 傲林科技有限公司 一种事件推演方法及装置
CN111581396B (zh) * 2020-05-06 2023-03-31 西安交通大学 一种基于多维特征融合与依存句法的事件图谱构建系统及方法
CN111581396A (zh) * 2020-05-06 2020-08-25 西安交通大学 一种基于多维特征融合与依存句法的事件图谱构建系统及方法
CN111767388A (zh) * 2020-05-07 2020-10-13 北京理工大学 一种候选池生成方法
CN111767388B (zh) * 2020-05-07 2023-07-04 北京理工大学 一种候选池生成方法
CN112668336B (zh) * 2020-05-14 2024-01-09 北京金山数字娱乐科技有限公司 一种基于任务模型的词语处理方法
CN112668336A (zh) * 2020-05-14 2021-04-16 北京金山数字娱乐科技有限公司 一种基于任务模型的词语处理方法
CN111881288A (zh) * 2020-05-19 2020-11-03 杭州中奥科技有限公司 笔录信息真假的判断方法、装置、存储介质及电子设备
CN111881288B (zh) * 2020-05-19 2024-04-09 杭州中奥科技有限公司 笔录信息真假的判断方法、装置、存储介质及电子设备
CN111680508A (zh) * 2020-06-08 2020-09-18 北京百度网讯科技有限公司 文本的处理方法和装置
CN111680508B (zh) * 2020-06-08 2023-05-26 北京百度网讯科技有限公司 文本的处理方法和装置
CN111611561A (zh) * 2020-06-09 2020-09-01 中国电子科技集团公司第二十八研究所 一种面向边缘分级用户的认证授权统一管控方法
CN111814476B (zh) * 2020-06-09 2024-04-16 北京捷通华声科技股份有限公司 一种实体关系的抽取方法和装置
CN111814476A (zh) * 2020-06-09 2020-10-23 北京捷通华声科技股份有限公司 一种实体关系的抽取方法和装置
CN111611561B (zh) * 2020-06-09 2022-09-06 中国电子科技集团公司第二十八研究所 一种面向边缘分级用户的认证授权统一管控方法
CN111666379B (zh) * 2020-06-11 2023-09-22 腾讯科技(深圳)有限公司 一种事件元素提取方法和装置
CN111666379A (zh) * 2020-06-11 2020-09-15 腾讯科技(深圳)有限公司 一种事件元素提取方法和装置
CN111694924A (zh) * 2020-06-17 2020-09-22 合肥中科类脑智能技术有限公司 一种事件抽取方法和系统
CN111694924B (zh) * 2020-06-17 2023-05-26 合肥中科类脑智能技术有限公司 一种事件抽取方法和系统
CN111832316A (zh) * 2020-06-30 2020-10-27 北京小米松果电子有限公司 语义识别的方法、装置、电子设备和存储介质
CN111767334A (zh) * 2020-06-30 2020-10-13 北京百度网讯科技有限公司 信息抽取方法、装置、电子设备及存储介质
CN111966890A (zh) * 2020-06-30 2020-11-20 北京百度网讯科技有限公司 基于文本的事件推送方法、装置、电子设备和存储介质
CN111832316B (zh) * 2020-06-30 2024-05-24 北京小米松果电子有限公司 语义识别的方法、装置、电子设备和存储介质
CN111767334B (zh) * 2020-06-30 2023-07-25 北京百度网讯科技有限公司 信息抽取方法、装置、电子设备及存储介质
CN111966890B (zh) * 2020-06-30 2023-07-04 北京百度网讯科技有限公司 基于文本的事件推送方法、装置、电子设备和存储介质
CN111859903A (zh) * 2020-07-30 2020-10-30 苏州思必驰信息科技有限公司 事件同指模型训练方法、事件同指消解方法
CN111881294A (zh) * 2020-07-30 2020-11-03 本识科技(深圳)有限公司 一种语料标注系统、方法及存储介质
CN111881294B (zh) * 2020-07-30 2023-10-24 本识科技(深圳)有限公司 一种语料标注系统、方法及存储介质
CN111859903B (zh) * 2020-07-30 2024-01-12 思必驰科技股份有限公司 事件同指模型训练方法、事件同指消解方法
CN112084531B (zh) * 2020-09-10 2024-05-17 杭州中奥科技有限公司 数据敏感程度分级方法、装置、设备及存储介质
CN112085104A (zh) * 2020-09-10 2020-12-15 杭州中奥科技有限公司 一种事件特征提取方法、装置、存储介质及电子设备
CN112085104B (zh) * 2020-09-10 2024-04-12 杭州中奥科技有限公司 一种事件特征提取方法、装置、存储介质及电子设备
CN112084531A (zh) * 2020-09-10 2020-12-15 杭州中奥科技有限公司 数据敏感程度分级方法、装置、设备及存储介质
CN112149427B (zh) * 2020-10-12 2024-02-02 腾讯科技(深圳)有限公司 动词短语蕴含图谱的构建方法及相关设备
CN112149427A (zh) * 2020-10-12 2020-12-29 腾讯科技(深圳)有限公司 动词短语蕴含图谱的构建方法及相关设备
CN112329468A (zh) * 2020-11-03 2021-02-05 中国平安财产保险股份有限公司 异质关系网络的构建方法、装置、计算机设备及存储介质
CN112329468B (zh) * 2020-11-03 2023-07-25 中国平安财产保险股份有限公司 异质关系网络的构建方法、装置、计算机设备及存储介质
CN112434532B (zh) * 2020-11-05 2024-05-28 西安交通大学 一种支持人机双向理解的电网环境模型及建模方法
CN112434532A (zh) * 2020-11-05 2021-03-02 西安交通大学 一种支持人机双向理解的电网环境模型及建模方法
CN114548086A (zh) * 2020-11-26 2022-05-27 税友软件集团股份有限公司 一种事件文本数据处理方法及相关装置
CN112541095A (zh) * 2020-11-30 2021-03-23 北京奇艺世纪科技有限公司 视频标题生成方法、装置、电子设备及存储介质
CN112541095B (zh) * 2020-11-30 2023-09-05 北京奇艺世纪科技有限公司 视频标题生成方法、装置、电子设备及存储介质
CN112559656A (zh) * 2020-12-09 2021-03-26 河海大学 基于水文事件的事理图谱构建方法
CN112651234B (zh) * 2020-12-18 2023-11-28 中国科学院信息工程研究所 一种半开放信息抽取的方法及装置
CN112651234A (zh) * 2020-12-18 2021-04-13 中国科学院信息工程研究所 一种半开放信息抽取的方法及装置
CN112528046A (zh) * 2020-12-25 2021-03-19 网易(杭州)网络有限公司 新的知识图谱的构建方法、装置和信息检索方法、装置
CN112528046B (zh) * 2020-12-25 2023-09-15 网易(杭州)网络有限公司 新的知识图谱的构建方法、装置和信息检索方法、装置
CN112651447B (zh) * 2020-12-29 2023-09-26 广东电网有限责任公司电力调度控制中心 一种基于本体的资源分类标注方法及系统
CN112651447A (zh) * 2020-12-29 2021-04-13 广东电网有限责任公司电力调度控制中心 一种基于本体的资源分类标注方法及系统
CN113536784A (zh) * 2021-01-05 2021-10-22 腾讯科技(深圳)有限公司 文本处理方法、装置、计算机设备和存储介质
CN112765980A (zh) * 2021-02-01 2021-05-07 广州市刑事科学技术研究所 一种面向警情笔录的事件论元角色抽取方法和装置
CN112765980B (zh) * 2021-02-01 2023-05-12 广州市刑事科学技术研究所 一种面向警情笔录的事件论元角色抽取方法和装置
CN112966079A (zh) * 2021-03-02 2021-06-15 中国电子科技集团公司第二十八研究所 一种用于对话系统的面向事件画像的文本分析方法
CN112966079B (zh) * 2021-03-02 2022-09-30 中国电子科技集团公司第二十八研究所 一种用于对话系统的面向事件画像的文本分析方法
CN113065353A (zh) * 2021-03-16 2021-07-02 北京金堤征信服务有限公司 实体识别方法及装置
CN113065353B (zh) * 2021-03-16 2024-04-02 北京金堤征信服务有限公司 实体识别方法及装置
CN113268595A (zh) * 2021-05-24 2021-08-17 中国电子科技集团公司第二十八研究所 一种基于实体关系抽取的结构化机场警报处理方法
CN113268595B (zh) * 2021-05-24 2022-09-06 中国电子科技集团公司第二十八研究所 一种基于实体关系抽取的结构化机场警报处理方法
CN113554174A (zh) * 2021-08-11 2021-10-26 上海明略人工智能(集团)有限公司 一种因果关系抽取方法、系统、电子设备及介质
CN113688253B (zh) * 2021-08-12 2024-05-07 浙江大学 一种层次感知的时态知识图谱表示学习方法
CN113688253A (zh) * 2021-08-12 2021-11-23 浙江大学 一种层次感知的时态知识图谱表示学习方法
CN113806486A (zh) * 2021-09-23 2021-12-17 深圳市北科瑞声科技股份有限公司 长文本相似度的计算方法及装置、存储介质、电子装置
CN113806486B (zh) * 2021-09-23 2024-05-10 深圳市北科瑞声科技股份有限公司 长文本相似度的计算方法及装置、存储介质、电子装置
WO2023051399A1 (zh) * 2021-09-28 2023-04-06 浙江大学 一种基于本体指导的生成式事件抽取方法
CN114492377B (zh) * 2021-12-30 2024-04-16 永中软件股份有限公司 一种事件角色的标注方法和计算机设备、计算机可读存储介质
CN114492377A (zh) * 2021-12-30 2022-05-13 永中软件股份有限公司 一种事件角色的标注方法和计算机设备、计算机可读存储介质
CN115292523A (zh) * 2022-08-04 2022-11-04 中国科学院空天信息创新研究院 一种基于图表示学习的时空信息推理方法
CN115292523B (zh) * 2022-08-04 2023-09-22 中国科学院空天信息创新研究院 一种基于图表示学习的时空信息推理方法
CN116303996B (zh) * 2023-05-25 2023-08-04 江西财经大学 基于多焦点图神经网络的主题事件抽取方法
CN116303996A (zh) * 2023-05-25 2023-06-23 江西财经大学 基于多焦点图神经网络的主题事件抽取方法
CN116451678B (zh) * 2023-06-15 2023-11-14 阿里巴巴(中国)有限公司 数据关系识别及数据表整合方法
CN116451678A (zh) * 2023-06-15 2023-07-18 阿里巴巴(中国)有限公司 数据关系识别及数据表整合方法
CN116737967B (zh) * 2023-08-15 2023-11-21 中国标准化研究院 一种基于自然语言的知识图谱构建和完善系统及方法
CN116737967A (zh) * 2023-08-15 2023-09-12 中国标准化研究院 一种基于自然语言的知识图谱构建和完善系统及方法
CN116992870B (zh) * 2023-09-26 2023-12-19 山东省计算中心(国家超级计算济南中心) 基于非对称核函数的文本信息实体关系抽取方法及系统
CN116992870A (zh) * 2023-09-26 2023-11-03 山东省计算中心(国家超级计算济南中心) 基于非对称核函数的文本信息实体关系抽取方法及系统
CN117252262A (zh) * 2023-09-28 2023-12-19 四川大学 知识图谱构建与专利信息检索方法及装置

Also Published As

Publication number Publication date
CN110717034A (zh) 2020-01-21

Similar Documents

Publication Publication Date Title
WO2020001373A1 (zh) 一种本体构建方法及装置
US11442932B2 (en) Mapping natural language to queries using a query grammar
Jia et al. A practical approach to constructing a knowledge graph for cybersecurity
US10725836B2 (en) Intent-based organisation of APIs
US10025819B2 (en) Generating a query statement based on unstructured input
US10157350B2 (en) Context based conversation system
US9311823B2 (en) Caching natural language questions and results in a question and answer system
US8630989B2 (en) Systems and methods for information extraction using contextual pattern discovery
WO2016050066A1 (zh) 知识库中问句解析的方法及设备
US8818795B1 (en) Method and system for using natural language techniques to process inputs
CN116775847B (zh) 一种基于知识图谱和大语言模型的问答方法和系统
US10372763B2 (en) Generating probabilistic annotations for entities and relations using reasoning and corpus-level evidence
CN110096573B (zh) 一种文本解析方法及装置
Nesi et al. Geographical localization of web domains and organization addresses recognition by employing natural language processing, Pattern Matching and clustering
WO2022141876A1 (zh) 基于词向量的搜索方法、装置、设备及存储介质
WO2023010427A1 (en) Systems and methods generating internet-of-things-specific knowledge graphs, and search systems and methods using such graphs
CN111325018A (zh) 一种基于web检索和新词发现的领域词典构建方法
CN114900346B (zh) 基于知识图谱的网络安全测试方法及系统
Hani et al. Fane-kg: A semantic knowledge graph for context-based fake news detection on social media
CN116383412B (zh) 基于知识图谱的功能点扩增方法和系统
CN112732969A (zh) 图像语义分析方法、装置、存储介质及电子设备
WO2023061441A1 (zh) 文本的量子线路确定方法、文本分类方法及相关装置
US11468078B2 (en) Hierarchical data searching using tensor searching, fuzzy searching, and Bayesian networks
AU2019290658B2 (en) Systems and methods for identifying and linking events in structured proceedings
Abedini et al. Epci: an embedding method for post-correction of inconsistency in the RDF knowledge bases

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

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 23-06-2021)

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19825803

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 19825803

Country of ref document: EP

Kind code of ref document: A1