Event extraction method, storage medium and server

By pre-training the roberta model in the general field and supervising training with manual annotation text corpus, a comprehensive event extraction model is constructed, which solves the problems of accurate and low efficiency of event extraction in the existing technology, and achieves more efficient events Feature capture and extraction effects.

CN112149386BActive Publication Date: 2025-02-11CHINASOFT HANGZHOU ANREN NETWORK COMM CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202011028849.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-25
Publication Date
2025-02-11
Estimated Expiration
2040-09-25

AI Technical Summary

Technical Problem

The prior art has problems of accuracy and inefficiency in event extraction, especially when dealing with complex sentence structures, active passive transformations and multi-event subject-object sharing.

Method used

By pre-training the roberta model in the general field, the roberta model in the professional field is obtained, and supervised training is combined with manual annotated text corpus to build a comprehensive event extraction model to predict event types, event trigger words and event arguments at the same time.

Benefits of technology

It improves the accuracy and efficiency of event extraction, reduces the unk situation of words, enhances the model's ability to capture event features, and reduces the accumulation error during model layer propagation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112149386B_ABST
    Figure CN112149386B_ABST
Patent Text Reader

Abstract

The present invention provides an event extraction method, a storage medium and a server. The event extraction method comprises: obtaining a text corpus to be extracted; pre-training a Roberta model in a general field to obtain a Roberta model in a professional field; manually annotating each text in the text corpus; forming an event extraction model with the Roberta model in the professional field, a trigger word recognition module, an event type recognition module and an event argument recognition module; performing supervised training on the event extraction model according to the manually annotated text corpus; inputting each text in the text corpus into the event extraction model, extracting the event trigger words in each text, the event arguments corresponding to each event trigger word and the event type of each text by the event extraction model; integrating the obtained event trigger words, the event arguments corresponding to each event trigger word and the event type of each text to obtain an event extraction result. The accuracy and efficiency of event extraction by the event extraction model are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of natural language processing, and in particular to an event extraction method, a storage medium and a server. Background Art

[0002] Event extraction refers to extracting the required event information from unstructured text and integrating it into a structured form. Event extraction from text includes event type judgment, event trigger word extraction, and event argument extraction. Among them, event arguments include event subject, event object, time, location, etc. Event extraction has important applications in public opinion monitoring, text summarization, automatic question and answer, automatic construction of event graphs, etc. In real scenarios, event extraction is a very challenging extraction task due to the difficulties in complex sentence structure, active and passive conversion, and sharing of multiple event subjects and objects in the text. Summary of the invention

[0003] The present invention provides an event extraction method, a storage medium and a server, which are used to improve the accuracy and efficiency of event extraction.

[0004] In a first aspect, the present invention provides an event extraction method, the event extraction method comprising:

[0005] Obtaining a text corpus to be extracted, wherein the text corpus includes at least one text;

[0006] According to the text corpus to be extracted, the Roberta model in the general field is pre-trained to obtain the Roberta model in the professional field;

[0007] Manually annotate each text in the text corpus. The annotated labels include event trigger words and event argument labels, event argument labels corresponding to each event trigger word, and event type labels for each text.

[0008] The roberta model, trigger word recognition module, event type recognition module and event argument recognition module in the professional field are combined into an event extraction model;

[0009] Supervised training of event extraction models based on manually annotated text corpus;

[0010] Input each text in the text corpus into the event extraction model, and the event extraction model extracts the event trigger words in each text, the event arguments corresponding to each event trigger word, and the event type of each text;

[0011] The obtained event trigger words, the event arguments corresponding to each event trigger word and the event type of each text are integrated to obtain the event extraction result.

[0012] In the above scheme, after pre-training the roberta model in the general field with the corpus text to be extracted, the obtained roberta model in the professional field can better capture the unique information in the corpus text to be extracted. And pre-training can reduce the unk (unknown) situation of words, laying the foundation for accurately extracting the features of events. The event trigger words and event argument labels marked above are mainly for the trigger word recognition module in the subsequent steps to extract event trigger words, in order to improve the accuracy of the trigger word recognition module in extracting event trigger words. And by using an event extraction model to simultaneously predict event types, event trigger words, and event arguments, there is no need to use multiple models to work together, which reduces the accumulated errors generated during the propagation between model layers, and improves the accuracy and efficiency of the event extraction model in extracting events.

[0013] In a specific implementation, the general domain Roberta model is a general Roberta model trained based on Chinese Wikipedia.

[0014] In a specific implementation, the marking method adopts the marking method of BEIO plus the corresponding event type.

[0015] In a specific implementation, the event extraction model extracts the trigger words of the event in each text, the event arguments corresponding to each event trigger word, and the event type of each text as follows:

[0016] The trigger word recognition module extracts the event trigger words in each text and the position of each event trigger word in the text;

[0017] The event type identification module extracts the event type of each text;

[0018] Each text is combined with each event trigger word extracted from the text and input into the event extraction model, and the event argument recognition module extracts the event argument corresponding to each event trigger word.

[0019] In a specific implementation, the trigger word recognition module extracts the event trigger words in each text, and the position of each event trigger word in the text is specifically:

[0020] The trigger word recognition module recognizes the event trigger words and event arguments in each text;

[0021] According to the identified event trigger words and event arguments, the trigger word recognition module extracts the event trigger words in each text. When the trigger word recognition module recognizes, it not only recognizes the event trigger word label, but also recognizes the label of the event argument, which improves the accuracy of the trigger word recognition module in extracting event trigger words. In the case of multiple event trigger words, the event extraction model is used to automatically determine the event argument corresponding to the event trigger word, which improves the accuracy of the event trigger word and the corresponding event argument.

[0022] In a specific embodiment, the trigger word recognition module corresponds to a bidirectional LSTM and a linear classification layer. The trigger word recognition module receives each token output from the Roberta model in the event extraction model; according to a corresponding bidirectional LSTM and a linear classification layer, the probability of the event trigger word category corresponding to each token is obtained; according to the probability of the event trigger word category corresponding to each token, the event trigger word and event argument in each text are obtained.

[0023] In a specific implementation, the event type identification module extracts the event type of each text by: determining the event type of each text according to the feature vector of each text.

[0024] In a specific implementation, the event type recognition module corresponds to a linear classification layer. The event type recognition module receives the feature vector of each text output by the Roberta model in the event extraction module; obtains the probability of the event type of each text according to the corresponding linear classification layer; and obtains the event type of each text according to the obtained probability of the event type of each text.

[0025] In a specific embodiment, the event argument recognition module corresponds to a one-dimensional CNN and linear classification layer. Each text is combined with each event trigger word extracted from the text and input into the event extraction model, and the event argument recognition module extracts the event argument corresponding to each event trigger word. Specifically, each text is separated from each event trigger word extracted from the text by a separator; each text, separator and each event trigger word extracted from the text are input into the event extraction model; the event argument recognition module receives each token output from the Roberta model of the event extraction model; according to the corresponding one-dimensional CNN and linear classification layer, the probability of the event argument category corresponding to each token is obtained; according to the probability of the event argument category corresponding to each token, the event argument corresponding to each event trigger word is obtained.

[0026] In a specific embodiment, the loss function of each module in the trigger word recognition module, event type recognition module and event argument recognition module in the event extraction module selects the cross entropy loss function; the total loss function of the trigger word recognition module, event type recognition module and event argument recognition module is the weighted average of the loss functions of the three modules.

[0027] In a specific implementation, marking the event trigger words and event argument tags in each text in the text corpus includes:

[0028] When there are event trigger words with the same name in each text, one of the event trigger words with the same name and the position of the current event trigger word are obtained;

[0029] Replace the event trigger word with the same name in other positions in each text with the replacement character;

[0030] Find the event argument closest to the current event trigger word;

[0031] The current event trigger word and the event argument closest to the event trigger word are labeled. For event trigger words with the same name, the event trigger word is uniquely determined based on the position of the event trigger word output by the event extraction model. Other event trigger words with the same name are replaced by replacement characters such as * to reduce the interference of event trigger words with the same name and improve the accuracy of prediction.

[0032] In a specific implementation, supervised training of the event extraction model based on manually annotated text corpus is specifically as follows:

[0033] Divide the annotated corpus text into training set, validation set and test set;

[0034] Use the training set to train the event extraction model;

[0035] Use the validation set to adjust the parameters of the event extraction model;

[0036] The event extraction model after parameter adjustment is tested using the test set. When the test result of the test set is greater than the preset evaluation, the adjusted parameters are selected as the parameters of the event extraction model. The efficiency and accuracy of the event extraction model can be improved through the joint training of multiple tasks.

[0037] In a second aspect, the present invention further provides a storage medium storing a computer program, which, when executed on a computer, enables the computer to execute any one of the above-mentioned event extraction methods.

[0038] In a third aspect, the present invention further provides a server, comprising a processor and a memory, wherein a computer program is stored in the memory, and the processor is used to execute any of the above-mentioned event extraction methods by calling the computer program stored in the memory. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 A flow chart of an event extraction method provided by an embodiment of the present invention;

[0040] Figure 2 A flow chart of an event extraction model provided in an embodiment of the present invention for extracting event trigger words, event types and corresponding event arguments of a text to be extracted;

[0041] Figure 3 A schematic diagram of the event extraction model structure provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0042] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0043] In order to facilitate understanding of the event extraction method provided by the embodiment of the present invention, the following first describes the application scenario of the event extraction method provided by the embodiment of the present invention, and the event extraction method is applied to extract events from a corpus text. The event extraction method is described in detail below in conjunction with the accompanying drawings.

[0044] refer to Figure 1 , the event extraction method provided by the embodiment of the present invention includes:

[0045] S10: Obtain a text corpus to be extracted, wherein the text corpus includes at least one text;

[0046] S20: pre-training the roberta model in the general field according to the text corpus to be extracted to obtain the roberta model in the professional field;

[0047] S30: manually annotating each text in the text corpus, wherein the annotated labels include event trigger words and event argument labels, event argument labels corresponding to each event trigger word, and event type labels for each text;

[0048] S40: The roberta model, trigger word recognition module, event type recognition module and event argument recognition module in the professional field are combined into an event extraction model;

[0049] S50: supervised training of event extraction model based on manually annotated text corpus;

[0050] S60: input each text in the text corpus into the event extraction model, and the event extraction model extracts the event trigger words in each text, the event arguments corresponding to each event trigger word, and the event type of each text;

[0051] S70: Integrate the obtained event trigger words, the event arguments corresponding to each event trigger word, and the event type of each text to obtain an event extraction result.

[0052] In the above scheme, after pre-training the roberta model in the general field with the corpus text to be extracted, the obtained roberta model in the professional field can better capture the unique information in the corpus text to be extracted. And pre-training can reduce the unk (unknown) situation of words, laying the foundation for accurately extracting the features of events. The event trigger words and event argument labels marked above are mainly for the trigger word recognition module in the subsequent steps to extract event trigger words, in order to improve the accuracy of the trigger word recognition module in extracting event trigger words. And by using an event extraction model to simultaneously predict event types, event trigger words, and event arguments, there is no need to use a collaborative approach with multiple models, which reduces the accumulated errors generated during propagation between model layers and improves the accuracy and efficiency of event extraction by the event extraction model. The specific operations of each of the above steps are described in detail below in conjunction with the accompanying drawings.

[0053] First, refer to Figure 1 , obtaining a text corpus to be extracted, wherein the text corpus includes at least one text. Each text in the text corpus can be a sports news, financial news, military news, social news, entertainment news, historical news, etc.

[0054] Next, the roberta model in the general field is pre-trained according to the text corpus to be extracted to obtain the roberta model in the professional field. Among them, the roberta model in the general field can be a general roberta model trained based on databases such as Chinese Wikipedia, Baidu Encyclopedia, Sina and Weibo. The specific method of pre-training the roberta model in the general field using the text corpus of the hot spots to be extracted to obtain the roberta model in the professional field is the pre-training method in the prior art. The general roberta model will be cut at the character level according to the vocab.txt file. In the text corpus of the hot spots to be extracted, if there are words that are not included in vocab.txt, they will be added to vocab.txt, and the embedding layer of the general roberta model will be extended according to the length of vocab.txt. By pre-training the roberta model in the general field, the obtained roberta model in the professional field can be made more suitable for extracting the semantic features of the specific corpus text, reducing the unk situation of the characters, and improving the accuracy of event extraction.

[0055] Next, each text in the text corpus is manually annotated. The annotated labels include event trigger words and event argument labels, event argument labels corresponding to each event trigger word, and event type labels for each text. It should be noted here that a text can have multiple event trigger words, and each event trigger word corresponds to an event argument. The text to be extracted plus the event trigger word uniquely determines the event argument, which includes the event subject, event object, time of the event, location of the event, etc. Each event trigger word corresponds to an event type, and each event type can correspond to multiple event trigger words. And for the event type label, it is only necessary to annotate one event type for each text to be extracted.

[0056] In this step, manual labeling requires labeling of three different types of labels, namely event trigger words and event argument labels, event type labels, and event argument labels corresponding to each event trigger word. The event trigger words and event argument labels marked above are mainly used to extract event trigger words in the trigger word recognition module in the subsequent steps, in order to improve the accuracy of the trigger word recognition module in extracting event trigger words.

[0057] The annotation method can adopt the annotation method of BEIO plus the event type to which it belongs. The following is an explanation using the example of event arguments including event subject and event object. When annotating event trigger words, event subjects and event objects corresponding to event trigger words, event trigger words, event subjects and event objects can adopt the method of BEIO plus type. Among them, B represents the beginning of the entity, E represents the end of the entity, I represents the middle position of the entity, and O represents the non-entity. For example, the event trigger words are labeled as B_trigger, I_trigger, E_trigger. The event subject is labeled as B_Subject, I_Subject, E_Subject. The event object is labeled as B_object, I_object, E_object. It should be understood that the annotation method is not limited to the BEIO annotation method. In addition, other annotation methods can also be used. For example, the annotation methods of BMES, BEIOS, etc. can also be used.

[0058] In addition, when annotating the event trigger words and event argument labels in each text in the text corpus, if there are event trigger words with the same name in each text, when annotating one of the event trigger words, other event trigger words with the same name can be replaced with replacement characters to reduce the interference of event trigger words with the same name. The specific method is: first, you can get the position of one event trigger word and the current event trigger word among the event trigger words with the same name. Then, replace the event trigger words with the same name in other positions in each text with replacement characters. Then, find the event argument closest to the current event trigger word. Next, annotate the current event trigger word and the event argument closest to the event trigger word. For event trigger words with the same name, the event trigger word is uniquely determined according to the position of the event trigger word output by the event extraction model, and other event trigger words with the same name are replaced by replacement characters such as * to reduce the interference of event trigger words with the same name and improve the accuracy of prediction.

[0059] Next, the professional field Roberta model, trigger word recognition module, event type recognition module and event argument recognition module are combined into an event extraction model. That is, the event extraction model consists of the professional field Roberta model plus three specific modules. Among them, the three specific modules are the trigger word recognition module, the event type recognition module and the event argument recognition module that recognizes the event argument corresponding to each event trigger word.

[0060] Next, supervised training of the event extraction model is performed based on the manually annotated text corpus. When supervised training of the event extraction model is performed based on the manually annotated text corpus, the annotated corpus text is first divided into a training set, a validation set, and a test set. Then, the training set is used to train the event extraction model. After that, the parameters of the event extraction model are adjusted using the validation set. Later, the event extraction model with adjusted parameters is tested using the test set. Repeat the above steps until the result of the test set test is greater than the preset evaluation, and the adjusted parameters are selected as the parameters of the event extraction model. The efficiency and accuracy of the event extraction model can be improved through multi-task joint training.

[0061] Next, each text in the text corpus is input into the event extraction model, and the event extraction model extracts the event trigger words in each text, the event arguments corresponding to each event trigger word, and the event type of each text.

[0062] Specifically, when the event extraction model extracts the trigger words of the event in each text, the event arguments corresponding to each event trigger word, and the event type of each text, refer to Figure 2 :

[0063] S61: extracting event trigger words in each text and the position of each event trigger word in the text by a trigger word recognition module;

[0064] S62: extracting the event type of each text by an event type identification module;

[0065] S63: Combine each text with each event trigger word extracted from the text and input them into the event extraction model, and extract the event argument corresponding to each event trigger word by the event argument recognition module. Next, each of the above steps is introduced in detail.

[0066] First, the text corpus to be extracted is input into the event extraction model, and the trigger words and event types of the text to be extracted are first output by the event extraction model. Specifically, the text to be extracted is converted into a digital ID based on the vocab.txt file. In this process, a mapping dictionary representing the corresponding relationship between the vocab.txt file and the digital ID is formed. The digital ID is input into the event extraction model, and the trigger word label and trigger word position information of the corresponding event and the label of the event type are obtained based on the trigger word recognition module and the event type recognition module.

[0067] Among them, when the trigger word recognition module extracts the event trigger words in each text and the position of each event trigger word in the text, the trigger word recognition module can first recognize the event trigger words and event arguments in each text. Afterwards, based on the recognized event trigger words and event arguments, the trigger word recognition module extracts the event trigger words in each text. When the trigger word recognition module recognizes, it not only recognizes the event trigger word label, but also recognizes the label of the event argument, thereby improving the accuracy of the trigger word recognition module in extracting the event trigger words. In the case of multiple event trigger words, the event extraction model is used to automatically determine the event argument corresponding to the event trigger word, thereby improving the accuracy of the event trigger word and the corresponding event argument.

[0068] The trigger word recognition module can correspond to a bidirectional LSTM and linear classification layer. When the trigger word recognition module extracts the event trigger words and event arguments in each text, the trigger word recognition module receives each token output by the Roberta model in the event extraction model. For the trigger word recognition module, only the features of the text part to be extracted output by the Roberta model in the professional field are selected. Afterwards, according to the corresponding bidirectional LSTM and linear classification layer, the probability of the event trigger word category corresponding to each token is obtained. Later, according to the probability of the event trigger word category corresponding to each token, the event trigger words and event arguments in each text are obtained. The trigger words and event arguments of the event are predicted by the text features to be extracted, and the prediction of event arguments is introduced to improve the accuracy of trigger word recognition.

[0069] When the event type recognition module extracts the event type of each text, the event type of each text can be determined according to the feature vector of each text. Specifically, the event type recognition module can correspond to a linear classification layer. First, the event type recognition module receives the feature vector of each text output by the roberta model in the event extraction module. For the event type recognition module, the features of the text part to be extracted output by the roberta model in the professional field are also selected. Afterwards, according to a corresponding linear classification layer, the probability of the event type of each text is obtained. The feature of the cls character can be selected as a feature vector of the entire text to be extracted, and the probability of the event type of the text to be extracted is predicted by the feature vector of the cls character. The output of the cls character of the roberta model in the event extraction module can be received to obtain the probability of the event type. Later, according to the probability of the event type of each text obtained, the event type of each text is obtained. Specifically, the event trigger word text can be extracted from the digital ID according to the mapping dictionary, and then the event type text is converted according to the mapping dictionary between the event trigger word and the event type.

[0070] Next, each text is combined with each event trigger word extracted from the text and input into the event extraction model, and the event argument recognition module extracts the event argument corresponding to each event trigger word.

[0071] Specifically, the event argument recognition module can correspond to a one-dimensional CNN and linear classification layer. When each text is combined with each event trigger word extracted from the text and input into the event extraction model, and the event argument recognition module extracts the event argument corresponding to each event trigger word, each text can be separated from each event trigger word extracted from the text by a separator. After that, each text, separator and each event trigger word extracted from the text are input into the event extraction model. After that, the event argument recognition module receives each token output from the Roberta model of the event extraction model. After that, according to the corresponding one-dimensional CNN and linear classification layer, the probability of the event argument category corresponding to each token is obtained. After that, according to the probability of the event argument category corresponding to each token, the event argument corresponding to each event trigger word is obtained. That is, the event argument recognition module selects the features of the text part to be extracted output by the Roberta model in the professional field and the combined features of the trigger words, and predicts the event argument based on the combined features. The specific prediction method is as follows: the event argument recognition module receives the output of each token of the roberta model, thereby obtaining the probability of the event argument category corresponding to each token. According to the probability of the event argument category corresponding to each token, the event argument corresponding to each event trigger word is obtained.

[0072] When separating each text from each event trigger word extracted from the text by a delimiter, refer to Figure 3 , the text to be extracted and the trigger word can be separated by special characters such as sep. Special characters such as cls can also be added at the beginning of the text to be extracted and the trigger word. Special characters such as sep can also be added at the end of the text to be extracted and the trigger word. Specifically, the trigger words extracted in the above steps can be converted into digital IDs based on the vocab.txt text, and spliced ​​with the digital ID of the text to be extracted. In the process of splicing the ID string, digital IDs with special characters such as sep are inserted in the middle for segmentation and distinction. The merged digital ID string is input into the event extraction model, and the event arguments corresponding to the event trigger words are obtained according to the event argument recognition module.

[0073] In addition, the loss function of each module in the trigger word recognition module, event type recognition module and event argument recognition module in the event extraction module can select the cross entropy loss function, so that the total loss function of the trigger word recognition module, event type recognition module and event argument recognition module is the weighted average of the loss functions of the three modules.

[0074] Next, the obtained event trigger words, the event arguments corresponding to each event trigger word, and the event type of each text are integrated to obtain the event extraction result. The event extraction result can be displayed in a sentence consisting of event trigger words, event types, and event arguments, or it can be listed in a table to list the event trigger words, event types, and event arguments of each text in the text corpus.

[0075] By pre-training the roberta model in the general field with the corpus text to be extracted, the obtained roberta model in the professional field can better capture the unique information in the corpus text to be extracted. And pre-training can reduce the unk (unknown) situation of words, laying the foundation for accurately extracting the features of events. The event trigger words and event argument labels marked above are mainly for the trigger word recognition module in the subsequent steps to extract event trigger words, in order to improve the accuracy of the trigger word recognition module in extracting event trigger words. And by using an event extraction model to simultaneously predict event types, event trigger words, and event arguments, there is no need to use multiple models to work together, which reduces the accumulated errors generated during the propagation between model layers, and improves the accuracy and efficiency of the event extraction model in extracting events.

[0076] In addition, an embodiment of the present invention further provides a storage medium, in which a computer program is stored, and when the computer program is run on a computer, the computer executes any of the above event extraction methods. The effects thereof are described above and will not be repeated here.

[0077] In addition, an embodiment of the present invention further provides a server, the server comprising a processor and a memory, the memory storing a computer program, the processor calling the computer program stored in the memory to execute any of the above event extraction methods. The effects thereof are referred to the above description and will not be repeated here.

[0078] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. An event extraction method, characterized in that: include: Acquire a text corpus to be extracted, wherein the text corpus includes at least one text; Pre-training the roberta model in a general field according to the text corpus to be extracted to obtain the roberta model in a professional field; Manually annotating each text in the text corpus, wherein the annotated labels include event trigger words and event argument labels, event argument labels corresponding to each event trigger word, and event type labels of each text; The roberta model, trigger word recognition module, event type recognition module and event argument recognition module in the professional field are combined into an event extraction model; Performing supervised training on the event extraction model based on manually annotated text corpus; Input each text in the text corpus into the event extraction model, and extract the event trigger words in each text, the event arguments corresponding to each event trigger word, and the event type of each text by the event extraction model; Integrate the obtained event trigger words, the event arguments corresponding to each event trigger word, and the event type of each text to obtain an event extraction result; The trigger words of the event in each text, the event arguments corresponding to each event trigger word, and the event type of each text extracted by the event extraction model are: The trigger word recognition module extracts the event trigger words in each text and the position of each event trigger word in the text; The event type identification module extracts the event type of each text; Combining each of the texts with each event trigger word extracted from the text and inputting the combined texts into the event extraction model, and extracting the event argument corresponding to each event trigger word by the event argument recognition module; The trigger word recognition module extracts the event trigger words in each text, and the position of each event trigger word in the text is specifically: The trigger word recognition module recognizes event trigger words and event arguments in each text; According to the identified event trigger words and event arguments, the trigger word recognition module extracts the event trigger words in each text.

2. The event extraction method according to claim 1, characterized in that: The trigger word recognition module corresponds to a bidirectional LSTM and linear classification layer; The trigger word recognition module recognizes event trigger words and event argument tags in each text as follows: The trigger word recognition module receives each token output from the roberta model in the event extraction model; According to the corresponding bidirectional LSTM and linear classification layer, the probability of the event trigger word category corresponding to each token is obtained; According to the probability of the event trigger word category corresponding to each token, the event trigger words and event arguments in each text are obtained.

3. The event extraction method according to claim 1, characterized in that: The event type identification module extracts the event type of each text as: The event type of each text is determined according to the feature vector of each text.

4. The event extraction method according to claim 3, characterized in that: The event type recognition module corresponds to a linear classification layer; The event type identification module receives the feature vector of each text output by the roberta model in the event extraction model; According to a corresponding linear classification layer, the probability of the event type of each text is obtained; The event type of each text is obtained according to the obtained probability of the event type of each text.

5. The event extraction method according to claim 1, characterized in that: The event argument recognition module corresponds to a one-dimensional CNN and a linear classification layer; The combination of each text and each event trigger word extracted from the text and inputting the combination into the event extraction model, and the event argument recognition module extracting the event argument corresponding to each event trigger word is specifically: Separating each of the texts from each of the event trigger words extracted from the texts by a separator; Input each of the texts, the separators and each event trigger word extracted from the texts into the event extraction model; The event argument recognition module receives each token output from the roberta model of the event extraction model; According to the corresponding one-dimensional CNN and linear classification layer, the probability of the event argument category corresponding to each token is obtained; According to the probability of the event argument category corresponding to each token, the event argument corresponding to each event trigger word is obtained.

6. The event extraction method according to claim 1, characterized in that: The loss function of each module in the trigger word recognition module, the event type recognition module and the event argument recognition module in the event extraction model is a cross entropy loss function; The total loss function of the trigger word recognition module, the event type recognition module and the event argument recognition module is a weighted average of the loss functions of the three modules.

7. The event extraction method according to claim 1, characterized in that: Labeling the event trigger words and event argument tags in each text in the text corpus includes: When there are event trigger words with the same name in each of the texts, obtaining a position of one of the event trigger words with the same name and a current event trigger word; Replace the event trigger word with the same name in other positions of each text with the replacement character; Find the event argument closest to the current event trigger word; Mark the current event trigger word and the event argument closest to the event trigger word.

8. The event extraction method according to claim 1, characterized in that: The supervised training of the event extraction model based on the manually annotated text corpus is specifically as follows: Divide the annotated corpus text into training set, validation set and test set; Using the training set to train the event extraction model; Using the validation set to adjust the parameters of the event extraction model; The event extraction model after parameter adjustment is tested using the test set. When the result of the test set test is greater than a preset evaluation, the adjusted parameters are selected as the parameters of the event extraction model.

9. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed on a computer, the computer is enabled to execute the event extraction method according to any one of claims 1 to 8.

10. A server, characterized in that: It comprises a processor and a memory, wherein the memory stores a computer program, and the processor is used to execute the event extraction method according to any one of claims 1 to 8 by calling the computer program stored in the memory.

Citation Information

Patent Citations

  • Method and system for united inference of Chinese events

    CN106055536A