WO2023079911A1 - Sentence generation model generator, sentence generation model, and sentence generator - Google Patents

Sentence generation model generator, sentence generation model, and sentence generator Download PDF

Info

Publication number
WO2023079911A1
WO2023079911A1 PCT/JP2022/037899 JP2022037899W WO2023079911A1 WO 2023079911 A1 WO2023079911 A1 WO 2023079911A1 JP 2022037899 W JP2022037899 W JP 2022037899W WO 2023079911 A1 WO2023079911 A1 WO 2023079911A1
Authority
WO
WIPO (PCT)
Prior art keywords
sentence
data
input
output
word
Prior art date
Application number
PCT/JP2022/037899
Other languages
French (fr)
Japanese (ja)
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ドコモ
Publication of WO2023079911A1 publication Critical patent/WO2023079911A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/40Processing or translation of natural language
    • G06F40/42Data-driven translation
    • G06F40/44Statistical methods, e.g. probability models

Definitions

  • the present invention relates to a sentence generation model generation device, a sentence generation model, and a sentence generation device.
  • Patent Literature 1 discloses a technique of generating a document corresponding to an input document using a machine learning model.
  • Ordinary translation engines and scoring engines which consist of models learned based on input sentences and their parallel translations, output parallel sentences that correspond in semantic content, so parallel sentences using specific expressions are output. I could't. For example, when a machine-learned model is applied to a correction and scoring engine, even if the parallel translation input by the user is correct regarding the use of the desired specific expression, there is an error in the part other than the specific expression. If there was, there was a case where it was corrected based on the parallel translation unrelated to the specific expression.
  • the present invention has been made in view of the above problems, and it is an object of the present invention to obtain an output sentence in a second language using specific expressions in response to an input sentence in the first language.
  • a sentence generation model generation device is a sentence generation model generation device that generates an output sentence in a second language different from the first language in response to an input sentence in the first language.
  • a sentence generative model generating device for generating a generative model by machine learning, wherein the sentence generative model is an encoder-decoder model including a neural network and composed of an encoder and a decoder, and is used for machine learning of the sentence generative model.
  • the data includes first data, constraint data and second data, the first data including an array of a plurality of words forming an input sentence, and the second data comprising a plurality of words forming an output sentence corresponding to the input sentence.
  • the sentence generation model generation device includes an encoder input unit that inputs the first data to the encoder according to the arrangement order of the words, constraint data, and start A decoder input unit for inputting symbols and words constituting the second data to the decoder according to the order of arrangement, an arrangement of words output from the decoder after the input of the start symbol, and included in the second data
  • An updating unit that updates weighting coefficients constituting the encoder and decoder based on the error of each word from the word array, and a model output unit that outputs a sentence generation model with the weighting coefficients updated by the updating unit.
  • the sentence generation model is composed of an encoder-decoder model including an encoder and a decoder. Constraints identified from the sequence of words forming an output sentence in training of a sentence generation model in which first data corresponding to an input sentence is input to an encoder and second data corresponding to an output sentence is input to a decoder Constraint data including one or more words is input to the decoder along with the second data. The arrangement order of the constraint words in the constraint data maintains the arrangement order of the word arrangement. By inputting to the decoder constraint data specifying words constituting a desired specific expression as constraint words, the sentence generation model learns the relationship between the constraint data and the second data. A sentence generation model can be obtained that outputs an output sentence using a specific expression consisting of contained constraint words.
  • FIG. 1 is a block diagram showing a functional configuration of a sentence generative model generation device of this embodiment;
  • FIG. It is a block diagram which shows the functional structure of the sentence production
  • It is a hardware block diagram of a sentence generation model generation device and a sentence generation device.
  • It is a figure which shows the structure of a sentence generation model.
  • It is a figure which shows an example of the production
  • FIG. 3 is a diagram for explaining a schematic configuration of a Transformer, which is an example of an encoder-decoder model; It is a figure which shows typically the sentence production
  • FIG. 13 is a diagram showing the configuration of the sentence generation model generation program.
  • FIG. 14 is a diagram showing the configuration of the sentence generation program.
  • the sentence generation model of the present embodiment is constructed by machine learning to cause a computer to function and generate an output sentence in a second language different from the first language in response to an input sentence in the first language.
  • the sentence generation model includes a neural network and is composed of an encoder-decoder model including an encoder and a decoder.
  • the sentence generation model generation device of this embodiment is a device that generates a sentence generation model by machine learning.
  • a sentence generation device is a device that generates an output sentence in a second language according to an input sentence in a first language using a sentence generation model constructed by machine learning.
  • FIG. 1 is a diagram showing the functional configuration of the sentence generative model generation device according to this embodiment.
  • the sentence generation model generation device 10 is a device that generates, by machine learning, a sentence generation model that generates an output sentence in a second language different from the first language according to an input sentence in the first language.
  • the sentence generative model generation device 10 functionally includes a constraint data generation unit 11 , an encoder input unit 12 , a decoder input unit 13 , an update unit 14 and a model output unit 15 .
  • Each of these functional units 11 to 15 may be configured in one device, or may be configured by being distributed in a plurality of devices.
  • the sentence generation model generation device 10 is configured to be able to access storage means such as the model storage unit 30 and the corpus storage unit 40 .
  • the model storage unit 30 and the corpus storage unit 40 may be configured within the sentence generative model generation device 10, or as shown in FIG. It may be configured as a separate accessible device.
  • the model storage unit 30 is storage means that stores sentence generation models such as those that have been learned or that are in the process of learning, and can be composed of storage, memory, and the like.
  • the corpus storage unit 40 is storage means for storing learning data used for machine learning of the sentence generation model and a corpus for generating the learning data. can.
  • FIG. 2 is a diagram showing the functional configuration of the sentence generation device according to this embodiment.
  • the sentence generation device 20 is a device that uses a sentence generation model built by machine learning to generate an output sentence in a second language different from the first language in response to an input sentence in the first language.
  • the sentence generation device 20 functionally includes an input unit 21, a constraint data input unit 22, a word input unit 23, and an output unit 24.
  • the sentence generation device 20 may further include a created sentence acquisition unit 25 , a created sentence input unit 26 and a created sentence evaluation unit 27 .
  • Each of these functional units 21 to 27 may be configured in one device, or may be configured by being distributed in a plurality of devices.
  • the sentence generation device 20 is configured to be able to access the model storage unit 30 that stores learned sentence generation models.
  • the model storage unit 30 may be configured within the sentence generation device 20, or may be configured in another external device.
  • sentence generation model generation device 10 and the sentence generation device 20 are configured in different devices (computers), but they may be integrated.
  • 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
  • a functional block (component) that performs transmission is called a transmitting unit or transmitter.
  • the implementation method is not particularly limited.
  • the sentence generative model generation device 10 and the sentence generation device 20 in one embodiment of the present invention may function as computers.
  • FIG. 3 is a diagram showing an example of the hardware configuration of the sentence generative model generation device 10 and the sentence generation device 20 according to this embodiment.
  • the sentence generation model generation device 10 and the sentence generation device 20 are each 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.
  • the term "apparatus” can be read as a circuit, device, unit, or the like.
  • the hardware configuration of the sentence generation model generation device 10 and the sentence generation device 20 may be configured to include one or more of each device shown in the figure, or may be configured without some devices. good.
  • Each function of the sentence generation model generation device 10 and the sentence generation device 20 is executed by the processor 1001 by loading predetermined software (program) onto hardware such as the processor 1001 and the memory 1002, and by the communication device 1004. It is realized by controlling communication, reading and/or writing of data in the memory 1002 and storage 1003 .
  • the processor 1001 for example, operates an operating system and controls the entire computer.
  • the processor 1001 may be configured with 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 functional units 11 to 15 and 21 to 27 shown in FIGS. 1 and 2 may be realized by the processor 1001.
  • FIG. 1 the functional units 11 to 15 and 21 to 27 shown in FIGS. 1 and 2 may be realized by the processor 1001.
  • the processor 1001 also reads programs (program codes), software modules and data from the storage 1003 and/or the communication device 1004 to the memory 1002, and executes various processes according to them.
  • programs program codes
  • software modules software modules
  • data data from the storage 1003 and/or the communication device 1004 to the memory 1002, and executes various processes according to them.
  • the program a program that causes a computer to execute at least part of the operations described in the above embodiments is used.
  • the functional units 11 to 15 and 21 to 27 of the sentence generation model generation device 10 and the sentence generation device 20 may be stored in the memory 1002 and implemented by a control program running on the processor 1001 .
  • the above-described various processes are executed by one processor 1001, they may be executed by two or more processors 1001 simultaneously or sequentially.
  • Processor 1001 may be implemented with 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 the sentence generation model generation method and the sentence generation method according to an embodiment of the present invention.
  • 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 memory 1002 and/or storage 1003 .
  • the communication device 1004 is hardware (transmitting/receiving device) for communicating between computers via a wired and/or wireless network, and is also called a network device, network controller, network card, communication module, etc., for example.
  • 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 composed of a single bus, or may be composed of different buses between devices.
  • the sentence generation model generation device 10 and the sentence generation device 20 include a microprocessor, a digital signal processor (DSP), an ASIC (Application Specific Integrated Circuit), a PLD (Programmable Logic Device), and an FPGA (Field Programmable Gate Array). ), and the hardware may implement part or all of each functional block.
  • processor 1001 may be implemented with at least one of these hardware.
  • FIG. 4 is a diagram showing the configuration of the sentence generation model of this embodiment.
  • the sentence generation model MD is an encoder-decoder model including a neural network and composed of an encoder en and a decoder de.
  • a neural network that configures the encoder-decoder model is not limited, but is, for example, a recurrent neural network (RNN).
  • the sentence generation model MD may be a neural network called a transformer.
  • the learning data used for machine learning of the sentence generation model MD of this embodiment includes first data a, second data b, and constraint data c.
  • the first data a includes an arrangement of a plurality of words forming an input sentence in the first language.
  • the second data b includes an arrangement of a plurality of words forming an output sentence in the second language corresponding to the input sentence.
  • the output sentence is, for example, a parallel translation of the input sentence.
  • the constraint data c is data containing one or more constraint words, which are words specified from the arrangement of words forming the second data b.
  • the arrangement order of the constraint words in the constraint data c maintains the arrangement order of the words in the second data b.
  • the first data a that constitutes the input sentence in the first language is input to the encoder en.
  • the first data a is divided into words by, for example, morphological analysis. Each divided word is converted (embedded) into a corresponding word vector and input to the encoder en according to the arrangement order in the first data a (input sentence).
  • the encoder en outputs to the decoder de a vector indicating the result of calculation based on the first data a (for example, the output of the hidden layer, the source target attention, etc.).
  • the decoder sequentially outputs a sequence of words based on the input of a vector from the encoder and a predetermined start symbol (vector) that indicates the start of the output.
  • the constraint data c is input to the decoder de of the sentence generation model MD of the present embodiment before the start symbol ss is input.
  • the decoder de outputs a sequence of words (vectors) of the output sentence t based on the output from the encoder en, the constraint data c and the input of the start symbol ss.
  • the output sentence t is composed of the sequence of words output up to that point.
  • the second data b corresponding to the output sentence (parallel translation of the input sentence in the second language) corresponding to the first data a (input sentence) is obtained word by word after the start symbol ss is input. It is input to the decoder de according to the arrangement order.
  • the constraint data c is data in which the constraint words, which are words specified from the arrangement of words forming the second data b, are included while maintaining the arrangement order of the words of the second data c.
  • the generation and the like of the constraint data c will be described in detail later, but the constraint data c is a constraint data in which words or word strings other than the constraint words in the array of words forming the output sentence are replaced with predetermined replacement symbols. It may be data consisting of an array of words and replacement symbols.
  • the functional units of the sentence generative model generation device 10 will be described with reference to FIG. 1 again.
  • the constraint data generator 11 generates constraint data based on the corpus. Generation of constraint data and learning data including the constraint data will be described with reference to FIGS. 5 and 6. FIG.
  • FIG. 5 is a diagram showing an example of generating first data, second data, and constraint data based on a corpus.
  • the constraint data generation unit 11 acquires the corpus cp0 from the corpus storage unit 40, for example.
  • the corpus cp0 consists of a first sentence cp01 written in the first language and a second sentence cp02 written in the second language.
  • the first sentence cp01 is the Japanese sentence "He studies English so that he can speak to foreigners (kare ha gaikokujin to hanaseruyoninarutameni eigo wo benkyo suru)".
  • the second sentence cp02 is a sentence "He studies English so that he can talk with foreigners.”
  • the constraint data generation unit 11 identifies the constraint word cx from the array of words forming the second sentence cp02.
  • the specification of the constraint word may be based on, for example, a specified input by a user or the like. For example, a word that constitutes an expression that should be used in the second sentence cp02 as a parallel translation of the first sentence cp01 may be specified as a constraint word by specifying input. Also, the specification of the constraint word may be performed at random. In the example shown in FIG. 5, three words or word strings of "He", "so that", and "talk with” are specified as the constraint word cx.
  • the constraint data generation unit 11 Based on the identified constraint word cx, the constraint data generation unit 11 generates constraint data c01 that includes the constraint word cx while maintaining the order of words in the second sentence. As shown in FIG. 5, the constraint data c01 is data containing "He", "so that", and "talk with” while maintaining the arrangement order in the second sentence cp02.
  • the constraint data may be data consisting of an arrangement of constraint words and replacement symbols, in which words or word strings other than the constraint words in the arrangement of words forming the output sentence are replaced with predetermined replacement symbols.
  • the constraint data generation unit 11 replaces words or word strings other than the word specified as the constraint word cx in the word array forming the second sentence cp02 with the replacement symbol rs, and produces the constraint word cx and the replacement symbol Generate constraint data c01 consisting of an array of rs. In the example shown in FIG.
  • the replacement symbol rs is indicated by "* (asterisk)", and the constraint data generation unit 11 generates three constraint words cx "He", “so that", "talk with” and replacement symbol rs generate constraint data c01 "He * so that * talk with *” arranged while maintaining the arrangement order in the second sentence cp02.
  • the constraint data generation unit 11 generates the first data a01 and the second data b01 in the learning data based on the first sentence cp01 and the second sentence cp02, respectively.
  • Learning data consisting of c01, start symbol ss, and second data b01 is generated.
  • the constraint data generation unit 11 may include information indicating the relationship with the second data b01 in the constraint data.
  • the constraint data generator 11 includes a symbol cl01 in the constraint data c01 indicating that the constraint data c01 contains the constraint word cx to be used in the second data b01 (output sentence).
  • the constraint data can be easily generated based on the corpus, thus preventing an increase in cost for obtaining learning data including the constraint data.
  • FIG. 6 is a diagram showing an example of the first data, second data, and constraint data used for learning the sentence generation model.
  • the learning data for the sentence generation model MD may include, as first data, arbitrary symbols, which are predetermined symbols having no linguistic meaning and content, instead of the arrangement of a plurality of words forming the input sentence.
  • the learning data includes first data consisting of arbitrary symbols a03 having no semantic content, and constraint data c03 containing constraint words specified as expressions to be used in output sentences in the second language. and b03 consisting of an output sentence in the second language.
  • the constraint data generation unit 11 Based on the corpus of sentence examples in the second language, the constraint data generation unit 11 generates constraint data c03 including the constraint word specified from the arrangement of the words forming the sentence example in the same manner as in the example of FIG.
  • Data for learning may be generated by extracting as second data b03 and adding an arbitrary symbol a03.
  • the decoder can learn the relationship between the constraint data and the second data. can be done. Therefore, it is possible to expand the learning data at a low cost, and to improve the accuracy of the desired output of the output sentence output by the decoder.
  • the encoder input unit 12 inputs the first data a to the encoder en according to the arrangement order of the words.
  • the decoder input unit 13 inputs the constraint data c, the start symbol ss, which is a predetermined symbol indicating the start of output of the output sentence, and the second data b to the decoder de word by word according to the arrangement order.
  • the updating unit 14 updates the encoder en and the decoder de based on the error for each word between the word array output from the decoder de after the input of the start symbol ss and the word array included in the second data b. update the weighting factors that make up
  • the encoder input unit 12 puts the word vectors of the words that make up the first data a into the input layer of the RNN that makes up the encoder en in word order. Input in order according to The output of the hidden layer of the encoder en based on the input of the last word vector of the first data a is output to the decoder de.
  • RNN recurrent neural network
  • the decoder input unit 13 sequentially inputs the word vectors of the words that make up the constraint data c into the input layer of the RNN that makes up the decoder de according to the word order. Further, the decoder input unit 13 sequentially inputs the start symbol ss and the second data b to the decoder de according to word order. When the start symbol ss is input to the decoder de, the decoder de sequentially outputs the sequence of word vectors of the output sentence t together with the likelihood (for example, by the softmax function).
  • the update unit 14 calculates an error for each word between the word sequence output from the decoder de and the word sequence of the second data b, and constructs a neural network of the encoder en and the decoder de by, for example, the error back propagation method. update the weighting factors to
  • FIG. 7 is a diagram for explaining the schematic configuration of a transformer, which is an example of an encoder-decoder model.
  • the encoder input unit 12 when the sentence generation model MD1 (MD) is composed of a transformer, the encoder input unit 12 generates word vectors aw11, aw12, . (n is an integer equal to or greater than 2) is input to the input layer ila of the encoder en1 according to the arrangement order of the words.
  • Transformers allow parallel processing of incoming data rather than sequential word entry as in RNNs.
  • the encoder en1 calculates the self-attention sa1 from the input layer ila to the middle layer mla, and converts the word vector into a vector corresponding to the self-attention sa1. Similarly, the self-attention sa2 from the middle layer mla to the output layer ola is calculated and the word vector is further transformed. Further, the source-target attention ta for the input layer ilb of the decoder de1 from the output layer ola of the encoder en1 is calculated.
  • the decoder input unit 13 receives word vectors cw11, . , . . . , bw1n (where n is an integer equal to or greater than 2) are input in parallel to the input layer ilb of the decoder de1 in the learning phase according to the arrangement order of the words.
  • the self-attention sa3 from the input layer ilb to the intermediate layer mlb is calculated, and the vector is converted according to the self-attention sa3.
  • the self-attention sa4 for the output layer olb is calculated from the intermediate layer mlb, and vector conversion is performed according to the self-attention sa4.
  • t1n (where n is an integer equal to or greater than 2) based on the word vector wv output after the input of the start symbol ss, and the words constituting the second data b1.
  • the model output unit 15 outputs the sentence generation model MD obtained after machine learning based on the required amount of learning data.
  • the model output unit 15 may cause the model storage unit 30 to store the sentence generation model MD.
  • FIG. 8 is a diagram schematically showing sentence generation processing by the sentence generation model.
  • the sentence generation model MD2 is a model learned and constructed by the sentence generation model generation device 10.
  • the sentence generation model MD2 includes an encoder en2 and a decoder de2.
  • the sentence generation model MD (MD1, MD2), which is a model including a trained neural network, is read or referred to by a computer, and is regarded as a program that causes the computer to execute predetermined processing and realize predetermined functions. can be done.
  • the trained sentence generation models MD (MD1, MD2) of this embodiment are used in a computer having a processor and memory.
  • the processor of the computer responds to the input data input to the input layer of the neural network according to instructions from the learned sentence generation models MD (MD1, MD2) stored in the memory, and corresponds to each layer. It operates to perform calculations based on learned weighting coefficients (parameters) and functions, and to output results (likelihoods) from the output layer.
  • the input unit 21 inputs words aw21, aw22, .
  • the encoder en2 outputs the calculation result to the decoder de2.
  • the constraint data input unit 22 inputs the symbol ct2, the words cw21 to cw24, .
  • the input constraint data c2 is data containing an input constraint word arbitrarily specified as a word to be used in an output sentence.
  • the input constraint words are included in the input constraint data c2 while maintaining the arrangement order of the words in the output sentence.
  • the identification of the input constraint word may be based on, for example, a specified input by a user or the like.
  • the input constraint data c2 is data consisting of an array of input constraint words and replacement symbols in which words or word strings other than the input constraint words in the word array constituting the output sentence are replaced with predetermined replacement symbols rs.
  • the input constraint data c2 are words or word strings such as "He” and "so that", and the replacement symbol rs "* (asterisk)" is Consists of data arranged in order.
  • the input constraint data c2 may include the symbol ct2.
  • Symbol ct2 indicates, for example, that input constraint data c2 is data containing an input constraint word to be used in output sentence t2.
  • the word input unit 23 inputs the start symbol ss to the decoder de2 after the input of the input constraint data c2.
  • the decoder de2 outputs a word tw21 at the beginning of the output sentence t2 according to the start symbol ss.
  • the word input unit 23 sequentially inputs the words output from the decoder de2 in the previous stage to the decoder de2.
  • the decoder de2 sequentially outputs a series of words tw21, tw22, .
  • the output unit 24 arranges the words tw21, tw22, . Generate t2. Then, the output unit 24 outputs the generated output sentence t2.
  • the form of output of the output sentence t2 is not limited, but may be, for example, storage in a predetermined storage means, display on a display means, output by voice, or the like.
  • FIG. 9 is a diagram showing an example of input constraint data and an output sentence that can be output based on the input constraint data.
  • the input sentence "He studies English so that he can speak to foreigners (kare ha gaikokujin to hanaseruyoninarutameni eigo wo benkyo suru)" is input to encoder en2 as input data a2. do. If this input sentence is translated by a normal translation engine without any restrictions, for example, the output sentence "He studies English to become able to speak with foreigners.”
  • different output sentences can be output according to the input constraint data input to the decoder de2.
  • FIG. 10 is a diagram showing processing for evaluating a created sentence in the evaluation system configured by the sentence generation device 20. As shown in FIG.
  • tw3n (where n is an integer of 2 or more) output at each stage after the start symbol ss is input, the decoder de3 shown in FIG. For each word, output the likelihood that indicates the likelihood of .
  • the evaluation system configured by the sentence generation device 20 evaluates the created sentence created and input by the user with the output sentence t3 as the correct answer.
  • the user inputs, for example, a parallel translation of the input sentence in the second language as a created sentence.
  • the created sentence acquisition unit 25 acquires the created sentence r3 that was created in the second language by the user and entered into the evaluation system.
  • the created sentence r3 consists of an array of words rw31, rw32, .
  • the composed sentence input unit 26 replaces the words tw31, tw32, .
  • the decoder de3 outputs the likelihood of each word of the entire vocabulary handled by the sentence generation model generation device 10 and the sentence generation device 20 at each output stage.
  • the output sentence t3 is constructed by arranging the words with the highest likelihood at each output stage.
  • the created sentence evaluation unit 27 evaluates the likelihood of each vocabulary output according to the input of the start symbol ss and the words (rw31, rw32, . . . , rw3n) output at the previous stage. , rw3n, the likelihood associated with each word rw31, rw32, .
  • the created sentence evaluation unit 27 compares the likelihood of each word tw31, tw32, . By doing so, the evaluation value of the created sentence r3 is calculated and output.
  • the method of calculating the evaluation value is not limited, it may be based on, for example, the ratio of the likelihoods for each word in each sentence t3 and r3, and the sum or average of the likelihoods for each sentence t3 and r3.
  • each word obtained by sequentially inputting the likelihood of each word forming an output sentence and each word forming a prepared and input prepared sentence into a decoder The constructed sentence is evaluated based on the contrast with the likelihood of . This makes it possible to configure an evaluation system that evaluates the likelihood of a created sentence as a parallel translation corresponding to an input sentence.
  • FIG. 11 is a flow chart showing the processing contents of the sentence generative model generation method in the sentence generative model generation device 10.
  • step S1 the sentence generative model generation device 10 acquires learning data including first data a, second data b, and constraint data c.
  • the constraint data in the learning data may be data generated in advance based on the corpus and stored in the corpus storage unit 40, or may be data generated by the constraint data generation unit 11 based on the corpus. good.
  • step S2 the first data a is input to the encoder en according to the arrangement order of the words.
  • step S3 the decoder input unit 13 inputs the constraint data c to the decoder de. Subsequently, in step S4, the decoder input unit 13 inputs the start symbol ss to the decoder de. Furthermore, in step S5, the decoder input unit 13 inputs the second data b to the decoder de word by word in accordance with the arrangement order.
  • step S6 the update unit 14 calculates the error for each word between the word array output from the decoder de after the input of the start symbol ss and the word array included in the second data b.
  • Backpropagation updates the weighting factors that make up the encoder en and the decoder de.
  • step S7 the update unit 14 determines whether or not machine learning based on the required amount of learning data has been completed. If it is determined that learning has ended, the process proceeds to step S8. On the other hand, if it is determined that the learning has not ended, the processing of steps S1 to S6 is repeated.
  • step S8 the model output unit 15 outputs the learned sentence generation model MD.
  • FIG. 12 is a flow chart showing the processing contents of the sentence generation method using the learned sentence generation model MD in the sentence generation device 20.
  • FIG. 12 is a flow chart showing the processing contents of the sentence generation method using the learned sentence generation model MD in the sentence generation device 20.
  • step S11 the input unit 21 inputs the words of the input data that make up the input sentence to the encoder of the sentence generation model according to the arrangement order for each word.
  • the encoder outputs the calculation result to the decoder according to the input of the input data.
  • step S12 the constraint data input unit 22 inputs the input constraint data to the decoder for each word according to the arrangement order. Subsequently, in step S13, the word input unit 23 inputs the start symbol ss to the decoder after inputting the input constraint data.
  • step S14 the output unit 24 acquires the word (or symbol) output from the output layer of the decoder.
  • step S15 the output unit 24 determines whether or not the output from the decoder is a terminal symbol indicating the end of the output sentence. If the output from the decoder is determined to be a terminal symbol, the process proceeds to step S17. On the other hand, if the output from the decoder is not determined to be a terminal symbol, the process proceeds to step S16.
  • step S16 the word input unit 23 inputs the word output from the previous-stage output layer of the decoder to the current-stage input layer of the decoder. Then, the process returns to step S14.
  • step S17 the output unit 24 arranges the words sequentially output from the output layer at each stage of the decoder to generate an output sentence. Then, in step S18, the output unit 24 outputs the output sentence.
  • FIG. 13 is a diagram showing the configuration of the sentence generation model generation program.
  • the sentence generative model generation program P1 includes a main module m10 for overall control of sentence generative model generation processing in the sentence generative model generation device 10, a constraint data generation module m11, an encoder input module m12, a decoder input module m13, an update module m14, and It is configured with a model output module m15.
  • Each of the modules m11 to m15 implements the functions of the constraint data generation unit 11, the encoder input unit 12, the decoder input unit 13, the update unit 14, and the model output unit 15.
  • FIG. 13 is a diagram showing the configuration of the sentence generation model generation program.
  • the sentence generative model generation program P1 includes a main module m10 for overall control of sentence generative model generation processing in the sentence generative model generation device 10, a constraint data generation module m11, an encoder input module m12, a decoder input module m13, an update module m14, and It
  • the sentence generation model generation program P1 may be transmitted via a transmission medium such as a communication line, or may be stored in a recording medium M1 as shown in FIG. good.
  • FIG. 14 is a diagram showing the configuration of the sentence generation program.
  • the sentence generation program P2 is composed of a main module m20, an input module m21, a constraint data input module m22, a word input module m23, and an output module m24, which collectively control sentence generation processing in the sentence generation device 20.
  • FIG. The sentence generation program P2 may further include a created sentence acquisition module m25, a created sentence input module m26, and a created sentence evaluation module m27. configured with Functions for the input unit 21, the constraint data input unit 22, the word input unit 23, the output unit 24, the created sentence acquisition unit 25, the created sentence input unit 26, and the created sentence evaluation unit 27 are provided by the respective modules m21 to m27. is realized.
  • the sentence generation program P2 may be transmitted via a transmission medium such as a communication line, or may be stored in a recording medium M2 as shown in FIG.
  • the sentence generative model is composed of an encoder-decoder model including an encoder and a decoder. Constraints identified from the sequence of words forming an output sentence in training of a sentence generation model in which first data corresponding to an input sentence is input to an encoder and second data corresponding to an output sentence is input to a decoder Constraint data including one or more words is input to the decoder along with the second data. The arrangement order of the constraint words in the constraint data maintains the arrangement order of the word arrangement.
  • the sentence generation model learns the relationship between the constraint data and the second data.
  • a sentence generation model can be obtained that outputs an output sentence using a specific expression consisting of contained constraint words.
  • the constraint data includes constraint words and It may consist of an array of replacement symbols.
  • the constraint data is composed of the constraint word and the sequence of the substitution symbol substituted from the word or word string other than the constraint word, so that the word corresponding to the constraint word in the second data is output.
  • words corresponding to replacement symbols in the second data are learned as arbitrary expressions in output sentences. Therefore, it is possible to generate a sentence generation model capable of outputting an output sentence using a specific expression composed of constraint words.
  • a sentence generative model generation device provides a corpus consisting of a first sentence composed in a first language and a second sentence that is a parallel translation of the first sentence composed in a second language.
  • a constraint data generation unit that generates constraint data including constraint words identified from the arrangement of words that make up the second sentence based on may be included.
  • constraint data for designating words corresponding to desired specific expressions to be used in output sentences can be obtained as learning data based on the corpus.
  • the constraint data generation unit converts words or word strings other than the words specified as constraint words in the word sequence forming the second sentence into replacement symbols.
  • the replacement may be performed to generate constraint data consisting of an array of constraint words and replacement symbols.
  • a word corresponding to a desired specific expression to be used in an output sentence is specified, and constraint data for specifying an arbitrary expression in the output sentence is obtained as learning data. be able to.
  • the first data is an arbitrary symbol that is a predetermined symbol having no linguistic meaning, instead of the arrangement of a plurality of words constituting the input sentence. It can be a certain thing.
  • the decoder can learn the relationship between the constraint data and the second data. Therefore, it is possible to expand the learning data at a low cost, and to improve the accuracy of the desired output of the output sentence output by the decoder.
  • a sentence generation model operates a computer to generate an output sentence in a second language different from the first language in response to an input sentence in a first language.
  • a sentence generation model that has been learned by machine learning for generating a sentence generation model, and learning data used for machine learning of the sentence generation model includes first data including an array of a plurality of words that constitute an input sentence, an input sentence second data including a sequence of a plurality of words forming an output sentence corresponding to and constraint data, wherein the constraint data includes a constraint word that is a word specified from the sequence of words forming the output sentence including one or more, the arrangement order of the constraint words in the constraint data maintains the arrangement order of the word arrangement, the sentence generation model is an encoder-decoder model that includes a neural network and is composed of an encoder and a decoder, and the first data is input to the encoder according to the arrangement order of the words, and the constraint data, the start symbol, which is a pre
  • the sentence generation model is composed of an encoder-decoder model including an encoder and a decoder.
  • the first data corresponding to the input sentence is input to the encoder
  • the second data corresponding to the output sentence is input to the decoder
  • the sequence of words constituting the output sentence is specified.
  • Constraint data including one or more of the constrained words is input to the decoder together with the second data.
  • the arrangement order of the constraint words in the constraint data maintains the arrangement order of the word arrangement. Relevance between the constraint data and the second data is learned by inputting to the decoder constraint data specifying words constituting a desired specific expression as constraint words. It is possible to output sentences using specific expressions consisting of constraint words contained in data.
  • a sentence generation device uses a sentence generation model constructed by machine learning to generate an input sentence in a first language.
  • a sentence generation device for generating output sentences in different second languages wherein learning data used for machine learning of a sentence generation model includes first data including an array of a plurality of words corresponding to an input sentence, second data including a sequence of a plurality of words corresponding to the corresponding output sentence;
  • the arrangement order of the constraint words in the constraint data maintains the arrangement order of the word arrangement
  • the sentence generation model is an encoder-decoder model that includes a neural network and is composed of an encoder and a decoder
  • the first data is Input to the encoder according to the arrangement order of words, constraint data, a start symbol that is a predetermined symbol signifying the start of output of an output sentence
  • second data are words of the constraint data, the start symbol, and the second data
  • the encoder and the The sentence generator is constructed by machine learning that updates the weighting
  • An arbitrarily specified input constraint word is included while maintaining the arrangement order in the output sentence.
  • a word input unit for sequentially inputting the words output from the decoder at the previous stage into the decoder, and generating an output sentence by arranging the words sequentially output at each stage of the decoder. and an output unit for outputting the generated output sentence.
  • the sentence generation model is composed of an encoder-decoder model including an encoder and a decoder.
  • the first data corresponding to the input sentence is input to the encoder
  • the second data corresponding to the output sentence is input to the decoder
  • the sequence of words constituting the output sentence is specified.
  • Constraint data including one or more of the constrained words is input to the decoder together with the second data.
  • the arrangement order of the constraint words in the constraint data maintains the arrangement order of the word arrangement.
  • the learned sentence generation model learns the relationship between the constraint data and the second data. Therefore, by inputting input data constituting an input sentence to the encoder and input constraint data for specifying constraint conditions in the output sentence to the decoder, an output sentence using a desired specific expression can be output.
  • the decoder outputs, for each word, a likelihood indicating the likelihood of each word to be output as a word forming the output sentence at each stage after the input of the start symbol. Then, in each stage after the input of the start symbol, the sentence generation device sequentially inputs to the decoder words constituting the sentence created in the second language instead of the words output from the decoder in the previous stage.
  • a created sentence input unit and the likelihood of each word composing the created sentence output from the decoder at each stage after the input of the starting symbol based on the input of the starting symbol and the sequential input of each word composing the created sentence; and a prepared sentence evaluation unit that evaluates the prepared sentence based on the comparison with the likelihood of each word constituting the output sentence.
  • the likelihood of each word that constitutes the output sentence is compared with the likelihood of each word that is obtained by sequentially inputting each word that constitutes the created and input sentence to the decoder. Based on this, the written sentence is evaluated. This makes it possible to configure an evaluation system that evaluates the likelihood of a created sentence as a parallel translation corresponding to an input sentence.
  • LTE Long Term Evolution
  • LTE-A Long Term Evolution-Advanced
  • SUPER 3G IMT-Advanced
  • 4G 5G
  • FRA Full Radio Access
  • W-CDMA registered trademark
  • GSM registered trademark
  • CDMA2000 Code Division Multiple Access 2000
  • UMB Universal Mobile Broadband
  • IEEE 802.11 Wi-Fi
  • IEEE 802.16 WiMAX
  • IEEE 802.20 UWB (Ultra-WideBand
  • Input and output information may be saved in a specific location (for example, memory) or managed in a management table. Input/output information and the like may 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, etc. may be transmitted and received via a transmission medium.
  • the software can be used to access websites, servers, or other When transmitted from a remote source, these wired and/or wireless technologies are included within the definition of transmission media.
  • 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
  • system and "network” used herein are used interchangeably.
  • information, parameters, etc. described in this specification may be represented by absolute values, may be represented by relative values from a predetermined value, or may be represented by corresponding other information. .
  • determining and “determining” used in this disclosure may encompass a wide variety of actions.
  • “Judgement” and “determination” are, for example, judging, calculating, computing, processing, deriving, investigating, looking up, searching, inquiring (eg, lookup in a table, database, or other data structure), ascertaining as “judged” or “determined”, and the like.
  • "judgment” and “determination” are used for receiving (e.g., receiving information), transmitting (e.g., transmitting information), input, output, access (accessing) (for example, accessing data in memory) may include deeming that a "judgment” or “decision” has been made.
  • judgment and “decision” are considered to be “judgment” and “decision” by resolving, selecting, choosing, establishing, comparing, etc. can contain.
  • judgment and “decision” may include considering that some action is “judgment” and “decision”.
  • judgment (decision) may be read as “assuming”, “expecting”, “considering”, or the like.
  • any reference to the elements does not generally limit the quantity or order of those elements. These designations may be used herein as a convenient method of distinguishing between two or more elements. Thus, references to first and second elements do not imply that only two elements may be employed therein or that the first element must precede the second element in any way.
  • model output module M2... recording medium, m20... main module, m21... input module, m22... constraint data input module, m23... word input module, m24... output module, m25... written sentence acquisition module, m26... Created sentence input module, m27... Created sentence evaluation module, MD, MD1, MD2... Sentence generation model, P1... Sentence generation model generation program, P2... Sentence generation program.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Probability & Statistics with Applications (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Machine Translation (AREA)

Abstract

This sentence generation model generator generates, through machine learning, a sentence generation model for generating an output sentence in a second language in response to input of an input sentence in a first language, the sentence generation model generator comprising: an encoder input unit for inputting first data that constitutes the input sentence to an encoder; a decoder input unit for inputting constraint data that includes a constraint word specified as a word equivalent to an expression that should be used in the output sentence, and second data that constitutes a start symbol and the output sentence, to a decoder; an update unit for updating weight coefficients that constitute the encoder and the decoder on the basis of a difference, for each word, between the array of words outputted from the decoder in stages subsequent to input of the start symbol and the array of words included in the second data; and an model output unit for outputting a sentence generation model in which the weight coefficients are updated.

Description

文生成モデル生成装置、文生成モデル及び文生成装置Sentence generation model generation device, sentence generation model, and sentence generation device
 本発明は、文生成モデル生成装置、文生成モデル及び文生成装置に関する。 The present invention relates to a sentence generation model generation device, a sentence generation model, and a sentence generation device.
 第1の言語による入力文に応じて、例えば第2の言語による対訳からなる出力文を生成するモデルを機械学習により生成し、生成されたモデルにより翻訳エンジン及び採点エンジン等を構成する技術が知られている。例えば、特許文献1には、機械学習モデルを用いて、入力された文書に対応する文書を生成する技術が開示されている。 A technique is known in which a model is generated by machine learning that generates an output sentence consisting of, for example, a parallel translation in a second language according to an input sentence in a first language, and a translation engine, a scoring engine, etc. are configured by the generated model. It is For example, Patent Literature 1 discloses a technique of generating a document corresponding to an input document using a machine learning model.
特開2020-135457号公報JP 2020-135457 A
 入力文とその対訳とに基づいて学習されたモデルにより構成される通常の翻訳エンジン及び採点エンジン等では、意味内容において対応する対訳文が出力されるので、特定の表現を用いた対訳文を出力することはできなかった。例えば、機械学習されたモデルが添削及び採点エンジンに適用される場合において、ユーザにより入力された対訳において、所望の特定表現を用いることに関しては正解であったとしても、特定表現以外の部分に誤りがあると、特定表現とは無関係の対訳に基づき添削されてしまう場合があった。 Ordinary translation engines and scoring engines, which consist of models learned based on input sentences and their parallel translations, output parallel sentences that correspond in semantic content, so parallel sentences using specific expressions are output. I couldn't. For example, when a machine-learned model is applied to a correction and scoring engine, even if the parallel translation input by the user is correct regarding the use of the desired specific expression, there is an error in the part other than the specific expression. If there was, there was a case where it was corrected based on the parallel translation unrelated to the specific expression.
 そこで、本発明は、上記問題点に鑑みてなされたものであり、第1言語による入力文に応じて、特定の表現を用いた第2言語の出力文を得ることを目的とする。 Therefore, the present invention has been made in view of the above problems, and it is an object of the present invention to obtain an output sentence in a second language using specific expressions in response to an input sentence in the first language.
 上記課題を解決するために、本発明の一形態に係る文生成モデル生成装置は、第1言語の入力文の入力に応じて、第1言語とは異なる第2言語の出力文を生成する文生成モデルを機械学習により生成する文生成モデル生成装置であって、文生成モデルは、ニューラルネットワークを含みエンコーダ及びデコーダにより構成されるエンコーダデコーダモデルであり、文生成モデルの機械学習に用いられる学習用データは、第1データ、制約データ及び第2データを含み、第1データは、入力文を構成する複数の単語の配列を含み、第2データは、入力文に対応する出力文を構成する複数の単語の配列を含み、制約データは、出力文を構成する単語の配列のうちから特定された単語である制約語を一以上含み、制約データにおける制約語の配列順は単語の配列における配列順を維持しており、文生成モデル生成装置は、第1データを単語の配列順に応じてエンコーダに入力するエンコーダ入力部と、制約データ、出力文の出力の開始を意味する所定の記号である開始記号、及び、第2データを構成する単語を配列順に応じて、デコーダに入力するデコーダ入力部と、開始記号の入力以降の後段においてデコーダから出力された単語の配列と、第2データに含まれる単語の配列との単語ごとの誤差に基づいて、エンコーダ及びデコーダを構成する重み係数を更新する更新部と、更新部により重み係数が更新された文生成モデルを出力するモデル出力部と、を備える。 In order to solve the above problems, a sentence generation model generation device according to one aspect of the present invention is a sentence generation model generation device that generates an output sentence in a second language different from the first language in response to an input sentence in the first language. A sentence generative model generating device for generating a generative model by machine learning, wherein the sentence generative model is an encoder-decoder model including a neural network and composed of an encoder and a decoder, and is used for machine learning of the sentence generative model. The data includes first data, constraint data and second data, the first data including an array of a plurality of words forming an input sentence, and the second data comprising a plurality of words forming an output sentence corresponding to the input sentence. and the constraint data includes one or more constraint words that are words specified from the word sequence that constitutes the output sentence, and the arrangement order of the constraint words in the constraint data is the order in the word arrangement The sentence generation model generation device includes an encoder input unit that inputs the first data to the encoder according to the arrangement order of the words, constraint data, and start A decoder input unit for inputting symbols and words constituting the second data to the decoder according to the order of arrangement, an arrangement of words output from the decoder after the input of the start symbol, and included in the second data An updating unit that updates weighting coefficients constituting the encoder and decoder based on the error of each word from the word array, and a model output unit that outputs a sentence generation model with the weighting coefficients updated by the updating unit. .
 上記の形態によれば、文生成モデルが、エンコーダ及びデコーダを含むエンコーダデコーダモデルにより構成される。入力文に対応する第1データがエンコーダに入力され、出力文に対応する第2データがデコーダに入力される文生成モデルの学習において、出力文を構成する単語の配列のうちから特定された制約語を一以上含む制約データが、第2データと併せてデコーダに入力される。制約データにおける制約語の配列順は単語の配列における配列順を維持している。所望の特定表現を構成する単語を制約語として特定した制約データをデコーダに入力することにより、文生成モデルが、制約データと第2データとの関連性を学習することとなるので、制約データに含まれる制約語からなる特定の表現を用いた出力文を出力する文生成モデルを得ることができる。 According to the above form, the sentence generation model is composed of an encoder-decoder model including an encoder and a decoder. Constraints identified from the sequence of words forming an output sentence in training of a sentence generation model in which first data corresponding to an input sentence is input to an encoder and second data corresponding to an output sentence is input to a decoder Constraint data including one or more words is input to the decoder along with the second data. The arrangement order of the constraint words in the constraint data maintains the arrangement order of the word arrangement. By inputting to the decoder constraint data specifying words constituting a desired specific expression as constraint words, the sentence generation model learns the relationship between the constraint data and the second data. A sentence generation model can be obtained that outputs an output sentence using a specific expression consisting of contained constraint words.
 第1言語による入力文に応じて、特定の表現を用いた第2言語の出力文を得ることが可能となる。 It is possible to obtain an output sentence in the second language using specific expressions according to the input sentence in the first language.
本実施形態の文生成モデル生成装置の機能的構成を示すブロック図である。1 is a block diagram showing a functional configuration of a sentence generative model generation device of this embodiment; FIG. 本実施形態の文生成装置の機能的構成を示すブロック図である。It is a block diagram which shows the functional structure of the sentence production|generation apparatus of this embodiment. 文生成モデル生成装置及び文生成装置のハードブロック図である。It is a hardware block diagram of a sentence generation model generation device and a sentence generation device. 文生成モデルの構成を示す図である。It is a figure which shows the structure of a sentence generation model. コーパスに基づく、第1データ及び第2データ並びに制約データの生成の一例を示す図である。It is a figure which shows an example of the production|generation of 1st data, 2nd data, and constraint data based on a corpus. モデルの学習に用いられる第1データ、第2データ及び制約データの例を示す図である。It is a figure which shows the example of 1st data, 2nd data, and constraint data which are used for learning of a model. エンコーダデコーダモデルの一例であるTransformerの概略構成を説明するための図である。FIG. 3 is a diagram for explaining a schematic configuration of a Transformer, which is an example of an encoder-decoder model; 文生成モデルによる文生成処理を模式的に示す図である。It is a figure which shows typically the sentence production|generation process by a sentence production|generation model. 入力制約データ及び当該制約データに基づいて出力されうる出力文の例を示す図である。It is a figure which shows the example of the output sentence which can be output based on input restrictions data and the said restrictions data. 文生成装置により構成された評価システムにおける作成文の評価の処理を示す図である。It is a figure which shows the process of evaluation of the created sentence in the evaluation system comprised by the sentence production|generation apparatus. 文生成モデル生成装置における文生成モデル生成方法の処理内容を示すフローチャートである。It is a flowchart which shows the processing content of the sentence generative model generation method in a sentence generative model generation apparatus. 文生成装置における文生成方法の処理内容を示すフローチャートである。It is a flowchart which shows the processing content of the sentence production|generation method in a sentence production|generation apparatus. 図13は、文生成モデル生成プログラムの構成を示す図である。FIG. 13 is a diagram showing the configuration of the sentence generation model generation program. 図14は、文生成プログラムの構成を示す図である。FIG. 14 is a diagram showing the configuration of the sentence generation program.
 本発明に係る文生成モデル生成装置、文生成装置及び文生成モデルの実施形態について図面を参照して説明する。なお、可能な場合には、同一の部分には同一の符号を付して、重複する説明を省略する。 Embodiments of a sentence generation model generation device, a sentence generation device, and a sentence generation model according to the present invention will be described with reference to the drawings. Where possible, the same parts are denoted by the same reference numerals, and duplicate descriptions are omitted.
 本実施形態の文生成モデルは、コンピュータを機能させ、第1言語の入力文の入力に応じて、第1言語とは異なる第2言語の出力文を生成するための、機械学習により構築されるモデルである。文生成モデルは、ニューラルネットワークを含み、エンコーダ及びデコーダを含むエンコーダデコーダモデルにより構成される。 The sentence generation model of the present embodiment is constructed by machine learning to cause a computer to function and generate an output sentence in a second language different from the first language in response to an input sentence in the first language. is a model. The sentence generation model includes a neural network and is composed of an encoder-decoder model including an encoder and a decoder.
 本実施形態の文生成モデル生成装置は、文生成モデルを機械学習により生成する装置である。文生成装置は、機械学習により構築された文生成モデルを用いて、第1言語の入力文の入力に応じて、第2言語の出力文を生成する装置である。 The sentence generation model generation device of this embodiment is a device that generates a sentence generation model by machine learning. A sentence generation device is a device that generates an output sentence in a second language according to an input sentence in a first language using a sentence generation model constructed by machine learning.
 本実施形態の文生成モデル生成装置、文生成モデル、文生成装置により解決される課題が生じる例について説明する。 An example of a problem solved by the sentence generation model generation device, sentence generation model, and sentence generation device of this embodiment will be described.
 所与の和文に基づく英作文をAI(人工知能)により添削するシステムでは、例えば、入力された英文に含まれる単語のうちのスコアが低い単語が抽出され、抽出された低スコアの単語に引き続く単語が書き換えられた添削文に基づいて添削される。例えば、「彼は外国人と話せるようになるために英語を勉強する。(kare ha gaikokujin to hanaseruyoninarutameni eigo wo benkyo suru)」という和文が、通常の翻訳エンジンでは、“He studies English to become able to speak with foreigners.”という英文に翻訳されるとする。 In a system that corrects an English composition based on a given Japanese sentence by AI (artificial intelligence), for example, a word with a low score is extracted from among the words contained in the input English sentence, and the extracted word with a low score is followed by Corrections are made based on correction sentences in which words have been rewritten. For example, the Japanese sentence ``He studies English to become able to speak to foreigners. with foreigners.”
 このような翻訳エンジンにより構成される添削システムに、ユーザにより作文された“He study English so that can talk with American.”という英文が入力された場合には、2番目に入力された単語“study”が明らかな誤りであり、そのスコアが低くなるので、添削システムは、2番目の単語“study”をスコアが高い単語“studies”に置き換え、さらに、3番目以後の単語も高スコアの単語に書き換えた英文“He studies English to become able to speak with foreigners.”を添削文として出力する。 When the English sentence "He study English so that can talk with American." is an obvious error and lowers its score, the correction system replaces the second word "study" with the word "studies" with a higher score, and also rewrites the third and subsequent words with higher-scoring words. Output the English sentence “He studies English to become able to speak with foreigners.”
 しかしながら、ユーザにより入力された英文における“so that”、“talk with”という単語列は、英訳としての正しい表現であるので、これらの表現が用いられた英訳の一例である“He studies English so that he can talk with foreigners.”という英文を添削文として添削されることが好ましい。本実施形態では、所望の表現をもちいた出力文の生成を可能にすると共に、所望の表現を用いた出力文に基づく作成文の適切な評価が可能となる。 However, since the word strings "so that" and "talk with" in the English sentences input by the user are correct expressions as English translations, "He studies English so that He can talk with foreigners.” In this embodiment, it is possible to generate an output sentence using a desired expression, and to appropriately evaluate a created sentence based on the output sentence using the desired expression.
 図1は、本実施形態に係る文生成モデル生成装置の機能的構成を示す図である。文生成モデル生成装置10は、第1言語の入力文の入力に応じて、第1言語とは異なる第2言語の出力文を生成する文生成モデルを機械学習により生成する装置である。図1に示すように、文生成モデル生成装置10は、機能的には、制約データ生成部11、エンコーダ入力部12、デコーダ入力部13、更新部14及びモデル出力部15を備える。これらの各機能部11~15は、一つの装置に構成されてもよいし、複数の装置に分散されて構成されてもよい。 FIG. 1 is a diagram showing the functional configuration of the sentence generative model generation device according to this embodiment. The sentence generation model generation device 10 is a device that generates, by machine learning, a sentence generation model that generates an output sentence in a second language different from the first language according to an input sentence in the first language. As shown in FIG. 1 , the sentence generative model generation device 10 functionally includes a constraint data generation unit 11 , an encoder input unit 12 , a decoder input unit 13 , an update unit 14 and a model output unit 15 . Each of these functional units 11 to 15 may be configured in one device, or may be configured by being distributed in a plurality of devices.
 また、文生成モデル生成装置10は、モデル記憶部30及びコーパス記憶部40といった記憶手段にアクセス可能に構成されている。モデル記憶部30及びコーパス記憶部40は、文生成モデル生成装置10内に構成されてもよいし、図1に示されるように、文生成モデル生成装置10の外部に、文生成モデル生成装置からアクセス可能な別の装置として構成されてもよい。 In addition, the sentence generation model generation device 10 is configured to be able to access storage means such as the model storage unit 30 and the corpus storage unit 40 . The model storage unit 30 and the corpus storage unit 40 may be configured within the sentence generative model generation device 10, or as shown in FIG. It may be configured as a separate accessible device.
 モデル記憶部30は、学習済みまたは学習過程等の文生成モデルを記憶している記憶手段であって、ストレージ及びメモリ等により構成されることができる。 The model storage unit 30 is storage means that stores sentence generation models such as those that have been learned or that are in the process of learning, and can be composed of storage, memory, and the like.
 コーパス記憶部40は、文生成モデルの機械学習に用いられる学習用データ及び学習用データを生成するためのコーパス等を記憶している記憶手段であって、ストレージ及びメモリ等により構成されることができる。 The corpus storage unit 40 is storage means for storing learning data used for machine learning of the sentence generation model and a corpus for generating the learning data. can.
 図2は、本実施形態に係る文生成装置の機能的構成を示す図である。文生成装置20は、機械学習により構築された文生成モデルを用いて、第1言語の入力文の入力に応じて、第1言語とは異なる第2言語の出力文を生成する装置である。図2に示すように、文生成装置20は、機能的には、入力部21、制約データ入力部22、単語入力部23及び出力部24を備える。文生成装置20は、作成文取得部25、作成文入力部26及び作成文評価部27を更に備えてもよい。これらの各機能部21~27は、一つの装置に構成されてもよいし、複数の装置に分散されて構成されてもよい。 FIG. 2 is a diagram showing the functional configuration of the sentence generation device according to this embodiment. The sentence generation device 20 is a device that uses a sentence generation model built by machine learning to generate an output sentence in a second language different from the first language in response to an input sentence in the first language. As shown in FIG. 2, the sentence generation device 20 functionally includes an input unit 21, a constraint data input unit 22, a word input unit 23, and an output unit 24. The sentence generation device 20 may further include a created sentence acquisition unit 25 , a created sentence input unit 26 and a created sentence evaluation unit 27 . Each of these functional units 21 to 27 may be configured in one device, or may be configured by being distributed in a plurality of devices.
 また、文生成装置20は、学習済みの文生成モデルを記憶しているモデル記憶部30にアクセス可能に構成されている。モデル記憶部30は、文生成装置20内に構成されてもよいし、外部の別の装置に構成されてもよい。 In addition, the sentence generation device 20 is configured to be able to access the model storage unit 30 that stores learned sentence generation models. The model storage unit 30 may be configured within the sentence generation device 20, or may be configured in another external device.
 また、本実施形態では、文生成モデル生成装置10と文生成装置20とがそれぞれ別の装置(コンピュータ)に構成されている例を示しているが、これらは一体に構成されてもよい。 Also, in this embodiment, an example is shown in which the sentence generation model generation device 10 and the sentence generation device 20 are configured in different devices (computers), but they may be integrated.
 なお、図1及び図2に示したブロック図は、機能単位のブロックを示している。これらの機能ブロック(構成部)は、ハードウェア及びソフトウェアの少なくとも一方の任意の組み合わせによって実現される。また、各機能ブロックの実現方法は特に限定されない。すなわち、各機能ブロックは、物理的又は論理的に結合した1つの装置を用いて実現されてもよいし、物理的又は論理的に分離した2つ以上の装置を直接的又は間接的に(例えば、有線、無線などを用いて)接続し、これら複数の装置を用いて実現されてもよい。機能ブロックは、上記1つの装置又は上記複数の装置にソフトウェアを組み合わせて実現されてもよい。 It should be noted that the block diagrams shown in FIGS. 1 and 2 show blocks for each function. These functional blocks (components) are realized by any combination of at least one of hardware and software. Also, the method of realizing each functional block is not particularly limited. That is, 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.
 機能には、判断、決定、判定、計算、算出、処理、導出、調査、探索、確認、受信、送信、出力、アクセス、解決、選択、選定、確立、比較、想定、期待、見做し、報知(broadcasting)、通知(notifying)、通信(communicating)、転送(forwarding)、構成(configuring)、再構成(reconfiguring)、割り当て(allocating、mapping)、割り振り(assigning)などがあるが、これらに限られない。たとえば、送信を機能させる機能ブロック(構成部)は、送信部(transmitting unit)や送信機(transmitter)と呼称される。いずれも、上述したとおり、実現方法は特に限定されない。 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 For example, a functional block (component) that performs transmission is called a transmitting unit or transmitter. In either case, as described above, the implementation method is not particularly limited.
 例えば、本発明の一実施の形態における文生成モデル生成装置10及び文生成装置20は、コンピュータとして機能してもよい。図3は、本実施形態に係る文生成モデル生成装置10及び文生成装置20のハードウェア構成の一例を示す図である。文生成モデル生成装置10及び文生成装置20はそれぞれ、物理的には、プロセッサ1001、メモリ1002、ストレージ1003、通信装置1004、入力装置1005、出力装置1006、バス1007などを含むコンピュータ装置として構成されてもよい。 For example, the sentence generative model generation device 10 and the sentence generation device 20 in one embodiment of the present invention may function as computers. FIG. 3 is a diagram showing an example of the hardware configuration of the sentence generative model generation device 10 and the sentence generation device 20 according to this embodiment. The sentence generation model generation device 10 and the sentence generation device 20 are each 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. may
 なお、以下の説明では、「装置」という文言は、回路、デバイス、ユニットなどに読み替えることができる。文生成モデル生成装置10及び文生成装置20のハードウェア構成は、図に示した各装置を1つ又は複数含むように構成されてもよいし、一部の装置を含まずに構成されてもよい。 In the following explanation, the term "apparatus" can be read as a circuit, device, unit, or the like. The hardware configuration of the sentence generation model generation device 10 and the sentence generation device 20 may be configured to include one or more of each device shown in the figure, or may be configured without some devices. good.
 文生成モデル生成装置10及び文生成装置20における各機能は、プロセッサ1001、メモリ1002などのハードウェア上に所定のソフトウェア(プログラム)を読み込ませることで、プロセッサ1001が演算を行い、通信装置1004による通信や、メモリ1002及びストレージ1003におけるデータの読み出し及び/又は書き込みを制御することで実現される。 Each function of the sentence generation model generation device 10 and the sentence generation device 20 is executed by the processor 1001 by loading predetermined software (program) onto hardware such as the processor 1001 and the memory 1002, and by the communication device 1004. It is realized by controlling communication, reading and/or writing of data in the memory 1002 and storage 1003 .
 プロセッサ1001は、例えば、オペレーティングシステムを動作させてコンピュータ全体を制御する。プロセッサ1001は、周辺装置とのインターフェース、制御装置、演算装置、レジスタなどを含む中央処理装置(CPU:Central Processing Unit)で構成されてもよい。例えば、図1及び図2に示した各機能部11~15,21~27などは、プロセッサ1001で実現されてもよい。 The processor 1001, for example, operates an operating system and controls the entire computer. The processor 1001 may be configured with a central processing unit (CPU) including an interface with peripheral devices, a control device, an arithmetic device, registers, and the like. For example, the functional units 11 to 15 and 21 to 27 shown in FIGS. 1 and 2 may be realized by the processor 1001. FIG.
 また、プロセッサ1001は、プログラム(プログラムコード)、ソフトウェアモジュールやデータを、ストレージ1003及び/又は通信装置1004からメモリ1002に読み出し、これらに従って各種の処理を実行する。プログラムとしては、上述の実施の形態で説明した動作の少なくとも一部をコンピュータに実行させるプログラムが用いられる。例えば、文生成モデル生成装置10及び文生成装置20の各機能部11~15,21~27は、メモリ1002に格納され、プロセッサ1001で動作する制御プログラムによって実現されてもよい。上述の各種処理は、1つのプロセッサ1001で実行される旨を説明してきたが、2以上のプロセッサ1001により同時又は逐次に実行されてもよい。プロセッサ1001は、1以上のチップで実装されてもよい。なお、プログラムは、電気通信回線を介してネットワークから送信されても良い。 The processor 1001 also reads programs (program codes), software modules and data from the storage 1003 and/or the communication device 1004 to the memory 1002, and executes various processes according to them. As the program, a program that causes a computer to execute at least part of the operations described in the above embodiments is used. For example, the functional units 11 to 15 and 21 to 27 of the sentence generation model generation device 10 and the sentence generation device 20 may be stored in the memory 1002 and implemented by a control program running on the processor 1001 . Although it has been described that the above-described various processes are executed by one processor 1001, they may be executed by two or more processors 1001 simultaneously or sequentially. Processor 1001 may be implemented with one or more chips. Note that the program may be transmitted from a network via an electric communication line.
 メモリ1002は、コンピュータ読み取り可能な記録媒体であり、例えば、ROM(Read Only Memory)、EPROM(Erasable Programmable ROM)、EEPROM(Electrically Erasable Programmable ROM)、RAM(Random Access Memory)などの少なくとも1つで構成されてもよい。メモリ1002は、レジスタ、キャッシュ、メインメモリ(主記憶装置)などと呼ばれてもよい。メモリ1002は、本発明の一実施の形態に係る文生成モデル生成方法及び文生成方法を実施するために実行可能なプログラム(プログラムコード)、ソフトウェアモジュールなどを保存することができる。 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 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 the sentence generation model generation method and the sentence generation method according to an embodiment of the present invention.
 ストレージ1003は、コンピュータ読み取り可能な記録媒体であり、例えば、CD-ROM(Compact Disc ROM)などの光ディスク、ハードディスクドライブ、フレキシブルディスク、光磁気ディスク(例えば、コンパクトディスク、デジタル多用途ディスク、Blu-ray(登録商標)ディスク)、スマートカード、フラッシュメモリ(例えば、カード、スティック、キードライブ)、フロッピー(登録商標)ディスク、磁気ストリップなどの少なくとも1つで構成されてもよい。ストレージ1003は、補助記憶装置と呼ばれてもよい。上述の記憶媒体は、例えば、メモリ1002及び/又はストレージ1003を含むデータベース、サーバその他の適切な媒体であってもよい。 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 memory 1002 and/or storage 1003 .
 通信装置1004は、有線及び/又は無線ネットワークを介してコンピュータ間の通信を行うためのハードウェア(送受信デバイス)であり、例えばネットワークデバイス、ネットワークコントローラ、ネットワークカード、通信モジュールなどともいう。 The communication device 1004 is hardware (transmitting/receiving device) for communicating between computers via a wired and/or wireless network, and is also called a network device, network controller, network card, communication module, etc., for example.
 入力装置1005は、外部からの入力を受け付ける入力デバイス(例えば、キーボード、マウス、マイクロフォン、スイッチ、ボタン、センサなど)である。出力装置1006は、外部への出力を実施する出力デバイス(例えば、ディスプレイ、スピーカー、LEDランプなど)である。なお、入力装置1005及び出力装置1006は、一体となった構成(例えば、タッチパネル)であってもよい。 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).
 また、プロセッサ1001やメモリ1002などの各装置は、情報を通信するためのバス1007で接続される。バス1007は、単一のバスで構成されてもよいし、装置間で異なるバスで構成されてもよい。 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 composed of a single bus, or may be composed of different buses between devices.
 また、文生成モデル生成装置10及び文生成装置20は、マイクロプロセッサ、デジタル信号プロセッサ(DSP:Digital Signal Processor)、ASIC(Application Specific Integrated Circuit)、PLD(Programmable Logic Device)、FPGA(Field Programmable Gate Array)などのハードウェアを含んで構成されてもよく、当該ハードウェアにより、各機能ブロックの一部又は全てが実現されてもよい。例えば、プロセッサ1001は、これらのハードウェアの少なくとも1つで実装されてもよい。 In addition, the sentence generation model generation device 10 and the sentence generation device 20 include a microprocessor, a digital signal processor (DSP), an ASIC (Application Specific Integrated Circuit), a PLD (Programmable Logic Device), and an FPGA (Field Programmable Gate Array). ), and the hardware may implement part or all of each functional block. For example, processor 1001 may be implemented with at least one of these hardware.
 図4は、本実施形態の文生成モデルの構成を示す図である。図4に示されるように、文生成モデルMDは、ニューラルネットワークを含みエンコーダen及びデコーダdeにより構成されるエンコーダデコーダモデルである。エンコーダデコーダモデルを構成するニューラルネットワークは限定されないが、例えばリカレントニューラルネットワーク(RNN:Recurrent Neural Network)である。また、文生成モデルMDは、トランスフォーマ(Transformer)と言われるニューラルネットワークであってもよい。 FIG. 4 is a diagram showing the configuration of the sentence generation model of this embodiment. As shown in FIG. 4, the sentence generation model MD is an encoder-decoder model including a neural network and composed of an encoder en and a decoder de. A neural network that configures the encoder-decoder model is not limited, but is, for example, a recurrent neural network (RNN). Also, the sentence generation model MD may be a neural network called a transformer.
 本実施形態の文生成モデルMDの機械学習に用いられる学習用データは、第1データa、第2データb及び制約データcを含む。第1データaは、第1言語の入力文を構成する複数の単語の配列を含む。第2データbは、入力文に対応する第2言語の出力文を構成する複数の単語の配列を含む。出力文は、例えば、入力文の対訳である。制約データcは、第2データbを構成する単語の配列のうちから特定された単語である制約語を一以上含むデータである。制約データcにおける制約語の配列順は、第2データbの単語の配列における配列順を維持している。 The learning data used for machine learning of the sentence generation model MD of this embodiment includes first data a, second data b, and constraint data c. The first data a includes an arrangement of a plurality of words forming an input sentence in the first language. The second data b includes an arrangement of a plurality of words forming an output sentence in the second language corresponding to the input sentence. The output sentence is, for example, a parallel translation of the input sentence. The constraint data c is data containing one or more constraint words, which are words specified from the arrangement of words forming the second data b. The arrangement order of the constraint words in the constraint data c maintains the arrangement order of the words in the second data b.
 エンコーダenには、第1言語の入力文を構成する第1データaが入力される。具体的には、第1データaは、例えば形態素解析等により単語に分割される。分割された各単語は、対応する単語ベクトルに変換(Embedding)されて、第1データa(入力文)における配列順に応じてエンコーダenに入力される。エンコーダenは、第1データaに基づく計算結果を示すベクトル(例えば、中間層の出力、ソースターゲットアテンション等)をデコーダdeに出力する。 The first data a that constitutes the input sentence in the first language is input to the encoder en. Specifically, the first data a is divided into words by, for example, morphological analysis. Each divided word is converted (embedded) into a corresponding word vector and input to the encoder en according to the arrangement order in the first data a (input sentence). The encoder en outputs to the decoder de a vector indicating the result of calculation based on the first data a (for example, the output of the hidden layer, the source target attention, etc.).
 一般的なエンコーダデコーダモデルでは、デコーダは、エンコーダからのベクトル及び出力の開始を示す所定の開始記号(ベクトル)の入力に基づいて、単語の系列を順次出力する。これに対して、本実施形態の文生成モデルMDのデコーダdeには、開始記号ssの入力の前段階において制約データcが入力される。デコーダdeは、エンコーダenからの出力、制約データc及び開始記号ssの入力に基づいて、出力文tの単語(ベクトル)の系列を出力する。デコーダdeから出力文の終了を意味する終端記号esがされたら、それまでに出力された単語の系列により出力文tが構成される。学習の局面においては、第1データa(入力文)に対応する出力文(入力文の第2言語による対訳)に相当する第2データbが、開始記号ssの入力の後段階において単語ごとに配列順に応じてデコーダdeに入力される。 In a typical encoder-decoder model, the decoder sequentially outputs a sequence of words based on the input of a vector from the encoder and a predetermined start symbol (vector) that indicates the start of the output. On the other hand, the constraint data c is input to the decoder de of the sentence generation model MD of the present embodiment before the start symbol ss is input. The decoder de outputs a sequence of words (vectors) of the output sentence t based on the output from the encoder en, the constraint data c and the input of the start symbol ss. When the terminal symbol es indicating the end of the output sentence is output from the decoder de, the output sentence t is composed of the sequence of words output up to that point. In the learning phase, the second data b corresponding to the output sentence (parallel translation of the input sentence in the second language) corresponding to the first data a (input sentence) is obtained word by word after the start symbol ss is input. It is input to the decoder de according to the arrangement order.
 制約データcは、第2データbを構成する単語の配列のうちから特定された単語である制約語が第2データcの単語の配列順を維持して含むデータである。制約データcの生成等については後に詳述されるが、制約データcは、出力文を構成する単語の配列のうちの制約語以外の単語又は単語列が所定の置換記号に置換された、制約語及び置換記号の配列からなるデータであってもよい。 The constraint data c is data in which the constraint words, which are words specified from the arrangement of words forming the second data b, are included while maintaining the arrangement order of the words of the second data c. The generation and the like of the constraint data c will be described in detail later, but the constraint data c is a constraint data in which words or word strings other than the constraint words in the array of words forming the output sentence are replaced with predetermined replacement symbols. It may be data consisting of an array of words and replacement symbols.
 再び図1を参照して、文生成モデル生成装置10の機能部を説明する。制約データ生成部11は、コーパスに基づいて制約データを生成する。図5~図6を参照して、制約データの生成及び制約データを含む学習用データについて説明する。 The functional units of the sentence generative model generation device 10 will be described with reference to FIG. 1 again. The constraint data generator 11 generates constraint data based on the corpus. Generation of constraint data and learning data including the constraint data will be described with reference to FIGS. 5 and 6. FIG.
 図5は、コーパスに基づく、第1データ及び第2データ並びに制約データの生成の一例を示す図である。制約データ生成部11は、例えばコーパス記憶部40から、コーパスcp0を取得する。コーパスcp0は、第1言語により構成された第1の文cp01と、第2言語により構成された第2の文cp02とからなる。図5の例では、第1の文cp01は、日本語の「彼は外国人と話せるようになるために英語を勉強する(kare ha gaikokujin to hanaseruyoninarutameni eigo wo benkyo suru)」という文であり、第2の文cp02は、第1の文cp01の英語による対訳の“He studies English so that he can talk with foreigners.”という文である。 FIG. 5 is a diagram showing an example of generating first data, second data, and constraint data based on a corpus. The constraint data generation unit 11 acquires the corpus cp0 from the corpus storage unit 40, for example. The corpus cp0 consists of a first sentence cp01 written in the first language and a second sentence cp02 written in the second language. In the example of FIG. 5, the first sentence cp01 is the Japanese sentence "He studies English so that he can speak to foreigners (kare ha gaikokujin to hanaseruyoninarutameni eigo wo benkyo suru)". The second sentence cp02 is a sentence "He studies English so that he can talk with foreigners."
 制約データ生成部11は、第2の文cp02を構成する単語の配列から制約語cxを特定する。制約語の特定は、例えば、ユーザ等による指定入力に基づいてもよい。例えば、第1の文cp01の対訳としての第2の文cp02において必須で用いられるべき表現を構成する単語が、指定入力により制約語として指定されてもよい。また、制約語の特定は、ランダムに行われてもよい。図5に示される例では、“He”、“so that”、“talk with”という3つの単語又は単語列が制約語cxとして特定されている。 The constraint data generation unit 11 identifies the constraint word cx from the array of words forming the second sentence cp02. The specification of the constraint word may be based on, for example, a specified input by a user or the like. For example, a word that constitutes an expression that should be used in the second sentence cp02 as a parallel translation of the first sentence cp01 may be specified as a constraint word by specifying input. Also, the specification of the constraint word may be performed at random. In the example shown in FIG. 5, three words or word strings of "He", "so that", and "talk with" are specified as the constraint word cx.
 制約データ生成部11は、特定された制約語cxに基づいて、制約語cxを第2の文における単語の配列順を維持させながら含む制約データc01を生成する。図5に示されるように、制約データc01は、“He”、“so that”、“talk with”を第2の文cp02における配列順を維持させながら含むデータである。 Based on the identified constraint word cx, the constraint data generation unit 11 generates constraint data c01 that includes the constraint word cx while maintaining the order of words in the second sentence. As shown in FIG. 5, the constraint data c01 is data containing "He", "so that", and "talk with" while maintaining the arrangement order in the second sentence cp02.
 また、制約データは、出力文を構成する単語の配列のうちの制約語以外の単語又は単語列が所定の置換記号に置換された、制約語及び置換記号の配列からなるデータであってもよい。制約データ生成部11は、第2の文cp02を構成する単語配列のうちの、制約語cxとして特定された単語以外の単語または単語列を置換記号rsに置換して、制約語cx及び置換記号rsの配列からなる制約データc01を生成する。図5に示される例では、置換記号rsは、「*(アスタリスク)」で示されており、制約データ生成部11は、3つの制約語cx“He”、“so that”、“talk with”及び置換記号rsが、第2の文cp02における配列順を維持して配列された制約データc01“He * so that * talk with *”を生成する。 Alternatively, the constraint data may be data consisting of an arrangement of constraint words and replacement symbols, in which words or word strings other than the constraint words in the arrangement of words forming the output sentence are replaced with predetermined replacement symbols. . The constraint data generation unit 11 replaces words or word strings other than the word specified as the constraint word cx in the word array forming the second sentence cp02 with the replacement symbol rs, and produces the constraint word cx and the replacement symbol Generate constraint data c01 consisting of an array of rs. In the example shown in FIG. 5, the replacement symbol rs is indicated by "* (asterisk)", and the constraint data generation unit 11 generates three constraint words cx "He", "so that", "talk with" and replacement symbol rs generate constraint data c01 "He * so that * talk with *" arranged while maintaining the arrangement order in the second sentence cp02.
 また、制約データ生成部11は、第1の文cp01及び第2の文cp02のそれぞれに基づいて、学習用データにおける第1データa01及び第2データb01を生成し、第1データa01、制約データc01、開始記号ss及び第2データb01からなる学習用データを生成する。 Further, the constraint data generation unit 11 generates the first data a01 and the second data b01 in the learning data based on the first sentence cp01 and the second sentence cp02, respectively. Learning data consisting of c01, start symbol ss, and second data b01 is generated.
 なお、制約データ生成部11は、第2データb01との関係を示す情報を制約データに含ませてもよい。図5に示される例では、制約データ生成部11は、制約データc01が第2データb01(出力文)において用いられるべき制約語cxを含むデータであることを示す記号cl01を制約データc01に含ませる。 Note that the constraint data generation unit 11 may include information indicating the relationship with the second data b01 in the constraint data. In the example shown in FIG. 5, the constraint data generator 11 includes a symbol cl01 in the constraint data c01 indicating that the constraint data c01 contains the constraint word cx to be used in the second data b01 (output sentence). Let
 図5を参照して説明したように、制約データがコーパスに基づいて容易に生成できるので、制約データを含む学習用データを得るためのコストの上昇が防止される。 As described with reference to FIG. 5, the constraint data can be easily generated based on the corpus, thus preventing an increase in cost for obtaining learning data including the constraint data.
 図6は、文生成モデルの学習に用いられる第1データ、第2データ及び制約データの例を示す図である。文生成モデルMDの学習用データは、入力文を構成する複数の単語の配列に代えて、言語的な意味内容を有さない所定の記号である任意記号を第1データとして含んでもよい。 FIG. 6 is a diagram showing an example of the first data, second data, and constraint data used for learning the sentence generation model. The learning data for the sentence generation model MD may include, as first data, arbitrary symbols, which are predetermined symbols having no linguistic meaning and content, instead of the arrangement of a plurality of words forming the input sentence.
 図6に示されるように、学習用データは、意味内容を有さない任意記号a03からなる第1データ、第2言語の出力文において用いられるべき表現として特定された制約語を含む制約データc03及び第2言語の出力文からなるb03により構成されてもよい。制約データ生成部11は、第2言語の文例からなるコーパスに基づいて、文例を構成する単語の配列から特定された制約語を含む制約データc03を図5の例と同様に生成し、文例を第2データb03として抽出し、さらに任意記号a03を付加して、学習用データを生成してもよい。 As shown in FIG. 6, the learning data includes first data consisting of arbitrary symbols a03 having no semantic content, and constraint data c03 containing constraint words specified as expressions to be used in output sentences in the second language. and b03 consisting of an output sentence in the second language. Based on the corpus of sentence examples in the second language, the constraint data generation unit 11 generates constraint data c03 including the constraint word specified from the arrangement of the words forming the sentence example in the same manner as in the example of FIG. Data for learning may be generated by extracting as second data b03 and adding an arbitrary symbol a03.
 図6に示される学習データの例によれば、出力文の対訳である入力文に相当する第1データが存在しなくても、制約データと第2データとの関係性をデコーダにおいて学習させることができる。従って、低コストで学習用データの拡充を図ることができると共に、デコーダにより出力される出力文の所望の出力に対する精度を高めることができる。 According to the learning data example shown in FIG. 6, even if there is no first data corresponding to the input sentence that is the parallel translation of the output sentence, the decoder can learn the relationship between the constraint data and the second data. can be done. Therefore, it is possible to expand the learning data at a low cost, and to improve the accuracy of the desired output of the output sentence output by the decoder.
 再び図1を参照して、エンコーダ入力部12は、第1データaを単語の配列順に応じてエンコーダenに入力する。  Referring to FIG. 1 again, the encoder input unit 12 inputs the first data a to the encoder en according to the arrangement order of the words.
 デコーダ入力部13は、制約データc、出力文の出力の開始を意味する所定の記号である開始記号ss、及び、第2データbを配列順に応じて、単語ごとにデコーダdeに入力する。 The decoder input unit 13 inputs the constraint data c, the start symbol ss, which is a predetermined symbol indicating the start of output of the output sentence, and the second data b to the decoder de word by word according to the arrangement order.
 更新部14は、開始記号ssの入力以降の後段においてデコーダdeから出力された単語の配列と、第2データbに含まれる単語の配列との単語ごとの誤差に基づいて、エンコーダen及びデコーダdeを構成する重み係数を更新する。 The updating unit 14 updates the encoder en and the decoder de based on the error for each word between the word array output from the decoder de after the input of the start symbol ss and the word array included in the second data b. update the weighting factors that make up
 文生成モデルMDが例えばリカレントニューラルネットワーク(RNN)により構成される場合には、エンコーダ入力部12は、第1データaを構成する単語の単語ベクトルを、エンコーダenを構成するRNNの入力層に語順に従って順次入力する。第1データaの最後の単語ベクトルの入力に基づくエンコーダenの中間層の出力が、デコーダdeに出力される。 When the sentence generation model MD is configured by, for example, a recurrent neural network (RNN), the encoder input unit 12 puts the word vectors of the words that make up the first data a into the input layer of the RNN that makes up the encoder en in word order. Input in order according to The output of the hidden layer of the encoder en based on the input of the last word vector of the first data a is output to the decoder de.
 続いて、デコーダ入力部13は、制約データcを構成する単語の単語ベクトルを、デコーダdeを構成するRNNの入力層に語順に従って順次入力する。さらに、デコーダ入力部13は、開始記号ss及び第2データbを語順に従ってデコーダdeに順次入力する。デコーダdeに開始記号ssが入力されると、デコーダdeは、出力文tの単語ベクトルの系列を、尤度(例えばソフトマックス関数による)と共に順次出力する。 Subsequently, the decoder input unit 13 sequentially inputs the word vectors of the words that make up the constraint data c into the input layer of the RNN that makes up the decoder de according to the word order. Further, the decoder input unit 13 sequentially inputs the start symbol ss and the second data b to the decoder de according to word order. When the start symbol ss is input to the decoder de, the decoder de sequentially outputs the sequence of word vectors of the output sentence t together with the likelihood (for example, by the softmax function).
 更新部14は、デコーダdeから出力された単語の系列と、第2データbの単語の系列との誤差を単語ごとに計算し、例えば誤差逆伝搬法によりエンコーダen及びデコータdeのニューラルネットワークを構成する重み係数を更新する。 The update unit 14 calculates an error for each word between the word sequence output from the decoder de and the word sequence of the second data b, and constructs a neural network of the encoder en and the decoder de by, for example, the error back propagation method. update the weighting factors to
 図7は、エンコーダデコーダモデルの一例であるトランスフォーマの概略構成を説明するための図である。図7に示されるように、文生成モデルMD1(MD)がトランスフォーマにより構成される場合には、エンコーダ入力部12は、第1データa1を構成する単語の単語ベクトルaw11,aw12,・・・aw1n(nは2以上の整数)を、単語の配列順に応じてエンコーダen1の入力層ilaに入力する。トランスフォーマでは、RNNのような逐次的な単語の入力ではなく、入力されるデータの並列処理が可能である。 FIG. 7 is a diagram for explaining the schematic configuration of a transformer, which is an example of an encoder-decoder model. As shown in FIG. 7, when the sentence generation model MD1 (MD) is composed of a transformer, the encoder input unit 12 generates word vectors aw11, aw12, . (n is an integer equal to or greater than 2) is input to the input layer ila of the encoder en1 according to the arrangement order of the words. Transformers allow parallel processing of incoming data rather than sequential word entry as in RNNs.
 エンコーダen1では、入力層ilaから中間層mlaに対するセルフアテンションsa1が計算されて、単語ベクトルがセルフアテンションsa1に応じたベクトルに変換される。同様に、中間層mlaから出力層olaに対するセルフアテンションsa2が計算され、単語ベクトルが更に変換される。さらに、エンコーダen1の出力層olaからデコーダde1の入力層ilbに対するソースターゲットアテンションtaが計算される。 The encoder en1 calculates the self-attention sa1 from the input layer ila to the middle layer mla, and converts the word vector into a vector corresponding to the self-attention sa1. Similarly, the self-attention sa2 from the middle layer mla to the output layer ola is calculated and the word vector is further transformed. Further, the source-target attention ta for the input layer ilb of the decoder de1 from the output layer ola of the encoder en1 is calculated.
 デコーダ入力部13は、制約データc1を構成する単語の単語ベクトルcw11,・・・,cw1n(nは2以上の整数)、開始記号ss及び第2データb1を構成する単語の単語ベクトルbw11,bw12,・・・,bw1n(nは2以上の整数)を、単語の配列順に応じて、学習局面では並列的にデコーダde1の入力層ilbに入力する。 The decoder input unit 13 receives word vectors cw11, . , . . . , bw1n (where n is an integer equal to or greater than 2) are input in parallel to the input layer ilb of the decoder de1 in the learning phase according to the arrangement order of the words.
 デコーダde1では、エンコーダen1と同様に、入力層ilbから中間層mlbに対するセルフアテンションsa3が計算されて、セルフアテンションsa3に応じてベクトルが変換される。同様に、中間層mlbから出力層olbに対するセルフアテンションsa4が計算され、セルフアテンションsa4に応じたベクトル変換が行われる。 In the decoder de1, similarly to the encoder en1, the self-attention sa3 from the input layer ilb to the intermediate layer mlb is calculated, and the vector is converted according to the self-attention sa3. Similarly, the self-attention sa4 for the output layer olb is calculated from the intermediate layer mlb, and vector conversion is performed according to the self-attention sa4.
 更新部14は、開始記号ssの入力以降の後段において出力される単語ベクトルwvに基づく単語系列t11,・・・,t1n(nは2以上の整数)と、第2データb1を構成する単語の単語系列bw11,・・・,bw1nとの誤差を単語ごとに計算し、誤差逆伝搬法により、セルフアテンション及びソースターゲットアテンションを計算するための重み係数を更新する。 , t1n (where n is an integer equal to or greater than 2) based on the word vector wv output after the input of the start symbol ss, and the words constituting the second data b1. The error with the word sequence bw11, .
 再び図1を参照して、モデル出力部15は、必要量の学習データに基づく機械学習の後に得られた文生成モデルMDを出力する。モデル出力部15は、文生成モデルMDをモデル記憶部30に記憶させてもよい。  Referring to FIG. 1 again, the model output unit 15 outputs the sentence generation model MD obtained after machine learning based on the required amount of learning data. The model output unit 15 may cause the model storage unit 30 to store the sentence generation model MD.
 次に、図2及び図8を参照して、文生成装置20の機能部及び学習済みの文生成モデルを用いた文生成の局面の処理について説明する。図8は、文生成モデルによる文生成処理を模式的に示す図である。 Next, with reference to FIGS. 2 and 8, the processing of the sentence generation phase using the functional units of the sentence generation device 20 and the learned sentence generation model will be described. FIG. 8 is a diagram schematically showing sentence generation processing by the sentence generation model.
 図8に示されるように、文生成モデルMD2は、文生成モデル生成装置10により学習及び構築されたモデルである。文生成モデルMD2は、エンコーダen2及びデコーダde2を含む。 As shown in FIG. 8, the sentence generation model MD2 is a model learned and constructed by the sentence generation model generation device 10. The sentence generation model MD2 includes an encoder en2 and a decoder de2.
 学習済みのニューラルネットワークを含むモデルである文生成モデルMD(MD1,MD2)は、コンピュータにより読み込まれ又は参照され、コンピュータに所定の処理を実行させ及びコンピュータに所定の機能を実現させるプログラムとして捉えることができる。 The sentence generation model MD (MD1, MD2), which is a model including a trained neural network, is read or referred to by a computer, and is regarded as a program that causes the computer to execute predetermined processing and realize predetermined functions. can be done.
 即ち、本実施形態の学習済みの文生成モデルMD(MD1,MD2)は、プロセッサ及びメモリを備えるコンピュータにおいて用いられる。具体的には、コンピュータのプロセッサが、メモリに記憶された学習済みの文生成モデルMD(MD1,MD2)からの指令に従って、ニューラルネットワークの入力層に入力された入力データに対し、各層に対応する学習済みの重み係数(パラメータ)と関数等に基づく演算を行い、出力層から結果(尤度)を出力するよう動作する。 That is, the trained sentence generation models MD (MD1, MD2) of this embodiment are used in a computer having a processor and memory. Specifically, the processor of the computer responds to the input data input to the input layer of the neural network according to instructions from the learned sentence generation models MD (MD1, MD2) stored in the memory, and corresponds to each layer. It operates to perform calculations based on learned weighting coefficients (parameters) and functions, and to output results (likelihoods) from the output layer.
 入力部21は、入力文を構成する入力データa2を構成する単語aw21,aw22,・・・,aw2n(nは2以上の整数)を、配列順に応じてエンコーダen2に入力する。エンコーダen2は、演算結果をデコーダde2に出力する。 The input unit 21 inputs words aw21, aw22, . The encoder en2 outputs the calculation result to the decoder de2.
 制約データ入力部22は、入力制約データc2を構成する記号ct2,単語cw21~cw24,・・・cw2n(nは2以上の整数)を、配列順に応じてデコーダde2に入力する。入力制約データc2は、出力文において用いられるべき語として任意に特定された入力制約語を含むデータである。入力制約語は、出力文における単語の配列順を維持しながら入力制約データc2に含まれる。入力制約語の特定は、例えば、ユーザ等による指定入力に基づいてもよい。 The constraint data input unit 22 inputs the symbol ct2, the words cw21 to cw24, . The input constraint data c2 is data containing an input constraint word arbitrarily specified as a word to be used in an output sentence. The input constraint words are included in the input constraint data c2 while maintaining the arrangement order of the words in the output sentence. The identification of the input constraint word may be based on, for example, a specified input by a user or the like.
 また、入力制約データc2は、出力文を構成する単語の配列のうちの入力制約語以外の単語又は単語列が所定の置換記号rsに置換された、入力制約語及び置換記号の配列からなるデータであってもよい。図8に示される例では、入力制約データc2は、“He”、“so that”等の単語又は単語列である入力制約語、及び、置換記号rs“*(アスタリスク)”が、出力文における配列順を維持して配列されたデータからなる。 The input constraint data c2 is data consisting of an array of input constraint words and replacement symbols in which words or word strings other than the input constraint words in the word array constituting the output sentence are replaced with predetermined replacement symbols rs. may be In the example shown in FIG. 8, the input constraint data c2 are words or word strings such as "He" and "so that", and the replacement symbol rs "* (asterisk)" is Consists of data arranged in order.
 また、入力制約データc2は、記号ct2を含んでもよい。記号ct2は、例えば、入力制約データc2が出力文t2において用いられるべき入力制約語を含むデータであることを示す。 Also, the input constraint data c2 may include the symbol ct2. Symbol ct2 indicates, for example, that input constraint data c2 is data containing an input constraint word to be used in output sentence t2.
 単語入力部23は、入力制約データc2の入力の後段において開始記号ssをデコーダde2に入力する。デコーダde2は、開始記号ssに応じて、出力文t2の文頭の単語tw21を出力する。単語入力部23は、開始記号ssの入力の後の各段階において、前段階においてデコーダde2から出力された単語をデコーダde2に順次入力する。デコーダde2は、順次入力される単語に応じて、出力文t2を構成する単語tw21,tw22,・・・tw2n(nは2以上の整数)の系列を順次出力する。 The word input unit 23 inputs the start symbol ss to the decoder de2 after the input of the input constraint data c2. The decoder de2 outputs a word tw21 at the beginning of the output sentence t2 according to the start symbol ss. At each stage after the input of the start symbol ss, the word input unit 23 sequentially inputs the words output from the decoder de2 in the previous stage to the decoder de2. The decoder de2 sequentially outputs a series of words tw21, tw22, .
 出力部24は、出力文の出力の終了を意味する終端記号esが出力された場合に、デコーダde2の各段階において順次出力された単語tw21,tw22,・・・tw2nを配列して、出力文t2を生成する。そして、出力部24は、生成した出力文t2を出力する。出力文t2の出力の態様は限定されないが、例えば、所定の記憶手段への記憶、表示手段への表示、音声による出力等であってもよい。 The output unit 24 arranges the words tw21, tw22, . Generate t2. Then, the output unit 24 outputs the generated output sentence t2. The form of output of the output sentence t2 is not limited, but may be, for example, storage in a predetermined storage means, display on a display means, output by voice, or the like.
 図9は、入力制約データ及び当該入力制約データに基づいて出力されうる出力文の例を示す図である。図9に示す例では、入力文「彼は外国人と話せるようになるために英語を勉強する(kare ha gaikokujin to hanaseruyoninarutameni eigo wo benkyo suru)」が入力データa2としてエンコーダen2に入力されたこととする。この入力文が何らの制約なしに通常の翻訳エンジンにより翻訳された場合には、例えば、“He studies English to become able to speak with foreigners.”という出力文が出力される。本実施形態の文生成装置20では、デコーダde2に入力される入力制約データに応じて異なる出力文が出力されうる。 FIG. 9 is a diagram showing an example of input constraint data and an output sentence that can be output based on the input constraint data. In the example shown in FIG. 9, the input sentence "He studies English so that he can speak to foreigners (kare ha gaikokujin to hanaseruyoninarutameni eigo wo benkyo suru)" is input to encoder en2 as input data a2. do. If this input sentence is translated by a normal translation engine without any restrictions, for example, the output sentence "He studies English to become able to speak with foreigners." In the sentence generation device 20 of this embodiment, different output sentences can be output according to the input constraint data input to the decoder de2.
 図9に示されるように、入力制約データ“He * so that *talk with *”が入力された場合には、例えば“He studies English so that he can talk with foreigners.”という出力文が出力される。また、入力制約データ“He * so that *chat *”が入力された場合には、例えば“He studies English so that he can chat foreigners.”という出力文が出力される。また、入力制約データ“He * in order to *speak *”が入力された場合には、例えば“He studies English in order to become able to speak with foreigners.”という出力文が出力される。 As shown in FIG. 9, when the input constraint data "He * * so * talk with *" is input, for example, an output sentence "He studies English so that he can talk with foreigners." . Also, when the input constraint data "He * * so * that * chat *" is input, an output sentence such as "He studies English so that he can chat foreigners." is output. Also, when the input constraint data "He *in order to *speak*" is input, for example, an output sentence "He studies English in order to become able to speak with foreigners." is output.
 また、入力制約データ“He * to be able to *”が入力された場合には、例えば“He studies English to be able to speak with foreigners.”という出力文が出力される。また、入力制約データ“He * for being *”が入力された場合には、例えば“He studies English for being able to speak with foreigners.”という出力文が出力される。また、入力制約データ“His study of English * talk with *”が入力された場合には、例えば“His study of English is to be able to talk with foreigners.”という出力文が出力される。 Also, when the input constraint data "He * to be able to *" is input, an output sentence such as "He studies English to be able to speak with foreigners." is output. Also, when the input constraint data "He * for being *" is input, for example, an output sentence "He studies English for being able to speak with foreigners." is output. Also, when the input constraint data "His study of English *talk with *" is input, for example, an output sentence "His study of English is to be able to talk with foreigners." is output.
 図2と併せて図10を参照しながら、文生成装置20により構成される、作成文を評価する評価システムについて説明する。図10は、文生成装置20により構成された評価システムにおける作成文の評価の処理を示す図である。 An evaluation system configured by the sentence generation device 20 for evaluating created sentences will be described with reference to FIG. 10 together with FIG. FIG. 10 is a diagram showing processing for evaluating a created sentence in the evaluation system configured by the sentence generation device 20. As shown in FIG.
 図10に示されるデコーダde3は、開始記号ssの入力以降の各段階において出力する単語tw31,tw32,・・・,tw3n(nは2以上の整数)の各々について、出力文t3を構成する単語としての尤もらしさを示す尤度を単語ごとに出力する。文生成装置20により構成される評価システムは、出力文t3を正解として、ユーザにより作成及び入力された作成文を評価する。ユーザは、出力文t3に対応する入力文の提示に応じて、例えば入力文の第2言語による対訳を作成文として入力する。なお、本実施形態では、ユーザにより入力された作成文を評価することを想定しているが、ユーザ以外の人及び装置等により作成及び入力された作成文を評価することとしてもよい。 , tw3n (where n is an integer of 2 or more) output at each stage after the start symbol ss is input, the decoder de3 shown in FIG. For each word, output the likelihood that indicates the likelihood of . The evaluation system configured by the sentence generation device 20 evaluates the created sentence created and input by the user with the output sentence t3 as the correct answer. In response to the presentation of the input sentence corresponding to the output sentence t3, the user inputs, for example, a parallel translation of the input sentence in the second language as a created sentence. In this embodiment, it is assumed that a created sentence input by a user is evaluated, but a created sentence created and input by a person other than the user or by a device may be evaluated.
 作成文取得部25は、ユーザにより第2言語で作成され当該評価システムに入力された作成文r3を取得する。作成文r3は、単語rw31,rw32,・・・,rw3n(nは2以上の整数)の配列からなる。 The created sentence acquisition unit 25 acquires the created sentence r3 that was created in the second language by the user and entered into the evaluation system. The created sentence r3 consists of an array of words rw31, rw32, .
 作成文入力部26は、開始記号ssの入力の後の各段階において、前段階においてデコーダde3から出力された単語tw31,tw32,・・・,tw3nに代えて、第2言語で作成された作成文r3を構成する単語rw31,rw32,・・・,rw3nの単語ベクトルをデコーダde3に順次入力する。 At each stage after the input of the start symbol ss, the composed sentence input unit 26 replaces the words tw31, tw32, . Word vectors of words rw31, rw32, .
 作成文評価部27は、開始記号ssの入力及び作成文r3を構成する各単語rw31,rw32,・・・,rw3nの順次入力に基づいて、開始記号ssの入力以降の各段階においてデコーダde3から出力された各単語rw31,rw32,・・・,rw3nの尤度と、出力文t3を構成する各単語tw31,tw32,・・・,tw3nの尤度との対比に基づいて、作成文r3の評価をする。 Based on the input of the start symbol ss and the sequential inputs of the words rw31, rw32, . , rw3n and the likelihoods of the words tw31, tw32, . . . , tw3n forming the output sentence t3, make an evaluation.
 具体的には、デコーダde3は、各出力段階において、文生成モデル生成装置10及び文生成装置20において扱われる全語彙の各単語の尤度を出力する。文生成処理の局面においては、各出力段階において最も高い尤度を有する単語を配列することにより出力文t3が構成される。 Specifically, the decoder de3 outputs the likelihood of each word of the entire vocabulary handled by the sentence generation model generation device 10 and the sentence generation device 20 at each output stage. In the sentence generation process phase, the output sentence t3 is constructed by arranging the words with the highest likelihood at each output stage.
 作成文評価部27は、デコーダde3の各段階において、開始記号ss及び前段階において出力された単語(rw31,rw32,・・・,rw3n)の入力に応じて出力された各語彙の尤度から、作成文r3の各単語rw31,rw32,・・・,rw3n,終端記号esに関連付けられた尤度を取得する。 At each stage of the decoder de3, the created sentence evaluation unit 27 evaluates the likelihood of each vocabulary output according to the input of the start symbol ss and the words (rw31, rw32, . . . , rw3n) output at the previous stage. , rw3n, the likelihood associated with each word rw31, rw32, .
 作成文評価部27は、出力文t3を構成する各単語tw31,tw32,・・・,tw3nの尤度と、作成文r3の各単語rw31,rw32,・・・,rw3nの尤度とを対比することにより、作成文r3の評価値を算出及び出力する。評価値の算出の手法は限定されないが、例えば、各文t3,r3における単語ごとの尤度の比、及び各文t3,r3ごとの尤度の合計または平均等に基づいてもよい。 The created sentence evaluation unit 27 compares the likelihood of each word tw31, tw32, . By doing so, the evaluation value of the created sentence r3 is calculated and output. Although the method of calculating the evaluation value is not limited, it may be based on, for example, the ratio of the likelihoods for each word in each sentence t3 and r3, and the sum or average of the likelihoods for each sentence t3 and r3.
 図10を参照して説明した評価システムによれば、出力文を構成する各単語の尤度と、作成及び入力された作成文を構成する各単語をデコーダに順次入力して得られた各単語の尤度との対比に基づいて、作成文の評価がされる。これにより、入力文に対応する対訳としての作成文の尤もらしさを評価する評価システムを構成できる。 According to the evaluation system described with reference to FIG. 10, each word obtained by sequentially inputting the likelihood of each word forming an output sentence and each word forming a prepared and input prepared sentence into a decoder The constructed sentence is evaluated based on the contrast with the likelihood of . This makes it possible to configure an evaluation system that evaluates the likelihood of a created sentence as a parallel translation corresponding to an input sentence.
 図11は、文生成モデル生成装置10における文生成モデル生成方法の処理内容を示すフローチャートである。 FIG. 11 is a flow chart showing the processing contents of the sentence generative model generation method in the sentence generative model generation device 10. FIG.
 ステップS1において、文生成モデル生成装置10は、第1データa、第2データb及び制約データcを含む学習用データを取得する。学習用データにおける制約データは、コーパスに基づいて予め生成されコーパス記憶部40に記憶されているデータであってもよいし、制約データ生成部11によりコーパスに基づいて生成されたデータであってもよい。 In step S1, the sentence generative model generation device 10 acquires learning data including first data a, second data b, and constraint data c. The constraint data in the learning data may be data generated in advance based on the corpus and stored in the corpus storage unit 40, or may be data generated by the constraint data generation unit 11 based on the corpus. good.
 ステップS2において、第1データaを単語の配列順に応じてエンコーダenに入力する。 In step S2, the first data a is input to the encoder en according to the arrangement order of the words.
 ステップS3において、デコーダ入力部13は、制約データcをデコーダdeに入力する。続いて、ステップS4において、デコーダ入力部13は、開始記号ssをデコーダdeに入力する。さらに、ステップS5において、デコーダ入力部13は、第2データbを配列順に応じて、単語ごとにデコーダdeに入力する。 In step S3, the decoder input unit 13 inputs the constraint data c to the decoder de. Subsequently, in step S4, the decoder input unit 13 inputs the start symbol ss to the decoder de. Furthermore, in step S5, the decoder input unit 13 inputs the second data b to the decoder de word by word in accordance with the arrangement order.
 ステップS6において、更新部14は、開始記号ssの入力以降の後段においてデコーダdeから出力された単語の配列と、第2データbに含まれる単語の配列との単語ごとの誤差を計算し、誤差逆伝搬法により、エンコーダen及びデコーダdeを構成する重み係数を更新する。 In step S6, the update unit 14 calculates the error for each word between the word array output from the decoder de after the input of the start symbol ss and the word array included in the second data b. Backpropagation updates the weighting factors that make up the encoder en and the decoder de.
 ステップS7において、更新部14は、必要量の学習用データに基づく機械学習が終了したか否かを判定する。学習が終了したと判定された場合には、処理はステップS8に進む。一方、学習が終了したと判定されなかった場合には、ステップS1~ステップS6の処理が繰り返される。 In step S7, the update unit 14 determines whether or not machine learning based on the required amount of learning data has been completed. If it is determined that learning has ended, the process proceeds to step S8. On the other hand, if it is determined that the learning has not ended, the processing of steps S1 to S6 is repeated.
 ステップS8において、モデル出力部15は、学習済みの文生成モデルMDを出力する。 In step S8, the model output unit 15 outputs the learned sentence generation model MD.
 図12は、文生成装置20における学習済みの文生成モデルMDを用いた文生成方法の処理内容を示すフローチャートである。 FIG. 12 is a flow chart showing the processing contents of the sentence generation method using the learned sentence generation model MD in the sentence generation device 20. FIG.
 ステップS11において、入力部21は、入力文を構成する入力データの単語を、単語ごとに配列順に応じて文生成モデルのエンコーダに入力する。入力データの入力に応じて、エンコーダは、演算結果をデコーダに出力する。 In step S11, the input unit 21 inputs the words of the input data that make up the input sentence to the encoder of the sentence generation model according to the arrangement order for each word. The encoder outputs the calculation result to the decoder according to the input of the input data.
 ステップS12において、制約データ入力部22は、入力制約データを、単語ごとに配列順に応じてデコーダに入力する。続いて、ステップS13において、単語入力部23は、入力制約データの入力の後段において開始記号ssをデコーダに入力する。 In step S12, the constraint data input unit 22 inputs the input constraint data to the decoder for each word according to the arrangement order. Subsequently, in step S13, the word input unit 23 inputs the start symbol ss to the decoder after inputting the input constraint data.
 ステップS14において、出力部24は、デコーダの出力層からから出力された単語(または記号)を取得する。ステップS15において、出力部24は、デコーダからの出力が出力文の出力の終了を意味する終端記号であるか否かを判定する。デコーダからの出力が終端記号であると判定された場合には、処理はステップS17に進む。一方、デコーダからの出力が終端記号であると判定されなかった場合には、処理はステップS16に進む。 In step S14, the output unit 24 acquires the word (or symbol) output from the output layer of the decoder. In step S15, the output unit 24 determines whether or not the output from the decoder is a terminal symbol indicating the end of the output sentence. If the output from the decoder is determined to be a terminal symbol, the process proceeds to step S17. On the other hand, if the output from the decoder is not determined to be a terminal symbol, the process proceeds to step S16.
 ステップS16において、単語入力部23は、デコーダの前段階の出力層から出力された単語を、デコーダの現段階の入力層に入力する。そして、処理はステップS14に戻る。 In step S16, the word input unit 23 inputs the word output from the previous-stage output layer of the decoder to the current-stage input layer of the decoder. Then, the process returns to step S14.
 ステップS17において、出力部24は、デコーダの各段階において出力層から順次出力された単語を配列して、出力文を生成する。そして、ステップS18において、出力部24は、出力文を出力する。 In step S17, the output unit 24 arranges the words sequentially output from the output layer at each stage of the decoder to generate an output sentence. Then, in step S18, the output unit 24 outputs the output sentence.
 次に、図13を参照して、コンピュータを、本実施形態の文生成モデル生成装置10として機能させるための文生成モデル生成プログラムについて説明する。 Next, a sentence generation model generation program for causing a computer to function as the sentence generation model generation device 10 of this embodiment will be described with reference to FIG.
 図13は、文生成モデル生成プログラムの構成を示す図である。文生成モデル生成プログラムP1は、文生成モデル生成装置10における文生成モデル生成処理を統括的に制御するメインモジュールm10、制約データ生成モジュールm11、エンコーダ入力モジュールm12、デコーダ入力モジュールm13、更新モジュールm14及びモデル出力モジュールm15を備えて構成される。そして、各モジュールm11~m15により、制約データ生成部11、エンコーダ入力部12、デコーダ入力部13、更新部14及びモデル出力部15のための各機能が実現される。 FIG. 13 is a diagram showing the configuration of the sentence generation model generation program. The sentence generative model generation program P1 includes a main module m10 for overall control of sentence generative model generation processing in the sentence generative model generation device 10, a constraint data generation module m11, an encoder input module m12, a decoder input module m13, an update module m14, and It is configured with a model output module m15. Each of the modules m11 to m15 implements the functions of the constraint data generation unit 11, the encoder input unit 12, the decoder input unit 13, the update unit 14, and the model output unit 15. FIG.
 なお、文生成モデル生成プログラムP1は、通信回線等の伝送媒体を介して伝送される態様であってもよいし、図13に示されるように、記録媒体M1に記憶される態様であってもよい。 The sentence generation model generation program P1 may be transmitted via a transmission medium such as a communication line, or may be stored in a recording medium M1 as shown in FIG. good.
 次に、図14を参照して、コンピュータを、本実施形態の文生成装置20として機能させるための文生成プログラムについて説明する。 Next, a sentence generation program for causing a computer to function as the sentence generation device 20 of this embodiment will be described with reference to FIG.
 図14は、文生成プログラムの構成を示す図である。文生成プログラムP2は、文生成装置20における文生成処理を統括的に制御するメインモジュールm20、入力モジュールm21、制約データ入力モジュールm22、単語入力モジュールm23及び出力モジュールm24を備えて構成される。また、文生成プログラムP2は、作成文取得モジュールm25、作成文入力モジュールm26及び作成文評価モジュールm27を更に備えてもよい。を備えて構成される。そして、各モジュールm21~m27により、入力部21、制約データ入力部22、単語入力部23、出力部24、作成文取得部25、作成文入力部26及び作成文評価部27のための各機能が実現される。 FIG. 14 is a diagram showing the configuration of the sentence generation program. The sentence generation program P2 is composed of a main module m20, an input module m21, a constraint data input module m22, a word input module m23, and an output module m24, which collectively control sentence generation processing in the sentence generation device 20. FIG. The sentence generation program P2 may further include a created sentence acquisition module m25, a created sentence input module m26, and a created sentence evaluation module m27. configured with Functions for the input unit 21, the constraint data input unit 22, the word input unit 23, the output unit 24, the created sentence acquisition unit 25, the created sentence input unit 26, and the created sentence evaluation unit 27 are provided by the respective modules m21 to m27. is realized.
 なお、文生成プログラムP2は、通信回線等の伝送媒体を介して伝送される態様であってもよいし、図14に示されるように、記録媒体M2記憶される態様であってもよい。 The sentence generation program P2 may be transmitted via a transmission medium such as a communication line, or may be stored in a recording medium M2 as shown in FIG.
 以上説明した本実施形態の文生成モデル生成装置10、文生成モデル生成方法及び文生成モデル生成プログラムP1によれば、文生成モデルが、エンコーダ及びデコーダを含むエンコーダデコーダモデルにより構成される。入力文に対応する第1データがエンコーダに入力され、出力文に対応する第2データがデコーダに入力される文生成モデルの学習において、出力文を構成する単語の配列のうちから特定された制約語を一以上含む制約データが、第2データと併せてデコーダに入力される。制約データにおける制約語の配列順は単語の配列における配列順を維持している。所望の特定表現を構成する単語を制約語として特定した制約データをデコーダに入力することにより、文生成モデルが、制約データと第2データとの関連性を学習することとなるので、制約データに含まれる制約語からなる特定の表現を用いた出力文を出力する文生成モデルを得ることができる。 According to the sentence generative model generating device 10, the sentence generative model generating method, and the sentence generative model generating program P1 of this embodiment described above, the sentence generative model is composed of an encoder-decoder model including an encoder and a decoder. Constraints identified from the sequence of words forming an output sentence in training of a sentence generation model in which first data corresponding to an input sentence is input to an encoder and second data corresponding to an output sentence is input to a decoder Constraint data including one or more words is input to the decoder along with the second data. The arrangement order of the constraint words in the constraint data maintains the arrangement order of the word arrangement. By inputting to the decoder constraint data specifying words constituting a desired specific expression as constraint words, the sentence generation model learns the relationship between the constraint data and the second data. A sentence generation model can be obtained that outputs an output sentence using a specific expression consisting of contained constraint words.
 また、別の形態に係る文生成モデル生成装置では、制約データは、出力文を構成する単語の配列のうちの制約語以外の単語又は単語列が所定の置換記号に置換された、制約語及び置換記号の配列からなることとしてもよい。 Further, in the sentence generative model generation device according to another aspect, the constraint data includes constraint words and It may consist of an array of replacement symbols.
 上記形態によれば、制約データが、制約語と、制約語以外の単語または単語列から置換された置換記号との配列により構成されるので、第2データにおける制約語に相当する単語が、出力文において用いられるべき単語として学習されると共に、第2データにおける置換記号に相当する単語が、出力文における任意の表現として学習される。従って、制約語により構成される特定の表現を用いた出力文を出力可能な文生成モデルを生成できる。 According to the above aspect, the constraint data is composed of the constraint word and the sequence of the substitution symbol substituted from the word or word string other than the constraint word, so that the word corresponding to the constraint word in the second data is output. While learning as words to be used in sentences, words corresponding to replacement symbols in the second data are learned as arbitrary expressions in output sentences. Therefore, it is possible to generate a sentence generation model capable of outputting an output sentence using a specific expression composed of constraint words.
 また、別の形態に係る文生成モデル生成装置は、第1言語により構成された第1の文と、第2言語により構成された第1の文の対訳である第2の文とからなるコーパスに基づいて、第2の文を構成する単語の配列から特定された制約語を、第2の文における単語の配列順を維持させながら含む、制約データを生成する、制約データ生成部、をさらに含むこととしてもよい。 Further, a sentence generative model generation device according to another aspect provides a corpus consisting of a first sentence composed in a first language and a second sentence that is a parallel translation of the first sentence composed in a second language. a constraint data generation unit that generates constraint data including constraint words identified from the arrangement of words that make up the second sentence based on may be included.
 上記形態によれば、コーパスに基づいて、出力文において用いられるべき所望の特定表現に相当する単語を指定するための制約データを学習用データとして得ることができる。 According to the above embodiment, constraint data for designating words corresponding to desired specific expressions to be used in output sentences can be obtained as learning data based on the corpus.
 また、別の形態に係る文生成モデル生成装置は、制約データ生成部は、第2の文を構成する単語配列のうちの、制約語として特定された単語以外の単語または単語列を置換記号に置換して、制約語及び置換記号の配列からなる制約データを生成することとしてもよい。 Further, in a sentence generation model generation device according to another aspect, the constraint data generation unit converts words or word strings other than the words specified as constraint words in the word sequence forming the second sentence into replacement symbols. The replacement may be performed to generate constraint data consisting of an array of constraint words and replacement symbols.
 上記形態によれば、コーパスに基づいて、出力文において用いられるべき所望の特定表現に相当する単語を指定し、且つ、出力文における任意の表現を指定するための制約データを学習用データとして得ることができる。 According to the above aspect, based on the corpus, a word corresponding to a desired specific expression to be used in an output sentence is specified, and constraint data for specifying an arbitrary expression in the output sentence is obtained as learning data. be able to.
 また、別の形態に係る文生成モデル生成装置では、第1データは、入力文を構成する複数の単語の配列に代えて、言語的な意味内容を有さない所定の記号である任意記号であることとしてもよい。 Further, in the sentence generation model generating device according to another aspect, the first data is an arbitrary symbol that is a predetermined symbol having no linguistic meaning, instead of the arrangement of a plurality of words constituting the input sentence. It can be a certain thing.
 上記形態によれば、出力文の対訳である入力文に相当する第1データが存在しなくても、制約データと第2データとの関係性をデコーダにおいて学習させることができる。従って、低コストで学習用データの拡充を図ることができると共に、デコーダにより出力される出力文の所望の出力に対する精度を高めることができる。 According to the above embodiment, even if the first data corresponding to the input sentence which is the parallel translation of the output sentence does not exist, the decoder can learn the relationship between the constraint data and the second data. Therefore, it is possible to expand the learning data at a low cost, and to improve the accuracy of the desired output of the output sentence output by the decoder.
 上記課題を解決するために、本発明の一形態に係る文生成モデルは、コンピュータを機能させ、第1言語の入力文の入力に応じて、第1言語とは異なる第2言語の出力文を生成するための、機械学習による学習済みの文生成モデルであって、文生成モデルの機械学習に用いられる学習用データは、入力文を構成する複数の単語の配列を含む第1データ、入力文に対応する出力文を構成する複数の単語の配列を含む第2データ、及び、制約データを含み、制約データは、出力文を構成する単語の配列のうちから特定された単語である制約語を一以上含み、制約データにおける制約語の配列順は単語の配列における配列順を維持しており、文生成モデルは、ニューラルネットワークを含みエンコーダ及びデコーダにより構成されるエンコーダデコーダモデルであり、第1データが単語の配列順に応じてエンコーダに入力され、制約データ、出力文の出力の開始を意味する所定の記号である開始記号、及び、第2データが、制約データ、開始記号及び第2データの単語及び記号の配列順に応じてデコーダに入力され、開始記号の入力以降の後段においてデコーダから出力された単語の配列と、第2データに含まれる単語の配列との単語ごとの誤差に基づいて、エンコーダ及びデコーダを構成する重み係数を更新する機械学習により構築される。 In order to solve the above problems, a sentence generation model according to one aspect of the present invention operates a computer to generate an output sentence in a second language different from the first language in response to an input sentence in a first language. A sentence generation model that has been learned by machine learning for generating a sentence generation model, and learning data used for machine learning of the sentence generation model includes first data including an array of a plurality of words that constitute an input sentence, an input sentence second data including a sequence of a plurality of words forming an output sentence corresponding to and constraint data, wherein the constraint data includes a constraint word that is a word specified from the sequence of words forming the output sentence including one or more, the arrangement order of the constraint words in the constraint data maintains the arrangement order of the word arrangement, the sentence generation model is an encoder-decoder model that includes a neural network and is composed of an encoder and a decoder, and the first data is input to the encoder according to the arrangement order of the words, and the constraint data, the start symbol, which is a predetermined symbol that means the start of output of the output sentence, and the second data, the constraint data, the start symbol, and the words of the second data and based on the error for each word between the arrangement of words input to the decoder according to the arrangement order of the symbols and output from the decoder after the input of the start symbol and the arrangement of words contained in the second data, the encoder and built by machine learning to update the weighting coefficients that make up the decoder.
 上記の形態によれば、文生成モデルが、エンコーダ及びデコーダを含むエンコーダデコーダモデルにより構成される。当該文生成モデルの学習において、入力文に対応する第1データがエンコーダに入力され、出力文に対応する第2データがデコーダに入力されると共に、出力文を構成する単語の配列のうちから特定された制約語を一以上含む制約データが、第2データと併せてデコーダに入力される。制約データにおける制約語の配列順は単語の配列における配列順を維持している。所望の特定表現を構成する単語を制約語として特定した制約データがデコーダに入力されることにより、制約データと第2データとの関連性が学習されることとなるので、文生成モデルは、制約データに含まれる制約語からなる特定の表現を用いた出力文を出力できる。 According to the above form, the sentence generation model is composed of an encoder-decoder model including an encoder and a decoder. In learning the sentence generation model, the first data corresponding to the input sentence is input to the encoder, the second data corresponding to the output sentence is input to the decoder, and the sequence of words constituting the output sentence is specified. Constraint data including one or more of the constrained words is input to the decoder together with the second data. The arrangement order of the constraint words in the constraint data maintains the arrangement order of the word arrangement. Relevance between the constraint data and the second data is learned by inputting to the decoder constraint data specifying words constituting a desired specific expression as constraint words. It is possible to output sentences using specific expressions consisting of constraint words contained in data.
 上記課題を解決するために、本発明の一形態に係る文生成装置は、機械学習により構築された文生成モデルを用いて、第1言語の入力文の入力に応じて、第1言語とは異なる第2言語の出力文を生成する文生成装置であって、文生成モデルの機械学習に用いられる学習用データは、入力文に相当する複数の単語の配列を含む第1データ、入力文に対応する出力文に相当する複数の単語の配列を含む第2データ、及び、制約データを含み、制約データは、出力文を構成する単語の配列のうちから特定された単語である制約語を一以上含み、制約データにおける制約語の配列順は単語の配列における配列順を維持しており、文生成モデルは、ニューラルネットワークを含みエンコーダ及びデコーダにより構成されるエンコーダデコーダモデルであり、第1データが単語の配列順に応じてエンコーダに入力され、制約データ、出力文の出力の開始を意味する所定の記号である開始記号、及び、第2データが、制約データ、開始記号及び第2データの単語及び記号の配列順に応じてデコーダに入力され、開始記号の入力以降の後段においてデコーダから出力された単語の配列と、第2データに含まれる単語の配列との単語ごとの誤差に基づいて、エンコーダ及びデコーダを構成する重み係数を更新する機械学習により構築され、文生成装置は、入力文を構成する入力データを単語の配列順に応じてエンコーダに入力する入力部と、出力文において用いられるべき語として任意に特定された入力制約語が、出力文における配列順を維持しながら含まれる入力制約データをデコーダに入力する制約データ入力部と、入力制約データの入力の後段において開始記号をデコーダに入力し、開始記号の入力の後の各段階において、前段階においてデコーダから出力された単語をデコーダに順次入力する単語入力部と、デコーダの各段階において順次出力された単語を配列して出力文を生成し、生成した出力文を出力する出力部と、を備える。 In order to solve the above problems, a sentence generation device according to one aspect of the present invention uses a sentence generation model constructed by machine learning to generate an input sentence in a first language. A sentence generation device for generating output sentences in different second languages, wherein learning data used for machine learning of a sentence generation model includes first data including an array of a plurality of words corresponding to an input sentence, second data including a sequence of a plurality of words corresponding to the corresponding output sentence; Including the above, the arrangement order of the constraint words in the constraint data maintains the arrangement order of the word arrangement, the sentence generation model is an encoder-decoder model that includes a neural network and is composed of an encoder and a decoder, and the first data is Input to the encoder according to the arrangement order of words, constraint data, a start symbol that is a predetermined symbol signifying the start of output of an output sentence, and second data are words of the constraint data, the start symbol, and the second data The encoder and the The sentence generator is constructed by machine learning that updates the weighting coefficients that make up the decoder. An arbitrarily specified input constraint word is included while maintaining the arrangement order in the output sentence. , at each stage after the input of the start symbol, a word input unit for sequentially inputting the words output from the decoder at the previous stage into the decoder, and generating an output sentence by arranging the words sequentially output at each stage of the decoder. and an output unit for outputting the generated output sentence.
 上記の形態によれば、文生成モデルが、エンコーダ及びデコーダを含むエンコーダデコーダモデルにより構成される。当該文生成モデルの学習において、入力文に対応する第1データがエンコーダに入力され、出力文に対応する第2データがデコーダに入力されると共に、出力文を構成する単語の配列のうちから特定された制約語を一以上含む制約データが、第2データと併せてデコーダに入力される。制約データにおける制約語の配列順は単語の配列における配列順を維持している。これにより、学習済みの文生成モデルは、制約データと第2データとの関連性を学習している。従って、入力文を構成する入力データをエンコーダに入力すると共に、出力文における制約条件を指定するための入力制約データをデコーダに入力することにより、所望の特定表現を用いた出力文を出力できる。 According to the above form, the sentence generation model is composed of an encoder-decoder model including an encoder and a decoder. In learning the sentence generation model, the first data corresponding to the input sentence is input to the encoder, the second data corresponding to the output sentence is input to the decoder, and the sequence of words constituting the output sentence is specified. Constraint data including one or more of the constrained words is input to the decoder together with the second data. The arrangement order of the constraint words in the constraint data maintains the arrangement order of the word arrangement. As a result, the learned sentence generation model learns the relationship between the constraint data and the second data. Therefore, by inputting input data constituting an input sentence to the encoder and input constraint data for specifying constraint conditions in the output sentence to the decoder, an output sentence using a desired specific expression can be output.
 また、別の形態に係る文生成装置では、デコーダは、開始記号の入力以降の各段階において出力する単語の各々について、出力文を構成する単語としての尤もらしさを示す尤度を単語ごとに出力し、文生成装置は、開始記号の入力の後の各段階において、前段階においてデコーダから出力された単語に代えて、第2言語で作成された作成文を構成する単語をデコーダに順次入力する作成文入力部と、開始記号の入力及び作成文を構成する各単語の順次入力に基づいて、開始記号の入力以降の各段階においてデコーダから出力された作成文を構成する各単語の尤度と、出力文を構成する各単語の尤度との対比に基づいて、作成文の評価をする作成文評価部と、をさらに備える。 Further, in the sentence generation device according to another aspect, the decoder outputs, for each word, a likelihood indicating the likelihood of each word to be output as a word forming the output sentence at each stage after the input of the start symbol. Then, in each stage after the input of the start symbol, the sentence generation device sequentially inputs to the decoder words constituting the sentence created in the second language instead of the words output from the decoder in the previous stage. a created sentence input unit, and the likelihood of each word composing the created sentence output from the decoder at each stage after the input of the starting symbol based on the input of the starting symbol and the sequential input of each word composing the created sentence; and a prepared sentence evaluation unit that evaluates the prepared sentence based on the comparison with the likelihood of each word constituting the output sentence.
 上記の形態によれば、出力文を構成する各単語の尤度と、作成及び入力された作成文を構成する各単語をデコーダに順次入力して得られた各単語の尤度との対比に基づいて、作成文の評価がされる。これにより、入力文に対応する対訳としての作成文の尤もらしさを評価する評価システムを構成できる。 According to the above embodiment, the likelihood of each word that constitutes the output sentence is compared with the likelihood of each word that is obtained by sequentially inputting each word that constitutes the created and input sentence to the decoder. Based on this, the written sentence is evaluated. This makes it possible to configure an evaluation system that evaluates the likelihood of a created sentence as a parallel translation corresponding to an input sentence.
 以上、本実施形態について詳細に説明したが、当業者にとっては、本実施形態が本明細書中に説明した実施形態に限定されるものではないということは明らかである。本実施形態は、特許請求の範囲の記載により定まる本発明の趣旨及び範囲を逸脱することなく修正及び変更態様として実施することができる。したがって、本明細書の記載は、例示説明を目的とするものであり、本実施形態に対して何ら制限的な意味を有するものではない。 Although the present embodiment has been described in detail above, it is obvious to those skilled in the art that the present embodiment is not limited to the embodiments described herein. This embodiment can be implemented as modifications and changes without departing from the spirit and scope of the present invention defined by the description of the claims. Therefore, the description in this specification is for the purpose of illustration and explanation, and does not have any restrictive meaning with respect to the present embodiment.
 本明細書で説明した各態様/実施形態は、LTE(Long Term Evolution)、LTE-A(LTE-Advanced)、SUPER 3G、IMT-Advanced、4G、5G、FRA(Future Radio Access)、W-CDMA(登録商標)、GSM(登録商標)、CDMA2000、UMB(Ultra Mobile Broadband)、IEEE 802.11(Wi-Fi)、IEEE 802.16(WiMAX)、IEEE 802.20、UWB(Ultra-WideBand)、Bluetooth(登録商標)、その他の適切なシステムを利用するシステム及び/又はこれらに基づいて拡張された次世代システムに適用されてもよい。 Each aspect/embodiment described herein includes LTE (Long Term Evolution), LTE-A (LTE-Advanced), SUPER 3G, IMT-Advanced, 4G, 5G, FRA (Future Radio Access), W-CDMA (registered trademark), GSM (registered trademark), CDMA2000, UMB (Ultra Mobile Broadband), IEEE 802.11 (Wi-Fi), IEEE 802.16 (WiMAX), IEEE 802.20, UWB (Ultra-WideBand), It may be applied to systems utilizing Bluetooth®, other suitable systems, and/or advanced next generation systems based thereon.
 本明細書で説明した各態様/実施形態の処理手順、シーケンス、フローチャートなどは、矛盾の無い限り、順序を入れ替えてもよい。例えば、本明細書で説明した方法については、例示的な順序で様々なステップの要素を提示しており、提示した特定の順序に限定されない。 The order of the processing procedures, sequences, flowcharts, etc. of each aspect/embodiment described in this specification may be changed as long as there is no contradiction. For example, the methods described herein present elements of the various steps in a sample order, and are not limited to the specific order presented.
 入出力された情報等は特定の場所(例えば、メモリ)に保存されてもよいし、管理テーブルで管理してもよい。入出力される情報等は、上書き、更新、または追記され得る。出力された情報等は削除されてもよい。入力された情報等は他の装置へ送信されてもよい。 Input and output information may be saved in a specific location (for example, memory) or managed in a management table. Input/output information and the like may 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.
 判定は、1ビットで表される値(0か1か)によって行われてもよいし、真偽値(Boolean:trueまたはfalse)によって行われてもよいし、数値の比較(例えば、所定の値との比較)によって行われてもよい。 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).
 本明細書で説明した各態様/実施形態は単独で用いてもよいし、組み合わせて用いてもよいし、実行に伴って切り替えて用いてもよい。また、所定の情報の通知(例えば、「Xであること」の通知)は、明示的に行うものに限られず、暗黙的(例えば、当該所定の情報の通知を行わない)ことによって行われてもよい。 Each aspect/embodiment described in this specification may be used alone, may be used in combination, or may be used by switching according to execution. In addition, the notification of predetermined information (for example, notification of “being X”) is not limited to being performed explicitly, but may be performed implicitly (for example, not notifying the predetermined information). good too.
 以上、本開示について詳細に説明したが、当業者にとっては、本開示が本開示中に説明した実施形態に限定されるものではないということは明らかである。本開示は、請求の範囲の記載により定まる本開示の趣旨及び範囲を逸脱することなく修正及び変更態様として実施することができる。したがって、本開示の記載は、例示説明を目的とするものであり、本開示に対して何ら制限的な意味を有するものではない。 Although the present disclosure has been described in detail above, it is clear to those skilled in the art that the present disclosure is not limited to the embodiments described in the present disclosure. The present disclosure can be practiced with modifications and variations without departing from the spirit and scope of the present disclosure as defined by the claims. Accordingly, the description of the present disclosure is for illustrative purposes and is not meant to be limiting in any way.
 ソフトウェアは、ソフトウェア、ファームウェア、ミドルウェア、マイクロコード、ハードウェア記述言語と呼ばれるか、他の名称で呼ばれるかを問わず、命令、命令セット、コード、コードセグメント、プログラムコード、プログラム、サブプログラム、ソフトウェアモジュール、アプリケーション、ソフトウェアアプリケーション、ソフトウェアパッケージ、ルーチン、サブルーチン、オブジェクト、実行可能ファイル、実行スレッド、手順、機能などを意味するよう広く解釈されるべきである。 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.
 また、ソフトウェア、命令などは、伝送媒体を介して送受信されてもよい。例えば、ソフトウェアが、同軸ケーブル、光ファイバケーブル、ツイストペア及びデジタル加入者回線(DSL)などの有線技術及び/又は赤外線、無線及びマイクロ波などの無線技術を使用してウェブサイト、サーバ、又は他のリモートソースから送信される場合、これらの有線技術及び/又は無線技術は、伝送媒体の定義内に含まれる。 Also, software, instructions, etc. may be transmitted and received via a transmission medium. For example, the software can be used to access websites, servers, or other When transmitted from a remote source, these wired and/or wireless technologies are included within the definition of transmission media.
 本開示において説明した情報、信号などは、様々な異なる技術のいずれかを使用して表されてもよい。例えば、上記の説明全体に渡って言及され得るデータ、命令、コマンド、情報、信号、ビット、シンボル、チップなどは、電圧、電流、電磁波、磁界若しくは磁性粒子、光場若しくは光子、又はこれらの任意の組み合わせによって表されてもよい。 The information, signals, etc. described in this disclosure may be represented using any of a variety of different technologies. For example, data, instructions, commands, information, signals, bits, symbols, chips, etc. that may be referred to throughout the above description 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
 なお、本開示において説明した用語及び/又は本明細書の理解に必要な用語については、同一の又は類似する意味を有する用語と置き換えてもよい。 The terms explained in the present disclosure and/or the terms necessary for understanding the specification may be replaced with terms having the same or similar meanings.
 本明細書で使用する「システム」および「ネットワーク」という用語は、互換的に使用される。 The terms "system" and "network" used herein are used interchangeably.
 また、本明細書で説明した情報、パラメータなどは、絶対値で表されてもよいし、所定の値からの相対値で表されてもよいし、対応する別の情報で表されてもよい。 In addition, the information, parameters, etc. described in this specification may be represented by absolute values, may be represented by relative values from a predetermined value, or may be represented by corresponding other information. .
 本開示で使用する「判断(determining)」、「決定(determining)」という用語は、多種多様な動作を包含する場合がある。「判断」、「決定」は、例えば、判定(judging)、計算(calculating)、算出(computing)、処理(processing)、導出(deriving)、調査(investigating)、探索(looking up、search、inquiry)(例えば、テーブル、データベース又は別のデータ構造での探索)、確認(ascertaining)した事を「判断」「決定」したとみなす事などを含み得る。また、「判断」、「決定」は、受信(receiving)(例えば、情報を受信すること)、送信(transmitting)(例えば、情報を送信すること)、入力(input)、出力(output)、アクセス(accessing)(例えば、メモリ中のデータにアクセスすること)した事を「判断」「決定」したとみなす事などを含み得る。また、「判断」、「決定」は、解決(resolving)、選択(selecting)、選定(choosing)、確立(establishing)、比較(comparing)などした事を「判断」「決定」したとみなす事を含み得る。つまり、「判断」「決定」は、何らかの動作を「判断」「決定」したとみなす事を含み得る。また、「判断(決定)」は、「想定する(assuming)」、「期待する(expecting)」、「みなす(considering)」などで読み替えられてもよい。 The terms "determining" and "determining" used in this disclosure may encompass a wide variety of actions. "Judgement" and "determination" are, for example, judging, calculating, computing, processing, deriving, investigating, looking up, searching, inquiring (eg, lookup in a table, database, or other data structure), ascertaining as "judged" or "determined", and the like. Also, "judgment" and "determination" are used for receiving (e.g., receiving information), transmitting (e.g., transmitting information), input, output, access (accessing) (for example, accessing data in memory) may include deeming that a "judgment" or "decision" has been made. In addition, "judgment" and "decision" are considered to be "judgment" and "decision" by resolving, selecting, choosing, establishing, comparing, etc. can contain. In other words, "judgment" and "decision" may include considering that some action is "judgment" and "decision". Also, "judgment (decision)" may be read as "assuming", "expecting", "considering", or the like.
 本開示で使用する「に基づいて」という記載は、別段に明記されていない限り、「のみに基づいて」を意味しない。言い換えれば、「に基づいて」という記載は、「のみに基づいて」と「に少なくとも基づいて」の両方を意味する。 The term "based on" as used in this disclosure does not mean "based only on," unless otherwise specified. In other words, the phrase "based on" means both "based only on" and "based at least on."
 本明細書で「第1の」、「第2の」などの呼称を使用した場合においては、その要素へのいかなる参照も、それらの要素の量または順序を全般的に限定するものではない。これらの呼称は、2つ以上の要素間を区別する便利な方法として本明細書で使用され得る。したがって、第1および第2の要素への参照は、2つの要素のみがそこで採用され得ること、または何らかの形で第1の要素が第2の要素に先行しなければならないことを意味しない。 Where the designations "first", "second", etc. are used herein, any reference to the elements does not generally limit the quantity or order of those elements. These designations may be used herein as a convenient method of distinguishing between two or more elements. Thus, references to first and second elements do not imply that only two elements may be employed therein or that the first element must precede the second element in any way.
 「含む(include)」、「含んでいる(including)」、およびそれらの変形が、本明細書あるいは特許請求の範囲で使用されている限り、これら用語は、用語「備える(comprising)」と同様に、包括的であることが意図される。さらに、本明細書あるいは特許請求の範囲において使用されている用語「または(or)」は、排他的論理和ではないことが意図される。 Wherever "include," "including," and variations thereof are used in the specification or claims, these terms are synonymous with the term "comprising." are intended to be inclusive. Furthermore, the term "or" as used in this specification or the claims is not intended to be an exclusive OR.
 本明細書において、文脈または技術的に明らかに1つのみしか存在しない装置である場合以外は、複数の装置をも含むものとする。 In this specification, a plurality of devices shall also be included unless there is clearly only one device from the context or technically.
 本開示の全体において、文脈から明らかに単数を示したものではなければ、複数のものを含むものとする。 Throughout this disclosure, the plural shall be included unless the singular is clearly indicated from the context.
 10…文生成モデル生成装置、11…制約データ生成部、12…エンコーダ入力部、13…デコーダ入力部、14…更新部、15…モデル出力部、20…文生成装置、21…入力部、22…制約データ入力部、23…単語入力部、24…出力部、25…作成文取得部、26…作成文入力部、27…作成文評価部、30…モデル記憶部、40…コーパス記憶部、de,de1,de2,de3…デコーダ、en,en1,en2…エンコーダ、M1…記録媒体、m10…メインモジュール、m11…制約データ生成モジュール、m12…エンコーダ入力モジュール、m13…デコーダ入力モジュール、m14…更新モジュール、m15…モデル出力モジュール、M2…記録媒体、m20…メインモジュール、m21…入力モジュール、m22…制約データ入力モジュール、m23…単語入力モジュール、m24…出力モジュール、m25…作成文取得モジュール、m26…作成文入力モジュール、m27…作成文評価モジュール、MD,MD1,MD2…文生成モデル、P1…文生成モデル生成プログラム、P2…文生成プログラム。 REFERENCE SIGNS LIST 10 sentence generation model generation device 11 constraint data generation unit 12 encoder input unit 13 decoder input unit 14 update unit 15 model output unit 20 sentence generation device 21 input unit 22 ... constraint data input unit, 23... word input unit, 24... output unit, 25... created sentence acquisition unit, 26... created sentence input unit, 27... created sentence evaluation unit, 30... model storage unit, 40... corpus storage unit, de, de1, de2, de3 ... decoder, en, en1, en2 ... encoder, M1 ... recording medium, m10 ... main module, m11 ... constraint data generation module, m12 ... encoder input module, m13 ... decoder input module, m14 ... update Modules m15... model output module, M2... recording medium, m20... main module, m21... input module, m22... constraint data input module, m23... word input module, m24... output module, m25... written sentence acquisition module, m26... Created sentence input module, m27... Created sentence evaluation module, MD, MD1, MD2... Sentence generation model, P1... Sentence generation model generation program, P2... Sentence generation program.

Claims (8)

  1.  第1言語の入力文の入力に応じて、前記第1言語とは異なる第2言語の出力文を生成する文生成モデルを機械学習により生成する文生成モデル生成装置であって、
     前記文生成モデルは、ニューラルネットワークを含みエンコーダ及びデコーダにより構成されるエンコーダデコーダモデルであり、
     前記文生成モデルの機械学習に用いられる学習用データは、第1データ、制約データ及び第2データを含み、
     前記第1データは、前記入力文を構成する複数の単語の配列を含み、
     前記第2データは、前記入力文に対応する前記出力文を構成する複数の単語の配列を含み、
     前記制約データは、前記出力文を構成する単語の配列のうちから特定された単語である制約語を一以上含み、前記制約データにおける前記制約語の配列順は前記単語の配列における配列順を維持しており、
     前記文生成モデル生成装置は、
     前記第1データを単語の配列順に応じて前記エンコーダに入力するエンコーダ入力部と、
     前記制約データ、前記出力文の出力の開始を意味する所定の記号である開始記号、及び、前記第2データを構成する単語を配列順に応じて、前記デコーダに入力するデコーダ入力部と、
     前記開始記号の入力以降の後段において前記デコーダから出力された単語の配列と、前記第2データに含まれる単語の配列との単語ごとの誤差に基づいて、前記エンコーダ及びデコーダを構成する重み係数を更新する更新部と、
     前記更新部により前記重み係数が更新された文生成モデルを出力するモデル出力部と、
     を備える文生成モデル生成装置。
    A sentence generation model generation device for generating, by machine learning, a sentence generation model for generating an output sentence in a second language different from the first language according to an input sentence in the first language,
    The sentence generation model is an encoder-decoder model composed of an encoder and a decoder including a neural network,
    The learning data used for machine learning of the sentence generation model includes first data, constraint data and second data,
    the first data includes an array of a plurality of words that make up the input sentence;
    the second data includes an array of a plurality of words forming the output sentence corresponding to the input sentence;
    The constraint data includes at least one constraint word that is a word specified from the word arrangement that constitutes the output sentence, and the arrangement order of the constraint words in the constraint data maintains the arrangement order of the word arrangement. and
    The sentence generation model generation device is
    an encoder input unit for inputting the first data to the encoder in accordance with the arrangement order of words;
    a decoder input unit for inputting the restriction data, a start symbol, which is a predetermined symbol indicating the start of output of the output sentence, and the words constituting the second data to the decoder according to the arrangement order;
    A weighting factor that configures the encoder and the decoder based on an error for each word between the word arrangement output from the decoder in the subsequent stage after the input of the start symbol and the word arrangement contained in the second data. an updating unit to update;
    a model output unit that outputs a sentence generation model in which the weighting factor is updated by the update unit;
    A sentence generation model generation device comprising:
  2.  前記制約データは、前記出力文を構成する単語の配列のうちの前記制約語以外の単語又は単語列が所定の置換記号に置換された、前記制約語及び前記置換記号の配列からなる、
     請求項1に記載の文生成モデル生成装置。
    The constraint data consists of an array of the constraint words and the replacement symbols, in which words or word strings other than the constraint words in the array of words forming the output sentence are replaced with predetermined replacement symbols.
    The sentence generative model generating device according to claim 1.
  3.  前記第1言語により構成された第1の文と、第2言語により構成された前記第1の文の対訳である第2の文とからなるコーパスに基づいて、前記第2の文を構成する単語の配列から特定された前記制約語を、前記第2の文における単語の配列順を維持させながら含む、前記制約データを生成する、制約データ生成部、をさらに含む、
     請求項1または2に記載の文生成モデル生成装置。
    constructing the second sentence based on a corpus consisting of a first sentence constructed in the first language and a second sentence that is a parallel translation of the first sentence constructed in the second language; a constraint data generation unit that generates the constraint data including the constraint word identified from the word arrangement while maintaining the arrangement order of the words in the second sentence;
    3. The sentence generative model generation device according to claim 1 or 2.
  4.  前記制約データ生成部は、前記第2の文を構成する単語配列のうちの、前記制約語として特定された単語以外の単語または単語列を所定の置換記号に置換して、前記制約語及び前記置換記号の配列からなる前記制約データを生成する、
     請求項3に記載の文生成モデル生成装置。
    The constraint data generation unit replaces words or word strings other than the words specified as the constraint words in the word array forming the second sentence with predetermined replacement symbols, and replaces the constraint words and the generating the constraint data consisting of an array of permutation symbols;
    The sentence generative model generating device according to claim 3.
  5.  前記第1データは、前記入力文を構成する複数の単語の配列に代えて、言語的な意味内容を有さない所定の記号である任意記号である、
     請求項1~4のいずれか一項に記載の文生成モデル生成装置。
    The first data is an arbitrary symbol that is a predetermined symbol that does not have linguistic meaning in place of the arrangement of a plurality of words that make up the input sentence.
    The sentence generative model generation device according to any one of claims 1 to 4.
  6.  コンピュータを機能させ、第1言語の入力文の入力に応じて、前記第1言語とは異なる第2言語の出力文を生成するための、機械学習による学習済みの文生成モデルであって、
     前記文生成モデルの機械学習に用いられる学習用データは、前記入力文を構成する複数の単語の配列を含む第1データ、前記入力文に対応する前記出力文を構成する複数の単語の配列を含む第2データ、及び、制約データを含み、
     前記制約データは、前記出力文を構成する単語の配列のうちから特定された単語である制約語を一以上含み、前記制約データにおける前記制約語の配列順は前記単語の配列における配列順を維持しており、
     前記文生成モデルは、
     ニューラルネットワークを含みエンコーダ及びデコーダにより構成されるエンコーダデコーダモデルであり、
     前記第1データが単語の配列順に応じて前記エンコーダに入力され、
     前記制約データ、前記出力文の出力の開始を意味する所定の記号である開始記号、及び、前記第2データが、前記制約データ、前記開始記号及び前記第2データの単語及び記号の配列順に応じて前記デコーダに入力され、
     前記開始記号の入力以降の後段において前記デコーダから出力された単語の配列と、前記第2データに含まれる単語の配列との単語ごとの誤差に基づいて、前記エンコーダ及びデコーダを構成する重み係数を更新する機械学習により構築される、
     学習済みの文生成モデル。
    A sentence generation model trained by machine learning for operating a computer to generate an output sentence in a second language different from the first language in response to an input sentence in the first language,
    The learning data used for machine learning of the sentence generation model includes first data including an array of a plurality of words forming the input sentence, and an array of a plurality of words forming the output sentence corresponding to the input sentence. including second data including and constraint data,
    The constraint data includes at least one constraint word that is a word specified from the word arrangement that constitutes the output sentence, and the arrangement order of the constraint words in the constraint data maintains the arrangement order of the word arrangement. and
    The sentence generation model is
    An encoder-decoder model composed of an encoder and a decoder including a neural network,
    the first data is input to the encoder according to the arrangement order of words;
    The constraint data, a start symbol that is a predetermined symbol signifying the start of output of the output sentence, and the second data according to the arrangement order of the words and symbols of the constraint data, the start symbol, and the second data. is input to the decoder,
    A weighting factor that configures the encoder and the decoder based on an error for each word between the word arrangement output from the decoder in the subsequent stage after the input of the start symbol and the word arrangement contained in the second data. Built with updating machine learning,
    Trained sentence generation model.
  7.  機械学習により構築された文生成モデルを用いて、第1言語の入力文の入力に応じて、前記第1言語とは異なる第2言語の出力文を生成する文生成装置であって、
     前記文生成モデルの機械学習に用いられる学習用データは、前記入力文に相当する複数の単語の配列を含む第1データ、前記入力文に対応する前記出力文に相当する複数の単語の配列を含む第2データ、及び、制約データを含み、
     前記制約データは、前記出力文を構成する単語の配列のうちから特定された単語である制約語を一以上含み、前記制約データにおける前記制約語の配列順は前記単語の配列における配列順を維持しており、
     前記文生成モデルは、
     ニューラルネットワークを含みエンコーダ及びデコーダにより構成されるエンコーダデコーダモデルであり、
     前記第1データが単語の配列順に応じて前記エンコーダに入力され、
     前記制約データ、前記出力文の出力の開始を意味する所定の記号である開始記号、及び、前記第2データが、前記制約データ、前記開始記号及び前記第2データの単語及び記号の配列順に応じて前記デコーダに入力され、
     前記開始記号の入力以降の後段において前記デコーダから出力された単語の配列と、前記第2データに含まれる単語の配列との単語ごとの誤差に基づいて、前記エンコーダ及びデコーダを構成する重み係数を更新する機械学習により構築され、
     前記文生成装置は、
     前記入力文を構成する入力データを単語の配列順に応じて前記エンコーダに入力する入力部と、
     前記出力文において用いられるべき語として任意に特定された入力制約語が、前記出力文における配列順を維持しながら含まれる入力制約データを前記デコーダに入力する制約データ入力部と、
     前記入力制約データの入力の後段において前記開始記号を前記デコーダに入力し、前記開始記号の入力の後の各段階において、前段階において前記デコーダから出力された単語を前記デコーダに順次入力する単語入力部と、
     前記デコーダの各段階において順次出力された単語を配列して前記出力文を生成し、生成した前記出力文を出力する出力部と、
     を備える文生成装置。
    A sentence generation device that generates an output sentence in a second language different from the first language according to an input sentence in the first language using a sentence generation model constructed by machine learning,
    The learning data used for machine learning of the sentence generation model includes first data including an array of a plurality of words corresponding to the input sentence, and an array of a plurality of words corresponding to the output sentence corresponding to the input sentence. including second data including and constraint data,
    The constraint data includes at least one constraint word that is a word specified from the word arrangement that constitutes the output sentence, and the arrangement order of the constraint words in the constraint data maintains the arrangement order of the word arrangement. and
    The sentence generation model is
    An encoder-decoder model composed of an encoder and a decoder including a neural network,
    the first data is input to the encoder according to the arrangement order of words;
    The constraint data, a start symbol that is a predetermined symbol signifying the start of output of the output sentence, and the second data according to the arrangement order of the words and symbols of the constraint data, the start symbol, and the second data. is input to the decoder,
    A weighting factor that configures the encoder and the decoder based on an error for each word between the word arrangement output from the decoder in the subsequent stage after the input of the start symbol and the word arrangement contained in the second data. Built with updating machine learning,
    The sentence generation device is
    an input unit for inputting input data constituting the input sentence to the encoder according to the arrangement order of words;
    a constraint data input unit for inputting to the decoder input constraint data in which input constraint words arbitrarily specified as words to be used in the output sentence are included while maintaining the arrangement order in the output sentence;
    Word input for inputting the start symbol to the decoder in a subsequent stage of inputting the input constraint data, and sequentially inputting the words output from the decoder in the previous stage to the decoder in each stage after inputting the start symbol. Department and
    an output unit for arranging the words sequentially output at each stage of the decoder to generate the output sentence, and for outputting the generated output sentence;
    A sentence generation device comprising:
  8.  前記デコーダは、前記開始記号の入力以降の各段階において出力する単語の各々について、前記出力文を構成する単語としての尤もらしさを示す尤度を単語ごとに出力し、
     前記文生成装置は、
     前記開始記号の入力の後の各段階において、前段階において前記デコーダから出力された単語に代えて、前記第2言語で作成された作成文を構成する単語を前記デコーダに順次入力する作成文入力部と、
     前記開始記号の入力及び前記作成文を構成する各単語の順次入力に基づいて、前記開始記号の入力以降の各段階において前記デコーダから出力された前記作成文を構成する各単語の尤度と、前記出力文を構成する各単語の尤度との対比に基づいて、前記作成文の評価をする作成文評価部と、をさらに備える、
     請求項7に記載の文生成装置。
     
    The decoder outputs, for each word, a likelihood indicating the likelihood of a word constituting the output sentence for each word to be output in each stage after the input of the start symbol,
    The sentence generation device is
    In each step after the input of the start symbol, inputting a composed sentence by sequentially inputting words constituting a composed sentence composed in the second language to the decoder in place of the words output from the decoder in the previous stage. Department and
    a likelihood of each word composing the created sentence output from the decoder at each stage after the input of the start symbol based on the input of the start symbol and the sequential input of each word composing the created sentence; a created sentence evaluation unit that evaluates the created sentence based on a comparison with the likelihood of each word that constitutes the output sentence,
    The sentence generation device according to claim 7.
PCT/JP2022/037899 2021-11-04 2022-10-11 Sentence generation model generator, sentence generation model, and sentence generator WO2023079911A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2021-180102 2021-11-04
JP2021180102 2021-11-04

Publications (1)

Publication Number Publication Date
WO2023079911A1 true WO2023079911A1 (en) 2023-05-11

Family

ID=86241320

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2022/037899 WO2023079911A1 (en) 2021-11-04 2022-10-11 Sentence generation model generator, sentence generation model, and sentence generator

Country Status (1)

Country Link
WO (1) WO2023079911A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019036093A (en) * 2017-08-14 2019-03-07 日本電信電話株式会社 Model learning device, conversion device, method, and program
WO2019225154A1 (en) * 2018-05-23 2019-11-28 株式会社Nttドコモ Created text evaluation device
CN111160049A (en) * 2019-12-06 2020-05-15 华为技术有限公司 Text translation method, device, machine translation system and storage medium
WO2021186892A1 (en) * 2020-03-19 2021-09-23 株式会社Nttドコモ Translated sentence computation device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019036093A (en) * 2017-08-14 2019-03-07 日本電信電話株式会社 Model learning device, conversion device, method, and program
WO2019225154A1 (en) * 2018-05-23 2019-11-28 株式会社Nttドコモ Created text evaluation device
CN111160049A (en) * 2019-12-06 2020-05-15 华为技术有限公司 Text translation method, device, machine translation system and storage medium
WO2021186892A1 (en) * 2020-03-19 2021-09-23 株式会社Nttドコモ Translated sentence computation device

Similar Documents

Publication Publication Date Title
WO2021070819A1 (en) Scoring model learning device, scoring model, and determination device
JPWO2020021845A1 (en) Document classification device and trained model
JP7062056B2 (en) Creation text evaluation device
JP7222082B2 (en) Recognition error correction device and correction model
US10657203B2 (en) Predicting probability of occurrence of a string using sequence of vectors
WO2019133676A1 (en) System and method for domain-and language-independent definition extraction using deep neural networks
CN115034201A (en) Augmenting textual data for sentence classification using weakly supervised multi-reward reinforcement learning
US11361170B1 (en) Apparatus and method for accurate translation reviews and consistency across multiple translators
JP7103957B2 (en) Data generator
WO2023079911A1 (en) Sentence generation model generator, sentence generation model, and sentence generator
WO2022102364A1 (en) Text generation model generating device, text generation model, and text generating device
JP2024077792A (en) Sentence Generator
US20230223017A1 (en) Punctuation mark delete model training device, punctuation mark delete model, and determination device
WO2020166125A1 (en) Translation data generating system
WO2021215352A1 (en) Voice data creation device
JP6924636B2 (en) Information processing equipment and programs
WO2021020299A1 (en) Popularity evaluation system and geographical feature generation model
JP7229347B2 (en) internal state changer
WO2019098185A1 (en) Dialog text generation system and dialog text generation program
WO2022130940A1 (en) Presentation device
JP2022029273A (en) Sentence similarity calculation device, trained model generation device, and variance expression model
WO2019235191A1 (en) Model learning device, method and program
WO2021125101A1 (en) Translation device
JP2020177387A (en) Sentence output device
CN113515959B (en) Training method of machine translation model, machine translation method and related equipment

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: 22889734

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2023557914

Country of ref document: JP

Kind code of ref document: A