Sentence generation using pre-trained model with word importance and focus point
A sentence generation device has: an estimation unit for receiving input of a first sentence and a focus point related to generation of a second sentence to be generated based on the first sentence, and estimating importance of each word constituting the first sentence using a pre-trained model; and a generation unit for generating the second sentence based on the importance, and thus makes it possible to evaluate importance of a constituent element of an input sentence in correspondence with a designated focus point.
1. A sentence generation learning device comprising a processor configured to execute operations comprising:
receiving input of a first sentence and a focus point related to generation of a second sentence to be generated based on the first sentence, wherein the focus point as represented in character string form is distinct from the first sentence and a part of the first sentence;
estimating importance of each word constituting the first sentence using a machine learning model according to the focus point;
generating the second sentence based on the importance; and
learning a parameter of the machine learning model using:
a first error between the estimated importance of a word according to the focus point and a label indicating whether or not the word is included in an output sentence that is a correct answer, and
a second error between the generated second sentence and the output sentence that is the correct answer.
2. The sentence generation learning device according to claim 1 , wherein the machine learning model includes a model trained using training data, and the training data include an input sentence, the output sentence, the focus point, and the label.