Data generation apparatus, data generation method, and data generation program

The data generation device generates ternary relationships from unannotated text data by using a language model and syntactic analysis, addressing the cost and domain-specific challenges of manual annotation in existing methods.

JP2024118570AActive Publication Date: 2024-09-02HITACHI LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
JP2023024920
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-02-21
Publication Date
2024-09-02
Estimated Expiration
2043-02-21

AI Technical Summary

Technical Problem

Existing methods for generating ternary relationships from text data require manual annotation of ternary relationships, which can be costly and domain-specific, making it difficult to organize such data effectively.

Method used

A data generation device that utilizes a processor to execute a program for generating ternary relationship data by acquiring answer candidates, inputting them into a language model to generate question sentences, and performing syntactic analysis to combine subjects, objects, and relationships without relying on pre-specified annotations.

Benefits of technology

Enables the generation of ternary relationship data from unannotated text data, reducing the need for manual annotation and associated costs, while maintaining accuracy through syntactic analysis and language model processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024118570000001
    Figure 2024118570000001
Patent Text Reader

Abstract

To provide a data generation apparatus, a data generation method, and a data generation program for generating ternary relation data from input data without using learning data or seed data indicating ternary relations.SOLUTION: A data generating apparatus 100 that includes a processor for executing a program and a storage device for storing the program, comprises: an acquisition unit for acquiring a first answer candidate from text data and acquiring a question sentence corresponding to the first answer candidate by inputting the first answer candidate into a first language model; and a generating unit for syntactically analyzing the acquired question sentence and generating ternary relation data in which either a subject or an object of a combination, combining the subject of the question sentence, the object of the question sentence, and a relationship between the subject and the object, is replaced with the first answer candidate based on the result of syntactically analyzing the question sentence and the first answer candidate.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to a data generation device, a data generation method, and a data generation program for generating data. [Background technology]

[0002] Open Information Extraction (OpenIE) is known as a method for structuring unstructured text information in a domain-independent format. OpenIE extracts information in the form of a triple (three-way relationship) of subject, relation, and object, and does not depend on any schema. Known examples of using the extracted three-way relationships include question answering tasks (machine reading comprehension), document summarization, and knowledge base construction.

[0003] The following Patent Document 1 is a related technology for generating ternary relations. The following Patent Document 1 states that "The present invention relates to a technology for efficiently generating pairs of two language patterns in which one pattern implies the other." The following Patent Document 1 also states that "We provide an entailment pair expansion device that is capable of predicting what entailment pairs can be obtained by expanding existing entailment pairs and can guarantee the accuracy to a certain degree."

[0004] Furthermore, Patent Document 2 below states, "In particular, the assistant system may determine, based on the query, one or more initial entities associated with the query. The assistant system may then select, by a conversational reasoning model, one or more candidate nodes from the knowledge graph corresponding to one or more candidate entities, respectively." Furthermore, Patent Document 2 below states, "In particular, the assistant system may generate a response based on the initial entities and the candidate entities."

[0005] Furthermore, Non-Patent Document 1 below states, "We propose a novel pipeline system for finding compact triples that share their constituents. We call our OpenIE system, COMPACTIE. To encourage the constituents to be shared across triples, COMPACTIE first extracts the constituents using a Constituent Extraction model and then links them using a Constituent Linking model to obtain triples." [Prior art documents] [Patent documents]

[0006] [Patent Document 1] WO2016 / 143449 issue [Patent Document 2] U.S. Patent No. 1,144,2992 [Non-patent literature]

[0007] [Non-Patent Document 1] Farima Fatahi Bayat, Nikita Bhutani, and H. Jagadish. 2022. CompactIE: Compact Facts in Open Information Extraction. In Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 900-910, Seattle, United States. Association for Computational Linguistics. Summary of the Invention [Problem to be solved by the invention]

[0008] There have been many attempts to automatically extract ternary relations from text data, and machine learning and rule-based approaches have been proposed. The technology described in Patent Literature 1 provides a means for generating new ternary relations from input text by extending existing ternary relations with a rule-based method. In addition, the technology described in Non-Patent Literature 1 provides a means for extracting ternary relations from text through supervised learning by using a neural network-based model.

[0009] In the above-mentioned conventional technology, it is necessary to add annotations that specify ternary relations to words, such as training data or seed data. However, depending on the application domain or modality, it may be difficult to prepare such data. One example is the case where the annotation cost of manually creating annotations that specify ternary relations is high.

[0010] An object of the present invention is to generate ternary relation data from input data without using information specifying the ternary relations. [Means for solving the problem]

[0011] A data generation device according to one aspect of the invention disclosed in the present application is a data generation device having a processor that executes a program and a storage device that stores the program, wherein the processor executes an acquisition process of acquiring a first answer candidate from text data and acquiring a question sentence corresponding to the first answer candidate by inputting the first answer candidate into a first language model, and a generation process of parsing the question sentence acquired by the acquisition process and generating ternary relational data, based on the result of the syntactic analysis of the question sentence and the first answer candidate, which is a combination of a subject of the question sentence, an object of the question sentence, and a relationship between the subject and the object, in which either the subject or the object of the combination is replaced by the first answer candidate. Effect of the Invention

[0012] According to a representative embodiment of the present invention, ternary relation data can be generated from input data without using data indicating ternary relations. Problems, configurations, and effects other than those described above will become apparent from the following description of the embodiment. [Brief description of the drawings]

[0013] [Figure 1] FIG. 1 is a block diagram of an example of a functional configuration of a data generating device according to a first embodiment. [Diagram 2] FIG. 2 is an explanatory diagram illustrating an example of the generation target data. [Diagram 3] FIG. 3 is an explanatory diagram illustrating an example of input and output of a named entity extractor. [Figure 4] FIG. 4 is a block diagram illustrating an example of a functional configuration of the acquisition unit. [Diagram 5] FIG. 5 is an explanatory diagram illustrating an example of a context. [Figure 6] FIG. 6 is an explanatory diagram illustrating an example of answer candidate information. [Figure 7] FIG. 7 is an explanatory diagram illustrating an example of question and answer data. [Figure 8] FIG. 8 is a block diagram illustrating an example of a functional configuration of the generation unit. [Figure 9] FIG. 9 is a flowchart illustrating an example of a procedure of a syntax analysis process performed by the syntax analysis unit. [Figure 10] FIG. 10 is an explanatory diagram showing Example 1 of the syntax analysis process by the syntax analysis unit of FIG. [Figure 11] FIG. 11 is an explanatory diagram showing Example 2 of the syntax analysis process by the syntax analysis unit of FIG. [Figure 12] FIG. 12 is an explanatory diagram illustrating Example 3 of the syntax analysis process by the syntax analysis unit of FIG. [Figure 13] FIG. 13 is a flowchart showing an example of an interrogative word processing procedure by the interrogative word processing unit. [Figure 14] FIG. 14 is a flowchart illustrating an example of a procedure of a master-slave relationship determination process performed by the master-slave relationship determination unit. [Figure 15] FIG. 15 is an explanatory diagram of an example of a setting execution screen of the data generating device according to the first embodiment. [Figure 16] FIG. 16 is a block diagram illustrating an example of a hardware configuration of the data generating device. [Figure 17] FIG. 17 is a block diagram of an example of a functional configuration of the data generating device according to the second embodiment. As illustrated in FIG. [Figure 18] FIG. 18 is an explanatory diagram illustrating an example of the verification unit setting information. [Figure 19]FIG. 19 is a flowchart illustrating an example of a procedure of the verification process performed by the verification unit. [Figure 20] FIG. 20 is an explanatory diagram of an example of a setting execution screen of the data generating device according to the second embodiment. [Figure 21] FIG. 21 is a diagram illustrating an example of a subgraph. [Figure 22] FIG. 22 is a flowchart showing an example of a processing procedure for generating a knowledge graph from ternary relation data related to document images. [Figure 23] FIG. 23 is an explanatory diagram showing an example of a knowledge graph constructed according to the processing shown in FIG. [Figure 24] FIG. 24 is an explanatory diagram showing an example of the FAQ generation result display screen. [Diagram 25] FIG. 25 is an explanatory diagram showing an example of the 5W1H arrangement result display screen. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0014] Hereinafter, embodiments will be described with reference to the accompanying drawings. In the following, it is understood that the embodiments and modifications can be combined in part or in whole without departing from the spirit of the present invention. EXAMPLES

[0015] <Example of functional configuration of data generating device> 1 is a block diagram showing an example of a functional configuration of a data generating device 100 according to a first embodiment. The data generating device 100 can take in, as input data, data to be generated 101, a first language model 102, a named entity extractor 103, and a syntax analyzer 104. The data generating device 100 includes an acquiring unit 110 and a generating unit 130. The data generating device 100 outputs ternary relation data 141.

[0016] Although the data generating device 100 can handle any language, the first embodiment will be described with reference to an example in which English is handled.

[0017] [Data to be generated 101] The target data 101 may be data of any modality or domain, but for convenience, an example of handling a document image will be described in the first embodiment. The target data 101 is, for example, a document image from which ternary relation data 141 is to be extracted.

[0018] 2 is an explanatory diagram showing an example of the data to be generated 101. The data to be generated 101 is, for example, screenshot data of a web page. In the case of a document image such as screenshot data of a web page, no annotation is added to the sentences in the document image for identifying a ternary relationship.

[0019] However, the target data 101 may be data including text (for example, a web page or a document file). When the target data 101 is data including text, it is possible to generate the ternary relation data 141 even if an annotation specifying a ternary relation is not added. Also, when the target data 101 is data including text, even if an annotation specifying a ternary relation is added, it is not used to generate the ternary relation data 141.

[0020] [First Language Model 102] Returning to Fig. 1, the first language model 102 is a machine learning model that generates a question sentence related to an answer candidate from the target data 101 and an arbitrary answer candidate. Any architecture can be used as a machine learning model based on a neural network for the first language model 102, but for example, a Transformer-type encoder language model represented by BERT (Bidirectional Encoder Representations from Transformers) or BART (Bidirectional Auto-Regressive Transformer), which is an encoder-decoder model, can be applied.

[0021] The learning of the first language model 102 is realized by a method of fine-tuning the above-mentioned pre-trained language model. In this case, the dataset used in the question answering task is utilized as the dataset for the question generation task. Specifically, when the target data 101 is in text format, it is possible to perform learning by supervised learning by regarding the context and answers of each sample of SQuAD (Stanford Question Answering Dataset) as input data and the question sentence as output data. Also, when the target data 101 is a document image as shown in FIG. 2, learning can be realized by using DocVQA (Document Visual Question Answering Dataset) and a method similar to SQuAD.

[0022] [Named entity extractor 103] The named entity extractor 103 is used for a process of extracting named entities contained in an input sentence, and is realized, for example, by a machine learning model based on a neural network. In the first embodiment, for example, it is assumed to use a model in which pre-trained BERT is fine-tuned with the named entity recognition dataset: OntoNotes Release 5.0.

[0023] 3 is an explanatory diagram showing an example of input and output of the named entity extractor 103. The named entity extractor 103 inputs an example sentence 301 in text format and outputs an extraction result 302. The format of the extraction result 302 is not limited to a table format and can have any data structure, but in the first embodiment, the table format is used.

[0024] The extraction result 302 has an entity 321 indicating token information and an entity type 322 indicating a named entity label. The type of the entity type 322 conforms to the label defined in the named entity recognition dataset. In the case of the first embodiment, the label defined in OntoNotes Release 5.0 is used.

[0025] In the first embodiment, the named entity extractor 103 is used in a process of generating answer candidates to be used as input by the first language model 102, but the method of generating answer candidates is not limited to this method and is merely an example. As an example of a method of generating answer candidates, the named entity extractor 103 may extract noun phrases by morphological analysis and use them as answer candidates.

[0026] [Acquisition unit 110] 4 is a block diagram showing an example of a functional configuration of the acquisition unit 110. The acquisition unit 110 receives, as input, the generation target data 101, the first language model 102, and the named entity extractor 103, and executes an acquisition process for acquiring a question sentence. The acquisition unit 110 outputs question and answer data 121. The acquisition unit 110 includes a context extraction unit 401, an answer candidate generation unit 402, and a question generation unit 403.

[0027] In the acquisition unit 110, first, the context extraction unit 401 extracts a context from the data to be generated 101. The context is data describing the contents of the data to be generated 101 in a text format, for example, but the content of the data to be generated 101 may be in a format that can be handled by the answer candidate generation unit 402 and the question generation unit 403, and is not limited to the text format.

[0028] Furthermore, when the first language model 102 accepts the target data 101 as is, the context obtained by the context extraction unit 401 may not be used in the question generation unit 403. For example, this corresponds to a case where the target data 101 is a document image and Donut (Document Understanding Transformer) is used as the first language model 102. When Donut is used, the context can be generated without using OCR even if the target data 101 is a document image. In the following, in the first embodiment, for convenience, it is assumed that the context is expressed in a text format.

[0029] 5 is an explanatory diagram showing an example of a context 500. The context 500 is text data extracted by OCR (Optical Character Recognition) from the generation target data 101 shown in FIG.

[0030] Returning to FIG. 4, the answer candidate generating unit 402 generates answer candidate information from the context 500 obtained by the context extracting unit 401 by using the named entity extractor 103 .

[0031] Fig. 6 is an explanatory diagram showing an example of answer candidate information. Answer candidate information 600 is a set of combinations of entities 321 and entity types 322 extracted from context 500 using named entity extractor 103, and the data format is the same as that of named entity extraction result 302 shown in Fig. 3. Each row (combination of entity 321 and entity type 322) of answer candidate information 600 becomes answer candidates 611, 612, 613, 614, ... (when no distinction is made between these, they are referred to as first answer candidate 610).

[0032] The question generation unit 403 generates question answer data 121 using the first language model 102, based on the context obtained by the context extraction unit 401 and the answer candidate information 600 obtained by the answer candidate generation unit 402. The question answer data 121 is composed of, for example, a first answer candidate 610 and a question sentence corresponding to the first answer candidate 610.

[0033] The answer candidate information 600 may be filtered according to the named entity class by a user's input in advance. A named entity class is a category in which named entities are classified according to their attributes. Specifically, this filtering can be realized by, for example, using the answer candidate information 600 output from the answer candidate generation unit 402 as input data for the question generation unit 403 only when the answer candidate information 600 belongs to a named entity class designated by the user. A method for implementing user input will be described later with reference to FIG. 15 (reference numeral 1503).

[0034] Fig. 7 is an explanatory diagram showing an example of question and answer data. The question generation unit 403 receives the context 500 and answer candidate information 600 as input, and generates question and answer data 121 by using the first language model 102. In the question and answer data 121 in Fig. 7, the entity 321 of the answer candidate information 600 is stored in "entity."

[0035] Moreover, in "entity_type", the entity type 322 of the answer candidate information 600 is stored. In "question", questions 721, 722, 723, ... (when no distinction is made between these, they are referred to as question 720) generated by the first language model 102 are stored. The question 720 is a question to which the entity 321 is the answer.

[0036] [Parser 104] 1, the parser 104 analyzes the input text using a known algorithm and converts it into tree-structured data that indicates relationships between texts. For example, the parser 104 executes a conversion process using a Stanza parser based on Universal Dependencies or a parser by spaCy based on ClearNLP Constituent-to-Dependency Conversion (Emory University), but the specific method is not limited thereto.

[0037] In the following, in the first embodiment, a known syntax analyzer is used, and each node of the tree structure data is assumed to be composed of phrase information and its dependency label information. The dependency label information is based on the above-mentioned ClearNLP Constituent-to-Dependency Conversion (Emory University).

[0038] [Generation unit 130] The generating unit 130 receives the question and answer data 121 and the syntax analyzer 104 as input, and executes a generating process to generate the ternary relation data 141.

[0039] 8 is a block diagram showing an example of the functional configuration of the generation unit 130. The generation unit 130 includes a syntax analysis unit 801, an interrogative word processing unit 802, and a superior-subordinate relationship determination unit 803, for example.

[0040] 9 is a flowchart showing an example of a procedure for a syntax analysis process performed by the syntax analysis unit 801. The generation unit 130 first executes syntax analysis by the syntax analysis unit 801 (step S901). Specifically, for example, the syntax analysis unit 801 breaks down the question sentence 720 included in the input question and answer data 121 into words using the syntax analyzer 104, and converts the words into tree-structured data in which the relationships between the nodes are indicated by arrow edges.

[0041] Fig. 10 is an explanatory diagram showing an example 1 of the syntax analysis process by the syntax analysis unit 801 of Fig. 9. In Fig. 10, when "How many internet users are there in Nigeria?" is given to the syntax analysis unit 801 as the question sentence 720, an output result 1001 is obtained by syntax analysis (step S901). An edge is information for specifying a node connected to the end side of the edge by a relational label, based on a node connected to the start side of the edge.

[0042] In FIG. 10, for convenience, the connection relationships between nodes are shown using edges, but any data format is acceptable as long as it can be expressed as a directed graph. The relationship labels between nodes in the output result 1001 are expressed by adding the relevant names (such as "advmod", "amod", and "compound") between the arrows. As described above, the relationship labels are based on the labels defined in ClearNLP Constituent-to-Dependency Conversion (Emory University). An example of a relationship label is shown below.

[0043] "advmod" is an adverb. "Amod" is an adjective. "Attr" is the complement of a verb that is connected by an equal relationship (a successive or conjunction) such as the verb "be" or "seem," "appear," or "become." "Aux" is an auxiliary verb. "cc" is a conjunction. "Compound" is a compound word. A "conj" is a connected word that is joined by a coordinating conjunction such as and or or. ``csubj'' is the main clause. "csubjpass" is the syntactic main clause in a passive clause (hereafter referred to as the passive main clause). "Det" is a determiner. "dobj" is the direct object. "Expl" is a particle or dummy, i.e. a meaningless word, such as the there in a there construction or the it in an emphasis construction, which is an element of a grammatical structure that has no meaning in itself. "Neg" is a negation word. 'nsubj' is the syntactic subject of the clause. 'nsubjpass' is the syntactic subject in the passive clause (hereafter referred to as the passive subject). "pobj" is the object of the preposition. "Prep" is a preposition.

[0044] In this specification, edges may be represented by their relational labels. For example, an edge to which the relational label "advmod" is assigned and which is connected to "How" may be represented as the edge advmod.

[0045] An edge whose end point of an edge with an arrowhead is connected to a node is called an "inflow edge." An edge whose start point of an edge without an arrowhead is connected to a node is called an "outflow edge." For example, an edge advmod that has a relation label "advmod" and is connected to "How" is an inflow edge from the perspective of the node "How" and an outflow edge from the perspective of the node "many."

[0046] Moreover, a node connected to an inflow edge is called an "inflow node," and a node connected to an outflow edge is called an "outflow node." The node "many" is connected to an outflow edge advmod with a relationship label "advmod," so it is an outflow node from the perspective of the outflow edge advmod, but it is connected to an inflow edge amod with a relationship label "amod," so it is an inflow node from the perspective of the inflow edge amod.

[0047] In identifying the root node (step S902), the syntax analysis unit 801 determines, as the root node, a node that is not connected to an inflow edge among the output result 1001 of the syntax analysis (step S901). The identification result 1002 of the identification of the root node (step S902) indicates that the node "are" has been determined as the root node R01.

[0048] Among the child nodes connected to the inflow edges from the root node, those that have specific relational labels for forming the same verb phrase (predicate phrase) as the root node R01, such as "neg" (negation), "aux" (auxiliary verb), "auxpass" (passive voice), "advmod" (adverb), "compound" (compound word), and "compound:prt" (phrasal verb), and that do not have outflow edges, are auxiliary nodes that support the root node R01. The root node and auxiliary nodes form a root node group.

[0049] In the example of Fig. 10, since there is no such auxiliary node for the root node R01, a root node group is not formed. In grouping the nodes other than the root node (step S903), the syntax analysis unit 801 sets a phrase for each child node having an incoming edge from the root node or the root node group. If an interrogative word exists in the phrase, an interrogative word phrase is also set.

[0050] For the identification result 1002, by grouping the nodes other than the root node (step S903), a grouping result 1003 is obtained.

[0051] In the grouping result 1003, the number of incoming nodes connected to the outgoing edges attr, expl, and prep from "are" of the root node R01 is three: "users," "there," and "in," so three node groups G01 to G03 are generated.

[0052] Specifically, for example, the incoming node "users" from the root node R01 "are" is connected to the incoming nodes "many" and "internet," and the incoming node "many" is further connected to the incoming node "How." Therefore, "How many internet users" becomes one phrase and constitutes the group G01.

[0053] In addition, since the interrogative word “How” can be connected to an adjective to form an interrogative phrase, the generation unit 130 sets “How many” as an interrogative phrase, which is the combination of the interrogative word “How” and the node “many” (adjective) connected to the interrogative word “How” by the outgoing edge advmod.

[0054] The inflow node "there" from the root node R01 "are" is not connected to an outflow edge. Therefore, the node "there" forms one phrase and constitutes the group G02.

[0055] The inflow node "in" from "are" in the root node R01 is connected to the inflow node "Nigeria?", but "Nigeria?" is not connected to an outflow edge. Therefore, "in Nigeria?" is one phrase and constitutes the group G03.

[0056] Fig. 11 is an explanatory diagram showing a second example of the syntax analysis process by the syntax analysis unit 801 in Fig. 9. In Fig. 11, when "What is the name of foundation?" is given to the syntax analysis unit 801 as the question sentence 720, an output result 1101 is obtained by syntax analysis (step S901).

[0057] In identifying the root node (step S902), the syntax analysis unit 801 determines the node "is" as the root node R11 from the output result 1101 of the syntax analysis (step S901).

[0058] In grouping the nodes other than the root node (step S903), the syntax analysis unit 801 outputs a grouping result 1103. In the grouping result 1103, the number of incoming nodes connected to the outgoing edge attr,nsubj from "is" of the root node R11 is two, "What" and "name", so two node groups G11 to G12 are generated.

[0059] Specifically, for example, the inflow node "What" from the root node R11 "is" is not connected to an outflow edge. Therefore, the node "What" alone forms one phrase and constitutes the group G11.

[0060] In addition, the inflow node "name" from the root node R11 "is" is connected to the inflow nodes "the" and "of", and the inflow node "of" is further connected to the inflow node "foundation?". Therefore, "the name of foundation?" becomes one phrase and constitutes a group G12.

[0061] Fig. 12 is an explanatory diagram showing a third example of the syntax analysis process by the syntax analysis unit 801 in Fig. 9. In Fig. 12, when the syntax analysis unit 801 is given a question "What percentage of people are not watching TV and the Internet concurrently?", an output result 1201 is obtained by syntax analysis (step S901).

[0062] In identifying the root node (step S902), the syntax analysis unit 801 determines "watching" as the root node R12 from the output result 1201 of the syntax analysis (step S901).

[0063] Among the child nodes "percentage", "are", "not", "TV", and "concurrently?" connected to the inflow edges from the root node R12 "watching", the nodes "are", "not", and "concurrently?" have specific relationship labels such as "neg" (negation), "aux" (auxiliary verb), "auxpass" (passive voice), "advmod" (adverb), "compound" (compound word), and "compound:prt" (phrasal verb) to support the root node R12, and do not have outflow edges. Therefore, the nodes "are", "not", and "concurrently?" are auxiliary nodes supporting the root node R12 "watching".

[0064] The auxiliary nodes "are", "not", and "concurrently?" form the same group as the root node R12 "watching". Therefore, "are not watching concurrently?" is determined to be the root node group RG20. The syntax analysis unit 801 outputs the identification result 1202.

[0065] In grouping the nodes other than the root node (step S903), the syntax analysis unit 801 outputs a grouping result 1203. In the grouping result 1203, the number of incoming nodes connected to the outgoing edges nsubj, dobj, and advmod from “are not watching concurrently?” in the root node group RG20 is two, “percentage” and “TV”, so two node groups G21 and G22 are generated.

[0066] In addition, since the interrogative word "What" is connected to a noun to form an interrogative phrase, the generation unit 130 sets "What percentage", which is the combination of the interrogative word "What" and the node "percentage" (noun) connected to the interrogative word "What" by the outgoing edge det, as the interrogative phrase.

[0067] 8, the interrogative word processor 802 identifies which node group the interrogative word exists in, and replaces the interrogative word phrase in the identified result 1002, which is a graph structure, with the first answer candidate 610 included in the question and answer data 121. An interrogative word phrase is a phrase in which a noun, an adjective, or an adverb is added to an interrogative word.

[0068] Fig. 13 is a flowchart showing an example of an interrogative processing procedure by the interrogative processing unit 802. First, the interrogative processing unit 802 extracts node groups including an interrogative using a regular expression (step S1301). For the grouping result 1003 in Fig. 10, node group G01 is extracted, for the grouping result 1103 in Fig. 11, node group G11, and for the grouping result 1203 in Fig. 12, node group G21 is extracted.

[0069] Next, the interrogative word processor 802 judges whether or not the interrogative word is connected to an incoming edge from the root node R for each of the node groups containing an interrogative word extracted in step S1301 (step S1302). That is, the interrogative word processor 802 judges whether or not the node groups containing an interrogative word extracted in step S1301 include an interrogative word connected to the root node R. For a node group that matches (step S1302: Yes), the process proceeds to step S1303, and for a node group that does not match (step S1302: No), the process proceeds to step S1304.

[0070] In the case of node group G01 including an interrogative, the incoming edge to the interrogative "How" in node group G01 is edge advmod, and the interrogative "How" is not connected to the incoming edges attr, prep, and expl from the root node R01 "are" (step S1302: No). Therefore, for node group G01, the process proceeds to step S1304.

[0071] In the case of node group G11 including an interrogative, the incoming edge to the interrogative "What" in node group G11 is edge attr, and the interrogative "What" is connected to the incoming edge attr from "is", which is the root node R11 (step S1302: Yes). Therefore, for node group G11, the process proceeds to step S1303.

[0072] In the case of node group G21 including an interrogative, the incoming edge to the interrogative "What" in node group G21 is edge det, which is not connected to the incoming edges nsubj, aux, neg, dobj, and advmod from the root node R12 "watching" (step S1302: No). Therefore, for node group G21, the process proceeds to step S1304.

[0073] For a node group to which an interrogative is connected via an incoming edge from the root node R (step S1302: Yes), the interrogative processing unit 802 replaces the node group containing the interrogative with the first answer candidate 610 (step S1303), and terminates the process.

[0074] Specifically, for example, the node group G11 including the interrogative "What" corresponds to the node group in which the interrogative "What" is connected to the incoming edge attr from the root node R11 "is". Therefore, the interrogative word processing unit 802 replaces the interrogative "What" in the node group G11 including the interrogative "What" in the grouping result 1103 in Fig. 11 with the first answer candidate 610 (e.g., "The XYZ foundation") in the question and answer data 121 corresponding to the question sentence 720 including the interrogative "What".

[0075] For a node group in which an interrogative is not connected to an incoming edge from the root node R (step S1302: No), the interrogative processor 802 judges whether or not the node group containing the interrogative is connected to an incoming edge from the root node in the node group (step S1304). The root node in the node group is the topmost node in the node group, and is connected to an incoming edge from the root node R. In other words, the interrogative processor 802 judges whether or not a node group in which an interrogative is not connected to an incoming edge from the root node R contains an interrogative phrase connected to the root node R.

[0076] For a corresponding node group (step S1304: Yes), the process proceeds to step S1305, and for a non-corresponding node group (step S1304: No), the process proceeds to step S1306. A non-corresponding node group is not connected to the root node R, but has an interrogative phrase connected to the root node in the node group.

[0077] If the node group G01 containing the interrogative word "How" is a node group whose interrogative word is not connected to an incoming edge from the root node R (step S1302: No), the root node within the node group is the node "users" connected to the incoming edge attr from the root node R01, "are".

[0078] The interrogative word "How" is not connected to the incoming edges amod and compound from the root node "users" in the node group (step S1304: No). Therefore, for the node group G01 that includes the interrogative word "How", the process proceeds to step S1306.

[0079] If the node group G21 containing the interrogative "What" is the node group in which the interrogative is not connected to an incoming edge from the root node R (step S1302: No), the root node in the node group is the node "percentage" which is connected to an incoming edge nsubj from the root node R12, "watching." The interrogative "What" is connected to an incoming edge det from the root node "percentage" in the node group (step S1304: Yes). Therefore, the process proceeds to step S1305.

[0080] For a node group including an interrogative for which step S1304: Yes is returned, the interrogative word processor 802 treats the interrogative word and the nodes connected to the interrogative word and the root node R as an interrogative phrase, and replaces the node group including the interrogative word with the first answer candidate 610 in the question and answer data 121 that corresponds to the question sentence 720 including the interrogative phrase (step S1305), and then terminates the process.

[0081] Specifically, for example, the node group including the interrogative for which step S1304: Yes is the node group G21 including the interrogative "What". For the node group G21 including the interrogative "What", the interrogative "What" and the node "percentage" connected to the outgoing edge det to the interrogative "What" and the incoming edge nsubj from the root node R12 are treated as the interrogative phrase "What percentage", and the interrogative phrase "What percentage" is replaced with the first answer candidate 610 (e.g., "7%") in the question and answer data 121 corresponding to the question sentence 720 including the interrogative phrase "What percentage" (step S1305), and the process ends.

[0082] For a node group including an interrogative word corresponding to step S1304: No, the interrogative word processor 802 replaces the subtree of the root node in that root node with the first answer candidate 610 (step S1306), and ends the process. Specifically, the interrogative word processor 802 identifies an interrogative phrase from the subtree from the root node in the node group including the interrogative word, and replaces the node group including that interrogative word with the first answer candidate 610 in the question and answer data 121 that corresponds to the question sentence 720 including that interrogative phrase.

[0083] For example, the node group containing the interrogative corresponding to step S1304:No is the node group G01 containing the interrogative "How". Also, the root node in the node group in the node group G01 containing the interrogative "How" is "users". The subtree connected to the root node "users" in the node group is composed of the interrogative "How" and the node "many" connected to the interrogative "How" by the outgoing edge advmod.

[0084] The node "many" is connected to an incoming edge amod from the intra-node-group root node "users", and the interrogative word "How" is connected by an incoming edge advmod (adverb) from such a node "many". Therefore, the interrogative word processing unit 802 determines the interrogative word "How" and the node "many" to be an interrogative phrase "How many" connected to an incoming edge amod (adjective) from the intra-node-group root node "users".

[0085] Moreover, "internet" is also a subtree connected to the root node "users" in the node group, but since it is not connected to an interrogative word, it is excluded from the replacement candidates for the first answer candidate 610.

[0086] Therefore, for node group G01 containing the interrogative phrase "How many," the interrogative word processing unit 802 replaces the interrogative phrase "How many" with the first answer candidate 610 (for example, "80 million") in the question and answer data 121 corresponding to the question sentence 720 containing the interrogative phrase (step S1306), and terminates the interrogative word processing.

[0087] Returning to Fig. 8, the superior-subordinate relationship determination unit 803 determines whether the node group including the interrogative word is a subject or an object depending on the part of speech of the node group including the interrogative word. The root node R and the root node group RG are a relation. The ternary relation data 141, which is the output data from the superior-subordinate relationship determination unit 803, is composed of {subject; relation; object}, and is a data structure in which either the subject or the object is converted into the first answer candidate 610 by the interrogative word processing unit 802.

[0088] 14 is a flowchart showing an example of a procedure for determining a master-slave relationship by the master-slave relationship determining unit 803. First, the master-slave relationship determining unit 803 determines whether a node group including an interrogative word constitutes a main clause by using a relation label obtained by syntactically analyzing the node group including the interrogative word (step S1401).

[0089] Specifically, if the relational label attached to the edge connected to the node group containing the interrogative word is any of the relational labels "nsubj" (subject), "nsubjpass" (passive subject), "csubj" (main clause), or "csubjpass" (passive main clause), then the node group containing the interrogative word constitutes a subject.

[0090] For example, in the case of the grouping result 1003 in Fig. 10, the relation labels attached to the edges connected to the node group G01 containing an interrogative word do not include any of "nsubj" (subject), "nsubjpass" (passive subject), "csubj" (main clause), and "csubjpass" (passive main clause). Therefore, the node group G01 containing an interrogative word does not constitute a subject.

[0091] 11, the relation labels attached to the edges connected to the node group G11 containing an interrogative word do not include any of "nsubj" (subject), "nsubjpass" (passive subject), "csubj" (main clause), and "csubjpass" (passive main clause). Therefore, the node group G01 containing an interrogative word does not constitute a subject.

[0092] 12, the relation label attached to the incoming edge from the root node group RG20 connected to the node group G21 containing an interrogative word includes "nsubj" (subject). Therefore, the node group G01 containing an interrogative word constitutes a subject.

[0093] If the node group including the interrogative constitutes the main clause (step S1401: Yes), the superior-subordinate relationship determination unit 803 determines the node group including the interrogative that constitutes the main clause as the subject in the grouping result, and determines the other node groups excluding the root node R and the root node group RG as the object (step S1402).

[0094] 12, the node group G21 containing an interrogative word is determined as a subject, and the other node group G22 is determined as an object. The node group G21 containing an interrogative word is converted by the interrogative word processor 802 into the first answer candidate 610. The node group G21 containing an interrogative word includes the interrogative word phrase "What percentage." The interrogative word phrase "What percentage" is converted by the interrogative word processor 802 into "7%," which is the first answer candidate 610.

[0095] Therefore, the ternary relation data 141 of the grouping result 1203 is {7%;are not watching;TV and the internet} It becomes.

[0096] In this manner, the ternary relation data 141 is generated, and the process of determining the superior-subordinate relation for the grouping result 1203 that is the processing target is completed.

[0097] On the other hand, if the node group including the interrogative does not constitute a subject (step S1401: No), the superior-subordinate relationship determining unit 803 determines whether the node group not including an interrogative in the grouping result is a prepositional phrase or not (step S1403). Specifically, if prep is present on the incoming edge from the root node R to the node group not including an interrogative, the superior-subordinate relationship determining unit 803 determines that the node group not including an interrogative is a prepositional phrase, and if prep is not present, determines that the node group not including an interrogative is not a prepositional phrase.

[0098] For example, in the case of the grouping result 1003 in Fig. 10, the node groups that do not include an interrogative are node groups G02 and G03. Of these, node group G03 is connected to an incoming edge prep from the root node R01 to which a relation label prep (preposition) is assigned.

[0099] Therefore, the node group G03 that does not include an interrogative word is determined to be a prepositional phrase (step S1403: Yes). Note that the node group G02 is determined not to be a prepositional phrase because it is not connected to the incoming edge prep from the root node R01 to which the relation label prep (preposition) is assigned (step S1403: No).

[0100] 11, the node group that does not include an interrogative is node group G12. Node group G12 is connected to an incoming edge nsubj from root node R11 to which relation label nsubj (subject) is assigned. Therefore, node group G12 that does not include an interrogative is not connected to an incoming edge prep, and is therefore determined not to be a prepositional phrase (step S1403: No).

[0101] If the node group not including an interrogative word is a prepositional phrase (step S1403: Yes), the superior-subordinate relationship determination unit 803 determines the node group including the interrogative word in the grouping result as the Subject, and determines the node group not including the interrogative word, excluding the root node R and the root node group RG, as the Object (step S1404).

[0102] Specifically, for example, in the case of the grouping result 1003 in Fig. 10, the node group determined to be a prepositional phrase is the node group G03 that does not include an interrogative word. Therefore, the node group G01 that includes an interrogative word is determined to be a Subject, and "in Nigeria", which is the node group G03, is determined to be an Object.

[0103] In this case, the node group G01 containing interrogative words contains the interrogative phrases "How many" and "How many internet users." The interrogative phrases "How many" and "How many internet users" have been replaced by the first answer candidate 610, "80 million," by the interrogative word processing unit 802.

[0104] As a result, the ternary relation data 141 of the grouping result 1003 is {80 million;are;in Nigeria} It becomes.

[0105] If the node group not including an interrogative word is not a prepositional phrase (step S1403: No), the superior-subordinate relationship determination unit 803 determines the node group not including an interrogative word in the grouping result as Object, and determines the other node groups except for the root node R and the root node group RG as Subject (step S1404).

[0106] 10, the node group that is not determined to be a prepositional phrase is node group G02 that does not include an interrogative word. Therefore, node group G01 that includes an interrogative word is determined to be an Object, and "there" in node group G02 is determined to be a Subject.

[0107] The node group G01 containing an interrogative word is converted by the interrogative word processor 802 into the first answer candidate 610. The node group G01 containing an interrogative word includes the interrogative word phrases "How many" and "How many internet users." The interrogative word phrases "How many" and "How many internet users" are converted by the interrogative word processor 802 into "80 million," which is the first answer candidate 610.

[0108] As a result, the ternary relation data 141 of the grouping result 1003 is {there;are;80 million} It becomes.

[0109] 11, the node group that is not determined to be a prepositional phrase is node group G12 that does not include an interrogative word. Therefore, node group G11 that includes an interrogative word is determined to be an Object, and "the name of foundation", which is node group G12, is determined to be a Subject (the "?" at the end is deleted).

[0110] The node group G11 containing an interrogative word has been converted by the interrogative word processor 802 into the first answer candidate 610. The node group G01 containing an interrogative word contains the interrogative word "What." The interrogative word "What" has been converted by the interrogative word processor 802 into "The XYZ foundation," which is the first answer candidate 610.

[0111] As a result, the ternary relation data 141 of the grouping result 1103 is {the name of foundation;is;The XYZ foundation} It becomes.

[0112] In this manner, the ternary relation data 141 is generated, and the process of determining the superior-subordinate relation for the grouping results 1003 and 1103 that are the processing targets is completed.

[0113] On the other hand, if the node group not including an interrogative word is not a prepositional phrase (step S1403: No), the superior-subordinate relationship determining unit 803 determines the node group including the interrogative word as an Object in the grouping result, and determines the other node groups as Subjects (step S1405).

[0114] 10, the node group that is not determined to be a prepositional phrase is node group G02 that does not include an interrogative word. Therefore, node group G01 that includes an interrogative word is determined to be "Object", and node group G02 is determined to be "Subject". As a result, the ternary relation data 141 {subject;relation;object} of grouping result 1103 becomes {G02;R01;G01}.

[0115] 11, the node group that is not determined to be a prepositional phrase is node group G12 that does not include an interrogative. Therefore, node group G01 that includes an interrogative is determined to be "Object", and node group G12 is determined to be "Subject". As a result, the ternary relation data 141 {subject;relation;object} of grouping result 1103 becomes {G12;R11;G11}.

[0116] In this way, the ternary relation data 141 is generated, and the master-slave relationship determination process is completed for the grouping results 1003, 1103 that were the processing targets. Note that in the above explanation, the data generating device 100 first executes the interrogative word processing by the interrogative word processing unit 802 shown in Fig. 13, and then executes the master-slave relationship determination process by the master-slave relationship determination unit 803 shown in Fig. 14, but it is also possible to first execute the master-slave relationship determination process by the master-slave relationship determination unit 803 shown in Fig. 14, and then execute the interrogative word processing by the interrogative word processing unit 802 shown in Fig. 13.

[0117] [Settings execution screen] 15 is an explanatory diagram showing an example of a setting execution screen of the data generation device 100 according to the first embodiment. The setting execution screen 1500 has an upload button 1501, an extraction execution button 1502, a check box 1503, an extraction result display area 1504, a question and answer data generation result display area 1505, and an information extraction result display area 1506.

[0118] The upload button 1501 is a user interface that allows a user to upload an information extraction target stored in the data generating device 100 to a memory. The extract execution button 1502 is a user interface that allows a user to instruct a computer to extract ternary relation data 141. The checkbox 1503 is a user interface that allows a user to restrict the named entity class of answer candidates used in the acquiring unit 110.

[0119] The answer candidate generating unit 402 generates the first answer candidate 610 for the selected named entity class. This makes it possible to suppress the generation of the first answer candidate 610 for which the named entity class is not selected, thereby making it possible to speed up the generation of answer candidates and reduce memory usage.

[0120] The extraction result display area 1504 is an area for displaying the ternary relation data 141 that is the extraction result. The question and answer data generation result display area 1505 is an area for displaying the question and answer data 121 (log) generated so far by the acquisition unit 110. The information extraction result display area 1506 is an area for displaying the ternary relation data 141 (log) extracted so far by the generation unit 130.

[0121] <Hardware Configuration Example of Data Generating Device 100> 16 is a block diagram showing an example of a hardware configuration of the data generating device 100. The data generating device 100 includes a processor 1601, a storage device 1602, an input device 1603, an output device 1604, and a communication interface (communication IF) 1605. The processor 1601, the storage device 1602, the input device 1603, the output device 1604, and the communication IF 1605 are connected by a bus 1606. The processor 1601 controls the data generating device 100. The storage device 1602 serves as a working area for the processor 1601. The storage device 1602 is a non-transient or temporary recording medium that stores various programs and data. Examples of the storage device 1602 include a ROM (Read Only Memory), a RAM (Random Access Memory), a HDD (Hard Disk Drive), and a flash memory. The input device 1603 inputs data. The input device 1603 may be, for example, a keyboard, a mouse, a touch panel, a numeric keypad, a scanner, a microphone, or a sensor. The output device 1604 outputs data. The output device 1604 may be, for example, a display, a printer, or a speaker. The communication IF 1605 connects to a network and transmits and receives data.

[0122] The above-mentioned acquiring unit 110 and generating unit 130 are specifically realized, for example, by causing a processor 1601 to execute a program stored in a storage device 1602 shown in FIG.

[0123] The above-mentioned data to be generated 101, first language model 102, named entity extractor 103, question and answer data 121, syntactic parser 104, and ternary relation data 141 are specifically stored, for example, in storage device 1602 shown in FIG. 16, or in another computer that can communicate with data generating device 100 via communication IF 1605.

[0124] The above-mentioned setting execution screen 1500 is specifically displayed on, for example, an output device 1604, and various inputs can be made by operating an input device 1603.

[0125] In this way, according to the first embodiment, by using the first language model 102 for generating questions and the syntax parser 104, it is possible to generate the ternary relational data 141 without preparing learning data or seed data indicating the ternary relational data 141 in the data to be generated 101.

[0126] Furthermore, even if data to be generated 101 includes annotations for identifying ternary relation data 141, data generating device 100 generates ternary relation data 141 without using annotations for identifying ternary relation data 141. Therefore, even if there is an error in the annotation for identifying ternary relation data 141, it does not affect the generation of ternary relation data 141, so that a decrease in the accuracy of generation of ternary relation data 141 can be suppressed. EXAMPLES

[0127] Next, a description will be given of Example 2. In Example 2, the differences from Example 1 will be mainly described, so that the same components as those in Example 1 are given the same reference numerals and the description thereof will be omitted.

[0128] <Example of functional configuration of data generating device> 17 is a block diagram illustrating an example of a functional configuration of a data generating device according to Example 2. The data generating device 1700 is configured by adding a second language model 1701, verification unit setting information 1702, a verification unit 1710, and question and answer data 1721 to the data generating device 100 according to Example 1.

[0129] The data generating device 1700 receives the data to be generated 101, the first language model 102, the named entity extractor 103, the second language model 1701, and the syntax analyzer 104 as input data, and generates the three-term relation data 141. [Second Language Model 1701] The second language model 1701 receives as input data the context 500 from which information is to be extracted and a question sentence 720 described in a question in the question and answer data 121 asking about the content of the context 500, and outputs as output data a second answer candidate 1703 to the question sentence 720. The second language model 1701 also outputs a probability value indicating how suitable the second answer candidate 1703 is as an answer to the question sentence 720. The second language model 1701 also functions as the named entity extractor 103, and is capable of outputting a named entity class (entity 321) for the second answer candidate.

[0130] For the second language model 1701, any architecture can be used as a machine learning model based on a neural network, but for example, a Transformer-type encoder language model represented by BERT or BART, which is an encoder-decoder model, can be used. The learning of the second language model 1701 can be performed by utilizing an existing question-answering dataset, similar to the learning of the first language model 102.

[0131] [Verification section setting information 1702] The verification unit setting information 1702 holds a threshold 1801 for filtering the second answer candidate 1703 obtained by the second language model 1701 described below, and priority information 1802 for determining whether the answer candidate of the verification unit 1710 or the acquisition unit 110 is to be prioritized.

[0132] 18 is an explanatory diagram showing an example of the verification unit setting information 1702. In the verification unit setting information 1702, a threshold 1801 is set to "0.5", and priority information 1802 is set to "Verification unit". The verification unit setting information 1702 can be set by a user operation.

[0133] [Verification Department 1710] Returning to FIG. 17, the verification unit 1710 receives the question and answer data 121, the second language model 1701, and the verification unit setting information 1702, and outputs question and answer data 1721.

[0134] 19 is a flowchart showing an example of a procedure of a verification process by the verification unit 1710. First, the verification unit 1710 generates a second answer candidate 1703 for the question 720 by inputting the context 500 obtained by the acquisition unit 110 and the question 720 asking about the content of the context 500 to the second language model 1701 (step S1901).

[0135] Next, the verification unit 1710 determines whether the second answer candidate 1703 obtained in step S1901 matches the first answer candidate 610 of the answer to question data 121 (step S1902).

[0136] If the two answer candidates match (step S1902: Yes), the verification unit 1710 outputs the question answering data 121 including the first answer candidate 610 as question answering data 1721 without changing the question answering data 121 (step S1903).

[0137] If the two answer candidates do not match (step S1902: No), the verification unit 1710 determines whether the probability value of the second answer candidate 1703 obtained by the second language model 1701 is greater than or equal to the threshold value 1801 set in the verification unit setting information 1702 (step S1904).

[0138] If it is less than the threshold value 1801 (step S1904: No), the verification unit 1710 outputs the question answering data 121 including the first answer candidate 610 as question answering data 1721 without changing the question answering data 121 including the first answer candidate 610 (step S1903).

[0139] On the other hand, if it is equal to or greater than the threshold value 1801 (step S1904: Yes), the verification unit 1710 determines whether or not a character string matching the second answer candidate 1703 obtained by the second language model 1701 exists in the context 500 (step S1905).

[0140] If there is no string in the context 500 that matches the second answer candidate 1703 (step S1905: No), the verification unit 1710 determines that the second language model 1701 has generated the second answer candidate 1703 that is not based on the context 500, and outputs the question answering data 121 including the first answer candidate 610 as question answering data 1721 without changing the question answering data 121 including the first answer candidate 610 (step S1903).

[0141] On the other hand, if a string matching the second answer candidate 1703 exists in the context 500 (step S1905: Yes), the verification unit 1710 determines whether the named entity class of the second answer candidate 1703 obtained by the second language model 1701 matches the named entity class (entity type 322) in the first answer candidate 610 in the question and answer data 121 (step S1906).

[0142] If the named entity classes do not match (step S1906: No), the verification unit 1710 selects, based on the priority information 1802 of the verification unit setting information 1702, whether to use the question answering data 121 including the first answer candidate 610 as the question answering data 1721 without modification, or to use the second answer candidate 1703 obtained by the second language model 1701 as the question answering data 1721 (step S1907).

[0143] 18, the priority information 1802 is set to "verification section", so the second answer candidate 1703 obtained by the second language model 1701 is used as question answering data 1721. If the priority information 1802 is set to "acquisition section", the question answering data 121 including the first answer candidate 610 is used as question answering data 1721 without modification.

[0144] Then, the verification unit 17101 outputs the question and answer data 1721 of the selected person (step S1903).

[0145] On the other hand, if the named entity classes match (step S1906: Yes), the verification unit 1710 updates the entity 321 of the matching first answer candidate 610 in the question and answer data 121 to the second answer candidate 1703 obtained in step S1901, and outputs it as question and answer data 1721 including the second answer candidate 1703 obtained in step S1901 (step S1908). The verification process ends when the question and answer data 1721 is output.

[0146] In FIG. 19, at least one of step S1902 and steps S1904 to S1907 may be omitted.

[0147] [Settings execution screen] 20 is an explanatory diagram illustrating an example of a setting execution screen of the data generating device 1700 according to the embodiment 2. The setting execution screen 2000 has a slide bar 2001, a radio button 2002, and a verification result display area 2003.

[0148] The slide bar 2001 is a user interface for setting, by a user operation, the threshold value 1801 of the verification unit setting information 1702. The threshold value 1801 can be set, for example, within the range of 0.0 to 1.0.

[0149] The radio button 2002 is a user interface for setting the priority information 1802 of the verification unit setting information 1702 by a user operation. In the example of FIG.

[0150] The verification result display area 2003 is an area for displaying the results of the verification performed by the verification unit 1710. Specifically, for example, the verification result display area 2003 displays the execution results in each step of FIG.

[0151] According to the second embodiment, by adding the second language model 1701 for answering questions, the extraction accuracy of the ternary relation data 141 can be improved. EXAMPLES

[0152] Next, a description will be given of Example 3. In Example 3, an example will be described in which a knowledge graph is generated from ternary relation data 141 by the generation unit 130. Note that, in Example 3, the differences between Example 1 and Example 2 will be mainly described, so that the same components as those in Example 1 and Example 2 are denoted by the same reference numerals and descriptions thereof will be omitted.

[0153] FIG. 21 is an explanatory diagram showing an example of a subgraph. In the third embodiment, the subgraph 2100 is a data structure in which two different entities 2101, 2102 and a relationship 2103 connecting them exist. The subgraph 2100 is created by, for example, converting the ternary relation data 141 {The deadline of submission of papers; is; 11:59PM UTC-12:00} into the entities 2101, 2102 and the relationship 2103 connecting them. The connection of a plurality of subgraphs is a knowledge graph. The knowledge graph can be configured by utilizing existing software, such as neo4j, but the specific method is not limited.

[0154] 22 is a flowchart showing an example of a processing procedure for generating a knowledge graph from ternary relation data 141 related to document images. First, the data generating device 100, 1700 executes a coreference resolution process to reduce noise on the knowledge graph (step S2201).

[0155] In the coreference resolution process (step S2201), for data that is considered to hold similar entities or relationships in the ternary relation data 141 but is expressed in different character strings, the notation is unified using, for example, an existing coreference analysis model provided by AllenNLP. As a result, for example, "Call for Papers" and "CFP" are treated as the same entity and unified to "Call for Papers."

[0156] Next, the data generating device 100, 1700 uses existing knowledge graph construction software to define the Subject and Object of the ternary relation data 141 as nodes for the ternary relation data 141 that has been subjected to the coreference resolution process (step S2201) (step S2202).

[0157] Next, the data generating device 100, 1700 adds an edge indicating a relationship between the relevant nodes using Relation in the ternary relation data 141 (step S2203).

[0158] Finally, the data generating device 100, 1700 creates a node (e.g., a URL or a data path) indicating the source of the document image as metadata (step S2204). The data generating device 100, 1700 may add an "include" edge to the Subject node defined in the coreference resolution process (step S2201), which means that the document image includes that node.

[0159] Fig. 23 is an explanatory diagram showing an example of a knowledge graph constructed according to the processing shown in Fig. 22. In Fig. 23, a knowledge graph 2300 is a directed graph having nodes shown as circles and edges showing relationships with arrow segments. Node 2301 indicates the source of a document image. Edge 2302 indicates an "include" edge, which means that the document image includes a URL (http: / / XXX.com / YYY) indicating the source of the document image indicated by node 2301. EXAMPLES

[0160] Next, a fourth embodiment will be described. In the fourth embodiment, a knowledge graph constructed from the ternary relation data 141 and an example of utilizing the ternary relation data 141 will be described. In the fourth embodiment, the differences between the first embodiment, the second embodiment, and the third embodiment will be mainly described, so that the same components as the first embodiment, the second embodiment, and the third embodiment will be denoted by the same reference numerals and the description thereof will be omitted.

[0161] A known example of efficient information search using a knowledge graph is a technique that uses Neo4j and Elasticsearch. On the other hand, an example of efficient information search using ternary relation data 141 is a Frequently Asked Questions (FAQ) search using questions and answers. The data generation devices 100 and 1700 output ternary relation data 141 for each input data, and therefore can automatically generate FAQs for each input data.

[0162] Fig. 24 is an explanatory diagram showing an example of an FAQ generation result display screen. Fig. 24 shows an example in which an FAQ is automatically generated from ternary relationship data 141 for the generation target data 101 in Fig. 2, and the result is displayed on an FAQ generation result display screen 2400. The FAQ generation result display screen 2400 has a ternary relationship data upload button 2401, an FAQ generation execution button 2402, and an FAQ generation result display area 2403.

[0163] The ternary relationship data upload button 2401 is a user interface for uploading the ternary relationship data 141 to memory by user input. The FAQ generation execution button 2402 is a user interface for generating an FAQ based on the ternary relationship data 141 uploaded to memory by user input. The FAQ generation result display area 2403 is an area for displaying the FAQ that is the generation result.

[0164] It is also possible to organize information from the ternary relationship data 141 focusing on 5W1H expressions such as "when, where, who, what, why, and how" and present the information to the user.

[0165] Fig. 25 is an explanatory diagram showing an example of a 5W1H arrangement result display screen. Fig. 25 shows an example in which the three-item relationship data 141 is converted into the 5W1H format for the data to be generated 101 in Fig. 2, and the result is displayed on a 5W1H arrangement result display screen 2500. The 5W1H arrangement result display screen 2500 has a three-item relationship data upload button 2401, a 5W1H generation execution button 2502, and a 5W1H arrangement result display area 2503.

[0166] The 5W1H generation execution button 2502 is a user interface for converting the three-item relationship data 141 into the 5W1H format based on the three-item relationship data 141 uploaded to the memory by user input. The 5W1H organization result display area 2503 is an area for displaying the three-item relationship data 141 converted into the 5W1H format.

[0167] As described above, according to the embodiment of the present invention, it is possible to display the departure time together with an analog clock in an easily viewable manner. In addition, it is possible to appropriately display the same program on different screen sizes. Furthermore, it is possible to simultaneously display operation information and departure information in an easily viewable manner.

[0168] The data generating devices 100 and 1700 according to the first and second embodiments can also be configured as follows (1) to (13).

[0169] (1) A data generating device 100, 1700 having a processor 1601 that executes a program and a storage device 1602 that stores the program, wherein the processor 1601 performs an acquisition process of acquiring a first answer candidate 610 from text data (e.g., a context 500) and acquiring a question sentence 720 corresponding to the first answer candidate 610 by inputting the first answer candidate 610 into a first language model 102; and performing a syntax analysis of the question sentence 720 acquired by the acquisition process. and based on the syntax analysis results (1001, 1101, 1201) and the first answer candidate 610, a generation process is executed to generate ternary relation data 141 in which a combination of a subject of the question sentence 720, an object of the question sentence 720, and a relation between the subject and the object is replaced with the first answer candidate 610.

[0170] (2) In the data generating device 100, 1700 described above in (1), the text data (for example, the context 500) does not include information specifying a ternary relationship.

[0171] (3) In the data generating device 100, 1700 described above in (1), the text data (for example, the context 500) is a context converted from image data (for example, the data to be generated 101).

[0172] (4) In the data generation device 100, 1700 of (1) above, in the acquisition process, the processor 1601 inputs the text data (e.g., context 500) to a named entity extractor 103 that extracts a named entity (entity 321) from a character string, thereby acquiring the named entity (entity 321) as the first answer candidate 610.

[0173] (5) In the data generation device 100, 1700 of (4) above, in the acquisition process, the processor 1601 accepts the selection of a class (entity type 322), which is a classification of the named entity (entity 321) by its attributes, and inputs the text data (e.g., context 500) to a named entity extractor 103 that extracts the named entity (entity 321) and the class (entity type 322) from the character string, thereby acquiring the named entity (entity 321) corresponding to the class (entity type 322) as the first answer candidate 610.

[0174] (6) In the data generation device 100, 1700 of (1) above, the syntactic analysis result is tree-structured data in which the words of the question sentence 720 are nodes and the directional connection relationships between the nodes are edges, and in the generation process, the processor 1601 determines the root node R, which is not specified by any node in the edges, as the relation.

[0175] (7) In the data generating device 100, 1700 of (6) above, in the generating process, the processor 1601 determines a word string consisting of the root node R and a support node supporting the root node R as the relation.

[0176] (8) In the data generation device 100, 1700 of (7) above, in the generation process, the processor 1601 determines, as the auxiliary node, a node that is specified by a specific connection relationship from the root node R to the root node R that supports the root node R and that does not specify any other node by the edge.

[0177] (9) In the data generation device 100, 1700 of (6) above, in the generation process, the processor 1601 generates a group for each node specified by the edge to the root node R from a group of nodes that do not fall under the relation, and determines the subject and object from among the multiple groups generated.

[0178] (10) In the data generating device 100, 1700 of (9) above, in the generating process, the processor 1601 replaces a group including an interrogative word among the plurality of groups with the first answer candidate 610.

[0179] (11) In the data generation device 100, 1700 of (10) above, in the generation process, when the interrogative is specified by the edge from the root node R, the processor 1601 replaces a group including the interrogative with the first answer candidate 610.

[0180] (12) In the data generation device 100, 1700 of (11) above, in the generation process, if the interrogative is not specified by the edge from the root node R, the processor 1601 replaces a group including a node specified by the edge from the root node R and including the interrogative that is not specified by the edge from the root node R, with the first answer candidate 610.

[0181] (13) In the data generation device 100, 1700 of (9) above, in the generation process, when a group including an interrogative word among the plurality of groups is the main clause, the processor 1601 determines the group including the interrogative word as the subject and determines the group not including the interrogative word as the object.

[0182] (14) In the data generation device 100, 1700 of (9) above, in the generation process, if a group including an interrogative word among the plurality of groups is not a main clause and the group not including the interrogative word is a prepositional phrase, the processor 1601 determines the group including the interrogative word as the subject and the group not including the interrogative word as the object.

[0183] (15) In the data generation device 100, 1700 of (9) above, in the generation process, if a group including an interrogative word among the plurality of groups is not a main clause and a group not including an interrogative word is not a prepositional phrase, the processor 1601 determines the group including the interrogative word as the object and the group not including the interrogative word as the subject.

[0184] (16) In the data generation device 100, 1700 of (1) above, the processor 1601 inputs the text data (e.g., the context 500) and the question sentence 720 into a second language model 1701 to obtain a second answer candidate 1703 for the question sentence 720, and executes a verification process to verify the consistency between the first answer candidate 610 and the second answer candidate 1703. In the generation process, the processor 1601 generates ternary relation data 141 in which either the subject or the object of the combination is replaced with either one of the answer candidates, based on the syntactic analysis result of the question sentence 720 and either the first answer candidate 610 or the second answer candidate 1703 based on the verification result of the verification process.

[0185] (17) In the data generation device 100, 1700 of (16) above, in the generation process, if the verification process determines that the first answer candidate 610 and the second answer candidate 1703 match, the processor 1601 generates ternary relation data 141 in which either the subject or the object of the combination is replaced with the first answer candidate 610.

[0186] (18) In the data generating device 100, 1700 of (16) above, in the verification process, if the first answer candidate 610 and the second answer candidate 1703 do not match, the processor 1601 verifies the match between the first answer candidate 610 and the second answer candidate 1703 based on the probability value of the second answer candidate 1703 output from the second language model 1701.

[0187] (19) In the data generating device 100, 1700 of (16) above, in the verification process, the processor 1601 verifies the consistency between the first answer candidate 610 and the second answer candidate 1703 based on the presence or absence of the second answer candidate 1703 in the text data (e.g., context 500).

[0188] (20) In the data generation device 100, 1700 of (16) above, in the acquisition process, the processor 1601 inputs the text data (e.g., context 500) to a named entity extractor 103 that extracts the named entity (entity 321) and a class (entity type 322), which is a category into which the named entity (entity 321) is classified by its attributes, from the character string, thereby acquiring a first named entity (entity 321) and a first class (entity type 322) output from the named entity extractor 103, and sets the first named entity (entity 321) as the first answer candidate 610. In the verification process, the processor 1601 verifies the consistency between the first answer candidate 610 and the second answer candidate 1703 based on the first class (entity type 322) and a second class related to the named entity for the second answer candidate 1703 output from the second language model 1701.

[0189] (21) In the data generation device 100, 1700 of (1) above, in the generation process, the processor 1601 generates a knowledge graph 2300 based on the ternary relation data 141.

[0190] The present invention is not limited to the above-described embodiments, and includes various modified examples and equivalent configurations within the spirit of the appended claims. For example, the above-described embodiments have been described in detail to clearly explain the present invention, and the present invention is not necessarily limited to those having all of the configurations described. Also, a part of the configuration of one embodiment may be replaced with a configuration of another embodiment. Also, a configuration of another embodiment may be added to a configuration of one embodiment. Also, a part of the configuration of each embodiment may be added, deleted, or replaced with another configuration.

[0191] Furthermore, each of the aforementioned configurations, functions, processing units, processing means, etc. may be realized in hardware, for example by designing some or all of them as an integrated circuit, or may be realized in software by a processor interpreting and executing a program that realizes each function.

[0192] Information such as programs, tables, files, etc. that realize each function can be stored in a storage device such as a memory, a hard disk, or an SSD (Solid State Drive), or in a recording medium such as an IC (Integrated Circuit) card, an SD card, or a DVD (Digital Versatile Disc).

[0193] In addition, the control lines and information lines shown are those considered necessary for the explanation, and do not necessarily show all the control lines and information lines necessary for implementation. In reality, it can be considered that almost all components are connected to each other. [Explanation of symbols]

[0194] 100,1700 Data Generator 101 Data to be generated 102 First Language Model 103 Named entity extractor 104 Parser 110 Acquisition Department 121 Question and Answer Data 130 Generation part 141 Ternary Relational Data 321 Entities 322 Entity Types 401 Context Extraction Unit 402 Answer candidate generator 403 Question generation section 500 Context 610 1st answer candidate 720 Questions 801 Parser 802 Interrogative word processing unit 803 Master-slave relationship determination unit 1701 Second Language Model 1703 Second answer candidate 1710 Verification Department 1721 Question and Answer Data

Claims

1. A data generating device having a processor that executes a program and a storage device that stores the program, The processor, an acquisition process of acquiring a first answer candidate from the text data and acquiring a question sentence corresponding to the first answer candidate by inputting the first answer candidate into a first language model; a generation process of parsing the question acquired by the acquisition process, and generating ternary relation data based on a result of the parsing of the question and the first answer candidate, the ternary relation data being a combination of a subject of the question, an object of the question, and a relationship between the subject and the object, in which either the subject or the object of the combination is replaced with the first answer candidate; A data generating device comprising:

2. 2. The data generating device according to claim 1, The text data does not include information specifying a ternary relationship. A data generating device comprising:

3. 2. The data generating device according to claim 1, The text data is a context converted from image data. A data generating device comprising:

4. 2. The data generating device according to claim 1, In the acquisition process, the processor inputs the text data to a named entity extractor that extracts a named entity from a character string, thereby acquiring the named entity as the first answer candidate. A data generating device comprising:

5. The data generating device according to claim 4, In the acquisition process, the processor accepts a selection of a class, which is a division into which the named entities are classified by their attributes, and inputs the text data to a named entity extractor that extracts the named entities and the class from the character string, thereby acquiring the named entities corresponding to the class as the first answer candidate. A data generating device comprising:

6. 2. The data generating device according to claim 1, the syntax analysis result is tree-structured data in which the words of the question sentence are nodes and the directional connection relationships between the nodes are edges; In the generation process, the processor determines a root node that is not specified by any node in the edge for the relationship. A data generating device comprising:

7. 7. The data generating device according to claim 6, In the generation process, the processor determines, as the relation, a word string including the root node and an auxiliary node that supports the root node. A data generating device comprising:

8. The data generating device according to claim 7, In the generation process, the processor determines, as the auxiliary node, a node that is specified by a specific connection relationship that supports the root node from the root node and does not specify another node by the edge. A data generating device comprising:

9. 7. The data generating device according to claim 6, In the generation process, the processor generates a group for each node designated by the edge to the root node from a group of nodes not corresponding to the relationship, and determines the subject and the object from among the generated groups. A data generating device comprising:

10. 10. The data generating device according to claim 9, In the generating process, the processor replaces a group including an interrogative word among the plurality of groups with the first answer candidate. A data generating device comprising:

11. The data generating device according to claim 10, In the generation process, when the interrogative word is specified by the edge from the root node, the processor replaces a group including the interrogative word with the first answer candidate. A data generating device comprising:

12. The data generating device according to claim 11, In the generating process, when the interrogative word is not specified by the edge from the root node, the processor replaces a group including a node specified by the edge from the root node and including the interrogative word not specified by the edge from the root node with the first answer candidate. A data generating device comprising:

13. 10. The data generating device according to claim 9, In the generation process, when a group including an interrogative word among the plurality of groups is a main clause, the processor determines the group including the interrogative word as the subject, and determines the group not including the interrogative word as the object. A data generating device comprising:

14. 10. The data generating device according to claim 9, In the generation process, when a group including an interrogative word among the plurality of groups is not a main clause and a group not including the interrogative word is a prepositional phrase, the processor determines the group including the interrogative word as the subject and determines the group not including the interrogative word as the object. A data generating device comprising:

15. 10. The data generating device according to claim 9, In the generation process, when a group including an interrogative word among the plurality of groups is not a main clause and a group not including the interrogative word is not a prepositional phrase, the processor determines the group including the interrogative word as the object and determines the group not including the interrogative word as the subject. A data generating device comprising:

16. 2. The data generating device according to claim 1, The processor, inputting the text data and the question sentence into a second language model to obtain second answer candidates for the question sentence, and executing a verification process to verify a match between the first answer candidates and the second answer candidates; In the generation process, the processor generates ternary relation data in which either the subject or the object of the combination is replaced with either the first answer candidate or the second answer candidate based on a syntactic analysis result of the question sentence and a verification result of the verification process. A data generating device comprising:

17. 17. The data generating device according to claim 16, In the generation process, when it is determined by the verification process that the first answer candidate and the second answer candidate match, the processor generates ternary relation data in which either the subject or the object of the combination is replaced with the first answer candidate. A data generating device comprising:

18. 17. The data generating device according to claim 16, In the verification process, when the first answer candidate and the second answer candidate do not match, the processor verifies the match between the first answer candidate and the second answer candidate based on a probability value of the second answer candidate output from the second language model. A data generating device comprising:

19. 17. The data generating device according to claim 16, In the verification process, the processor verifies a match between the first answer candidate and the second answer candidate based on the presence or absence of the second answer candidate in the text data. A data generating device comprising:

20. 17. The data generating device according to claim 16, In the acquisition process, the processor inputs the text data to a named entity extractor that extracts a named entity and a class that is a division into which the named entity is classified by its attribute from a character string, thereby acquiring a first named entity and a first class output from the named entity extractor, and sets the first named entity as the first answer candidate; In the verification process, the processor verifies a consistency between the first answer candidate and the second answer candidate based on the first class and a second class related to a named entity for the second answer candidate output from the second language model. A data generating device comprising:

21. 2. The data generating device according to claim 1, In the generation process, the processor generates a knowledge graph based on the ternary relation data. A data generating device comprising:

22. A data generation method executed by a data generation device having a processor that executes a program and a storage device that stores the program, comprising: The processor, an acquisition process of acquiring a first answer candidate from the text data and acquiring a question sentence corresponding to the first answer candidate by inputting the first answer candidate into a first language model; a generation process of parsing the question acquired by the acquisition process, and generating ternary relation data based on a result of the parsing of the question and the first answer candidate, the ternary relation data being a combination of a subject of the question, an object of the question, and a relationship between the subject and the object, in which either the subject or the object of the combination is replaced with the first answer candidate; A data generation method comprising:

23. The processor: an acquisition process of acquiring a first answer candidate from the text data and acquiring a question sentence corresponding to the first answer candidate by inputting the first answer candidate into a first language model; a generation process of parsing the question acquired by the acquisition process, and generating ternary relation data based on a result of the parsing of the question and the first answer candidate, the ternary relation data being a combination of a subject of the question, an object of the question, and a relationship between the subject and the object, in which either the subject or the object of the combination is replaced with the first answer candidate; A data generation program that causes a user to execute the above steps.

Citation Information

Patent Citations

  • Argument-sharing discriminator learning apparatus, language knowledge collecting device, and anaphor / abbreviation analyzer

    JP2016192198A

  • Realization method, system and storage medium for smart question answering

    JP2017511922A

  • Information processing program, information processing method, information processor, data structure of graph data, and graph data generation method

    JP2021125182A

  • Method for generating triple sample, device, electronic device, and storage medium

    JP2022008207A

  • Natural Language System Question Classifier, Semantic Representations, and Logical Form Templates

    US20170177715A1