An English spelling correction method, applied to an electronic device with computing capabilities, the electronic device comprising an AI processing unit, the English spelling correction method at least comprising:
- serializing English characters and obtaining a plurality of encoding numbers;
- receiving an input English word string composed of a plurality of English characters and obtaining a number (n) of the English characters;
- normalizing the encoding numbers corresponding to each of the English characters of the input English word string and obtaining a plurality of initial numbering array numerics;
- performing Euclidean distance calculation on the encoding numbers corresponding to the adjacent English characters of the input English word string and obtaining a plurality of Euclidean distance values, and normalizing each of the Euclidean distance values and obtaining a plurality of initial distance array numerics;
- obtaining a number (n) of the English characters of the input English word string and arranging in sequence according to the initial numbering array numerics and the initial distance array numerics corresponding to each of the English characters of the input English word string and generating a first feature map of 1×(2×n) in a first layer;
- performing a one-dimensional convolution operation of convolutional neural network on the first feature map and generating 6 second feature maps with an array of 1×(2×n+2−3+1) in a second layer;
- performing a one-dimensional convolution operation of convolutional neural network on the second feature map and generating 16 third feature maps with an array of 1×((2×n+2−3+1)+2−3+1) in a third layer;
- performing a fully-connected layer of convolutional neural network on the third feature map and forming a fourth feature map with an array of (2×n)×16 in a fourth layer;
- performing a fully-connected layer of convolutional neural network on the fourth feature map, converting into a fifth feature map of ((2×n)/4)×64 compatible with inputting into a bidirectional long short-term memory (LSTM) network in a fifth layer;
- performing a bidirectional long short-term memory (LSTM) network operation on the fifth feature map and outputting a sixth feature map with an array of ((2×n)/4)×128 in a sixth layer;
- performing a bidirectional long short-term memory (LSTM) network operation on the sixth feature map and outputting a seventh feature map with an array of ((2×n)/4)×128 in a seventh layer;
- performing a fully-connected layer on the seventh feature map and forming an eighth feature map with an array of 37×(2×n) in an eighth layer;
- performing a probability recognition according to the eighth feature map with an array of 37×(2×n) and outputting a probabilistic word string with a character length of (2×n);
- and
- recognizing the probabilistic word string according to a search setting to output an English spelling correction result.