WO2022180990A1 - 質問生成装置 - Google Patents

質問生成装置 Download PDF

Info

Publication number
WO2022180990A1
WO2022180990A1 PCT/JP2021/046101 JP2021046101W WO2022180990A1 WO 2022180990 A1 WO2022180990 A1 WO 2022180990A1 JP 2021046101 W JP2021046101 W JP 2021046101W WO 2022180990 A1 WO2022180990 A1 WO 2022180990A1
Authority
WO
WIPO (PCT)
Prior art keywords
question
sentence
input
classification
unit
Prior art date
Application number
PCT/JP2021/046101
Other languages
English (en)
French (fr)
Inventor
熱気 澤山
Original Assignee
株式会社Nttドコモ
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 株式会社Nttドコモ filed Critical 株式会社Nttドコモ
Priority to JP2023502089A priority Critical patent/JPWO2022180990A1/ja
Publication of WO2022180990A1 publication Critical patent/WO2022180990A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking
    • G06F40/295Named entity recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/40Processing or translation of natural language
    • G06F40/55Rule-based translation
    • G06F40/56Natural language generation

Definitions

  • One aspect of the present invention relates to a question generation device.
  • Patent Document 1 A mechanism for automatically generating a response message to a user's utterance is known (for example, Patent Document 1).
  • Patent Document 1 discloses the following processing. First, a plurality of question sentence candidates are generated for the user's utterance. After that, for each of the plurality of question sentences, the content rate of the feature amount (each word obtained by the morphological analysis) included in the user's utterance is calculated, and question sentences with a high content rate are excluded from the question candidates.
  • a question generation device analyzes a user input sentence to identify or presume that the input sentence contains one or more of a plurality of predetermined classifications related to the content of the sentence. Based on the analysis unit that extracts the first classification, the one or more second classifications remaining after excluding the one or more first classifications from among the plurality of classifications, and the input sentence, 2.
  • a question sentence generating unit for generating one or more question sentences according to the classification; and when a plurality of question sentences are generated by the question sentence generating unit, a plurality of questions based on the input sentence and the plurality of question sentences.
  • a question text selection unit that selects a question text to be presented to the user from among the texts.
  • a question generation device that can more efficiently generate a question sentence according to a user input sentence.
  • FIG. 4 is a diagram showing an example of a question sentence generated by a question generation model; 4 is a flow chart showing an example of a processing procedure of the model generating device;
  • FIG. 10 is a diagram illustrating a first example of processing by an analysis unit;
  • FIG. 10 is a diagram illustrating a second example of processing by the analysis unit;
  • It is a figure which shows an example of the process of a question sentence production
  • It is a figure which shows an example of the hardware constitutions of a model generation apparatus and a question generation apparatus.
  • FIG. 1 is a diagram showing the overall configuration of an information processing system 1 according to one embodiment.
  • the information processing system 1 includes a model generation device 10 , a question generation device 20 and one or more user terminals 30 .
  • the model generation device 10 is a device that generates a question generation model M.
  • the question generation model M is a trained model created by machine learning so that an arbitrary sentence is input and a question sentence for the sentence is generated.
  • the question generation device 20 is a device that generates a question sentence for a user's input sentence and presents the generated question sentence to the user. In this embodiment, the question generation device 20 generates a question sentence for the user's input sentence by using the question generation model M generated by the model generation device 10 .
  • the question generation device 20 is configured to communicate with the user terminal 30 .
  • the question generation device 20 is configured to receive from the user terminal 30 an input sentence input by a user operation via the user terminal 30 and to transmit the generated question sentence to the user terminal 30 .
  • a user terminal 30 is any terminal possessed and operated by a user. Specific examples of the user terminal 30 include smart phones, tablet terminals, desktop PCs, laptop PCs, wearable terminals, and the like.
  • Each of the model generation device 10 and the question generation device 20 may be configured by a single server device, or may be configured by a plurality of server devices. Also, the model generation device 10 and the question generation device 20 may be configured by the same server device.
  • the information processing system 1 is a system that supports a user's language learning (English learning in this embodiment).
  • the sentence input by the user is in English
  • the question sentence generated by the question generation device 20 is also in English.
  • the question generating device 20 acquires an arbitrary English sentence input by the user, presents the user with a question sentence corresponding to the content of the English sentence, and prompts the user to answer in English, thereby helping the user learn English.
  • generation and presentation of redundant (meaningless) question sentences should be eliminated as much as possible.
  • the question generating device 20 is configured to avoid generating and presenting such redundant question texts and to generate and present question texts with appropriate content according to input texts.
  • the model generation device 10 has a pair information acquisition unit 11 , a teacher data generation unit 12 , a model generation unit 13 and a model storage unit 14 .
  • the pair information acquisition unit 11 acquires pair information including a question and an answer to the question.
  • the pair information acquisition unit 11 may acquire such samples as pair information, for example.
  • the information source of the pair information is not limited to the above example.
  • the pair information acquisition unit 11 extracts question and answer pairs from any information source that can extract question and answer pairs, such as dialogue logs accumulated in any dialogue system that interacts with the user, answer results (Q&A) of web questionnaires, etc. , may acquire pair information. Examples of paired information include the question "What animal do you like?" and the answer to the question "I don't really like animals.” I don't like it.)" pair.
  • the teacher data generation unit 12 generates teacher data by associating the answer sentences included in the pair information acquired by the pair information acquisition unit 11 with the input data, and by associating the question sentences included in the pair information with the output data.
  • the teacher data generation unit 12 generates teacher data in which the temporal order of the question sentence and the answer sentence included in the pair information is reversed. More specifically, the teacher data generation unit 12 generates teacher data having a relationship of predicting a question sentence (output data) that occurred earlier in time from an answer sentence (input data) that occurred later in time. Generate.
  • the teacher data generation unit 12 associates the answer sentences included in the pair information with the input data, and further associates the classification information indicating the classification of the question sentences included in the pair information with the input data.
  • the classification information is a category related to question content (question target).
  • the classification information is information indicating the classification corresponding to English interrogative words.
  • the classification information is information indicating six classifications called 5W1H. That is, the taxonomy information includes "when", "where", “who”, “what”, “why", and “how”. is information indicating six classifications of
  • the training data generation unit 12 extracts interrogative words included in the question sentence, and uses the extracted interrogative words as classification information. For example, in the pair information example described above, the training data generation unit 12 extracts the interrogative word "what" included in the question sentence "What animal do you like?" and uses the interrogative word "what” as the classification information. In this case, the question word "what" and the answer sentence "I don't really like animals.” correspond to the input data, and the question sentence "What animal do you like?" corresponds to the output data. be done. For example, teacher data is represented by the following data format.
  • the training data includes "a token specifying the division of interrogative words (5W1H), an answer sentence, a token ⁇ SEP> indicating a break between the answer sentence and the question sentence, a question sentence, and a token ⁇ EOS> indicating the end of the sentence.” It is composed by In the teacher data expressed in such a data format, the part before the token ⁇ SEP> corresponds to the input data, and the part after the token ⁇ SEP> corresponds to the output data.
  • the training data generation unit 12 Information indicating that there is no interrogative (other) (for example, information indicating null) may be set as the classification information.
  • the model generation unit 13 described later By performing learning by the model generation unit 13 described later using such teacher data (that is, teacher data including “other” classification information), the classification information input to the question generation model M becomes null. It is possible to generate a question generation model M capable of generating a question sentence (for example, a question sentence corresponding to a closed question) even in the case of (that is, when no interrogative is specified).
  • the model generation unit 13 executes machine learning using the training data generated by the training data generation unit 12 to input an arbitrary first sentence and generate a question sentence (second sentence) for the first sentence.
  • a question generation model M to be output is generated.
  • teacher data includes classification information as data corresponding to input data.
  • the question generation model M inputs an arbitrary first sentence and arbitrary classification information, and the classification indicated by the arbitrary classification information (in this embodiment, any interrogative of 5W1H or "other" It is configured to output a question sentence (second sentence) according to the classification shown).
  • Figure 2 corresponds to each classification information (interrogative) obtained from an input sentence "I studied English yesterday.” by the question generation model M created by the present inventor.
  • An example of a question sentence is shown.
  • a question generation model M capable of generating and outputting a question sentence (second sentence) asking a question about the item was obtained.
  • the model generation unit 13 may generate the question generation model M by performing additional learning on a language model prepared in advance.
  • the model generation unit 13 uses a trained large-scale language model such as BERT (Bidirectional Encoder Representations from Transformers), GPT-2 (Generative Pre-trained Transformer), etc.
  • the question generation model M may be generated by performing learning (eg, fine tuning, transfer learning, etc.). By generating the question generation model M based on the language model described above, it is possible to obtain the question generation model M capable of generating a more natural sentence (second sentence).
  • the question generation model M generated by the model generation unit 13 is stored in the model storage unit 14.
  • the question generation model M stored in the model storage unit 14 is used by the question generation device 20 (more specifically, the question sentence generation unit 23 described later).
  • the pair information acquisition unit 11 acquires pair information (pair information acquisition step, step S1).
  • the pair information acquisition unit 11 acquires a sufficient number of pair information for the question generation model M to learn.
  • the teacher data generator 12 generates teacher data based on the pair information acquired by the pair information acquirer 11 (teacher data generation step, step S2).
  • the pair information acquisition unit 11 generates teacher data in which the answer sentences included in the pair information correspond to the input data and the question sentences included in the pair information correspond to the output data.
  • the teacher data generation unit 12 generates teacher data by further associating classification information indicating the classification of question sentences included in the pair information (for example, interrogative words included in the question sentences) with the input data.
  • the model generator 13 generates a question generation model M by executing machine learning using the teacher data generated by the teacher data generator 12 (model generation step, step S3).
  • the generated question generation model M is stored in the model storage unit 14 .
  • the question generation device 20 includes a reception unit 21 , an analysis unit 22 , a question text generation unit 23 , a question text selection unit 24 , a question text correction unit 25 and a presentation unit 26 .
  • the reception unit 21 acquires (receives) the user's input sentence from the user terminal 30 .
  • the analysis unit 22 analyzes the user's input sentence acquired by the reception unit 21 to identify or presume that the input sentence includes one or more of a plurality of predetermined classifications related to the content of the sentence. Extract the first category.
  • the multiple classifications are the same as the classification information described above. That is, the multiple classifications are classifications corresponding to English interrogative words (eg, 5W1H).
  • a specific example of processing executed by the analysis unit 22 to extract the first classification will be described below.
  • FIG. 4 is a diagram showing a first example of processing by the analysis unit 22. As shown in FIG. FIG. 4 shows an example in which the input sentence is "I went to Kyoto yesterday." First, the analysis unit 22 extracts all named entities included in the input sentence. A known technique (eg, Bi-LSTM-CRF, etc.) can be used to extract the named entity.
  • a known technique eg, Bi-LSTM-CRF, etc.
  • a named entity has multiple predefined classes defined.
  • classes such as person's name, place name, organization name, time, date (including time), amount of money, terrain name, and facility name are defined.
  • Each class is associated in advance with the interrogative classification described above. For example, "person's name” is associated with the interrogative "who”. "Place name”, “geographic name”, and “facility name” are associated with the interrogative "where”. "Time” and "date” are associated with the interrogative "when". Such association can be arbitrarily set in advance by an operator or the like.
  • the named entity extracted from the input sentence by the analysis unit 22 belongs to one of the above classes. That is, the analysis unit 22 extracts the named entity included in the input sentence and acquires information about the class to which the named entity belongs.
  • the analysis unit 22 determines from the input sentence that the named entity "yesterday” belonging to the class "date” corresponding to the interrogative "when” and the class "place name” corresponding to the interrogative "where” Extract the named entity "Kyoto”. Therefore, in the example of FIG. 4, the analysis unit 22 extracts the interrogative words "when” and "where" as the first classification. In other words, the analysis unit 22 analyzes that the input sentence includes the content regarding "when” and "where".
  • the analysis unit 22 may extract the first classification by using a learned model (classification model).
  • FIG. 5 is a diagram showing a second example of processing by the analysis unit 22.
  • classification models include one classification model M1 that performs multi-class classification and a classification model M2 that performs binary classification prepared for each interrogative.
  • the classification model M1 that performs multi-class classification receives an input sentence and each classification (here, 6 classifications of 5W1H and a total of 7 classifications of "Others"). ) and the degree of fitness (probability that the input sentence contains the content related to each classification).
  • each classification here, 6 classifications of 5W1H and a total of 7 classifications of "Others"
  • the degree of fitness probability that the input sentence contains the content related to each classification.
  • the input sentence contains the named entity 'Nagano' corresponding to the class 'place name' corresponding to the interrogative 'where', and the named entity corresponding to the class 'date' corresponding to the interrogative 'when'.
  • the analysis unit 22 classifies (in the example of FIG. 5, the interrogative words "where", "when", and " who") may be extracted as the first classification.
  • a classification model M2 for binary classification is prepared for each interrogative classification.
  • the classification model M2 corresponding to the interrogative word "when" inputs an input sentence and calculates the probability that the input sentence includes "when” (that is, the input sentence includes the content corresponding to "when”). is configured to output the probability that
  • the classification model M2 corresponding to the interrogative word "how” inputs an input sentence and calculates the probability that the input sentence contains "how” (that is, the input sentence contains the content corresponding to "how”). is configured to output the probability that The same applies to the classification models M2 corresponding to other interrogative words.
  • the analysis unit 22 may refer to the probability values output by the classification model M2 corresponding to each interrogative, and extract the classification corresponding to the probability value equal to or greater than a predetermined threshold as the first classification.
  • the classification models M1 and M2 as described above can be configured by, for example, a one-layer or multi-layer neural network.
  • the classification models M1 and M2 for example, perform machine learning (for example, deep learning, etc.) using teacher data in which a certain sentence and interrogative information (i.e., correct label) included in the sentence are set. generated.
  • the question sentence generation unit 23 excludes one or more first categories extracted by the analysis unit 22 from among a plurality of predetermined categories (six categories of 5W1H in this embodiment). Obtain one or more secondary classifications. Then, based on the input sentence and the one or more second classifications, the question sentence generation unit 23 generates one or more question sentences corresponding to the input sentence and each second classification.
  • the analysis unit 22 extracts the classifications corresponding to the interrogatives "where", “when” and “who” as the first classification.
  • the question sentence generation unit 23 acquires three categories corresponding to the remaining interrogative words “what", “why", and “how” as the second categories.
  • the analysis unit 22 applies the Generate a corresponding question sentence.
  • the question generation unit 23 generates a question using the question generation model M generated by the model generation device 10 (the question generation model M stored in the model storage unit 14). More specifically, the question sentence generation unit 23 acquires a question sentence output from the question generation model M by inputting the pair of the input sentence and the second classification into the question generation model M.
  • the question generation unit 23 generates text data in the same format as the part corresponding to the input data in the teacher data (for example, " ⁇ what> I went to ski last winter to Nagano with Hanako.") to the question generation model M. to enter.
  • the question generation model M generates and outputs a question sentence corresponding to the designated interrogative ("what" in this example) and the input sentence.
  • the question sentence generation unit 23 generates "What did you do last winter?" as a question sentence corresponding to the pair "input sentence + what". Then, as a question sentence corresponding to the pair of "input sentence + why", "Why did you go skiing last winter?" is generated, and "input sentence + how" is generated. "How did you get there?" is generated as a question corresponding to the pair of .
  • the question text selection unit 24 selects a question text to be presented to the user from among the plurality of question texts based on the input text and the plurality of question texts. to select. For example, when presenting only one question sentence to the user, the question sentence selection unit 24 selects one question sentence to be presented to the user from among the plurality of question sentences generated by the question sentence generation unit 23. Decide on a sentence. When a predetermined number of questions (N (N is an integer equal to or greater than 2)) can be presented to the user, the question text selection unit 24 selects the questions generated by the question text generation unit 23. If the number of sentences is greater than N, N question sentences may be selected. The details of the processing of the question text selection unit 24 will be described later.
  • the question text correction unit 25 converts the question text generated by the question text generation unit 23 (for example, one question text selected by the question text selection unit 24) into a more appropriate question that takes into account the content of the input text. Correct the sentence. It should be noted that if there is no part to be corrected, the question text correction unit 25 does not need to correct the question text. Further, the timing at which the question sentence correction unit 25 corrects the question sentence may be before the processing of the question sentence selection unit 24 . In this case, the question text correction unit 25 may perform correction processing (including processing for determining whether correction is necessary) for each question text generated by the question text generation unit 23 .
  • the question sentence correction unit 25 compares the question sentence generated by the question sentence generation unit 23 and the input sentence, and determines that the first word contained in the question sentence and the input sentence having the same named entity classification are When the included second word is extracted, the first word in the question sentence is replaced with the second word. The details of the processing of the question sentence correction unit 25 will be described later.
  • the presentation unit 26 presents the question text generated by the question text generation unit 23 (the question text selected by the question text selection unit 24 when multiple question texts are generated) to the user.
  • the presentation unit 26 presents the question to the user by transmitting the question to the user terminal 30 and displaying the question on a display unit such as a display of the user terminal 30 .
  • the reception unit 21 acquires the user's input sentence from the user terminal 30 (step S11).
  • the analysis unit 22 analyzes the user's input sentence acquired by the reception unit 21 to extract the first classification that is specified or presumed to be included in the input sentence (step S12). For example, as shown in FIG. 4, the analysis unit 22 selects one of a plurality of predetermined classifications (in this embodiment, a classification corresponding to each interrogative word of 5W1H) by the technique of named entity extraction described above.
  • the classification (interrogative term) corresponding to the named entity class may be specified as the first classification.
  • the analysis unit 22 uses the classification models M1 and M2 shown in FIG. 5, for example, to estimate a classification (interrogative) for which a probability value equal to or greater than a predetermined threshold value is output as the first classification.
  • a classification interrogative
  • the question text generation unit 23 removes the one or more first classifications extracted by the analysis unit 22 from among the plurality of classifications (six classifications of 5W1H), and removes the remaining one or more second classifications. is obtained (step S13).
  • the question text generation unit 23 removes the one or more first classifications extracted by the analysis unit 22 from among the plurality of classifications (six classifications of 5W1H), and removes the remaining one or more second classifications. is obtained (step S13).
  • four categories corresponding to the interrogative words “who”, “what”, “why”, and “how” are acquired as the second category through this process.
  • the question text generation unit 23 generates a question text for each set of the input text and each second classification (step S14).
  • the question text generation unit 23 uses the question generation model M to generate a question text.
  • the question sentence generation unit 23 inputs pairs of the input sentence and the second classification to the question generation model M, and outputs the output result from the question generation model M to each pair. Generate as a corresponding question sentence.
  • step S15: YES when a plurality of question texts are generated by the question text generating unit 23 (that is, when there are a plurality of second classifications) (step S15: YES), the question text selection unit 24 selects the plurality of question texts. A question sentence to be presented to the user is selected from among them (step S16). When the number of question sentences generated by the question sentence generation unit 23 is one (step S15: NO), the process of the question sentence selection unit 24 is omitted.
  • the question sentence is corrected to a more appropriate question sentence that takes into account the content of the input sentence (step S18).
  • the predetermined correction condition is, for example, that the above-described first word and second word are extracted from the question sentence and the input sentence. That is, when the above-described first word and second word are extracted from the question sentence and the input sentence, the first word included in the question sentence is replaced with the second word included in the input sentence in step S18.
  • the presentation unit 26 presents the question text generated by the question text generation unit 23 (if multiple question texts are generated, the question text selected by the question text selection unit 24) to the user (step S19).
  • FIG. 8 is an example of a screen displaying the processing contents and processing results of the question generation device 20 as a CUI.
  • the input sentence "I went to ski last winter to Nagano with Hanako.” is acquired by the reception unit 21 (step S11).
  • the analysis unit 22 generates a named entity “winter” belonging to the class “date” corresponding to the interrogative “when”, a named entity “Nagano” belonging to the class “place name” corresponding to the interrogative “where”, A named entity “Hanako” belonging to the class "person's name” corresponding to the interrogative "who” is extracted (step S12). That is, “when”, “where", and “who” are extracted as the first classification.
  • the remaining interrogative words “what", "how”, and "why” are extracted as the second category by the analysis unit 22 (step S13).
  • the question text generation unit 23 generates a question text corresponding to each second classification (step S14).
  • “What did you do last winter?” corresponds to the interrogative "what", “How did you get there?" corresponds to the interrogative "how”, and "Why Three question sentences, "did you go skiing last winter?" are generated.
  • the question text selection unit 24 selects one question text to be presented to the user from among the three question texts (step S16). For example, the question sentence selection unit 24 calculates the degree of similarity between each question sentence generated by the question sentence generation unit 23 and the input sentence, and preferentially selects the question sentence with the lower similarity to the input sentence. It may be selected as a question sentence to be presented to
  • the question sentence selection unit 24 creates input sentences and 2-grams of each question as shown below.
  • 2-gram indicates the 2-gram of the sentence.
  • the question text selection unit 24 creates an intersection of the 2-grams of the input text and the 2-grams of each question text.
  • the intersection of the 2-gram of the input sentence and the 2-gram of the what question sentence is ⁇ 'last winter' ⁇ and the intersection of the 2-gram of the input sentence and the 2-gram of the how question sentence is The intersection is ⁇ 'last winter' ⁇ , and the intersection of the 2-gram of the input sentence and the 2-gram of the why question sentence is the empty set ⁇ .
  • the question text selection unit 24 may set a higher priority to a question text having a smaller number of elements in the product set (that is, a question text having a lower degree of similarity).
  • the priority of the why question (the number of elements in the intersection set is "0") is set higher than the priority of the what and how questions (the number of elements in the intersection set is "1").
  • the question sentence selection unit 24 selects the question sentence "Why did you go skiing last winter?" as the question sentence to be presented to the user.
  • step S17 NO
  • step S18 the presentation unit 26 presents the question "why" selected by the question selection unit 24 to the user (step S19).
  • FIG. 9 is an example of a screen displaying the processing contents and processing results of the question generation device 20 as a CUI.
  • the input sentence "I like to go to Kyoto.” is acquired by the receiving unit 21 (step S11).
  • the analysis unit 22 extracts the named entity "Kyoto" belonging to the class "place name” corresponding to the interrogative "where” (step S12). That is, "where" is extracted as the first classification.
  • four categories of "where", “when”, “how”, and “why” are predetermined as a plurality of categories (interrogative candidates). Therefore, the remaining interrogative words "when", "how", and "why” are extracted as the second category by the analysis unit 22 (step S13).
  • the question text generation unit 23 generates a question text corresponding to each second classification (step S14).
  • “When do you like to go to Kyoto?” corresponds to the interrogative "when", "How would you like to travel, by train or by bus?”
  • Three question sentences of "Why are you interested in Japan?” corresponding to the lyric "why" are generated.
  • the question text selection unit 24 selects one question text to be presented to the user from among the three question texts (step S16).
  • the question text selection unit 24 may select a question text based on 2-grams, as in the first embodiment described above.
  • the intersection of the 2-gram of the input sentence and the 2-gram of the when question sentence is ⁇ 'like to', 'to go', 'to Kyoto', 'go to' ⁇ The intersection of the input sentence 2-gram and the how question sentence 2-gram is ⁇ 'like to' ⁇ , and the intersection of the input sentence 2-gram and the why question sentence 2-gram is empty. It is a set ⁇ .
  • the priority of the why question (the number of elements in the intersection is 0) is the when question (the number of elements in the intersection is 4) and the how question (the number of elements in the intersection is 4).
  • the number of elements is set higher than the priority of "1").
  • the input sentence includes the named entity "Kyoto" belonging to the class "place name”.
  • the question sentence of why contains the named entity "Japan” belonging to the class "place name”. That is, in this example, the first word "Japan” included in the question sentence and the second word "Kyoto” included in the input sentence, which have the same named entity classification, are extracted. Therefore, since the correction condition described above is satisfied (step S17: YES), the question sentence correction process (step S18) is executed. That is, the question sentence correction unit 25 replaces the first word "Japan” included in the question sentence with the second word "Kyoto". That is, the question sentence correction unit 25 corrects the question sentence "Why are you interested in Japan?" to "Why are you interested in Kyoto?". Subsequently, the corrected question text is presented to the user by the presentation unit 26 (step S19).
  • the model generation device 10 described above includes the pair information acquisition unit 11, the teacher data generation unit 12, and the model generation unit 13 described above. According to the model generation device 10 as described above, a question generation model M that inputs an arbitrary first sentence and generates a question sentence (second sentence) for the first sentence is obtained. In order to generate the question generation model M as described above, it is natural to use a pair of an arbitrary sentence corresponding to the first sentence and a question sentence for the arbitrary sentence as training data. More specifically, since the first sentence input to the question generation model M exists temporally before the second sentence output from the question generation model M, the question generation model M is generated.
  • an arbitrary sentence corresponding to the first sentence is associated with the input data, and a question sentence occurring temporally after the arbitrary sentence (that is, a question sentence for the arbitrary sentence) is associated with the output data.
  • a question sentence occurring temporally after the arbitrary sentence that is, a question sentence for the arbitrary sentence
  • the teacher data in which the temporal context is reversed that is, the question sentence that occurred earlier in time corresponds to the output data, and the answer sentence that occurred later in time corresponds to the output data. teacher data corresponding to the input data) is used. As shown in the example of FIG.
  • the inputted first A question generation model M is obtained that outputs the second sentence, which is the question sentence for the first sentence. That is, a question generation model M capable of generating a second sentence, which is a question sentence related to the content of the first sentence, is obtained. Furthermore, as described above, pair information including a question and an answer to the question can be obtained relatively easily, for example, from example sentences written in commercially available English problem collections. Therefore, according to the model generation device 10, it is possible to efficiently generate a model for generating a question sentence for an input sentence.
  • the teacher data generation unit 12 associates answer sentences with input data, and further associates classification information indicating the classification of question sentences (for example, classification of interrogative words such as 5W1H) with input data. Generate teacher data. Then, the model generation unit 13 generates a question generation model M that inputs an input sentence (first sentence) and arbitrary classification information and outputs a question sentence (second sentence) according to the classification indicated by the arbitrary classification information. do. According to the above configuration, it is possible to obtain a question generation model M that can generate a question sentence regarding the content indicated by the classification information while taking into account the content of the input sentence (see FIG. 2).
  • the teacher data generation unit 12 extracts interrogative words (interrogative words corresponding to 5W1H in this embodiment) included in the question sentence, and uses the extracted interrogative words as classification information. According to the above configuration, it is possible to easily and appropriately extract the classification information based on the interrogative included in the question sentence of the pair information.
  • the question generation device 20 described above includes an analysis unit 22, a question text generation unit 23, and a question text selection unit 24. According to the question generating device 20 as described above, only question sentences corresponding to the second classification other than the first classification specified or presumed to be included in the input sentence among the plurality of predetermined classifications are generated. That is, the process of generating redundant questions about the content (first category) that is likely to be included in the input sentence is omitted, and meaningful questions (that is, first category questions that are likely not to be included in the Only two-class questions) can be generated. Furthermore, the processing load of the question text selection unit 24 is reduced by avoiding the generation of questions related to the first classification and narrowing down the number of question text candidates in advance. Therefore, it is possible to more efficiently generate a question sentence according to the user input sentence.
  • the analysis unit 22 extracts the classification corresponding to the one interrogative word as the first classification. According to the above configuration, it is possible to easily and efficiently extract the first classification by using a known named entity extraction method.
  • the question text selection unit 24 calculates the degree of similarity between each question text generated by the question text generation unit 23 and the input text, and gives priority to question texts with lower similarities to the input text. Then, it is selected as a question sentence to be presented to the user. According to the above configuration, it is possible to present to the user a question sentence that is not superficially or semantically similar to the input sentence (that is, a question sentence from which redundancy has been eliminated).
  • the number of elements included in the product set of the 2-gram of the input sentence and the 2-gram of each question is used as the indicator of the similarity, but the question sentence selection unit 24
  • a question sentence to be presented to the user may be selected based on a degree of similarity other than the above.
  • the question sentence selection unit 24 vectorizes the input sentence and each question sentence, calculates the cosine similarity between the vectorized input sentence and each vectorized question sentence, and calculates the cosine similarity between the vectorized input sentence and each vectorized question sentence. may be selected as the question to be presented to the user.
  • the question text selection unit 24 may use n-grams (n is an integer of 3 or more) instead of 2-grams, or use 1-grams (bag-of-word, word matching). may
  • the question text selection unit 24 calculates the probability that the content related to each second classification is included in the input text (relevance rate for each second classification), and selects more question texts corresponding to the second classification with the lower probability. It may be selected preferentially as a question sentence to be presented to the user.
  • the question sentence selection unit 24 may input an input sentence to the above-described classification model (see FIG. 5) and calculate the probability that the input sentence includes each classification. Then, the question text selection unit 24 extracts the second class with the lowest probability from among the plurality of second classes, and selects the question text corresponding to the extracted second class as the question text to be presented to the user. good too.
  • the question sentence regarding the content that is highly likely not mentioned in the input sentence in this embodiment, the content of 5W1H that is not included in the input sentence
  • the question sentence regarding the content that is highly likely not mentioned in the input sentence is appropriately selected as the question to be presented to the user. can do.
  • the question generation device 20 includes a question sentence correction unit 25.
  • a question sentence correction unit 25 According to the above configuration, as in the example shown in FIG. 9, part of the description included in the question ("Japan” in the example of FIG. 9) belongs to the same class described in the input sentence ( In the example of FIG. 9, by replacing with "Kyoto"), a more natural question sentence can be generated according to the input sentence. In the example of FIG. 9, by converting "Japan” included in the question sentence into a more specific expression "Kyoto" included in the input sentence, a more natural question sentence corresponding to the input sentence can be obtained.
  • the correction condition for correction by the question sentence correction unit 25 is the condition described in the above embodiment (that the first word and second word belonging to the same named entity class are extracted from the question sentence and the input sentence). ) is not limited to For example, consider a case where the input sentence includes one named entity belonging to the class "place name" and the question text includes two named entities belonging to the class "place name”. In this case, it may not be possible to specify to which of the two named entities included in the question sentence the named entity belonging to the class “place name” included in the input sentence corresponds. Therefore, the question text correcting unit 25 replaces the first word with the second You can replace it with a word.
  • the question generation model M can also generate question sentences corresponding to closed questions. For example, when the second classification is not extracted in the processing by the analysis unit 22, the question sentence generation unit 23 inputs the input sentence and the classification information indicating null to the question generation model M, A question sentence corresponding to the closed question may be generated.
  • an input sentence to the question generation model M and a question sentence output from the question generation model M may be sentences written in a language other than English.
  • a question generation model M corresponding to languages other than English can be obtained.
  • each functional block may be implemented using one device that is physically or logically coupled, or directly or indirectly using two or more devices that are physically or logically separated (e.g. , wired, wireless, etc.) and may be implemented using these multiple devices.
  • a functional block may be implemented by combining software in the one device or the plurality of devices.
  • Functions include judging, determining, determining, calculating, calculating, processing, deriving, investigating, searching, checking, receiving, transmitting, outputting, accessing, resolving, selecting, choosing, establishing, comparing, assuming, expecting, assuming, Broadcasting, notifying, communicating, forwarding, configuring, reconfiguring, allocating, mapping, assigning, etc. can't
  • the model generation device 10 and the question generation device 20 in one embodiment of the present disclosure may function as computers that perform the model generation method and the question generation method of the present disclosure.
  • FIG. 10 is a diagram showing an example of a hardware configuration common to the model generation device 10 and the question generation device 20 according to an embodiment of the present disclosure.
  • Each of the model generation device 10 and the question generation device 20 is physically configured as a computer device including a processor 1001, a memory 1002, a storage 1003, a communication device 1004, an input device 1005, an output device 1006, a bus 1007, and the like. good too.
  • the term "apparatus” can be read as a circuit, device, unit, or the like.
  • the hardware configuration of the model generation device 10 and the question generation device 20 may be configured to include one or more of each device shown in FIG. 10, or may be configured without some devices. .
  • Each function of the model generation device 10 and the question generation device 20 is performed by the processor 1001 performing calculations and communication by the communication device 1004 by loading predetermined software (programs) onto hardware such as the processor 1001 and the memory 1002. and at least one of reading and writing data in the memory 1002 and the storage 1003 .
  • the processor 1001 for example, operates an operating system and controls the entire computer.
  • the processor 1001 may be configured by a central processing unit (CPU) including an interface with peripheral devices, a control device, an arithmetic device, registers, and the like.
  • CPU central processing unit
  • the processor 1001 reads programs (program codes), software modules, data, etc. from at least one of the storage 1003 and the communication device 1004 to the memory 1002, and executes various processes according to them.
  • programs program codes
  • the program a program that causes a computer to execute at least part of the operations described in the above embodiments is used.
  • the model generation unit 13 of the model generation device 10 the question generation unit 23 of the question generation device 20, and the like may be stored in the memory 1002 and realized by a control program operating in the processor 1001.
  • Other functional blocks may be realized as well.
  • FIG. Processor 1001 may be implemented by one or more chips.
  • the program may be transmitted from a network via an electric communication line.
  • the memory 1002 is a computer-readable recording medium, and is composed of at least one of, for example, ROM (Read Only Memory), EPROM (Erasable Programmable ROM), EEPROM (Electrically Erasable Programmable ROM), RAM (Random Access Memory), etc. may be
  • ROM Read Only Memory
  • EPROM Erasable Programmable ROM
  • EEPROM Electrical Erasable Programmable ROM
  • RAM Random Access Memory
  • the memory 1002 may also be called a register, cache, main memory (main storage device), or the like.
  • the memory 1002 can store executable programs (program codes), software modules, etc. for implementing a communication control method according to an embodiment of the present disclosure.
  • the storage 1003 is a computer-readable recording medium, for example, an optical disc such as a CD-ROM (Compact Disc ROM), a hard disk drive, a flexible disc, a magneto-optical disc (for example, a compact disc, a digital versatile disc, a Blu-ray disk), smart card, flash memory (eg, card, stick, key drive), floppy disk, magnetic strip, and/or the like.
  • Storage 1003 may also be called an auxiliary storage device.
  • the storage medium described above may be, for example, a database, server, or other suitable medium including at least one of memory 1002 and storage 1003 .
  • the communication device 1004 is hardware (transmitting/receiving device) for communicating between computers via at least one of a wired network and a wireless network, and is also called a network device, a network controller, a network card, a communication module, or the like.
  • the input device 1005 is an input device (for example, keyboard, mouse, microphone, switch, button, sensor, etc.) that receives input from the outside.
  • the output device 1006 is an output device (eg, display, speaker, LED lamp, etc.) that outputs to the outside. Note that the input device 1005 and the output device 1006 may be integrated (for example, a touch panel).
  • Each device such as the processor 1001 and the memory 1002 is connected by a bus 1007 for communicating information.
  • the bus 1007 may be configured using a single bus, or may be configured using different buses between devices.
  • model generation device 10 and the question generation device 20 include a microprocessor, a digital signal processor (DSP), an ASIC (Application Specific Integrated Circuit), a PLD (Programmable Logic Device), an FPGA (Field Programmable Gate Array), etc. hardware, and part or all of each functional block may be realized by the hardware.
  • processor 1001 may be implemented using at least one of these pieces of hardware.
  • Input/output information may be stored in a specific location (for example, memory) or managed using a management table. Input/output information and the like can be overwritten, updated, or appended. The output information and the like may be deleted. The entered information and the like may be transmitted to another device.
  • the determination may be made by a value represented by one bit (0 or 1), by a true/false value (Boolean: true or false), or by numerical comparison (for example, a predetermined value).
  • notification of predetermined information is not limited to being performed explicitly, but may be performed implicitly (for example, not notifying the predetermined information). good too.
  • Software whether referred to as software, firmware, middleware, microcode, hardware description language or otherwise, includes instructions, instruction sets, code, code segments, program code, programs, subprograms, and software modules. , applications, software applications, software packages, routines, subroutines, objects, executables, threads of execution, procedures, functions, and the like.
  • software, instructions, information, etc. may be transmitted and received via a transmission medium.
  • the software uses at least one of wired technology (coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), etc.) and wireless technology (infrared, microwave, etc.) to website, Wired and/or wireless technologies are included within the definition of transmission medium when sent from a server or other remote source.
  • wired technology coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), etc.
  • wireless technology infrared, microwave, etc.
  • data, instructions, commands, information, signals, bits, symbols, chips, etc. may refer to voltages, currents, electromagnetic waves, magnetic fields or magnetic particles, light fields or photons, or any of these. may be represented by a combination of
  • information, parameters, etc. described in the present disclosure may be expressed using absolute values, may be expressed using relative values from a predetermined value, or may be expressed using other corresponding information. may be represented.
  • any reference to elements using the "first,” “second,” etc. designations used in this disclosure does not generally limit the quantity or order of those elements. These designations may be used in this disclosure as a convenient method of distinguishing between two or more elements. Thus, reference to a first and second element does not imply that only two elements can be employed or that the first element must precede the second element in any way.
  • a and B are different may mean “A and B are different from each other.”
  • the term may also mean that "A and B are different from C”.
  • Terms such as “separate,” “coupled,” etc. may also be interpreted in the same manner as “different.”

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

質問生成装置20は、ユーザの入力文を解析することにより、文の内容に関する予め定められた複数の分類のうち、入力文に含まれると特定又は推定される一以上の第1分類を抽出する解析部22と、複数の分類のうちから一以上の第1分類を除外することにより残った一以上の第2分類と、入力文と、に基づいて、入力文及び各第2分類に応じた一以上の質問文を生成する質問文生成部23と、質問文生成部23によって複数の質問文が生成された場合に、入力文と複数の質問文とに基づいて、複数の質問文のうちからユーザに提示する質問文を選定する質問文選定部24と、を備える。

Description

質問生成装置
 本発明の一側面は、質問生成装置に関する。
 ユーザ発話に対する応答メッセージを自動生成する仕組みが知られている(例えば、特許文献1)。特許文献1には、以下のような処理が開示されている。まず、ユーザ発話に対する質問文の候補が複数生成される。その後、複数の質問文の各々について、ユーザ発話に含まれる特徴量(形態素解析により得られた各単語)の含有率が計算され、含有率が高い質問文が質問候補から除外される。
国際公開第2013/080406号
 上記特許文献1に開示された処理によれば、含有率が高い質問文(すなわち、既にユーザ発話で言及されている内容に関する冗長な質問)を排除することができる。しかし、上記処理では、複数の質問文の候補を最初に生成した後に、全ての質問文間で含有率の比較を行う必要があるため、効率的ではない。
 そこで、本発明の一側面は、ユーザ入力文に応じた質問文をより効率的に生成することが可能な質問生成装置を提供することを目的とする。
 本発明の一側面に係る質問生成装置は、ユーザの入力文を解析することにより、文の内容に関する予め定められた複数の分類のうち、入力文に含まれると特定又は推定される一以上の第1分類を抽出する解析部と、複数の分類のうちから一以上の第1分類を除外することにより残った一以上の第2分類と、入力文と、に基づいて、入力文及び各第2分類に応じた一以上の質問文を生成する質問文生成部と、質問文生成部によって複数の質問文が生成された場合に、入力文と複数の質問文とに基づいて、複数の質問文のうちからユーザに提示する質問文を選定する質問文選定部と、を備える。
 本発明の一側面に係る質問生成装置によれば、予め定められた複数の分類のうち入力文に含まれると特定又は推定される第1分類以外の第2分類に応じた質問文のみが生成される。すなわち、入力文に含まれている可能性の高い内容(第1分類)に関する冗長な質問を生成する処理を省略し、意味のある質問(すなわち、入力文に含まれていない可能性の高い第2分類に関する質問)のみを生成することができる。さらに、第1分類に関する質問の生成が回避され、質問文の候補数が予め絞られることにより、質問文選定部の処理負荷が低減される。従って、ユーザ入力文に応じた質問文をより効率的に生成することができる。
 本発明の一側面によれば、ユーザ入力文に応じた質問文をより効率的に生成することが可能な質問生成装置を提供することができる。
実施形態に係る情報処理システムの全体構成を示す図である。 質問生成モデルにより生成される質問文の例を示す図である。 モデル生成装置の処理手順の一例を示すフローチャートである。 解析部の処理の第1の例を示す図である。 解析部の処理の第2の例を示す図である。 質問文生成部の処理の一例を示す図である。 質問生成装置の処理手順の一例を示すフローチャートである。 質問生成処理の第1例を示す図である。 質問生成処理の第2例を示す図である。 モデル生成装置及び質問生成装置のハードウェア構成の一例を示す図である。
 以下、添付図面を参照して、本発明の一実施形態について詳細に説明する。なお、図面の説明において同一又は相当要素には同一符号を付し、重複する説明を省略する。
 図1は、一実施形態に係る情報処理システム1の全体構成を示す図である。情報処理システム1は、モデル生成装置10と、質問生成装置20と、一以上のユーザ端末30と、を含んでいる。モデル生成装置10は、質問生成モデルMを生成する装置である。質問生成モデルMは、任意の文を入力して当該文に対する質問文を生成するように機械学習によって作成された学習済みモデルである。質問生成装置20は、ユーザの入力文に対する質問文を生成し、生成された質問文をユーザに提示する装置である。本実施形態では、質問生成装置20は、モデル生成装置10により生成された質問生成モデルMを利用することにより、ユーザの入力文に対する質問文を生成する。質問生成装置20は、ユーザ端末30と通信可能に構成されている。質問生成装置20は、ユーザ端末30を介したユーザ操作により入力された入力文をユーザ端末30から受信し、生成した質問文をユーザ端末30に送信するように構成されている。ユーザ端末30は、ユーザにより所持及び操作される任意の端末である。ユーザ端末30の具体例としては、スマートフォン、タブレット端末、デスクトップPC、ラップトップPC、ウェアラブル端末等が挙げられる。なお、モデル生成装置10及び質問生成装置20の各々は、単一のサーバ装置によって構成されてもよいし、複数のサーバ装置によって構成されてもよい。また、モデル生成装置10と質問生成装置20とは、同一のサーバ装置によって構成されてもよい。
 本実施形態では一例として、情報処理システム1は、ユーザの語学学習(本実施形態では、英語学習)を支援するシステムである。具体的には、ユーザの入力文は英文であり、質問生成装置20により生成される質問文も英文である。例えば、質問生成装置20は、ユーザにより入力された任意の英文を取得し、当該英文の内容に応じた質問文をユーザに提示し、ユーザに英語での回答を促すことにより、ユーザの英語学習を支援する。ここで、ユーザの学習効率及び学習意欲を向上させる観点から、冗長な(無意味な)質問文の生成及び提示は、極力排除されるべきである。例えば、ユーザの入力文が「I went to ski last winter.(私は昨冬スキーに行きました。)」である場合について考える。この場合、入力文には、時期(when)に関する情報(ここでは、「last winter」)が含まれている。従って、この場合、入力文に含まれている時期について問う「When did you go to ski?(あなたはいつスキーに行きましたか?)」といった質問文は冗長な質問文であり、ユーザに提示すべきではない。質問生成装置20は、このような冗長な質問文の生成及び提示を回避して、入力文に応じた適切な内容の質問文を生成及び提示するように構成されている。
[モデル生成装置の構成]
 モデル生成装置10は、ペア情報取得部11と、教師データ生成部12と、モデル生成部13と、モデル記憶部14と、を有する。
 ペア情報取得部11は、質問文と当該質問文に対する回答文とを含むペア情報を取得する。質問文とそれに対する回答文とのペアに関して、例えば、市販の英語問題集等において、非常に多くのサンプル(例文)が存在している。ペア情報取得部11は、例えばこのようなサンプルをペア情報として取得してもよい。ただし、ペア情報の情報源は上記例に限られない。例えば、ペア情報取得部11は、ユーザと対話を行う任意の対話システムに蓄積された対話ログ、Webアンケートの回答結果(Q&A)等の、質問及び回答のペアを抽出可能な任意の情報源から、ペア情報を取得してもよい。ペア情報の例としては、質問文「What animal do you like?(好きな動物は何ですか?)」、及び当該質問文に対する回答文「I don’t really like animals.(私はあまり動物が好きではありません。)」のペア等が挙げられる。
 教師データ生成部12は、ペア情報取得部11により取得されたペア情報に含まれる回答文を入力データに対応させると共にペア情報に含まれる質問文を出力データに対応させた教師データを生成する。言い換えれば、教師データ生成部12は、ペア情報に含まれる質問文と回答文との時間的な前後関係を逆にした教師データを生成する。より具体的には、教師データ生成部12は、時間的に後に発生した回答文(入力データ)から時間的に前に発生した質問文(出力データ)を予測するという関係性を有する教師データを生成する。
 本実施形態では、教師データ生成部12は、ペア情報に含まれる回答文を入力データに対応させると共に、ペア情報に含まれる質問文の分類を示す分類情報を入力データに更に対応させた教師データを生成する。ここで、分類情報は、質問内容(質問対象)に関するカテゴリである。本実施形態では一例として、分類情報は、英語の疑問詞に対応する分類を示す情報である。例えば、分類情報は、いわゆる5W1Hと呼ばれる6つの分類を示す情報である。すなわち、分類情報は、「いつ(when)」、「どこで(where)」、「誰が(who)」、「何を(what)」、「なぜ(why)」、「どのように(how)」の6つの分類を示す情報である。
 例えば、教師データ生成部12は、質問文に含まれる疑問詞を抽出し、抽出された疑問詞を分類情報として用いる。例えば、上述したペア情報の例では、教師データ生成部12は、質問文「What animal do you like?」に含まれる疑問詞「what」を抽出し、疑問詞「what」を分類情報として用いる。この場合、疑問詞「what」と回答文「I don’t really like animals.」とが入力データに対応すると共に、質問文「What animal do you like?」が出力データに対応する教師データが生成される。例えば、教師データは、以下のようなデータ形式により表される。この例では、教師データは、「疑問詞(5W1H)の区分を指定するトークン、回答文、回答文と質問文との区切りを示すトークン<SEP>、質問文、文末を示すトークン<EOS>」によって構成されている。このようなデータ形式で表される教師データでは、トークン<SEP>よりも前の部分が入力データに対応し、トークン<SEP>よりも後の部分が出力データに対応する。また、トークン<EOS>によって教師データ間の区切りを認識することが可能であるため、教師データが複数ある場合には、以下のような形式で表された教師データを複数連結した1つのテキストデータを用いて学習を行うことができる。
(教師データの例)
<what>I don’t really like animals.<SEP> What animal do you like?<EOS>
 なお、質問文に疑問詞(5W1H)が含まれない場合(例えば、ペア情報に含まれる質問文が「Do you~」等のクローズドクエスチョンである場合)には、教師データ生成部12は、特定の疑問詞がないこと(その他)を示す情報(例えば、空(null)を示す情報等)を分類情報に設定してもよい。このような教師データ(すなわち、「その他」の分類情報を含む教師データ)を用いて後述するモデル生成部13による学習を行うことにより、質問生成モデルMに入力される分類情報が空(null)の場合(すなわち、疑問詞の指定がない場合)であっても質問文(例えば、クローズドクエスチョンに対応する質問文)を生成可能な質問生成モデルMを生成することが可能となる。
 モデル生成部13は、教師データ生成部12により生成された教師データを用いた機械学習を実行することにより、任意の第1文を入力して当該第1文に対する質問文(第2文)を出力する質問生成モデルMを生成する。上述したように、本実施形態では、教師データは、入力データに対応するデータとして分類情報を含んでいる。このため、質問生成モデルMは、任意の第1文及び任意の分類情報を入力して当該任意の分類情報が示す分類(本実施形態では、5W1Hのいずれかの疑問詞、又は「その他」を示す分類)に応じた質問文(第2文)を出力するように構成される。
 図2は、本発明者により作成された質問生成モデルMによって、ある入力文「I studied English yesterday.(私は昨日英語を勉強した。)」から得られた各分類情報(疑問詞)に対応する質問文の例を示している。このように、上述した教師データを用いた機械学習によって、ある入力文(第1文)と任意の分類情報とを入力することにより、入力文の内容が加味されると共に、入力された分類情報に関する事項を質問する質問文(第2文)を生成及び出力することが可能な質問生成モデルMが得られた。
 モデル生成部13は、予め用意された言語モデルに対する追加学習を行うことにより、質問生成モデルMを生成してもよい。例えば、モデル生成部13は、BERT(Bidirectional Encoder Representations from Transformers)、GPT-2(Generative Pre-trained Transformer)等の学習済みの大規模言語モデルをベースとして用いて、上述した教師データを用いた追加学習(例えば、ファインチューニング、転移学習等)を実行することにより、質問生成モデルMを生成してもよい。上述したような言語モデルをベースとして質問生成モデルMを生成することにより、より自然な文章(第2文)を生成可能な質問生成モデルMを得ることが可能となる。
 モデル生成部13により生成された質問生成モデルMは、モデル記憶部14に記憶される。モデル記憶部14に記憶された質問生成モデルMは、質問生成装置20(より具体的には、後述する質問文生成部23)によって利用される。
 図3に示されるフローチャートを参照して、モデル生成装置10の処理手順(一実施形態に係るモデル生成方法)の一例について説明する。まず、ペア情報取得部11は、ペア情報を取得する(ペア情報取得ステップ、ステップS1)。ペア情報取得部11は、質問生成モデルMを学習させるために十分な数のペア情報を取得する。続いて、教師データ生成部12は、ペア情報取得部11により取得されたペア情報に基づいて、教師データを生成する(教師データ生成ステップ、ステップS2)。具体的には、ペア情報取得部11は、ペア情報に含まれる回答文を入力データに対応させると共にペア情報に含まれる質問文を出力データに対応させた教師データを生成する。本実施形態では、教師データ生成部12は、ペア情報に含まれる質問文の分類(例えば、質問文に含まれる疑問詞)を示す分類情報を入力データに更に対応させた教師データを生成する。続いて、モデル生成部13は、教師データ生成部12により生成された教師データを用いた機械学習を実行することにより、質問生成モデルMを生成する(モデル生成ステップ、ステップS3)。生成された質問生成モデルMは、モデル記憶部14に格納される。
[質問生成装置の構成]
 質問生成装置20は、受付部21と、解析部22と、質問文生成部23と、質問文選定部24と、質問文補正部25と、提示部26と、を有する。
 受付部21は、ユーザの入力文をユーザ端末30から取得(受信)する。
 解析部22は、受付部21により取得されたユーザの入力文を解析することにより、文の内容に関する予め定められた複数の分類のうち、入力文に含まれると特定又は推定される一以上の第1分類を抽出する。本実施形態では一例として、複数の分類は、上述した分類情報と同一である。すなわち、複数の分類は、英語の疑問詞(例えば5W1H)に対応する分類である。以下、解析部22が第1分類の抽出するために実行する処理の具体例について説明する。
 第1の例として、解析部22は、入力文に一の疑問詞(本実施形態では、5W1Hの6つの分類のうちの任意の分類)に対応する固有表現が含まれる場合に、当該一の疑問詞に対応する分類を第1分類として抽出する。図4は、解析部22の処理の第1の例を示す図である。図4は、入力文が「I went to Kyoto yesterday.(私は昨日京都に行きました。)」である場合の例を示している。まず、解析部22は、入力文に含まれる固有表現を全て抽出する。固有表現の抽出には、公知の手法(例えば、Bi-LSTM-CRF等)を使用することができる。
 固有表現には、予め定められた複数のクラスが定義されている。一例として、人名、地名、組織名、時間、日付(時期を含む)、金額、地形名、施設名等のクラスが定義されている。各クラスは、予め、上述した疑問詞の分類と対応付けられる。例えば、「人名」は、疑問詞「who」と対応付けられる。「地名」、「地形名」、及び「施設名」は、疑問詞「where」と対応付けられる。「時間」及び「日付」は、疑問詞「when」と対応付けられる。このような対応付けは、事前にオペレータ等によって任意に設定され得る。
 解析部22によって入力文から抽出される固有表現は、上記のいずれかのクラスに属する。すなわち、解析部22は、入力文に含まれる固有表現を抽出すると共に、当該固有表現が属するクラスに関する情報を取得する。図4の例では、解析部22は、入力文から、疑問詞「when」に対応するクラス「日付」に属する固有表現「yesterday」と、疑問詞「where」に対応するクラス「地名」に属する固有表現「Kyoto」と、を抽出する。従って、図4の例では、解析部22は、疑問詞「when」及び「where」を、第1分類として抽出する。言い換えれば、解析部22は、入力文に「when」及び「where」に関する内容が含まれていると解析する。
 第2の例として、解析部22は、学習済みモデル(分類モデル)を利用することにより、第1分類を抽出してもよい。図5は、解析部22の処理の第2の例を示す図である。分類モデルの例としては、マルチクラス分類を行う1つの分類モデルM1と、疑問詞毎に用意された2値分類を行う分類モデルM2と、が挙げられる。
 図5の左側に示されるように、マルチクラス分類を行う分類モデルM1は、入力文を入力して、入力文と各分類(ここでは、5W1Hの6つの分類と「その他」の計7つの分類)との適合度(入力文が各分類に関する内容を含む確率)を出力するように構成された学習済みモデルである。図5の例では、分類モデルM1に入力文「I went to ski last winter to Nagano with Hanako.」が入力された結果、入力文が各疑問詞を含む確率(各疑問詞に対応する内容を含む確率)が出力されている。この例では、入力文は、疑問詞「where」に対応するクラス「地名」に対応する固有表現「Nagano」を含んでおり、疑問詞「when」に対応するクラス「日付」に対応する固有表現「winter」を含んでおり、疑問詞「who」に対応するクラス「人名」に対応する固有表現「Hanako」を含んでいる。このため、分類モデルの出力結果において、疑問詞「where」、「when」、及び「who」の確率が、他の疑問詞の確率よりも大きくなっている。例えば、解析部22は、予め定められた閾値(ここでは一例として「0.2」)以上の確率値に対応する分類(図5の例では、疑問詞「where」、「when」、及び「who」)を第1分類として抽出してもよい。
 図5の右側に示されるように、2値分類を行う分類モデルM2は、疑問詞の分類毎に用意される。例えば、疑問詞「when」に対応する分類モデルM2は、入力文を入力して、当該入力文が「when」を含む確率(すなわち、当該入力文に「when」に対応する内容が含まれている確率)を出力するように構成される。同様に、疑問詞「how」に対応する分類モデルM2は、入力文を入力して、当該入力文が「how」を含む確率(すなわち、当該入力文に「how」に対応する内容が含まれている確率)を出力するように構成される。他の疑問詞に対応する分類モデルM2も同様である。例えば、解析部22は、各疑問詞に対応する分類モデルM2により出力された確率値を参照し、予め定められた閾値以上の確率値に対応する分類を第1分類として抽出してもよい。
 上述したような分類モデルM1,M2は、例えば、一層又は多層のニューラルネットワーク等によって構成され得る。分類モデルM1,M2は、例えば、ある文章と当該文章に含まれる疑問詞の情報(すなわち正解ラベル)とをセットにした教師データを用いた機械学習(例えば、深層学習等)を実行することにより生成される。
 質問文生成部23は、予め定められた複数の分類(本実施形態では、5W1Hの6つの分類)のうちから、解析部22により抽出された一以上の第1分類を除外することにより残った一以上の第2分類を取得する。そして、質問文生成部23は、入力文と、当該一以上の第2分類と、に基づいて、入力文及び各第2分類に応じた一以上の質問文を生成する。
 図5の例では、解析部22により疑問詞「where」、「when」及び「who」に対応する分類が第1分類として抽出される。この場合、質問文生成部23は、残りの疑問詞「what」、「why」、及び「how」に対応する3つの分類を第2分類として取得する。この場合、図6に示されるように、解析部22は、入力文及び第2分類の各ペア(この例では、「入力文+what」、「入力文+why」、及び「入力文+how」)に対応する質問文を生成する。一例として、質問文生成部23は、モデル生成装置10により生成された質問生成モデルM(モデル記憶部14に記憶された質問生成モデルM)を用いて質問文を生成する。より具体的には、質問文生成部23は、入力文及び第2分類のペアを質問生成モデルMに入力することにより、質問生成モデルMから出力される質問文を取得する。例えば、質問文生成部23は、教師データにおける入力データに対応する部分と同様の形式のテキストデータ(例えば、「<what>I went to ski last winter to Nagano with Hanako.」)を質問生成モデルMに入力する。その結果、質問生成モデルMによって、指定された疑問詞(この例では「what」)及び入力文に応じた質問文が生成及び出力される。
 図6の例では、質問文生成部23は、「入力文+what」のペアに対応する質問文として、「What did you do last winter?(あなたは、昨冬何をしましたか?)」を生成し、「入力文+why」のペアに対応する質問文として、「Why did you go skiing last winter?(あなたは、なぜ昨冬スキーに行ったのですか?)」を生成し、「入力文+how」のペアに対応する質問文として、「How did you get there?(あなたは、どのようにしてそこに行ったのですか?)」を生成する。
 質問文選定部24は、質問文生成部23によって複数の質問文が生成された場合に、入力文と複数の質問文とに基づいて、当該複数の質問文のうちからユーザに提示する質問文を選定する。例えば、ユーザに対して1つの質問文のみを提示する場合には、質問文選定部24は、質問文生成部23により生成された複数の質問文のうちから、ユーザに提示すべき1つの質問文を決定する。なお、ユーザに対して予め定められた数(N個(Nは2以上の整数))の質問を提示可能な場合には、質問文選定部24は、質問文生成部23によって生成された質問文の数がNよりも多い場合に、N個の質問文を選定してもよい。質問文選定部24の処理の詳細については後述する。
 質問文補正部25は、質問文生成部23により生成された質問文(例えば、質問文選定部24によって選定された1つの質問文)を、入力文の内容が加味された、より適切な質問文に補正する。なお、特に補正すべき箇所がない場合には、質問文補正部25による質問文の補正はされなくてもよい。また、質問文補正部25が質問文を補正するタイミングは、質問文選定部24の処理よりも前でもよい。この場合、質問文補正部25は、質問文生成部23により生成された各質問文の補正処理(補正の要否を判断する処理を含む)を実行すればよい。
 例えば、質問文補正部25は、質問文生成部23により生成された質問文と入力文とを比較し、固有表現の分類が互いに同一である、質問文に含まれる第1単語及び入力文に含まれる第2単語が抽出された場合に、質問文中の第1単語を第2単語に置換する。質問文補正部25の処理の詳細については後述する。
 提示部26は、質問文生成部23により生成された質問文(複数の質問文が生成された場合には、質問文選定部24により選定された質問文)をユーザに提示する。本実施形態では、提示部26は、質問文をユーザ端末30に送信し、ユーザ端末30が備えるディスプレイ等の表示部に質問文を表示させることにより、上記質問文をユーザに提示する。
 図7に示されるフローチャートを参照して、質問生成装置20の処理手順の一例について説明する。
 まず、受付部21は、ユーザの入力文をユーザ端末30から取得する(ステップS11)。続いて、解析部22は、受付部21により取得されたユーザの入力文を解析することにより、入力文に含まれると特定又は推定される第1分類を抽出する(ステップS12)。例えば、図4に示したように、解析部22は、上述した固有表現抽出の手法により、予め定められた複数の分類(本実施形態では、5W1Hの各疑問詞に対応する分類)のいずれかに対応する固有表現クラスに属する固有表現が入力文から抽出された場合に、当該固有表現クラスに対応する分類(疑問詞)を、第1分類として特定してもよい。また、解析部22は、例えば、図5に示したような分類モデルM1,M2を用いて、予め定められた閾値以上の確率値が出力された分類(疑問詞)を、第1分類として推定してもよい。図4の例では、解析部22の処理により、疑問詞「when」及び「where」に対応する2つの分類が、第1分類として抽出される。
 続いて、質問文生成部23は、複数の分類(5W1Hの6つの分類)のうちから、解析部22により抽出された一以上の第1分類を除外することにより残った一以上の第2分類を取得する(ステップS13)。図4の例では、当該処理により、疑問詞「who」、「what」、「why」、及び「how」に対応する4つの分類が、第2分類として取得される。
 続いて、質問文生成部23は、入力文及び各第2分類の組毎に質問文を生成する(ステップS14)。一例として、質問文生成部23は、質問生成モデルMを用いて質問文を生成する。具体的には、図6に示されるように、質問文生成部23は、入力文及び第2分類のペアを質問生成モデルMに入力し、質問生成モデルMからの出力結果を、各ペアに対応する質問文として生成する。
 続いて、質問文選定部24は、質問文生成部23により複数の質問文が生成された場合(すなわち、第2分類が複数存在する場合)(ステップS15:YES)、当該複数の質問文のうちからユーザに提示する質問文を選定する(ステップS16)。なお、質問文生成部23により生成された質問文が1つの場合(ステップS15:NO)、質問文選定部24の処理は省略される。
 続いて、質問文補正部25は、質問文生成部23により生成された質問文(本実施形態では、質問文選定部24によって選定された1つの質問文)が所定の補正条件を満たす場合(ステップS17:YES)、質問文を、入力文の内容が加味された、より適切な質問文に補正する(ステップS18)。なお、所定の補正条件を満たさない場合(ステップS17:NO)、質問文補正部25の処理は省略される。ここで、所定の補正条件は、例えば、質問文及び入力文から上述した第1単語及び第2単語が抽出されることである。すなわち、質問文及び入力文から上述した第1単語及び第2単語が抽出された場合、ステップS18において、質問文に含まれる第1単語が、入力文に含まれる第2単語に置換される。
 続いて、提示部26は、質問文生成部23により生成された質問文(複数の質問文が生成された場合には、質問文選定部24により選定された質問文)をユーザに提示する(ステップS19)。
(第1実施例)
 図8を参照して、上述した図7のフローチャートに示した処理の第1実施例について説明する。図8は、質問生成装置20の処理内容及び処理結果をCUI表示した画面の一例である。
 第1実施例では、受付部21により、入力文「I went to ski last winter to Nagano with Hanako.」が取得される(ステップS11)。続いて、解析部22により、疑問詞「when」に対応するクラス「日付」に属する固有表現「winter」と、疑問詞「where」に対応するクラス「地名」に属する固有表現「Nagano」と、疑問詞「who」に対応するクラス「人名」に属する固有表現「Hanako」と、が抽出される(ステップS12)。すなわち、「when」、「where」、及び「who」が第1分類として抽出される。その結果、解析部22により、残りの疑問詞「what」、「how」、及び「why」が第2分類として抽出される(ステップS13)。
 続いて、質問文生成部23により、各第2分類に対応する質問文が生成される(ステップS14)。この例では、疑問詞「what」に対応する「What did you do last winter?」、疑問詞「how」に対応する「How did you get there?」、及び疑問詞「why」に対応する「Why did you go skiing last winter?」の3つの質問文が生成される。
 続いて、質問文選定部24が、上記3つの質問文のうちから、ユーザに提示すべき1つの質問文を選定する(ステップS16)。例えば、質問文選定部24は、質問文生成部23により生成された各質問文と入力文との類似度を算出し、入力文との類似度がより低い質問文をより優先的に、ユーザに提示する質問文として選定してもよい。
 一例として、質問文選定部24は、下記に示すような入力文及び各質問の2-gramを作成する。下記において、2-gram(文)は、当該文の2-gramを示す。
 2-gram(入力文)={‘I went’,‘went to’,‘to ski’,‘ski last’,‘last winter’,‘winter to’,‘to Nagano’,‘Nagano with’,‘with Hanako’,‘Hanko .’}
 2-gram(whatの質問文)={‘What did’,‘did you’,‘you do’,‘do last’,‘last winter’,‘winter ?’}
 2-gram(howの質問文)={‘How did’,‘did you’,‘you get’,‘get there’,‘there ?’}
 2-gram(whyの質問文)={‘Why did’,‘did you’,‘you go’,‘go skiing’,‘skiing last’,‘last winter’,‘winter ?’}
 質問文選定部24は、入力文の2-gramと各質問文の2-gramとの積集合を作成する。この例では、入力文の2-gramとwhatの質問文の2-gramとの積集合は{‘last winter’}であり、入力文の2-gramとhowの質問文の2-gramとの積集合は{‘last winter’}であり、入力文の2-gramとwhyの質問文の2-gramとの積集合は空集合{}である。
 ここで、上記の積集合の要素数が多い質問文(すなわち、入力文との文章一致率が高い質問文)ほど、入力文と類似する度合い(類似度)が高いといえる。そこで、質問文選定部24は、積集合の要素数が少ない質問文(すなわち、類似度が低い質問文)ほど優先度を高く設定してもよい。上記例では、whyの質問文(積集合の要素数が「0」)の優先度が、what及びhowの質問文(積集合の要素数が「1」)の優先度よりも高く設定される。このような処理によれば、質問文選定部24により、whyの質問文「Why did you go skiing last winter?」が、ユーザに提示すべき質問文として選定される。
 続いて、質問文補正部25による質問文の補正を行うか否かが判定されるが、第1実施例では、上述した補正条件を満たさないため(ステップS17:NO)、質問文の補正処理(ステップS18)は実行されない。その結果、提示部26によって、質問文選定部24により選定されたwhyの質問文が、ユーザに提示される(ステップS19)。
(第2実施例)
 図9を参照して、上述した図7のフローチャートに示した処理の第2実施例について説明する。図9は、質問生成装置20の処理内容及び処理結果をCUI表示した画面の一例である。
 第2実施例では、受付部21により、入力文「I like to go to Kyoto.」が取得される(ステップS11)。続いて、解析部22により、疑問詞「where」に対応するクラス「地名」に属する固有表現「Kyoto」が抽出される(ステップS12)。すなわち、「where」が第1分類として抽出される。ここで、第2実施例では、複数の分類(疑問詞の候補)として、「where」、「when」、「how」、及び「why」の4つの分類が予め定められている。このため、解析部22により、残りの疑問詞「when」、「how」、及び「why」が第2分類として抽出される(ステップS13)。
 続いて、質問文生成部23により、各第2分類に対応する質問文が生成される(ステップS14)。この例では、疑問詞「when」に対応する「When do you like to go to Kyoto?」、疑問詞「how」に対応する「How would you like to travel, by train or by bus?」、及び疑問詞「why」に対応する「Why are you interested in Japan?」の3つの質問文が生成される。
 続いて、質問文選定部24が、上記3つの質問文のうちから、ユーザに提示すべき1つの質問文を選定する(ステップS16)。例えば、質問文選定部24は、上述した第1実施例と同様に、2-gramに基づいて質問文を選定してもよい。第2実施例では、入力文の2-gramとwhenの質問文の2-gramとの積集合は{‘like to’,‘to go’,‘to Kyoto’,‘go to’}であり、入力文の2-gramとhowの質問文の2-gramとの積集合は{‘like to’}であり、入力文の2-gramとwhyの質問文の2-gramとの積集合は空集合{}である。
 従って、上記例では、whyの質問文(積集合の要素数が「0」)の優先度が、whenの質問文(積集合の要素数が「4」)及びhowの質問文(積集合の要素数が「1」)の優先度よりも高く設定される。このような処理によれば、質問文選定部24により、whyの質問文「Why are you interested in Japan?」が、ユーザに提示すべき質問文として選定される。
 続いて、質問文補正部25による質問文の補正を行うか否かが判定される。第2実施例では、入力文が、クラス「地名」に属する固有表現「Kyoto」を含んでいる。また、whyの質問文が、クラス「地名」に属する固有表現「Japan」を含んでいる。すなわち、この例では、固有表現の分類が互いに同一である、質問文に含まれる第1単語「Japan」及び入力文に含まれる第2単語「Kyoto」が抽出される。従って、上述した補正条件を満たすため(ステップS17:YES)、質問文の補正処理(ステップS18)が実行される。すなわち、質問文補正部25により、質問文に含まれる第1単語「Japan」が第2単語「Kyoto」に置換される。すなわち、質問文補正部25により、質問文「Why are you interested in Japan?」が「Why are you interested in Kyoto?」に補正される。続いて、提示部26により、当該補正後の質問文が、ユーザに提示される(ステップS19)。
 以上述べたモデル生成装置10は、上述したペア情報取得部11、教師データ生成部12、及びモデル生成部13を備える。このようなモデル生成装置10によれば、任意の第1文を入力して当該第1文に対する質問文(第2文)を生成する質問生成モデルMが得られる。上記のような質問生成モデルMを生成するためには、第1文に対応する任意の文と当該任意の文に対する質問文とのペアを教師データとして用いるのが自然である。より具体的には、質問生成モデルMに入力される第1文は質問生成モデルMから出力される第2文よりも時間的に前に存在するものであるから、質問生成モデルMを生成するためには、第1文に対応する任意の文を入力データに対応させると共に当該任意の文よりも時間的に後に発生した質問文(すなわち、当該任意の文に対する質問文)を出力データに対応させた教師データを用いることが自然である。これに対して、モデル生成装置10では、時間的な前後関係を逆にした教師データ(すなわち、時間的に前に発生した質問文が出力データに対応し、時間的に後に発生した回答文が入力データに対応する教師データ)を用いる。図2の例に示したように、本発明者の知見によれば、このように質問文及び回答文の時間的な前後関係を逆にした教師データを用いた場合にも、入力された第1文に対する質問文である第2文を出力する質問生成モデルMが得られる。つまり、第1文の内容に関連する質問文である第2文を生成可能な質問生成モデルMが得られる。さらに、質問文と当該質問文に対する回答文とを含むペア情報は、上述したように、例えば市販の英語問題集等に記載された例文等から、比較的容易に入手可能である。従って、モデル生成装置10によれば、入力文に対する質問文を生成するモデルを効率的に生成することができる。
 本実施形態では、教師データ生成部12は、回答文を入力データに対応させると共に、質問文の分類を示す分類情報(一例として、5W1H等の疑問詞の分類)を入力データに更に対応させた教師データを生成する。そして、モデル生成部13は、入力文(第1文)及び任意の分類情報を入力して任意の分類情報が示す分類に応じた質問文(第2文)を出力する質問生成モデルMを生成する。上記構成によれば、入力文の内容が加味されると共に分類情報により示される内容に関する質問文を生成可能な質問生成モデルMを得ることができる(図2参照)。
 本実施形態では、教師データ生成部12は、質問文に含まれる疑問詞(本実施形態では、5W1Hに対応する疑問詞)を抽出し、抽出された疑問詞を分類情報として用いる。上記構成によれば、ペア情報の質問文に含まれる疑問詞に基づいて、分類情報を容易且つ適切に抽出することができる。
 以上述べた質問生成装置20は、解析部22、質問文生成部23、及び質問文選定部24を備える。このような質問生成装置20によれば、予め定められた複数の分類のうち入力文に含まれると特定又は推定される第1分類以外の第2分類に応じた質問文のみが生成される。すなわち、入力文に含まれている可能性の高い内容(第1分類)に関する冗長な質問を生成する処理を省略し、意味のある質問(すなわち、入力文に含まれていない可能性の高い第2分類に関する質問)のみを生成することができる。さらに、このように第1分類に関する質問の生成が回避され、質問文の候補数が予め絞られることにより、質問文選定部24の処理負荷が低減される。従って、ユーザ入力文に応じた質問文をより効率的に生成することができる。
 本実施形態では、解析部22は、入力文に一の疑問詞に対応する固有表現が含まれる場合に、当該一の疑問詞に対応する分類を第1分類として抽出する。上記構成によれば、公知の固有表現抽出手法を用いることにより、第1分類の抽出を容易且つ効率的に行うことができる。
 本実施形態では、質問文選定部24は、質問文生成部23により生成された各質問文と入力文との類似度を算出し、入力文との類似度がより低い質問文をより優先的に、ユーザに提示する質問文として選定する。上記構成によれば、入力文と表層的又は意味的に似ていない質問文(すなわち、より冗長性が排除された質問文)をユーザに提示することが可能となる。
 なお、本実施形態では一例として、入力文の2-gramと各質問の2-gramとの積集合に含まれる要素数が上記類似度の指標として利用されたが、質問文選定部24は、上記以外の類似度に基づいて、ユーザに提示する質問文を選定してもよい。例えば、質問文選定部24は、入力文と各質問文のそれぞれをベクトル化し、ベクトル化された入力文とベクトル化された各質問文とのコサイン類似度を算出し、当該コサイン類似度が最小の質問文を、ユーザに提示する質問文として選定してもよい。或いは、質問文選定部24は、2-gramの代わりに、n-gram(nは3以上の整数)を用いてもよいし、1-gram(bag-of-word、単語一致度)を用いてもよい。
 また、質問文選定部24は、入力文に各第2分類に関する内容が含まれる確率(第2分類毎の適合率)を算出し、当該確率がより低い第2分類に対応する質問文をより優先的に、ユーザに提示する質問文として選定してもよい。例えば、質問文選定部24は、上述した分類モデル(図5参照)に入力文を入力し、入力文が各分類を含む確率を算出してもよい。そして、質問文選定部24は、複数の第2分類のうち当該確率が最小の第2分類を抽出し、抽出された第2分類に対応する質問文をユーザに提示する質問文として選定してもよい。上記構成によっても、入力文で言及されていない可能性が高い内容(本実施形態では、5W1Hのうち入力文に含まれていない内容)に関する質問文を、ユーザに提示すべき質問として適切に選定することができる。
 本実施形態では、質問生成装置20は、質問文補正部25を備える。上記構成によれば、図9に示される例のように、質問文に含まれる一部の記載(図9の例では「Japan」)を入力文に記載された同一のクラスに属する固有表現(図9の例では「Kyoto」)に置換することにより、入力文に応じたより自然な質問文を生成することができる。図9の例では、質問文に含まれる「Japan」を入力文に含まれるより具体的な表現「Kyoto」に変換することによって、入力文に応じたより自然な質問文が得られる。
 なお、質問文補正部25による補正を行うための補正条件は、上記実施形態に記載した条件(質問文及び入力文から同一の固有表現クラスに属する第1単語及び第2単語が抽出されること)に限られない。例えば、入力文にクラス「地名」に属する固有表現が1つ含まれ、質問文にクラス「地名」に属する固有表現が2つ含まれている場合について考える。この場合、入力文に含まれるクラス「地名」に属する固有表現が、質問文に含まれる2つの固有表現のうちのいずれに対応するかを特定することができない可能性がある。そこで、質問文補正部25は、質問文及び入力文に共通の固有表現クラスに属する固有表現(第1単語及び第2単語)が1つずつ存在する場合に限って、第1単語を第2単語に置換してもよい。
 なお、上述したように、質問生成モデルMの学習において、分類情報が空の場合の質問文(例えば、疑問詞のない「Do you~」等のクローズドクエスチョン)と回答文とのペア情報に基づく教師データも用いることにより、質問生成モデルMは、クローズドクエスチョンに対応する質問文も生成可能となる。例えば、解析部22による処理において第2分類が抽出されなかった場合等には、質問文生成部23は、入力文と空(null)を示す分類情報とを質問生成モデルMに入力して、クローズドクエスチョンに対応する質問文を生成してもよい。
 また、上記実施形態では、英文を対象とする処理について説明したが、英語以外の言語で記載された文章が処理対象とされてもよい。例えば、質問生成モデルMに対する入力文及び質問生成モデルMから出力される質問文は、英語以外の言語で記載された文章であってもよい。例えば、英語以外の言語で記載された文章を教師データとして用いた機械学習を実行することにより、英語以外の言語に対応する質問生成モデルMが得られる。
 なお、上記実施形態の説明に用いたブロック図は、機能単位のブロックを示している。これらの機能ブロック(構成部)は、ハードウェア及びソフトウェアの少なくとも一方の任意の組み合わせによって実現される。また、各機能ブロックの実現方法は特に限定されない。すなわち、各機能ブロックは、物理的又は論理的に結合した1つの装置を用いて実現されてもよいし、物理的又は論理的に分離した2つ以上の装置を直接的又は間接的に(例えば、有線、無線などを用いて)接続し、これら複数の装置を用いて実現されてもよい。機能ブロックは、上記1つの装置又は上記複数の装置にソフトウェアを組み合わせて実現されてもよい。
 機能には、判断、決定、判定、計算、算出、処理、導出、調査、探索、確認、受信、送信、出力、アクセス、解決、選択、選定、確立、比較、想定、期待、見做し、報知(broadcasting)、通知(notifying)、通信(communicating)、転送(forwarding)、構成(configuring)、再構成(reconfiguring)、割り当て(allocating、mapping)、割り振り(assigning)などがあるが、これらに限られない。
 例えば、本開示の一実施の形態におけるモデル生成装置10及び質問生成装置20は、本開示のモデル生成方法及び質問生成方法を行うコンピュータとして機能してもよい。図10は、本開示の一実施の形態に係るモデル生成装置10及び質問生成装置20に共通のハードウェア構成の一例を示す図である。モデル生成装置10及び質問生成装置20の各々は、物理的には、プロセッサ1001、メモリ1002、ストレージ1003、通信装置1004、入力装置1005、出力装置1006、バス1007などを含むコンピュータ装置として構成されてもよい。
 なお、以下の説明では、「装置」という文言は、回路、デバイス、ユニットなどに読み替えることができる。モデル生成装置10及び質問生成装置20のハードウェア構成は、図10に示した各装置を1つ又は複数含むように構成されてもよいし、一部の装置を含まずに構成されてもよい。
 モデル生成装置10及び質問生成装置20における各機能は、プロセッサ1001、メモリ1002などのハードウェア上に所定のソフトウェア(プログラム)を読み込ませることによって、プロセッサ1001が演算を行い、通信装置1004による通信を制御したり、メモリ1002及びストレージ1003におけるデータの読み出し及び書き込みの少なくとも一方を制御したりすることによって実現される。
 プロセッサ1001は、例えば、オペレーティングシステムを動作させてコンピュータ全体を制御する。プロセッサ1001は、周辺装置とのインターフェース、制御装置、演算装置、レジスタなどを含む中央処理装置(CPU:Central Processing Unit)によって構成されてもよい。
 また、プロセッサ1001は、プログラム(プログラムコード)、ソフトウェアモジュール、データなどを、ストレージ1003及び通信装置1004の少なくとも一方からメモリ1002に読み出し、これらに従って各種の処理を実行する。プログラムとしては、上述の実施の形態において説明した動作の少なくとも一部をコンピュータに実行させるプログラムが用いられる。例えば、モデル生成装置10のモデル生成部13、質問生成装置20の質問文生成部23等は、メモリ1002に格納され、プロセッサ1001において動作する制御プログラムによって実現されてもよく、他の機能ブロックについても同様に実現されてもよい。上述の各種処理は、1つのプロセッサ1001によって実行される旨を説明してきたが、2以上のプロセッサ1001により同時又は逐次に実行されてもよい。プロセッサ1001は、1以上のチップによって実装されてもよい。なお、プログラムは、電気通信回線を介してネットワークから送信されても良い。
 メモリ1002は、コンピュータ読み取り可能な記録媒体であり、例えば、ROM(Read Only Memory)、EPROM(Erasable Programmable ROM)、EEPROM(Electrically Erasable Programmable ROM)、RAM(Random Access Memory)などの少なくとも1つによって構成されてもよい。メモリ1002は、レジスタ、キャッシュ、メインメモリ(主記憶装置)などと呼ばれてもよい。メモリ1002は、本開示の一実施の形態に係る通信制御方法を実施するために実行可能なプログラム(プログラムコード)、ソフトウェアモジュールなどを保存することができる。
 ストレージ1003は、コンピュータ読み取り可能な記録媒体であり、例えば、CD-ROM(Compact Disc ROM)などの光ディスク、ハードディスクドライブ、フレキシブルディスク、光磁気ディスク(例えば、コンパクトディスク、デジタル多用途ディスク、Blu-ray(登録商標)ディスク)、スマートカード、フラッシュメモリ(例えば、カード、スティック、キードライブ)、フロッピー(登録商標)ディスク、磁気ストリップなどの少なくとも1つによって構成されてもよい。ストレージ1003は、補助記憶装置と呼ばれてもよい。上述の記憶媒体は、例えば、メモリ1002及びストレージ1003の少なくとも一方を含むデータベース、サーバその他の適切な媒体であってもよい。
 通信装置1004は、有線ネットワーク及び無線ネットワークの少なくとも一方を介してコンピュータ間の通信を行うためのハードウェア(送受信デバイス)であり、例えばネットワークデバイス、ネットワークコントローラ、ネットワークカード、通信モジュールなどともいう。
 入力装置1005は、外部からの入力を受け付ける入力デバイス(例えば、キーボード、マウス、マイクロフォン、スイッチ、ボタン、センサなど)である。出力装置1006は、外部への出力を実施する出力デバイス(例えば、ディスプレイ、スピーカー、LEDランプなど)である。なお、入力装置1005及び出力装置1006は、一体となった構成(例えば、タッチパネル)であってもよい。
 また、プロセッサ1001、メモリ1002などの各装置は、情報を通信するためのバス1007によって接続される。バス1007は、単一のバスを用いて構成されてもよいし、装置間ごとに異なるバスを用いて構成されてもよい。
 また、モデル生成装置10及び質問生成装置20は、マイクロプロセッサ、デジタル信号プロセッサ(DSP:Digital Signal Processor)、ASIC(Application Specific Integrated Circuit)、PLD(Programmable Logic Device)、FPGA(Field Programmable Gate Array)などのハードウェアを含んで構成されてもよく、当該ハードウェアにより、各機能ブロックの一部又は全てが実現されてもよい。例えば、プロセッサ1001は、これらのハードウェアの少なくとも1つを用いて実装されてもよい。
 以上、本実施形態について詳細に説明したが、当業者にとっては、本実施形態が本明細書中に説明した実施形態に限定されるものではないということは明らかである。本実施形態は、特許請求の範囲の記載により定まる本発明の趣旨及び範囲を逸脱することなく修正及び変更態様として実施することができる。したがって、本明細書の記載は、例示説明を目的とするものであり、本実施形態に対して何ら制限的な意味を有するものではない。
 本開示において説明した各態様/実施形態の処理手順、シーケンス、フローチャートなどは、矛盾の無い限り、順序を入れ替えてもよい。例えば、本開示において説明した方法については、例示的な順序を用いて様々なステップの要素を提示しており、提示した特定の順序に限定されない。
 入出力された情報等は特定の場所(例えば、メモリ)に保存されてもよいし、管理テーブルを用いて管理してもよい。入出力される情報等は、上書き、更新、又は追記され得る。出力された情報等は削除されてもよい。入力された情報等は他の装置へ送信されてもよい。
 判定は、1ビットで表される値(0か1か)によって行われてもよいし、真偽値(Boolean:true又はfalse)によって行われてもよいし、数値の比較(例えば、所定の値との比較)によって行われてもよい。
 本開示において説明した各態様/実施形態は単独で用いてもよいし、組み合わせて用いてもよいし、実行に伴って切り替えて用いてもよい。また、所定の情報の通知(例えば、「Xであること」の通知)は、明示的に行うものに限られず、暗黙的(例えば、当該所定の情報の通知を行わない)ことによって行われてもよい。
 ソフトウェアは、ソフトウェア、ファームウェア、ミドルウェア、マイクロコード、ハードウェア記述言語と呼ばれるか、他の名称で呼ばれるかを問わず、命令、命令セット、コード、コードセグメント、プログラムコード、プログラム、サブプログラム、ソフトウェアモジュール、アプリケーション、ソフトウェアアプリケーション、ソフトウェアパッケージ、ルーチン、サブルーチン、オブジェクト、実行可能ファイル、実行スレッド、手順、機能などを意味するよう広く解釈されるべきである。
 また、ソフトウェア、命令、情報などは、伝送媒体を介して送受信されてもよい。例えば、ソフトウェアが、有線技術(同軸ケーブル、光ファイバケーブル、ツイストペア、デジタル加入者回線(DSL:Digital Subscriber Line)など)及び無線技術(赤外線、マイクロ波など)の少なくとも一方を使用してウェブサイト、サーバ、又は他のリモートソースから送信される場合、これらの有線技術及び無線技術の少なくとも一方は、伝送媒体の定義内に含まれる。
 本開示において説明した情報、信号などは、様々な異なる技術のいずれかを使用して表されてもよい。例えば、上記の説明全体に渡って言及され得るデータ、命令、コマンド、情報、信号、ビット、シンボル、チップなどは、電圧、電流、電磁波、磁界若しくは磁性粒子、光場若しくは光子、又はこれらの任意の組み合わせによって表されてもよい。
 また、本開示において説明した情報、パラメータなどは、絶対値を用いて表されてもよいし、所定の値からの相対値を用いて表されてもよいし、対応する別の情報を用いて表されてもよい。
 上述したパラメータに使用する名称はいかなる点においても限定的な名称ではない。さらに、これらのパラメータを使用する数式等は、本開示で明示的に開示したものと異なる場合もある。様々な情報要素は、あらゆる好適な名称によって識別できるので、これらの様々な情報要素に割り当てている様々な名称は、いかなる点においても限定的な名称ではない。
 本開示において使用する「に基づいて」という記載は、別段に明記されていない限り、「のみに基づいて」を意味しない。言い換えれば、「に基づいて」という記載は、「のみに基づいて」と「に少なくとも基づいて」の両方を意味する。
 本開示において使用する「第1の」、「第2の」などの呼称を使用した要素へのいかなる参照も、それらの要素の量又は順序を全般的に限定しない。これらの呼称は、2つ以上の要素間を区別する便利な方法として本開示において使用され得る。したがって、第1及び第2の要素への参照は、2つの要素のみが採用され得ること、又は何らかの形で第1の要素が第2の要素に先行しなければならないことを意味しない。
 本開示において、「含む(include)」、「含んでいる(including)」及びそれらの変形が使用されている場合、これらの用語は、用語「備える(comprising)」と同様に、包括的であることが意図される。さらに、本開示において使用されている用語「又は(or)」は、排他的論理和ではないことが意図される。
 本開示において、例えば、英語でのa, an及びtheのように、翻訳により冠詞が追加された場合、本開示は、これらの冠詞の後に続く名詞が複数形であることを含んでもよい。
 本開示において、「AとBが異なる」という用語は、「AとBが互いに異なる」ことを意味してもよい。なお、当該用語は、「AとBがそれぞれCと異なる」ことを意味してもよい。「離れる」、「結合される」などの用語も、「異なる」と同様に解釈されてもよい。
 10…モデル生成装置、11…ペア情報取得部、12…教師データ生成部、13…モデル生成部、20…質問生成装置、21…受付部、22…解析部、23…質問文生成部、24…質問文選定部、25…質問文補正部、26…提示部、M…質問生成モデル。

Claims (5)

  1.  ユーザの入力文を解析することにより、文の内容に関する予め定められた複数の分類のうち、前記入力文に含まれると特定又は推定される一以上の第1分類を抽出する解析部と、
     前記複数の分類のうちから前記一以上の第1分類を除外することにより残った一以上の第2分類と、前記入力文と、に基づいて、前記入力文及び各前記第2分類に応じた一以上の質問文を生成する質問文生成部と、
     前記質問文生成部によって複数の質問文が生成された場合に、前記入力文と前記複数の質問文とに基づいて、前記複数の質問文のうちから前記ユーザに提示する質問文を選定する質問文選定部と、
    を備える質問生成装置。
  2.  前記解析部は、前記入力文に一の疑問詞に対応する固有表現が含まれる場合に、前記一の疑問詞に対応する分類を前記第1分類として抽出する、請求項1に記載の質問生成装置。
  3.  前記質問文選定部は、前記質問文生成部により生成された各前記質問文と前記入力文との類似度を算出し、前記入力文との類似度がより低い前記質問文をより優先的に、前記ユーザに提示する質問文として選定する、請求項1又は2に記載の質問生成装置。
  4.  前記質問文選定部は、前記入力文に各前記第2分類に関する内容が含まれる確率を算出し、前記確率がより低い第2分類に対応する前記質問文をより優先的に、前記ユーザに提示する質問文として選定する、請求項1又は2に記載の質問生成装置。
  5.  前記質問文生成部により生成された前記質問文と前記入力文とを比較し、固有表現の分類が互いに同一である、前記質問文に含まれる第1単語及び前記入力文に含まれる第2単語が抽出された場合に、前記第1単語を前記第2単語に置換する質問文補正部を更に備える、請求項1~4のいずれか一項に記載の質問生成装置。
PCT/JP2021/046101 2021-02-24 2021-12-14 質問生成装置 WO2022180990A1 (ja)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2023502089A JPWO2022180990A1 (ja) 2021-02-24 2021-12-14

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2021027207 2021-02-24
JP2021-027207 2021-02-24

Publications (1)

Publication Number Publication Date
WO2022180990A1 true WO2022180990A1 (ja) 2022-09-01

Family

ID=83048016

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2021/046101 WO2022180990A1 (ja) 2021-02-24 2021-12-14 質問生成装置

Country Status (2)

Country Link
JP (1) JPWO2022180990A1 (ja)
WO (1) WO2022180990A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7423111B1 (ja) 2023-07-31 2024-01-29 SurpassOne株式会社 学習材生成システム、学習材生成方法、及び学習材生成プログラム

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006018622A (ja) * 2004-07-02 2006-01-19 Sony Corp 情報処理システム、情報処理装置および情報処理方法、プログラム、並びに記録媒体
JP2020064419A (ja) * 2018-10-16 2020-04-23 日本電信電話株式会社 発話生成装置、方法、及びプログラム

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006018622A (ja) * 2004-07-02 2006-01-19 Sony Corp 情報処理システム、情報処理装置および情報処理方法、プログラム、並びに記録媒体
JP2020064419A (ja) * 2018-10-16 2020-04-23 日本電信電話株式会社 発話生成装置、方法、及びプログラム

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
HIGASHINAKA, RYUICHIRO, MASUMURA, RYO: "Application of deep learning in dialogue systems", JOURNAL OF JAPANESE SOCIETY FOR ARTIFICIAL INTELLIGENCE, vol. 34, no. 4, 1 July 2019 (2019-07-01), pages 460 - 466, XP009539244, ISSN: 2188-2266 *
YUICHI SASAZAWA, SHO TAKASE, NAOMI OKAZAKI: "Omission completion of interactive question answering", PROCEEDINGS OF TWENTY-FIFTH ANNUAL MEETING OF THE ASSOCIATION FOR NATURAL LANGUAGE PROCESSING; MARCH 12-15, 2019, ASSOCIATION FOR NATURAL LANGUAGE PROCESSING, JP, 4 March 2019 (2019-03-04) - 15 March 2019 (2019-03-15), JP, pages 163 - 166, XP009539403 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7423111B1 (ja) 2023-07-31 2024-01-29 SurpassOne株式会社 学習材生成システム、学習材生成方法、及び学習材生成プログラム

Also Published As

Publication number Publication date
JPWO2022180990A1 (ja) 2022-09-01

Similar Documents

Publication Publication Date Title
US11748232B2 (en) System for discovering semantic relationships in computer programs
US10796105B2 (en) Device and method for converting dialect into standard language
CN107644011B (zh) 用于细粒度医疗实体提取的系统和方法
CN1457041B (zh) 为一个自然语言理解系统用来自动注解训练数据的一个系统
CN110580308B (zh) 信息审核方法及装置、电子设备、存储介质
CN111680159A (zh) 数据处理方法、装置及电子设备
US10460028B1 (en) Syntactic graph traversal for recognition of inferred clauses within natural language inputs
US10977155B1 (en) System for providing autonomous discovery of field or navigation constraints
US20220147835A1 (en) Knowledge graph construction system and knowledge graph construction method
US11941361B2 (en) Automatically identifying multi-word expressions
CN111930792A (zh) 数据资源的标注方法、装置、存储介质及电子设备
US10650195B2 (en) Translated-clause generating method, translated-clause generating apparatus, and recording medium
CN113486178A (zh) 文本识别模型训练方法、文本识别方法、装置以及介质
WO2022180990A1 (ja) 質問生成装置
WO2022180989A1 (ja) モデル生成装置及びモデル生成方法
CN111552780B (zh) 医用场景的搜索处理方法、装置、存储介质及电子设备
CN114068028A (zh) 医疗问诊数据处理方法及装置、可读存储介质及电子设备
Yu et al. Leveraging rich annotations to improve learning of medical concepts from clinical free text
CN117236347B (zh) 交互文本翻译的方法、交互文本的显示方法和相关装置
CN112733492B (zh) 基于知识库的辅助设计方法、装置、终端和存储介质
WO2022130940A1 (ja) 提示装置
EP4060644A1 (en) Character input device, character input method, and character input program
US12008026B1 (en) Determining repair instructions in response to natural language queries
WO2023032100A1 (ja) 文書作成支援装置、文書作成支援方法、及びプログラム
Wachowiak Introduction to Text Analysis In R

Legal Events

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

Ref document number: 21928083

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2023502089

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21928083

Country of ref document: EP

Kind code of ref document: A1