A natural language processing method based on a neural network, and an electronic device. In the natural language processing method, by introducing length information of an input statement reflecting the actual length of the input statement, multiplication operation between a character vector matrix and a convolution kernel is executed corresponding times in convolution calculation according to the length information of the input statement, and the fixed length convolution based on a fixed preset sentence length in the prior art is converted into a variable length convolution based on the actual length of the input statement, thus greatly reducing calculation amount, and thereby remarkably improving calculation speed and reducing waste of calculation resources and time.
NATURAL LANGUAGE PROCESSING METHOD BASED ON NEURAL NETWORK, AND ELECTRONIC DEVICE