Analyzing the Application of Multimedia Technology Assisted English Grammar Teaching in Colleges

Page created by William Simpson
 
CONTINUE READING
Hindawi
Scientific Programming
Volume 2022, Article ID 4422754, 11 pages
https://doi.org/10.1155/2022/4422754

Research Article
Analyzing the Application of Multimedia Technology Assisted
English Grammar Teaching in Colleges

 Feng Wu,1 Shaohai Huang,1 and Lijuan Cheng 2

 1
 Mathematics and Computer Department, Fuzhou Preschool Education College, FuZhou 344000, China
 2
 School of Humanities and Law, Hebei University of Engineering, Handan 056000, China

 Correspondence should be addressed to Lijuan Cheng; chenglijuan0701@hebeu.edu.cn

 Received 11 January 2022; Revised 8 February 2022; Accepted 26 February 2022; Published 30 March 2022

 Academic Editor: Fazli Wahid

 Copyright © 2022 Feng Wu et al. This is an open access article distributed under the Creative Commons Attribution License,
 which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
 To address the problem that the traditional English composition is manually reviewed, which leads to low efficiency of grammar
 error checking and heavy teaching burden for teachers and seriously affects the quality of English teaching, a verb grammar error
 checking algorithm based on the combination of a multilayer rule model and a deep learning model is proposed with current
 multimedia technology. First, the basic principles and network structure of the long short-term memory network LSTM are
 specifically analyzed; then, a multilayer rule model is constructed; after that, an attention model-based LSTM verb grammar
 checker is designed, and a word embedding model is used to encode the text and map it to the status space to retain the textual
 information. Finally, the proposed algorithm is experimentally validated using the corpus dataset. The experimental results
 revealed that the accuracy, recall, and F1 values of the proposed algorithm in verb error detection were 45.51%, 28.77%, and 35.5%,
 respectively, which were higher than those of the traditional automatic review algorithm, indicating that the proposed algorithm
 has superior performance and can improve the accuracy and efficiency of grammar error detection.

1. Introduction correction and introducing a deep learning algorithm [5];
 Ailani Sagar summarizes the current mainstream syntax
In recent years, with the rapid development of multimedia error correction algorithms, which provide a reference for a
technology, the learning of English in university gradually comprehensive understanding of syntax error correction [6].
tends to be automated and intelligent. Among them, English Chanjun Park et al. put forward the syntax error correction
composition is gradually converted from manual marking to method of a neural network and the evaluation index of
automatic marking, which gradually improves marking ef- correction and over correction [7]; Bo Wang et al. proposed
ficiency and reduces teachers’ teaching pressure. However, marking the statistical machine translation results to im-
the traditional English composition error detection system prove the accuracy of error correction [8]; Lichtage Jared
has a low accuracy rate of grammar detection and a high rate et al. improved grammar error correction from the per-
of error detection for words such as verbs, prepositions, and spective of data training so as to provide a way to improve
coronals, which cannot meet the current requirements of training and improve the accuracy of grammar error cor-
college English grammar-assisted teaching [1–3]. In re- rection [9]. Crivellari Alessandro et al. proposed a direction-
sponse to this problem, a large number of studies have been finding algorithm with error detection and fault tolerance
proposed by scholars and experts. Krzysztof pajak et al. for longer statements in English, and the LSTM network
proposed a seq2seq error correction method based on model with attention mechanism is effective in learning
denoising automatic coding and obtained an F1 score of longer statements in both directions and preserving the
56.58%[4]. Zhaoquan Qiu proposed a two-stage Chinese features of long and short statement sequences [10–13].
grammar error correction algorithm, which is characterized Based on the above, the LSTM network in deep learning is
by providing reference for Chinese grammar error applied to English grammar error detection to improve the
2 Scientific Programming

accuracy and efficiency of English grammar error detection ht yt
and to assist English teachers in instructing students.

2. Basic Methods ht−1
 LSTM o
 σ + xt
2.1. LSTM Fundamentals. Long short term memory
(LSTM) is a recurrent neural network with memory function tanh
to process the next period of time sequence. Its main role is
to solve the dependent memory decline in data modeling, ct−1
 ct
which can avoid the gradient disappearance and explosion f c
 ht−1 + +
problem during model training. To solve the problem that ct−1
the RNN has only ht states in the hidden layer at moment t, xt i
 σ + ht−1
the unit state ct, i.e., the information storage, will be added.
 2
The values to be updated are selected in the input gate xt
sigmoid function, and then a candidate vector ct obtained tanh
from the tanh layer is added to ct . As a result, LSTM can
effectively solve nonlinear time series data associated with +
specific memory functions. With the control of the learning
rates of input gate, output gate, and forget gate, the large data ht−1 xt
sequences can be better processed [14–16].
 Figure 1: LSTM cell structure.
 At time t, the input to the LSTM consists mainly of the
input value xt of the neural network at time t, the output
value ht−1 at time t − 1, and the cell state ct−1 at time t-1; The direction; according to δ, the weight gradient is derived and
resulting LSTM outputs are as follows: the output value ht of a suitable gradient optimization algorithm is selected to
the neural network at moment t and the cell state ct at update the weights. diag denotes the diagonal matrix with
moment t. The LSTM neuron structure is shown in Figure 1. diagonal elements as vector elements; o denotes the corre-
 The formulas for each structure are expressed as sponding elements multiplied by each other, and the cal-
 culation process is
 ft � σ ωxf xt + ωht ht−1 + bf � σ netf,t , Based on the time back propagation error term δ, we find
 it � σ ωxf + ωht ht−1 + bi � σ netf,t , the error δt−1 at time t − 1 [19].
 zht zn eto,t zn etf,t zn eti,t T zn et c,t
 ct � tanh ωxc xt + ωhc ht−1 + bc � tanh net c,t , δTt � δTo,t + δTf,t + δTi,t δ ,
 (1) zht−1 zht−1 zht−1 zht−1 c,t zht−1
 ct � ft ct−1 + it ct ,
 (3)
 ot � σ ωxo xt + ωho ht−1 + bo � σ neto,t ,
 zht
 ht � ot tanh ct . � diag tanh ct , (4)
 zot
 In the above equation, it , ft , and ot denote the states of where it , ft , ct , and ot are all functions of ht−1 , which can be
the input, forget, and output gate at moment t, respectively; found by the total derivative formula:
σ and tanh are the sigmoid function and hyperbolic tangent
activation function, respectively; w and b denote the cor- zht 2
 � diag ot ∘ 1 − q tanh ct . (5)
responding weight coefficient matrix and bias terms; ct zct
denotes the state of the memory cell at moment t; ht denotes
 According to ∇w E � tk�1 ∇wk E, it is possible to
the full output of the LSTM network unit at time point t.
 calculate
 The sigmoid function and hyperbolic tangent activation
function expressions are [17, 18] zct zc zc
 � diag ct−1 , t � diag ct , t � diag it . (6)
 1 zft zit z ct
 σ(x) � ,
 1 + e−x It is easy to derive the following formula:
 (2)
 x −x
 e −e zot
 tanh(x) � . � diag ot ∘ 1 − ot , (7)
 ex + e−x zn eto,t

 ze to,t
 � Woh , (8)
2.2. Back Propagation Process of LSTM. LSTM model zht−1
training is mainly implemented by the BPTT algorithm,
which calculates all output values according to equations (3) zft
 � diag ft • 1 − ft , (9)
to (9); the error term δ is calculated from the spatiotemporal zn etf,t
Scientific Programming 3

 znetf,t 3. English Grammar Checker Design
 � Wfh , (10)
 zht−1 3.1. Syntax Checking Based on Multilayer Rule Model
 zit 3.1.1. Overall Module Design. In English grammar error
 � diag it • 1 − it , (11)
 zneti,t checking, firstly, we obtain the rules in the grammar, build
 an error checking model based on chopped rules, match the
 zneti,t rules with the database through the input text, find out the
 � Wih , (12) error points, and modify them according to the corpus
 zht−1
 information. The module design is obtained as follows which
 z ct is referring to Xu et al. [23] (Figure 2):
 � diag 1 − c2t , (13)
 znet ct ,1
 3.1.2. Part-of-Speech Tagging. English statements are mainly
 znet c,t composed of various words, including nouns, verbs, and
 � Wch . (14) coronals. Since the meaning of each word is different and has
 zht−1
 an impact on the later rule matching, part-of-speech tagging
 Bring the above partial derivatives into equation (3) for will be performed before grammar error checking for better
calculation, we can find [20] error correction of the statement, thus making the rule base
 better to discriminate the wrong text. At present, the
 commonly used annotation method is the marking con-
 zneto,t znetf,t zneti,t znet c,t
δt−1 � δTo,t + δTf,t + δTi,t + δTo,t vention, which is useful for different part of speech. Based on
 zht−1 zht−1 zht−1 zht−1 the information characteristics of the English corpus,
 (15)
 Stanford parser will be used for annotation.
 � δTo,t Woh + δTf,t Wfh + δTi,t Wih + δ Tc,t Wch .

 From δo,t , δf,t , δi,t , and δ c,t , it can be calculated that: 3.1.3. Rule Base Design. To improve the accuracy of
 grammar error detection, referring to the results of Xu et al.,
 a rule base will be designed to match the input statements,
 δTo,t � δTt • tanh ct • ot • 1 − ot , and its design structure is shown in Figure 3 [24]. It is mainly
 2
 ranked according to the specific characteristics of the
 δTf,t � δTt • ot • 1 − tanh ct • ct−1 • ft • 1 − ft , grammar and thus stored, and is arranged in accordance
 (16) with the name of the file so that multiple rules can be found
 2
 δTi,t � δTt • ot • 1 − tanh ct • ct • it • 1 − it , for subsequent queries.
 2
 In the rule base, its rules are mainly adjusted according
 δ Tc,t � δTt • ot • 1 − tanh ct • it • 1 − c2t . to the corresponding algorithm. The adjustment is done
 from top to bottom, and its specific process is as follows
 It is possible to obtain the equation that passes the error which refers to the results of Xu et al. (Figures 4–6).
term forward to any k moments as [16–18] First, open the index table in the rule base, check whether
 t−1
 it is blank, if so, reopen for operation; conversely, select an
 δTk � δTo,j Woh + δTf,j Wfh + δTi,j Wih + δ Tc,j Wch . index item according to the order, and then the system
 (17)
 j�k
 number it, check whether its number is consistent with the
 index item, if so, get its rule base name, end the index,
 If the current is the l th layer, the error term in the l − 1 otherwise, go back to the second step for operation.
layer is the derivative of the error function to the
weighted input in the l − 1 layer, which can be expressed
 3.1.4. Multilayer Rule Syntax Error Correction. After com-
as
 pleting the above design, the syntax error checking is tested
 def zE according to the criteria of the rule base, and a certain
 δl−1
 t � . (18) English statement is input to the error checking module for
 netl−1
 t multiple hierarchical matching to find out the wrong
 statement. The error checking steps are divided into three
 The input xt to the LSTM at the current moment can be
 steps, which are represented as follows:
found by the following equation [21, 22]:
 (1) After inputting the statements, appropriate deletions
 xlt � fl− 1 netl−1
 t . (19) are made, and the statements with important in-
 formation are preserved
 In the above equation, fl−1 is the activation function of (2) The above algorithm is used to check for errors, and
l − 1. Since netlf,t , netll,t , net lc,t , and netlo,t are all functions of if an error is found, it goes to the next step, and if not,
xt , and xt is a function of netl−1 t , the error can be transferred it ends the calculation and returns to the above steps
to the l − 1 layer by the total derivative formula. for recalculation until the end of the rule base
4 Scientific Programming

 text segmentation
 xi belongs to K-dimension, the summation is aver-
 aged over all utterances, after which the output is X′ .
Multi-level rules Part-of- (2) Feature extraction: the statement features are
 Word extracted and encoded using the LSTM model.X and
 module speech
 Segmentation
 tagging X′ are input into the system as X′ . h1 , h2 , h3 , · · · , ht
 error and x1 , x2 , x3 , · · · , xt corresponding to each other,
 and they are the invisible corresponding values.
 Rule matching Rule base (3) Error classification: an attention model is used to
 construct a classifier, and English statements are
 input into this classifier to classify them according to
 Revise Calculate
 scheme sentence score
 N-gram the above extracted features, thus achieving error
 classification.

 Yes
 Among them, the word embedding method can make
 Original Text p (s) > p (s') the statements shorter and improve the consistency of
 No statements, which can effectively solve the grammatical error
 correction problem and is applicable to shorter English texts
 Output feedback and revise for grammatical error correction.
 Figure 2: Overall module design.
 3.3. LSTM Model Based on Attention Model with
 base index table Combination of Positive and Reverse Order. The above error
 detection model is mainly for short English statements, but
 rule base 1 when longer statements with more complex semantic in-
 1 rule base name formation are input, the model is unable to detect errors and
 cannot take care of the contextual connections, resulting in
 2 rule base name
 rule base 2 poor error detection.
 Therefore, based on the above model, the positive and
 ...... negative sequences are added to combine the information in
 both directions to achieve multilayer feature extraction and
 ... ...
 encoding [27]. The specific structure is shown in Figure 7.
 In the above model structure, x1 , x2 , x3 , · · · , xt are the
 sequences of the system being input; h1 , h2 , h3 , · · · , ht are the
 n rule base name rule base n potential nodes of the layer with forward transmission di-
 rection; h3′, h3′, h3′, · · · , h′t indicate the potential nodes of the
 Figure 3: Rule base design. layer with backward transmission direction; Y1 , Y2 , Y3 , · · · , Yt
 indicate the sequences of the final obtained output.
 The model is divided into three main parts, advance
 (3) If the system finds an error, it goes back to step (2) to processing, extraction of features, and classification, and the
 search for the error location specific process is as follows:
 The overall flow of the system is shown in Figure 5 [25]. (1) Two directional data are input into the model, and
 x1 , x2 , x3 , · · · , xt and X′ are both backward se-
 quences, and the rest are forward sequences. The two
3.2. LSTM Syntax Checker Design Based on Attention Model.
 data are represented by the word embedding
In order to improve the accuracy of English syntax error
 method, after which they are input into the error
detection, the LSTM network model is applied to English
 detection model.
syntax error detection by encoding the utterance, extracting
features through it, and later classifying the features using (2) Feature extraction is performed using the LSTM in
the attention mechanism, thus realizing syntax error de- the error detection model, and the association in-
tection. The structure of the syntax error checker is shown in formation of the two sequences is encoded.
Figure 6 [26]. (3) After completing the above operations, the attention
 In this model, there are three main steps, which are model is used for classification, and the classification
analyzed as follows: of erroneous statements is thus obtained.
 (1) Word vector representation: the English statements The error detection model designed in the study can fully
 are represented using the word embedding model. If take into account the length and direction of the input data,
 the input utterance is X � x1 , x2 , x3 , · · · , xT , where which can retain more text information for better text
Scientific Programming 5

 Start

 Open base index table

 Yes
 Is the index
 return on failure
 table empty?
 No

 Read an index item in order

 No Is the current system
 hierarchy number equal to the number
 in the index item?

 Yes

 Fetch the name of the rule base
 in the index item

 return on success

 Figure 4: Flowchart of rule base scheduling algorithm.

extraction and classification, and finally realize the error experimental corpus, and the types and numbers of errors it
detection of long and short statements. contains are shown in Table 2.

 4.2. Evaluation Criteria. In order to better evaluate the error
3.4. Design and Implementation of Verb Syntax Checking. detection results of the proposed error detection system,
Based on the above LSTM model, it is combined with the F-Measure will be used as the evaluation index in this ex-
rule set to design an English grammar checker with the periment, and its expression is
following overall architecture [28–30] (Figure 8). 2
 β + 1 PR
 As can be seen from the above figure, the checker Fβ � 2 . (20)
mainly consists of a rule model and an LSTM model. β P+R
First, the rule model is used to perform operations such
as information matching on the input statements to find In equation (17), P denotes the precision; R denotes the
out the location of the wrong syntax and give a pre- recall, and the expression of the precision is
 A
liminary modification plan; then, the LSTM error P� , (21)
checking module based on the attention model is used to A+C
detect, compare it with the standard statements of the where P denotes the proportion of marked correct state-
corpus to find out the statement errors, mark and locate ments among all statements, A and C denote the number of
the errors, and finally give the corresponding revision marked correct statements and the number of statements
strategy. that are actually correct but marked incorrectly, respectively.
 The solution formula of R is
4. Experimental Results and Analysis A
 R� . (22)
 A+B
4.1. Evaluation Contents. There are a variety of grammatical
 In the above formula, R represents the proportion of
problems in English statements, the more common ones
 statements with errors but marked correctly in all wrong
being grammatical errors, word morphology errors, missing
 statements. B represents the total number of unmarked
words, and other aspects of application. The study will
 errors and sentences in the text.
identify the more typical common errors, which are de-
 F1 − Measure is as follows:
scribed in Table 1.
 In order to enhance the evaluation accuracy of the ex- P∗R
 F1 � . (23)
perimental results, NUCLE-releaSe2.2 will be selected as the P+R
6 Scientific Programming

 Start

 word segmentation

 grammatical analysis of sentences

 Is the analysis No
 successful?

 Yes

 Set processing level I=0

 Obtain the error checking rules for the first level

 check the sentence using the rules

 Yes display error
 have error?
 indications
 No
 I=1+1 Return

 1>maximum Yes Display check
 number of layers? results

 No

 Obtain the analysis rules for layer 1

 Yes
 Analyze the sentences using the rules have error?

 No

 Figure 5: Layer rule syntax error correction system diagram.

 Classifier Classifier

 HC

 c ak

 feature extraction

 ak ak2 ak3 ak4 ak5 ak6
 h1 h2 h3 h4 h5 ht Hk LSTM

 x1 x2 x3 x4 x5 xt x Distributed representation

 word vector

 Figure 6: LSTM model-based verb syntax error corrector.
Scientific Programming 7

 positive-or-
 positive-or- Atrten
 der
 der input Based
 semantic
 sequence LSTM
 encoding

 semantic
 encoding

 classifier

 output
 Text input
 sequence

 reverse-ord- Atrten reverse-ord-
 er input Based er semantic
 sequence LSTM encoding

 Figure 7: Structure of LSTM network based on attention model with combined positive and reverse order.

 Text segmentation

 part-of-speech Word
 tagging segmentation
 Rule-based

 disambiguation
 and chunking
 Rule engine corpus

 Statistical-bias
 No Pre
 original rule
 written
 text matching
 rules Part of
 Yes speech
 tagging
 propose
 revision
 scheme Score
 calculati-
 attention
 on for
 model
 revised
 sentences

 No
 original P>T
 text

 Yes

 output feedback and
 revision suggestions

 Figure 8: Flowchart of the grammar checker.

 The effectiveness of English syntax detection is verified redundancy, absence, and misuse, and their error ratios are
by F1 . If F1 takes a higher value, it means that the detection shown in (Tables 3 and 4).
effect of this syntax detection system is better. The information of the experimental corpus of article
 errors was obtained from the NUCLE English composition
 of a university, and the training and test sets of article class
4.3. Experimental Results and Analysis errors were classified after manual annotation, as shown in
 Table 4.
4.3.1. Verification of Article Detection. In English grammar, The above datasets are applied to the error detection
article errors mainly include three forms of article model individually; the model is trained and predicted,
8 Scientific Programming

 Table 1: Common English grammatical errors. Table 3: Proportions of the three types of article errors in the
 corpus.
Type Content
Vt Verb tense error Article Article Article
 Type
Vo Verb missing error redundancy (%) absence (%) misuse (%)
Vform Verb form error Error ratio 26.8 57.5 15.7
SVA Subject-verb agreement error
ArtOrDet Article error
Prep Preposition error Table 4: Statistics of article corpus.
Nn Form error of singular and plural nouns Training set Test set
Others Other errors
 Number of sentences 57151 1381
 Number of participles 1161567 29207
 Table 2: Evaluation contents of grammatical errors. Number and proportion of article errors 14.9% 19.9%

Type Quantity
Vt 3211
 Input statements Model Prediction
Vo 411
Vform 1453
SVA 1527
ArtOrDet 6658
 Preprocess Preprocess
Prep 2404
Nn 3779
Others 16865
 Feature
 Feature extraction
 extraction
respectively, and the flowchart of the article error detection
system is shown in Figure 9.
 The experiment compares the results of the above three Model prediction
 Model
evaluation metrics on the test set before and after pre- Training
treatment, and the results are shown in Table 5. Same prediction
 Different Prediction
 As can be seen from Table 5, the precision, recall, and F1
values of this corpus information increased after pre- Error Correction
processing the dataset, by 24.57%, 56.74%, and 34.08%, end
 Feedback
respectively, and the model training is significantly faster
and better. Figure 9: Work flow of article correction system.
 In English syntax error detection, the error detection
model belongs to the maximum entropy model, and the
 Table 5: Comparison of the test set results before and after pre-
number of iterations seriously affects the error detection
 processing the corpus.
effect, and the relationship between the number of iterations
and F-Measure is obtained as shown in Table 6. Precision (%) Recall (%) F1 (%)
 From Table 6, we can see that the F-Measure increases Before pretreatment 22.64 54.90 33.13
with the increasing number of iterations, and the increase is After pretreatment 24.57 56.74 34.08
small. The process increases the training time, which will
affect the subsequent syntax error detection results; there-
 In order to further test the superiority of the article error
fore, it is most reasonable to set the number of iterations to 1.
 detection system, this experiment compares the error de-
 To verify the effect of the maximum entropy model on
 tection results of this system and the CoNLL 2013 shared
the processing of grammatical information, the model was
 task system, and the comparison results are obtained as
compared with the Naive Bayesian model using the test set
 shown in Table 9.
data, and the experimental results are shown in Table 7.
 From Table 9, we can find that the P value, R value and F
 As can be seen from Table 7, the precision, recall, and
 value of the article error detection system are 24.54%,
F-Measure of the maximum entropy model are 24.42%,
 57.39%, and 34.38%, which are 1.35%, 9.87%, and 1.19%
56.38%, and 34.08%, respectively, which are better than the
 higher than the CoNLL 2013 system, respectively, thus in-
Naive Bayesian model for classification recognition and
 dicating that the proposed article error detection system can
faster training.
 achieve better error detection results and superior system
 Since the article corpus dataset is small, a partial wiki
 performance.
corpus will be added to this dataset for comparison. The test
results after adding the corpus are obtained as shown in
Table 8. 4.3.2. Preposition Detection Verification. Preposition errors
 From Table 8, it can be seen that the precision, recall, and in English statements can be mainly classified as the same as
F-Measure of the training corpus are improved after adding article. The proportions of incorrect statements are shown in
different amounts of corpus, but the improvement is small. Table 10.
Scientific Programming 9

 Table 6: The relationship between the number of iterations and F-Measure.
Number of iterations 1 (%) 2 (%) 3 (%) 4 (%) 5 (%) 10 (%) 100 (%)
F1 34.08 34.08 34.11 34.12 34.18 32.24 35.48

 Table 7: Comparison results of the two models in the test set. Table 11: Preposition corpus data statistics.
 Precision (%) Recall (%) F1 (%) Training set Test set
Naive bayesian model 16.13 41.59 23.25 Number of statements 57151 1381
Maximum entropy model 24.42 56.38 34.08 Number of participles 1161567 29207
 Number of prep errors 133665 3332

Table 8: Effect comparison of test set after adding 100,000 and
200,000 Wikipedia corpus. Table 12: Test comparison results before and after corpus
 preprocessing.
 Precision (%) Recall (%) F1 (%)
 Precision (%) Recall (%) F1 (%)
NUCLE 24.42 56.38 34.08
NUCLE + Wiki (l0w strip) 24.27 56.81 34.01 Before preprocessing 68.13 13.47 21.82
NUCLE + Wiki (20w strip) 24.54 57.39 34.38 After preprocessing 68.87 14.20 23.54

Table 9: Comparison of the error detection results of the two Table 13: Variation of values with different values.
systems.
 C 0.98 (%) 0.95 (%) 0.9 (%) 0.8 (%) 0.7 (%)
 Precision (%) Recall (%) F1 (%) F1 25.27 26.74 23.47 18.54 10.78
End results 24.54 57.39 34.38
Shared task 25.65 47.84 33.40
 Table 14: Changes in values after expanding the training set.
 Table 10: Proportion of three types of prepositional errors. F1 (%)
 UNCLE 23.54
 Preposition Preposition Preposition
Type UNCLE + Wiki (10wstrip) 24.57
 redundancy (%) missing (%) misuse (%)
 UNCLE + Wiki (50wstrip) 27.68
NUCLE 24.42 56.38 34.08
Error
 18.12 24.03 57.91
ratio
 Table 15: Comparison results of F1 values of the three models.
 F1 (%)
 Preposition data were obtained from the NUCLE-re-
 NB-priors 11.87
lease2.2 corpus, and 28 types were obtained, where prep
 Maxent 27.68
represents the number of errors. The preposition corpus data Shared task 27.51
statistics are shown in Table 11.
 The data preprocessing of the prepositional corpus
according to the experimental evaluation indexes yielded the its F1 value up to 27.68%. To further test the error detection
following test results before and after preprocessing. effectiveness of the preposition detection model, the model
 As can be seen from Table 12, the preprocessing of this was compared with Naive Bayes and shared task, and the
dataset improved all the indicators of the prepositional results are shown in Table 15.
dataset, indicating that the preprocessing was carried out As can be seen from Table 15, the F1-value of this model
with better results, which was beneficial to the subsequent is 27.68, which is 16.19 and 0.17 higher than the other two
experiments. models, respectively, indicating that this model is more
 In order to test the effect of different values of the error effective in error detection.
difference C factor on the F1 value of the prepositional error
detection system, the experiment will set the C value, as
shown in Table 13. 4.3.3. Validation of Detection System Effect. At present, the
 From Table 13, it can be seen that when C takes the value common grammatical errors of verbs in college English
of 0.95, the F1 value is 26.74, which takes the highest value composition mainly include four types of errors, verb
among the five C values. Therefore, the C value was set to missing errors, modal errors, tense errors, and subject-verb
0.95, and the Wike corpus was added to the original dataset, agreement errors. According to the statistics of the corpus,
respectively, and placed into the prepositional dataset for the results of verb error classification are shown in Table 16.
testing, and the test results were obtained, as shown in The test materials were obtained from the language
Table 14. material library CLEC, from which 100 English composi-
 As can be seen from Table 14, the expansion of the tions were arbitrarily selected for the experiment, which
preposition training set resulted in a significant increase in contained a total of 1,128 sentences and 1,083 mislabeled
10 Scientific Programming

 Table 16: Proportion of the four verb errors.
Error type Verb missing error (%) Verb mood error (%) Verb tense error (%) Subject-verb agreement error (%)
Error percentage 6 19 36 39

 Table 17: Effect of grammar error detection.
 Precision (%) Recall (%) F1 (%)
Verb error detection 45.47 29.67 34.95
Subject-verb agreement error detection 39.69 20.98 32.06
Error detection of the singular and plural forms of noun 86.03 53.97 63.04
Article error detection 68.14 43.05 52.57
Preposition error detection 71.98 38.06 50.18
Overall error detection 62.26 37.14 46.56

sentences. This experiment, referring to the process of [2] W. Li, X. Gao, and H. Liu, “Efficient prediction of transonic
proposed by Xu et al., uses the above dataset to test the flutter boundaries for varying Mach number and angle of
effect of grammar error detection, as shown in Table 17 attack via LSTM network,” Aerospace Science and Technology,
[23]. vol. 110, Article ID 106451, 2020.
 [3] H. Kang, S. Yang, J. Huang, and J. Oh, “Time series prediction
 From Table 16, the overall accuracy of the grammar error
 of wastewater flow rate by bidirectional LSTM deep learning,”
detection system is 62.14%, the recall rate is 37.00%, and the International Journal of Control, Automation and Systems,
F1-value is 46.40%. The overall error detection rate is rel- vol. 18, no. 12, pp. 3023–3030, 2020.
atively high, and the overall error detection accuracy is [4] K. Pajak and G. Adam, “Grammatical error correction with
further improved and compared with the results of articles, denoising autoencoder,” International Journal of Advanced
prepositions, and verbs. Computer Science and Applications, vol. 12, no. 8, 2021.
 [5] Z. Qiu and Y. Qu, “A two-stage model for Chinese grammatical
5. Conclusion error correction,” IEEE Access, vol. 7, pp. 146772–146777, 2019.
 [6] A. Sagar, D. Ashwini, and S. Irfan, “Grammatical error
In summary, the English syntax error detection model based correction (GEC): research approaches till now,” Interna-
on the combination of multilayer rules and LSTM model tional Journal of Computer Application, vol. 178, no. 40,
proposed in the study can improve the accurate error de- pp. 1–3, 2019.
tection results of English syntax with significant error de- [7] C. Park, Y. Yang, C. Lee, and H. Lim, “Comparison of the
 evaluation metrics for neural grammatical error correction
tection effects and can be applied in the teaching of English
 with o,” IEEE Access, vol. 8, pp. 106264–106272, 2020.
grammar. The experimental results suggest that the overall [8] B. Wang, F. au, K. Hirota, C. Liu, Y. Dai, and Z. Jia, “An
error detection effect of the proposed model is significantly approach to NMT Re-ranking using sequence-l for gram-
improved compared with the traditional error detection matical error correction,” Journal of Advanced Computational
model, and better error detection effect can be achieved in Intelligence and Intelligent Informatics, vol. 24, no. 4,
the grammar of articles, prepositions, and verbs. The pp. 557–567, 2020.
pressure of English teachers at work can be reduced by [9] L. Jared, A. Chris, and K. Shankar, “Data weighted training
higher efficiency of error detection. The innovation of this strategies for grammatical error correction,” Transactions of
study is to correct grammar by combining the advantages of the Association for Computational Linguistics, vol. 8,
LSTM in temporal change data processing so as to greatly pp. 634–646, 2020.
improve the accuracy of grammar translation. [10] C. Alessandro and B. Euro, “Forecasting spatially-distrib-
 uted urban traffic volumes via multi-target LSTM-based
 neural network regressor,” Mathematics, vol. 8, no. 12,
Data Availability p. 2233, 2020.
 [11] L. Sun, Y. Wang, J. He, H. Li, D. Peng, and Y. Wang, “A
The experimental data used to support the findings of this study stacked LSTM for atrial fibrillation prediction based on
are available from the corresponding author upon request. multivariate ECGs,” Health Information Science and Systems,
 vol. 8, no. 1, p. 19, 2020.
Conflicts of Interest [12] T. Mario, R. Miguel, and R. Felipe, “PV power prediction,
 using CNN-LSTM hybrid neural network model. Case of
The authors declared that they have no conflicts of interest study: temixco-morelos, méxico,” Energies, vol. 13, no. 24,
regarding this work. p. 6512, 2020.
 [13] B. Ren, “The use of machine translation algorithm based on
References residual and LSTM neural network in translation teaching,”
 Plos One, vol. 15, no. 11, Article ID e0240663, 2020.
 [1] Y. Jin, L. Yu, G. Li, and S. Fei, “A 6-DOFs event-based [14] C. Sur, “CRUR: coupled-recurrent unit for unification,
 camera relocalization system by CNN-LSTM and image conceptualization and context capture for language repre-
 denoising,” Expert Systems with Applications, vol. 170, sentation - a generalization of bi directional LSTM,” Multi-
 Article ID 114535, 2020. media Tools and Applications, vol. 80, pp. 1–43, 2020.
Scientific Programming 11

[15] A. Zhu, Q. Wu, R. Cui et al., “Exploring a rich spatial-tem- [29] H. Kim and H. Bae, “Hyper parameter tuning method based
 poral dependent relational model for skeleton-based action on sampling for optimal LSTM model,” Journal of the Korea
 recognition by bidirectional LSTM-CNN,” Neurocomputing, Society of Computer and Information, vol. 24, no. 1,
 vol. 414, pp. 90–100, 2020. pp. 137–143, 2019.
[16] Z. Fang, Y. Wang, L. Peng, and H. Hong, “Predicting flood [30] M. Aslam and A. H. Osama, “A control chart for gamma
 susceptibility using long short-term memory (LSTM) neural distribution using multiple dependent state sampling,” In-
 network model,” Journal of Hydrology, vol. 594, p. 125734, 2020. dustrial Engineeering & Management Systems, vol. 16, no. 1,
[17] M. Yaqub, H. Asif, S. Kim, and W. Lee, “Modeling of a full- pp. 109–117, 2017.
 scale sewage treatment plant to predict the nutrient removal
 efficiency using a long short-term memory (lstm) neural
 network,” Journal of Water Process Engineering, vol. 37,
 Article ID 101388, 2020.
[18] H. Yang, “Efficiency of online grammar checker in English
 writing performance and students’ perceptions,” Korea
 Journal of English Language and Linguistics, vol. 18, no. 3,
 pp. 328–348, 2018.
[19] R. Potter and D. Fuller, “My new teaching partner? Using the
 grammar checker in writing instruction,” English Journal,
 vol. 98, no. 1, pp. 36–41, 2008.
[20] A. Choi, H. Jung, K. Y. Lee, S. Lee, and J. H. Mun, “Machine
 learning approach to predict center of pressure trajectories in
 a complete gait cycle: a feedforward neural network vs. LSTM
 network,” Medical, & Biological Engineering & Computing,
 vol. 57, no. 12, pp. 2693–2703, 2019.
[21] Y. Dai, Z. Lu, H. Zhang, T. Zhan, J. Lu, and P. Wang, “A
 correction method of environmental meteorological model
 based on long-short-term memory neural network,” Earth
 and Space Science, vol. 6, no. 11, pp. 2214–2226, 2019.
[22] S. Lee, K. Xie, D. Ngoduy, and M. Keyvan-Ekbatani, “An
 advanced deep learning approach to real-time estimation of
 lane-based queue lengths at a signalized junction,” Trans-
 portation Research Part C: Emerging Technologies, vol. 109,
 no. C, pp. 117–136, 2019.
[23] X. Xu, “Exploration of English composition diagnosis system
 based on rule matching,” International Journal of Emerging
 Technologies in Learning (iJET), vol. 13, no. 7, p. 161, 2018.
[24] Y. Zhu, W. Zhang, Y. Chen, and H. Gao, “A novel approach to
 workload prediction using attention-based LSTM encoder-
 decoder network in cloud environment,” EURASIP Journal on
 Wireless Communications and Networking, vol. 2019, no. 1,
 pp. 7–18, 2019.
[25] M. Saumil, A. Agarwal, A. Shukla, and R. Tiwari, “A com-
 prehensive evaluation for the prediction of mortality in in-
 tensive care units with LSTM networks: patients with
 cardiovascular disease,” Biomedizinische Technik. Biomedical
 engineering, vol. 65, no. 4, pp. 435–446, 2019.
[26] M. Kim and J. Kim, “A short-term prediction method of the IGS
 RTS clock correction by using LSTM network,” Journal of Po-
 sitioning, Navigation, and Timing, vol. 8, no. 4, pp. 209–214, 2019.
[27] A. Autonomous, “Networks - neural networks; new findings
 on neural networks described by investigators at beijing
 technology and business university (Bi-directional lstm model
 with symptoms-frequency position attention for question
 answering system in medical domain),” Journal of Robotics &
 Machine Learning, vol. 20, p. 168, 2019.
[28] Y.-B. Cho, K.-J. Kim, J.-A. Ku, and S.-H. Woo, “Change of
 malicious code API call pattern extraction using RNN and
 LSTM,” International Conference On Future Information &
 Communication Engineering, vol. 11, no. 1, pp. 277–280, 2019.
You can also read