To provide a language generation method capable of improving the overall semantic learning effect of an input sequence.SOLUTION: A method comprises: encoding an input sequence using a preset encoder to generate a hidden state vector corresponding to input; using N decoders to decode each of a first target fragment vector, the hidden state vector, and a position vector corresponding to a second target fragment when a particle size category of a second target fragment to be predicted is a phrase, to generate N second target fragments; determining a loss value based on the difference between each of the N second target fragments and a second target tagging fragment; and updating the parameters for the preset encoder, a preset classifier and the N decoders based on the loss value, and using an updated language generation model to generate language.SELECTED DRAWING: Figure 1
LANGUAGE GENERATION METHOD, DEVICE AND ELECTRONIC APPARATUS