Semantic role labeling method, device and medium based on machine reading comprehension

Through the method based on machine reading comprehension, the predicate meaning, predict the argument category and the labeling role are extracted, and the problem of predicate disambiguation and argument labeling in the existing technology is solved, and more efficient semantic role labeling is achieved.

CN113887241BActive Publication Date: 2024-11-05ZHEJIANG XIANGNONG HUIYU TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202111211106.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-18
Publication Date
2024-11-05
Estimated Expiration
2041-10-18

AI Technical Summary

Technical Problem

The existing semantic role labeling method usually treats the two subtasks of predicate disparity and argument labeling as simple classification tasks, ignoring the semantic information corresponding to the semantic label of the predicate and the connection between the two subtasks, resulting in The calculation amount is too large and the difficulty is increased.

Method used

Using a machine reading comprehension method, the semantic labels of predicate meaning are extracted through the predicate disambiguation step, the role prediction step predicts the argument category, and the argument annotation step is used to determine the semantic labels and role meanings to annotate the roles in the sentence, reducing the Calculate volume and improve accuracy.

Benefits of technology

The semantic information of semantic labels is effectively utilized, which reduces the difficulty of predicate disambiguation, improves the accuracy of argument labeling, and filters out impossible roles through role prediction, reducing the amount of calculation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113887241B_ABST
    Figure CN113887241B_ABST
Patent Text Reader

Abstract

The present application discloses a semantic role labeling method, device and medium based on machine reading comprehension, which belongs to the field of natural language processing. The method includes a predicate disambiguation step, a role prediction step and an argument labeling step, wherein the role prediction step inputs a plurality of argument categories corresponding to the identification predicate and the determined semantic label into a pre-trained language model, and selects a preset number of argument categories from the plurality of argument categories as the role label of the identification predicate. The present application introduces a role prediction step, which effectively reduces the number of roles that need to be asked and reduces the amount of calculation; the predicate disambiguation step and the argument labeling step introduce the specific meanings of the predicate and the color, rather than just the label of each meaning, so that the pre-trained language model can get more detailed guidance and improve the accuracy of semantic role labeling.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of natural language processing, and in particular to a semantic role labeling method, device and medium based on machine reading comprehension. Background Art

[0002] Semantic role labeling is a shallow semantic analysis technology used to analyze the predicate-argument structure of sentences. It can be used in downstream tasks such as question-answering systems and machine translation. For the two subtasks of predicate disambiguation and argument labeling, there is such a connection: the meaning of the argument role can be determined by the meaning of the predicate. Existing semantic role labeling methods usually only treat predicate disambiguation and argument labeling as simple classification tasks, ignoring the semantic information corresponding to the semantic label of the predicate, increasing the difficulty of the predicate disambiguation subtask, and ignoring the connection between the two subtasks. In addition, all argument roles need to be labeled, which increases the computational complexity of the system. Summary of the invention

[0003] In view of the problems in the prior art of excessive computational effort caused by labeling all roles, ignoring the semantic information corresponding to the semantic label of the predicate which increases the difficulty of the predicate disambiguation subtask, and ignoring the connection between the predicate disambiguation subtask and the argument labeling subtask, the present application mainly provides a semantic role labeling method, device and medium based on machine reading comprehension.

[0004] In order to achieve the above purpose, a technical solution adopted by the present application is to provide a semantic role labeling method based on machine reading comprehension, which includes:

[0005] A predicate disambiguation step, extracting the predicate meaning of the identification predicate in the identification sentence through a toolkit for extracting the predicate meaning, obtaining multiple semantic labels corresponding to the predicate meaning, splicing the label meanings of the multiple semantic labels with the identification sentence respectively, and inputting them into the pre-trained language model to obtain a definite semantic label representing the predicate meaning;

[0006] a role prediction step, inputting a plurality of argument categories corresponding to the identification predicate and the determined semantic label into a pre-trained language model, and selecting a preset number of argument categories from the plurality of argument categories as role labels of the identification predicate; and

[0007] In the argument labeling step, the role meaning of the role label is determined based on the determined semantic label, the role meaning and the identification sentence are concatenated and input into the pre-trained language model to label the argument corresponding to the role label in the identification sentence.

[0008] Another technical solution adopted by the present application is to provide a semantic role labeling device based on machine reading comprehension, which includes:

[0009] A predicate disambiguation module is used to extract the predicate meaning of the identification predicate in the identification sentence through a toolkit for extracting the predicate meaning, obtain multiple semantic labels corresponding to the predicate meaning, respectively concatenate the label meanings of the multiple semantic labels with the identification sentence, and input them into a pre-trained language model to obtain a determined semantic label representing the predicate meaning;

[0010] a role prediction module, which is used to input a plurality of first argument categories corresponding to the identification predicate and the determined semantic label into a pre-trained language model, and select a preset number of argument categories from the plurality of argument categories as role labels of the identification predicate; and

[0011] The argument labeling module is used to determine the role meaning of the role label based on the determined semantic label, concatenate the role meaning and the identification sentence, and input them into the pre-trained language model to label the argument corresponding to the role label in the identification sentence.

[0012] Another technical solution adopted by the present application is: providing a computer-readable storage medium storing computer instructions, which are operated to execute the semantic role labeling method based on machine reading comprehension in Solution 1.

[0013] The technical solution of the present application can achieve the following beneficial effects: the present application designs a semantic role labeling method, device and medium based on machine reading comprehension. The method uses the method of machine reading comprehension to splice the specific meaning of the semantic label of the predicate with the sentence, and can effectively utilize the semantic information in the semantic label. At the same time, the result of predicate disambiguation can also be used to improve the result of argument labeling. The introduction of role prediction can filter out roles that cannot exist, thereby reducing the amount of calculation. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0015] Figure 1 It is a schematic diagram of a specific implementation of a semantic role labeling method based on machine reading comprehension in the present application;

[0016] Figure 2 is a schematic diagram of a specific example of a semantic role labeling method based on machine reading comprehension in the present application;

[0017] Figure 3is a schematic diagram of another specific example of a semantic role labeling method based on machine reading comprehension of the present application;

[0018] Figure 4 is a schematic diagram of another specific example of a semantic role labeling method based on machine reading comprehension of the present application;

[0019] Figure 5 It is a schematic diagram of a specific implementation of a semantic role labeling device based on machine reading comprehension in the present application.

[0020] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0021] The preferred embodiments of the present application are described in detail below in conjunction with the accompanying drawings so that the advantages and features of the present application can be more easily understood by those skilled in the art, thereby making a clearer and more definite definition of the protection scope of the present application.

[0022] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0023] Semantic role labeling is a shallow semantic analysis technology used to analyze the predicate-argument structure of a sentence. It can be used in downstream tasks such as question-answering systems and machine translation. Semantic role labeling includes two subtasks: predicate disambiguation and argument labeling. Predicate disambiguation is to determine the specific meaning of the predicate in a sentence, and argument labeling is to determine the argument of the predicate in a sentence. For the two subtasks of predicate disambiguation and argument labeling, there is such a connection: the meaning of the argument role can be determined by the meaning of the predicate. Existing semantic role labeling methods usually only treat predicate disambiguation and argument labeling as simple classification tasks, ignoring the semantic information corresponding to the semantic labels and the connection between the two subtasks, and labeling all roles will result in excessive computational effort.

[0024] The implementation scheme of this application is mainly to convert the semantic role labeling problem into a machine reading comprehension problem, and then solve it using a pre-trained language model. The so-called machine reading comprehension is the process of finding the answer from the context of a pre-trained language model based on a given context and a question. The entire implementation scheme contains three subtasks: predicate disambiguation, role prediction, and argument labeling. For predicate disambiguation, first obtain each possible semantic label of the predicate, and then take the meaning defined under the semantic label as a question, take the input sentence as the context, and convert the predicate disambiguation subtask into a multiple-choice reading comprehension task, that is, select the best one from all the questions (all possible meanings) to represent the meaning of the predicate. After obtaining the meaning of the predicate, the role label and its role meaning of the predicate can be obtained through role prediction. Argument labeling is to treat the role meaning of the role label as a question for each possible role label, and take the input sentence as the context, and then convert the argument labeling subtask into an extractive reading comprehension task, in which the answer is a continuous string of characters in the text, representing what the current argument is in the input sentence.

[0025] Figure 1 The figure is a schematic diagram of a specific example of a semantic role labeling method based on machine reading comprehension. In the sentence "the stock has been beaten down for two days", through machine reading comprehension, we can get the semantic label of the predicate beaten as beat.02, and its corresponding label meaning is "push, cause motion". The argument corresponding to the role label A1 of the label meaning of the semantic label of the predicate beaten is "The stock", the argument corresponding to the role label A2 is "down", and the argument corresponding to the role label TMP is "for two days". The semantic labels of the predicates and the role labels of the arguments are all provided in the structure file frame.

[0026] exist Figure 1 In the example, it is difficult to judge whether the semantic label beat.02 corresponds to the predicate beaten by looking at it alone. If we know the specific meaning of the predicate beaten, that is, Figure 1In the sentence “the stock has been beaten down for two days”, the semantic label of the predicate beaten is “push, cause motion”, which can easily determine whether the semantic label of the predicate beaten is beat.02 corresponding to “push, cause motion”. This can reduce the difficulty of predicate disambiguation. Similarly, for argument labeling, if we only know the role labels A0, A1, A2 but don’t know what they represent, it is difficult for us to accurately extract the content corresponding to A0, A1, A2 from the sentence “the stock has been beaten down for two days”. However, if we know that the meaning of A0 is “causer of motion”, the meaning of A1 is “thing moving”, and the meaning of A2 is “direction, destination”, it is easier to extract the corresponding answer from the sentence according to the meaning of each role label.

[0027] By introducing the specific meanings of predicates and roles, rather than just the labels of each meaning, the pre-trained language model can receive more detailed “guidance”, thereby improving the accuracy of semantic role labeling.

[0028] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0029] Figure 2 A specific implementation of a semantic role labeling method based on machine reading comprehension of the present application is shown.

[0030] exist Figure 2 In the specific implementation shown, the semantic role labeling method based on machine reading comprehension includes:

[0031] S201, a predicate disambiguation step, extracts the predicate meaning of the identification predicate in the identification sentence through a toolkit for extracting predicate meanings, obtains multiple semantic labels corresponding to the predicate meanings, concatenates the label meanings of the multiple semantic labels with the identification sentence respectively, and inputs them into a pre-trained language model to obtain a definite semantic label representing the predicate meaning.

[0032] In this implementation, in the pre-trained language model, a semantic label that is most similar to the meaning of the predicate is selected from multiple semantic labels as the determined semantic label to represent the meaning of the predicate, which not only fully utilizes the semantic information of the semantic label but also reduces the difficulty of predicate disambiguation.

[0033] In a specific example, for predicate disambiguation, we first obtain each possible semantic label (Lemma) that identifies the predicate, and then take the meaning defined under the semantic label lemma as a question and the input identification sentence as the context, and transform the predicate disambiguation into a multiple-choice reading comprehension task, that is, select the best one from all the questions to represent the meaning of the identification predicate.

[0034] In an optional embodiment of the present application, the label meanings of multiple semantic labels are respectively concatenated with the identification sentences and input into a pre-trained language model to obtain a definite semantic label representing the predicate meaning, including: in the pre-trained language model, respectively calculating the similarity scores between the multiple label meanings and the predicate meaning; sorting the similarity scores according to size, and selecting the definite semantic label representing the predicate meaning according to the sorting result.

[0035] In this embodiment, in the pre-trained language model, the similarity score between the label meaning of each semantic label and the predicate meaning of the identification predicate is calculated, and multiple similarity scores are sorted to conveniently and directly select the semantic label with the highest score to represent the meaning of the identification predicate, thereby reducing the difficulty of predicate disambiguation.

[0036] Figure 3 is a schematic diagram of another specific example of a semantic role labeling method based on machine reading comprehension in the present application. Figure 3 In the example shown, SpaCy, an existing toolkit for extracting semantic tags of predicate meanings, is used to obtain possible meanings of the predicate, namely, multiple semantic tag lemmas; the multiple semantic tag lemmas are regarded as questions, concatenated with the sentences identifying the predicates, and sent to the pretrained language model, and the meaning under each semantic tag lemma is calculated as the score of the meaning corresponding to the predicate; and the predicate meaning with the highest score is selected as the answer.

[0037] exist Figure 2 In the specific implementation shown, the semantic role labeling method based on machine reading comprehension also includes:

[0038] S202, a role prediction step, inputting multiple argument categories corresponding to the identification predicate and the determined semantic label into a pre-trained language model, and selecting a preset number of argument categories from the multiple argument categories as the role label of the identification predicate.

[0039] In this implementation, by introducing role prediction, role labels that are impossible for the identification predicate are filtered out, which effectively reduces the roles that need to be asked, thereby reducing the amount of calculation.

[0040] In an optional embodiment of the present application, a specific number of special symbols are used to identify the predicate to obtain an identified predicate.

[0041] In this embodiment, two special symbols are generally used to identify the predicates in the sentence, so that the pre-trained language model can more easily distinguish the predicates in the sentence.

[0042] Specifically, the value of the specific number can be reasonably determined based on empirical values, with a preferred value of 2.

[0043] In an optional embodiment of the present application, multiple argument categories corresponding to the identification predicate and the determined semantic label are input into a pre-trained language model, and a preset number of argument categories are selected from the multiple argument categories as role labels possessed by the identification predicate, including: in the pre-trained language model, using a neural network algorithm to analyze the identification predicate to obtain a score of the argument category possessed by the identification predicate; sorting the scores according to size, and selecting a preset number of argument categories as the role labels possessed by the identification predicate based on the sorting results.

[0044] In this embodiment, the neural network algorithm can be used to simultaneously calculate each identification predicate in a large number of identification sentences, and the calculation ability is strong. In determining the multiple argument categories corresponding to the semantic label, the argument category of the identification predicate is selected as the role label of the identification predicate, which not only reduces the amount of calculation, but also improves the accuracy.

[0045] In a specific example, after obtaining the predicate meaning of the identification predicate, the role meaning of the role label corresponding to the identification predicate can be obtained. Figure 1 In the example, we first find that the predicate meaning of the predicate beaten is "push, cause motion" through predicate disambiguation, and the semantic label corresponding to the predicate meaning is beat.02. After finding the semantic label beat.02, we can get all the possible role labels under this semantic label, which are A0, A1, A2 and TMP, and we can also get their corresponding role meanings. In order to solve the problem of excessive computation caused by directly asking all roles, the role labels that cannot be possessed by the identification predicate are filtered out. Figure 1 For the example sentence in , A0 is a role that the identification predicate cannot have, so it is filtered out in the role prediction step by calculating the scores between argument categories.

[0046] In an optional embodiment of the present application, a preset number is determined according to a preset recall rate threshold; the recall rate of the role label possessed by the identification predicate is calculated, and the preset number is adjusted according to the recall rate, so that the recall rate corresponding to the role label selected according to the preset number is greater than the preset recall rate threshold.

[0047] In this embodiment, the calculation of the recall rate of each possible role label is to verify and adjust the preset number to ensure that the role label corresponding to the identification predicate is real and valid. According to the recall rate of the role label, a preset number of role labels are selected to represent the role labels with higher accuracy of the identification predicate, where the preset number is to find x role labels so that the recall rate of these x role labels can reach 99%; through experimental data, it is found that about 90% of the role labels can achieve this goal. The recall rate of 99% is a very high value. When it reaches 99%, it can be considered that this solution will not miss any possible correct argument roles, thus avoiding the decline in the effect of the pre-trained language model.

[0048] Preferably, the preset recall rate threshold is set at 99%.

[0049] In a specific example, after obtaining the semantic label representing the meaning of the predicate, we proceed to the role prediction step. First, we use two special symbols and The predicates are identified and then input into the pre-trained language model. For each possible argument category (such as A0, A1, A2, etc.), the output of the pre-trained language model is passed through a layer of neural network to calculate the score of the predicate in the sentence with that argument category. The argument categories with scores concentrated in the first λn are selected as role labels for the argument labeling task, where λ is adjusted on the validation set to achieve a recall rate of more than 99% for the roles.

[0050] exist Figure 2 In the specific implementation shown, the semantic role labeling method based on machine reading comprehension also includes:

[0051] S203, the argument labeling step, determines the role meaning of the role label based on the determined semantic label, concatenates the role meaning and the identification sentence, and inputs them into the pre-trained language model to label the arguments corresponding to the role label in the identification sentence.

[0052] In this implementation, the determined semantic labels obtained in the predicate disambiguation step can assist in obtaining the role meaning of the role labels in the argument marking step, thereby improving the accuracy of argument labeling.

[0053] In a specific example, the argument labeling step treats each possible role label as a question, and the input identification sentence as the context, and then transforms the argument labeling into an extractive reading comprehension task, where the answer is a continuous string in the identification sentence, which represents what the argument of the current role label is in the input identification sentence. Figure 1 In the example above, the argument corresponding to role label A1 in the identified sentence is “The stock”.

[0054] In an optional embodiment of the present application, the input is into a pre-trained language model, and the arguments corresponding to the role labels in the identification sentence are labeled, including: in the pre-trained language model, the argument positions corresponding to the role labels in the identification sentence are labeled by sequence labeling to obtain the arguments corresponding to the role labels in the identification sentence, wherein the sequence labeling includes BIO labeling.

[0055] In this embodiment, sequence labeling is to label each element of a sequence with a label. Generally speaking, a sequence refers to a sentence, and an element refers to a word in a sentence. BIO labeling in sequence labeling labels individual words in a sentence to obtain arguments corresponding to the role label, thereby improving accuracy.

[0056] Figure 4 is a schematic diagram of another specific example of a semantic role labeling method based on machine reading comprehension in the present application. Figure 4 In the example shown, after all possible roles are predicted, the argument labeling step is entered. First, the specific meaning of the role label corresponding to the identified predicate is determined in combination with the result of predicate disambiguation, that is, the role meaning; for the possible role labels of the predicate obtained by role prediction, a question is constructed based on its corresponding role meaning, and the input identification sentence that identifies the predicate is used as the context; the question and the identification sentence that identifies the predicate are concatenated together and input into the pre-trained language model, and the corresponding arguments in the identification sentence are obtained through BIO (B: Beginning, I: Intermediate, O: Outside) annotation. BIO annotation is used to determine whether each word is in the answer and where it is in the answer. Figure 1 In the example, assuming that the role label currently being considered is A1, then for the input sentence "the stock has been beaten down for two days", the is labeled B (Beginning, the beginning of the answer), stock is labeled I (Intermediate, the middle of the answer), and all remaining words are labeled O (Outside, outside the answer). Through such labeling, we can get the answer argument corresponding to the role label A1 is the stock.

[0057] By introducing the specific meanings of predicates and arguments, rather than just the labels of each meaning, the pre-trained language model can get more detailed "guidance", thereby improving the accuracy of semantic role labeling; through the method of machine reading comprehension, the specific meaning of the semantic label of the predicate is spliced ​​with the sentence, which can effectively utilize the semantic information in the semantic label. At the same time, the results of predicate disambiguation can also be used to improve the results of argument labeling. The introduction of role prediction can filter out roles that cannot exist, thereby reducing the amount of computation.

[0058] Figure 5 A specific implementation of a semantic role labeling device based on machine reading comprehension of the present application is shown.

[0059] In this specific implementation, the semantic role labeling device based on machine reading comprehension mainly includes:

[0060] 501, a predicate disambiguation module, which is used to extract the predicate meaning of the identification predicate in the identification sentence through a toolkit for extracting the predicate meaning, obtain multiple semantic labels corresponding to the predicate meaning, respectively concatenate the label meanings of the multiple semantic labels with the identification sentence, and input them into a pre-trained language model to obtain a determined semantic label representing the predicate meaning;

[0061] 502, a role prediction module, which is used to input a plurality of first argument categories corresponding to the identification predicate and the determined semantic label into a pre-trained language model, and select a preset number of argument categories from the plurality of argument categories as role labels of the identification predicate; and

[0062] 503, an argument labeling module, which is used to determine the role meaning of the role label according to the determined semantic label, concatenate the role meaning and the identification sentence, and input them into the pre-trained language model to label the argument corresponding to the role label in the identification sentence.

[0063] In this implementation, the predicate disambiguation module makes full use of the semantic information in the semantic label to obtain a definite semantic label representing the specific meaning of the identification predicate, thereby reducing the difficulty of predicate disambiguation; by introducing a role prediction module, multiple argument categories corresponding to the definite semantic label are screened, and argument categories that the identification predicate cannot have are filtered out, thereby reducing the amount of calculation and improving the accuracy.

[0064] In an optional embodiment of the present application, in a role prediction module, a neural network algorithm in a pre-trained language model is used to analyze the identification predicate to obtain a score of the argument category of the identification predicate; the scores are sorted by size, and based on the sorting results, a preset number of argument categories are selected as role labels of the identification predicate.

[0065] In this embodiment, the neural network algorithm can be used to simultaneously calculate each identification predicate in a large number of identification sentences, and the calculation ability is strong. In determining the multiple argument categories corresponding to the semantic label, the argument category of the identification predicate is selected as the role label of the identification predicate, which not only reduces the amount of calculation, but also improves the accuracy.

[0066] In an optional embodiment of the present application, in an argument labeling module, sequence labeling in a pre-trained language model is used to label the argument position corresponding to the role label in the identification sentence to obtain the argument corresponding to the role label in the identification sentence, wherein the sequence labeling includes BIO labeling.

[0067] In this embodiment, the BIO annotation in the sequence annotation obtains arguments corresponding to the role labels by annotating individual words in the sentence, thereby improving accuracy.

[0068] The semantic role labeling device based on machine reading comprehension provided in the present application can be used to execute the semantic role labeling method based on machine reading comprehension in any of the above embodiments. Its implementation principle and technical effects are similar and will not be repeated here.

[0069] In a specific embodiment of the present application, each functional module in a semantic role labeling device based on machine reading comprehension of the present application can be directly in hardware, in a software module executed by a processor, or in a combination of the two.

[0070] The software modules may reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, removable disk, CD-ROM or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from and write information to the storage medium.

[0071] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA), or other programmable logic devices, discrete gates or transistor logic, discrete hardware components, or any combination thereof. A general-purpose processor may be a microprocessor, but in an alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. The processor may also be implemented as a combination of computing devices, such as a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors combined with a DSP core, or any other such configuration. In an alternative, the storage medium may be integrated with the processor. The processor and the storage medium may reside in an ASIC. The ASIC may reside in a user terminal. In an alternative, the processor and the storage medium may reside in a user terminal as discrete components.

[0072] In another specific embodiment of the present application, a computer-readable storage medium stores computer instructions, and the computer instructions are operated to execute the semantic role labeling method based on machine reading comprehension in any embodiment.

[0073] In another specific embodiment of the present application, a computer device includes a processor and a memory, wherein the memory stores computer instructions, and the processor operates the computer instructions to execute the semantic role labeling method based on machine reading comprehension in any embodiment.

[0074] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0075] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0076] The above description is only an embodiment of the present application and does not limit the patent scope of the present application. Any equivalent structural transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A semantic role labeling method based on machine reading comprehension, characterized in that: include: a predicate disambiguation step, extracting the predicate meaning of the identification predicate in the identification sentence by using a toolkit for extracting predicate meanings, obtaining a plurality of semantic labels corresponding to the predicate meanings, concatenating the label meanings in the plurality of semantic labels with the identification sentence respectively, and inputting the concatenated labels into a pre-trained language model to obtain a definite semantic label representing the predicate meaning, including, in the pre-trained language model, respectively calculating similarity scores between the plurality of label meanings and the predicate meaning, sorting the similarity scores according to size, and selecting the definite semantic label representing the predicate meaning according to the sorting result; A role prediction step, inputting a plurality of argument categories corresponding to the identification predicate and the determined semantic label into the pre-trained language model, and selecting a preset number of the argument categories as role labels of the identification predicate; as well as The argument labeling step determines the role meaning of the role label according to the determined semantic label, concatenates the role meaning with the identification sentence, and inputs the concatenated sentence into a pre-trained language model, and labels the arguments corresponding to the role label in the identification sentence.

2. The semantic role labeling method based on machine reading comprehension according to claim 1, characterized in that: The step of inputting a plurality of argument categories corresponding to the identification predicate and the determined semantic label into the pre-trained language model, and selecting a preset number of the argument categories from the plurality of argument categories as the role label of the identification predicate comprises: In the pre-trained language model, the identification predicate is analyzed using a neural network algorithm to obtain a score of the identification predicate having the argument category; The scores are sorted according to size, and according to the sorting result, the preset number of the argument categories are selected as the role labels of the identification predicate.

3. The semantic role labeling method based on machine reading comprehension according to claim 2, characterized in that: The recall rate of the role label of the identification predicate is calculated, and the preset number is adjusted according to the recall rate, so that the recall rate corresponding to the role label selected according to the preset number is greater than a preset recall rate threshold.

4. The semantic role labeling method based on machine reading comprehension according to claim 1, characterized in that: The predicate is identified by using a specific number of special symbols to obtain the identified predicate.

5. The semantic role labeling method based on machine reading comprehension according to claim 1, characterized in that: The input is input into the pre-trained language model, and the argument corresponding to the role label in the identification sentence is labeled, including: In the pre-trained language model, the argument position corresponding to the role label in the identification sentence is labeled through sequence labeling to obtain the argument corresponding to the role label in the identification sentence, wherein the sequence labeling includes BIO labeling.

6. A semantic role labeling device based on machine reading comprehension, characterized in that: include: A predicate disambiguation module, which is used to extract the predicate meaning of the identification predicate in the identification sentence through a toolkit for extracting predicate meanings, obtain multiple semantic labels corresponding to the predicate meanings, respectively concatenate the label meanings in the multiple semantic labels with the identification sentence, and input them into a pre-trained language model to obtain a definite semantic label representing the predicate meaning, including, in the pre-trained language model, respectively calculating similarity scores between the multiple label meanings and the predicate meaning, sorting the similarity scores according to size, and selecting the definite semantic label representing the predicate meaning according to the sorting result; A role prediction module, which is used to input a plurality of first argument categories corresponding to the identification predicate and the determined semantic label into the pre-trained language model, and select a preset number of the argument categories from the plurality of argument categories as the role label of the identification predicate; as well as An argument labeling module is used to determine the role meaning of the role label according to the determined semantic label, concatenate the role meaning with the identification sentence, input the concatenated sentence into a pre-trained language model, and label the argument corresponding to the role label in the identification sentence.

7. The semantic role labeling device based on machine reading comprehension according to claim 6, characterized in that: In the role prediction module, the identification predicate is analyzed using a neural network algorithm in the pre-trained language model to obtain a score of the identification predicate having the argument category; The scores are sorted according to size, and according to the sorting result, the preset number of the argument categories are selected as the role labels of the identification predicate.

8. The semantic role labeling device based on machine reading comprehension according to claim 6, characterized in that: In the argument labeling module, the sequence labeling in the pre-trained language model is used to label the argument position corresponding to the role label in the identification sentence to obtain the argument corresponding to the role label in the identification sentence, wherein the sequence labeling includes BIO labeling.

9. A computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are operated to execute the semantic role labeling method based on machine reading comprehension according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Argument characteristic model based literature term recognition method and system

    CN105740230A

  • Method for marking semantic roles by fusing predicate prior information

    CN107273354A

  • Commodity brand feature acquisition method and device, sales volume prediction method and device and electronic equipment

    CN111401409A

  • Systems and methods for automatic generation of questions from text

    US11023684B1