Method and device for obtaining reading comprehension materials, electronic device, and readable medium
By extracting subject-verb-object triples from the knowledge graph and constructing question templates, the text is automatically retrieved to generate reading comprehension materials. This solves the problems of high manual labeling costs and inconsistent question formats in existing technologies, and achieves efficient and diverse material generation and model training.
Patent Information
- Application Number
- CN201910652009.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-07-18
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2039-07-18
AI Technical Summary
Existing technologies rely on manual annotation to obtain reading comprehension materials, which is costly, inefficient, and has a high error rate. In addition, the question forms obtained by natural language processing are very different from actual questions, which affects the training effect.
By obtaining the subject-verb-object triples, extracting the subject, predicate, and object from the knowledge graph, using the preset question template to construct questions and retrieve text, reading comprehension materials are automatically constructed.
It achieves low-cost and high-efficiency generation of high-quality and diverse reading comprehension materials, improves the training effect of machine learning models, and avoids human errors.
Smart Images

Figure CN110347803B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to the field of machine reading comprehension, and in particular to a method and apparatus for obtaining reading comprehension materials, an electronic device, and a computer-readable medium. Background Art
[0002] Machine reading comprehension (MRC) is a technology in the field of natural language understanding, which involves extracting (or determining) part of the content from a (or a paragraph of) text as an answer to a question through a machine learning model (such as a supervised learning framework model), that is, achieving "reading comprehension" of the text. Among them, the machine learning model is obtained through training. The training process includes inputting questions and texts into the machine learning model, comparing the answers obtained with preset standard answers, and adjusting the machine learning model according to the comparison results. To complete the training of the machine learning model, reading comprehension materials are required. The reading comprehension materials include corresponding questions, texts (texts containing answers to questions), and answers (standard answers). Since the amount of reading comprehension materials required for training is large, it is important to know how to obtain reading comprehension materials.
[0003] One way to obtain reading comprehension materials is to obtain text from reading comprehension datasets and manually annotate questions and answers. However, this method relies on manual labor, which is costly, inefficient, and has a high error rate. In addition, the form of questions (such as predicates) is limited by the operator's knowledge and habits, and the training effect on low-frequency data is not good.
[0004] Another way to obtain reading comprehension materials is to use natural language processing annotation tools to annotate questions and answers within a pre-determined text. However, since most text is declarative, the questions generated using this method are often declarative rather than interrogative. This significantly differs from the distribution of questions in practice, affecting training effectiveness. Furthermore, the correspondence between questions and answers obtained through natural language processing alone is likely to be inaccurate, resulting in erroneous and meaningless data. Summary of the Invention
[0005] Embodiments of the present disclosure provide a method and apparatus for obtaining reading comprehension materials, an electronic device, and a computer-readable medium.
[0006] In a first aspect, an embodiment of the present disclosure provides a method for obtaining reading comprehension materials, comprising:
[0007] Obtaining a subject-predicate-object triple, wherein the subject-predicate-object triple includes a corresponding subject, a predicate, and an object;
[0008] Constructing at least one question including a subject and a predicate of the subject-predicate-object triple according to a preset question template, and taking the object of the subject-predicate-object triple as the answer to the question;
[0009] Retrieving at least one text including the subject and object of the subject-verb-object triple;
[0010] Construct reading comprehension materials based on the answers, the questions, and the text.
[0011] In some embodiments, obtaining a subject-verb-object triple comprises:
[0012] Get subject-verb-object triples from the preset knowledge graph.
[0013] In some embodiments, between constructing at least one question including the subject and predicate of the subject-verb-object triple according to a preset question template and constructing reading comprehension material using the answer, the question, and the text, the following steps are further included:
[0014] Get search records;
[0015] Determining a similarity between at least one candidate search result in the search record and a question search result, wherein the candidate search result is a search result obtained by searching with the candidate search formula, and the question search result is a search result obtained by searching with the question as the search formula;
[0016] The candidate search terms corresponding to the candidate search results whose similarity is greater than the threshold are taken as questions.
[0017] In some embodiments, the search results include:
[0018] Search result items, and / or operations on each search result item.
[0019] In some embodiments, the retrieved text including at least one subject and object of the subject-verb-object triple comprises:
[0020] At least one text including the subject, predicate and object of the subject-predicate-object triple is retrieved.
[0021] In a second aspect, an embodiment of the present disclosure provides a device for obtaining reading comprehension materials, comprising:
[0022] An acquisition module, configured to acquire a subject-verb-object triple, wherein the subject-verb-object triple includes a corresponding subject, a predicate, and an object;
[0023] a question construction module, configured to construct at least one question including a subject and a predicate of the subject-predicate-object triple according to a preset question template, with the object of the subject-predicate-object triple as the answer to the question;
[0024] retrieving at least one text including a subject and an object of the subject-predicate-object triple;
[0025] constructing a reading comprehension material with the answer, the question, and the text.
[0026] In some embodiments, the obtaining module is configured to obtain the subject-predicate-object triple from a preset knowledge graph.
[0027] In some embodiments, the apparatus further includes:
[0028] a retrieval record obtaining module configured to obtain a retrieval record;
[0029] a threshold comparison module configured to determine a similarity between at least one candidate retrieval result in the retrieval record and a question retrieval result, wherein the candidate retrieval result is a retrieval result obtained by searching with a candidate search formula, and the question retrieval result is a retrieval result obtained by searching with the question as a search formula;
[0030] a question expansion module configured to expand the question as the candidate search formula corresponding to the candidate retrieval result with the similarity greater than a threshold.
[0031] In some embodiments, the retrieval result includes:
[0032] a retrieval result item, and / or an operation on each retrieval result item.
[0033] In some embodiments, the retrieving module is configured to retrieve at least one text including a subject, a predicate, and an object of the subject-predicate-object triple.
[0034] In a third aspect, an electronic device is provided, which includes:
[0035] one or more processors;
[0036] a storage device having one or more programs stored thereon, when the one or more programs are executed by the one or more processors, the one or more processors implement any of the above methods for obtaining a reading comprehension material.
[0037] In a fourth aspect, a computer readable medium is provided, which has a computer program stored thereon, when the program is executed by a processor, the processor implements any of the above methods for obtaining a reading comprehension material.
[0038] It can be seen that the method of the embodiments of the present disclosure is not dependent on manual work, can be automatically implemented, has low cost and high efficiency, and can avoid errors introduced by human beings.
[0039] Furthermore, according to the disclosed embodiments, the questions and answers of the reading comprehension materials are essentially determined based on subject-verb-object triples, so the accuracy of the relationship between the two is very high. At the same time, the questions are obtained by expanding a variety of different templates, so their forms are diverse and they are indeed "questions," which are highly consistent with actual questions. In addition, the text of the reading comprehension materials is retrieved from a large amount of content and includes subject (S) and object (O), so the text is diverse in form and has a high accuracy rate. As a result, the reading comprehension materials obtained by the disclosed embodiments are of high quality, large in quantity, and good in diversity. Therefore, using them to train machine reading comprehension (MRC) machine learning models can achieve better results and obtain machine learning models with better performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The accompanying drawings are used to provide a further understanding of the embodiments of the present disclosure and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the present disclosure and do not constitute a limitation of the present disclosure. The above and other features and advantages will become more apparent to those skilled in the art by describing the detailed exemplary embodiments with reference to the accompanying drawings, in which:
[0041] Figure 1 A flowchart of a method for obtaining reading comprehension materials provided in an embodiment of the present disclosure;
[0042] Figure 2 A flowchart of another method for obtaining reading comprehension materials provided by an embodiment of the present disclosure;
[0043] Figure 3 A block diagram of a device for obtaining reading comprehension materials provided by an embodiment of the present disclosure;
[0044] Figure 4 A block diagram of another apparatus for obtaining reading comprehension materials provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0045] To enable those skilled in the art to better understand the technical solutions of the present disclosure, the method and apparatus for obtaining reading comprehension materials, electronic device, and computer-readable medium provided by the present disclosure are described in detail below with reference to the accompanying drawings.
[0046] Example embodiments will be described more fully hereinafter with reference to the accompanying drawings, but the example embodiments may be embodied in different forms and should not be construed as limited to the embodiments set forth in this disclosure. Rather, these embodiments are provided so that this disclosure will be thorough and complete and will fully convey the scope of this disclosure to those skilled in the art.
[0047] As used in this disclosure, the term "and / or" includes any and all combinations of one or more of the associated listed items.
[0048] The terminology used by the present disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the present disclosure. As used in the present disclosure, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
[0049] When the term "comprising" and / or "consisting of" is / are used in the present disclosure, it specifies the presence of stated features, integers, steps, operations, elements, and / or components but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0050] The embodiments described in the present disclosure can be described with reference to plan views and / or cross-sectional views by idealized schematic drawings of the present disclosure. Thus, the example illustrations can be modified according to manufacturing techniques and / or tolerances.
[0051] The embodiments of the present disclosure are not limited to the embodiments shown in the drawings, but include modifications of configurations formed based on manufacturing processes. Thus, the regions illustrated in the drawings have a schematic property, and the shape of the regions shown in the drawings exemplifies a specific shape of a region of an element, but is not intended to be limiting.
[0052] Unless otherwise defined, all terms used in the present disclosure, including technical and scientific terms, have the same meaning as commonly understood by one of ordinary skill in the art. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the relevant art and the present disclosure, and will not be interpreted in an overly formal or overly strict sense unless expressly so defined herein.
[0053] The embodiments of the present disclosure are used to obtain reading comprehension materials. The reading comprehension materials include a question, an answer, and a text; wherein the answer is corresponding to the question, or the answer to the question; and the text also contains the answer; so that for a machine reading comprehension (MRC) machine learning model (such as a supervised learning framework model), in theory, the answer can be found from the text according to the question.
[0054] Wherein, the above reading comprehension materials are used for training the above machine learning model, that is, the question and the text of the reading comprehension materials are input into the machine learning model, and the answer obtained by the machine learning model (the answer determined from the text) is compared with the answer (the standard answer) of the reading comprehension materials, so that the machine learning model can be adjusted according to the comparison result, and the training of the machine learning model is realized.
[0055] Figure 1 A flowchart of a method for obtaining reading comprehension materials according to an embodiment of the present disclosure.
[0056] In a first aspect, with reference to Figure 1The embodiment of the present disclosure provides a method for obtaining reading comprehension materials, which comprises:
[0057] S101, acquiring a subject-predicate-object triple, the subject-predicate-object triple comprising a corresponding subject, a predicate and an object.
[0058] The subject-predicate-object triple is also called an SPO (Subject-Predication-Object) triple, which is a triple composed of a subject (S), a predicate (P) and an object (O) having a corresponding relationship, that is, the subject-predicate-object triple represents that the object of the predicate of the subject is the object. For example, A University (S)-current president (P)-Mr. B (O) constitutes a subject-predicate-object triple, which represents that the current president of A University is Mr. B.
[0059] In some embodiments, the present step (S101) specifically comprises: acquiring the subject-predicate-object triple from a preset knowledge graph.
[0060] The knowledge graph is a database representing the relationship between different entities and the attributes of the entities. In the knowledge graph, the entity is the node; the entity and the entity, the entity and its corresponding attribute, and the attribute and its corresponding value are connected by edges, thereby forming a structured, network-like database.
[0061] As can be seen, there are many "entity-attribute-value" relationships in the knowledge graph, and such relationships are essentially equivalent to subject-predicate-object triples, that is, the entity is equivalent to the subject (S), the attribute is equivalent to the predicate (P), and the value is equivalent to the object (O). Therefore, the subject-predicate-object triple can be easily obtained through the existing knowledge graph.
[0062] Of course, it is also feasible to obtain the subject-predicate-object triple from other sources (such as from other databases or manually input, etc.).
[0063] S102, constructing at least one question comprising the subject, the predicate and the object of the subject-predicate-object triple according to a preset question template, and taking the object of the subject-predicate-object triple as the answer to the corresponding question.
[0064] In the field of machine reading comprehension, the question usually comprises the subject (S) and the predicate (P), and the desired answer is the object (O), so the question can be constructed by the subject (S) and the predicate (P) according to the predetermined template, that is, the subject (S), the predicate (P) are arranged in a specific order and combined with other specific contents as the question; at the same time, the object (O) is taken as the answer to the corresponding question.
[0065] The specific form of the template can be various, for example, the template and the corresponding question can be as shown in the following table:
[0066] Table 1, examples of templates and corresponding questions
[0067] template question Subject (S) Predicate (P) Current President of University A The predicate (P) of the subject (S) is The current president of University A is
[0068] Of course, the answer to the above question at this time is "Mr. B".
[0069] Furthermore, by performing a more detailed analysis of the subject-verb-object triples, more detailed questions can be generated based on targeted templates. For example, the subject-verb-object triples can be analyzed to determine the part of speech of the object (O) (such as person, number, place, time, etc.), and templates for different parts of speech can be selected to generate questions. For example, templates can include "who", "how many", "where", and other part-of-speech related question parts. Specifically, some targeted templates and their corresponding questions can be shown in the following table:
[0070] Table 2. Examples of targeted templates and corresponding questions
[0071]
[0072] S103: Retrieve and obtain at least one text including a subject and an object of a subject-verb-object triple.
[0073] Through a specific search engine, multiple (multiple) texts are retrieved within a predetermined scope (such as a specific database, or a public network covered by the search engine), wherein each text must at least include the above subject (S) and object (O), such as "University A" and "Mr. B".
[0074] Obviously, the content of the text including the subject (S) and the object (O) is very likely to be about the above subject-verb-object triple, and it includes the core part of the question and the corresponding answer. Therefore, theoretically, the answer to the corresponding question should be selected from this text. Therefore, such text can be used as reading comprehension material.
[0075] In some embodiments, this step (S104) specifically includes: retrieving at least one text including a subject, a predicate, and an object of a subject-predicate-object triple.
[0076] That is to say, the retrieved text preferably also includes the above predicate (P), such as "current principal", because such text is more accurate and targeted.
[0077] Of course, it should be understood that the above text includes the subject, predicate, and object, which means that the text can include the original text of the subject, predicate, and object, or the equivalent representation of the original text of the subject, predicate, and object. For example, assuming that the object is "two thousand nineteen", the Arabic numerals "2019" is its equivalent representation.
[0078] S104. Construct reading comprehension materials using answers, questions, and texts.
[0079] The above determined answer, question, and text have a corresponding relationship, that is, in theory, according to the above question, the above answer can be determined from the above text. Thus, the answer, question, and text can be used to construct reading comprehension materials, that is, the answer, question, and text with a corresponding relationship are used as reading comprehension materials.
[0080] Of course, it should be understood that since the answer is obtained according to one subject-predicate-object three tuple, there should be only one answer in the above process, but the question and text corresponding to the answer can be multiple.
[0081] Thus, the specific format of the reading comprehension material can be diverse. For example, each reading comprehension material can include only one question, one text, and one answer, so that multiple reading comprehension materials can be constructed (only the answers of the multiple reading comprehension materials are the same); or each reading comprehension material can include multiple questions and multiple texts, and these questions and texts correspond to only one answer.
[0082] Of course, it should be understood that although the above process is illustrated by taking only one answer (or only processing one subject-predicate-object three tuple) as an example; it should be understood that by processing multiple subject-predicate-object three tuples respectively according to the above process, multiple answers can be obtained, and the question and text corresponding to each question, and according to each answer and the question and text corresponding thereto, different reading comprehension materials can be obtained.
[0083] Among them, the above reading comprehension material can be used for training of a machine learning model (such as a supervised learning framework model) for machine reading comprehension (MRC), that is, the question and text of the reading comprehension material can be input into the machine learning model, and the answer obtained by the machine learning model (the answer determined from the text) is compared with the answer (standard answer) of the reading comprehension material, so that the machine learning model can be adjusted according to the comparison result, and the training of the machine learning model is realized.
[0084] It can be seen that the manner of the embodiments of the present disclosure does not depend on manual work, can be automatically implemented, has low cost and high efficiency, and can avoid human-induced errors.
[0085] Further, according to the embodiment of the present disclosure, the question and the answer of the reading comprehension material are essentially determined according to the subject-predicate-object triplets, so the correctness of the relationship between the question and the answer is high; meanwhile, the question is obtained through the expansion of multiple different templates, so the question has various forms and is indeed a question, which is highly consistent with the actual question; in addition, the text of the reading comprehension material is obtained from a large amount of content, and the content includes the subject (S) and the object (O), so the text has various forms and high correctness. Therefore, the reading comprehension material obtained by the embodiment of the present disclosure has high quality, large quantity, and good diversity, so the machine learning model of the machine reading comprehension (MRC) trained by the reading comprehension material can achieve better results and obtain a machine learning model with better performance.
[0086] In some embodiments, with reference to Figure 2 In the step of constructing at least one question including a subject, a predicate, and a subject-predicate-object triplet according to a preset question template (S102), and the step of constructing the reading comprehension material with an answer, a question, and a text (S104), the following steps are further included:
[0087] S105, obtaining a search record.
[0088] The search record of a specific search engine is obtained, and the search record includes a search formula (i.e., the content according to which the search is performed) and a search result.
[0089] S106, determining the similarity between at least one candidate search result in the search record and a question search result, wherein the candidate search result is a search result obtained by searching with a candidate search formula, and the question search result is a search result obtained by searching with the question as the search formula.
[0090] The result obtained by searching according to the current existing question is the question search result (of course, if there are multiple questions, there will also be multiple corresponding question search results), and the similarity between the search result (candidate search result) obtained by searching with other search formulas (candidate search formulas) and the question search result is compared, that is, it is determined which other candidate search formulas can obtain the same or highly similar search result as the question.
[0091] In some embodiments, the search result includes a search result item and / or an operation on each search result item.
[0092] The above search result can specifically include a search result item (such as a web page, a link, etc.), that is, if the same search result item can be obtained by searching with different search formulas, it can be considered that the corresponding search results are similar.
[0093] Alternatively, the search results can also include operations on the search result items, i.e. after a plurality of search result items are searched, which search result items are operated on (e.g. clicked to open) by the user can also be part of the search results. Thus, if after searching by different search expressions, a large proportion of users click on the same search result item, it can be considered that the search results corresponding thereto are similar. For example, if after searching by the search expression "Who is the current president of A University?", 70% of people click on the link of "A University official website", and after searching by the search expression "Does anyone know who is the new president of A University?", 75% of people click on the link of "A University official website", it can be considered that the two search results are similar.
[0094] Exemplarily, the ways of determining the similarity of search results according to clicks (operations) are various, for example, the way in the following paper can be adopted: "Zhao S, Wang H, Liu T. Paraphrasing with search engine query logs [C] / / Proceedings of the 23rd International Conference on Computational Linguistics. Association for Computational Linguistics, 2010: 1317-1325.", which will not be described in detail here.
[0095] Of course, it is also feasible if the search results simultaneously include search result items and operations on the search result items.
[0096] S107, taking the candidate search expression corresponding to the candidate search result with a similarity greater than a threshold as a question.
[0097] Obviously, if the candidate search result obtained by a certain candidate search expression is very similar to the question search result obtained by searching according to the question, it indicates that the actual meaning expressed by the candidate search expression is very similar to the question, or in other words, the candidate search expression is another form of expression of the question, and therefore, the candidate search expression can also be taken as a question for the construction of reading comprehension materials.
[0098] As a specific example, the similarity of the candidate search result of the candidate search expression "Does anyone know who is the new president of A University?" to the question search result of the question "Who is the current president of A University?" is greater than a threshold, it can be considered that people often use the search expression "Does anyone know who is the new president of A University?" to search for the current president of A University, and therefore, the search expression "Does anyone know who is the new president of A University?" can also be taken as a question.
[0099] Because templates are manually constructed, their form is inevitably influenced by the creator and the circumstances surrounding their creation. The same question may be expressed differently by other people or at other times. By analyzing the search results, the above steps can identify the various ways the public frequently expresses a question, greatly expanding the diversity of the resulting question forms and ensuring they align with actual circumstances.
[0100] Of course, it should be understood that the order in which the steps in the method for obtaining reading comprehension materials described above in the embodiment of the present disclosure are not intended to limit their actual execution order; the execution order of the steps above can be reversed as long as it is logical. For example, the step of "using the object of the subject-verb-object triple as the answer to the corresponding question" can be performed between the step of "obtaining the subject-verb-object triple" and the step of "constructing the reading comprehension materials"; for another example, the step of "retrieving at least one text containing the subject and object of the subject-verb-object triple" can also be performed between the step of "obtaining the subject-verb-object triple" and the step of "constructing the reading comprehension materials."
[0101] Figure 3 This is a block diagram of a device for obtaining reading comprehension materials according to an embodiment of the present disclosure.
[0102] Secondly, refer to Figure 3 , an embodiment of the present disclosure provides a device for obtaining reading comprehension materials, which includes:
[0103] An acquisition module is used to acquire a subject-verb-object triple, where the subject-verb-object triple includes a corresponding subject, a predicate, and an object;
[0104] A question construction module is used to construct at least one question including a subject and a predicate of a subject-predicate-object triple according to a preset question template, with the object of the subject-predicate-object triple being the answer to the corresponding question;
[0105] A retrieval module, configured to retrieve and obtain at least one text including a subject and an object of a subject-verb-object triple;
[0106] The reading comprehension material module is used to construct reading comprehension materials with answers, questions, and texts.
[0107] In some embodiments, the acquisition module is used to obtain subject-verb-object triples from a preset knowledge graph.
[0108] Reference Figure 4 In some embodiments, the apparatus further comprises:
[0109] A retrieval record acquisition module is used to acquire retrieval records;
[0110] a threshold comparison module configured to determine a similarity between at least one candidate search result in the search records and the problem search result, wherein the candidate search result is a search result obtained by searching with a candidate search formula, and the problem search result is a search result obtained by searching with the problem as a search formula;
[0111] a problem expansion module configured to expand the problem with a candidate search formula corresponding to the candidate search result whose similarity is greater than the threshold.
[0112] In some embodiments, the search result includes:
[0113] a search result item, and / or an operation on each search result item.
[0114] In some embodiments, the search module is configured to search to obtain at least one text including a subject, a predicate, and an object of a subject-predicate-object triple.
[0115] In a third aspect, the embodiments of the present disclosure provide an electronic device, which includes:
[0116] one or more processors;
[0117] a storage device having one or more programs stored thereon, when the one or more programs are executed by the one or more processors, the one or more processors implement any of the above methods for obtaining reading comprehension materials.
[0118] In a fourth aspect, the embodiments of the present disclosure provide a computer readable medium having a computer program stored thereon, when the program is executed by a processor, the program implements any of the above methods for obtaining reading comprehension materials.
[0119] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As is well known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable, and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those skilled in the art that communication media typically embodies computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0120] The present disclosure has disclosed example embodiments, and although specific terms are employed, they are used and should be interpreted only in a general illustrative sense and not for purposes of limitation. In some instances, it will be apparent to those skilled in the art that, unless otherwise expressly indicated, features, characteristics, and / or elements described in conjunction with a particular embodiment may be used alone or in combination with features, characteristics, and / or elements described in conjunction with other embodiments. Therefore, it will be understood by those skilled in the art that various changes in form and detail may be made without departing from the scope of the present disclosure as set forth in the appended claims.
Claims
1. A method for obtaining reading comprehension materials, comprising: Obtain a subject-verb-object triple from a preset knowledge graph, wherein the subject-verb-object triple includes a corresponding subject, a predicate, and an object; Constructing multiple questions including the subject and predicate of the subject-predicate-object triple according to a preset question template, with the object of the subject-predicate-object triple as the answer to the corresponding question; A search engine is used to retrieve, within a predetermined range, a plurality of texts including the subject and object of the subject-verb-object triple; wherein the predetermined range includes a public network covered by the search engine; and the answers are obtained based on the subject-verb-object triples, the answers corresponding to a plurality of questions, and the answers corresponding to a plurality of texts; Constructing reading comprehension materials using the answers, the questions, and the text; wherein the reading comprehension materials are used for training a machine learning model; wherein, between constructing at least one question including a subject and a predicate of the subject-verb-object triple according to a preset question template and constructing the reading comprehension materials using the answers, the questions, and the text, further comprising: Get search records; Determining a similarity between at least one candidate search result in the search record and a question search result, wherein the candidate search result is a search result obtained by searching with the candidate search formula, and the question search result is a search result obtained by searching with the question as the search formula; The candidate search terms corresponding to the candidate search results whose similarity is greater than a threshold are taken as questions.
2. The method according to claim 1, wherein The search results include: Search result items, and / or operations on each search result item.
3. The method according to claim 1, wherein The retrieved text including at least one subject and object of the subject-verb-object triple includes: At least one text including the subject, predicate and object of the subject-predicate-object triple is retrieved.
4. A device for obtaining reading comprehension materials, comprising: An acquisition module is used to obtain a subject-verb-object triple from a preset knowledge graph, wherein the subject-verb-object triple includes a corresponding subject, a predicate, and an object; a question construction module, configured to construct a plurality of questions including the subject and predicate of the subject-predicate-object triples according to a preset question template, with the objects of the subject-predicate-object triples serving as answers to the corresponding questions; a retrieval module configured to retrieve, through a search engine, a plurality of texts including the subject and object of the subject-verb-object triple within a predetermined range; wherein the predetermined range includes the public network covered by the search engine; and wherein the answer is obtained based on the subject-verb-object triple, the answer corresponds to a plurality of questions, and the answer corresponds to a plurality of texts; A reading comprehension material module is used to construct reading comprehension materials using the answers, the questions, and the text; wherein the reading comprehension materials are used to train a machine learning model; and further includes: A retrieval record acquisition module is used to acquire retrieval records; a threshold comparison module, configured to determine a similarity between at least one candidate search result in the search record and a question search result, wherein the candidate search result is a search result obtained by searching with the candidate search formula, and the question search result is a search result obtained by searching with the question as the search formula; The question expansion module is used to take the candidate search formulas corresponding to the candidate search results with similarity greater than a threshold as questions.
5. The device according to claim 4, wherein The search results include: Search result items, and / or operations on each search result item.
6. The device according to claim 4, wherein The retrieval module is used to retrieve and obtain at least one text including the subject, predicate and object of the subject-predicate-object triple.
7. An electronic device comprising: one or more processors; A storage device having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method for obtaining reading comprehension materials according to any one of claims 1 to 3.
8. A computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method for obtaining reading comprehension materials according to any one of claims 1 to 3 is implemented.
Citation Information
Patent Citations
Method and device for processing question and answer corpus and electronic terminal
CN109388697A
Information extraction method and device for text data
CN109977391A
Index structure and query process method for RDF triple repository
KR1020110026841A
Question and answer method based on knowledge graph, and agricultural encyclopedia question and answer system
CN108804521A
A dialog system automatic optimization method based on log learning
CN109460459A