# Application of Thematic Context-Based Deep Learning in Foreign Language Teaching

Authors: Qinhua Zhao
Journal: Scientific Programming
 (2021)

---

## Abstract

Foreign language teaching is not simply the transfer of knowledge, but rather the placement of students in contexts to explore and discover problems. The thematic contexts do not exist in isolation. Teachers should adopt certain teaching strategies based on thematic contexts, rely on relevant discourse, study the discourse text, and use rich learning and activities as the driving force to highlight students’ active experience and emotional experience. In this paper, we propose an ELT (English Language Teaching) affective analysis method based on contextual classification and genetic algorithms. The method first constructs ELT topic sets and ELT topic word sets using the LDA (latent Dirichlet allocation) model, then applies genetic algorithms to each ELT topic word set one by one using ELT label data to automatically iterate the sentiment values of words in the word sets, and finally calculates the sentiment polarity of ELT texts using the sentiment values of words in the word sets. The experimental results show that the accuracy of this method improves 3.12% compared with LDA, the recall rate reaches 87.32%, and F1 reaches 73.79%, which can obtain ELT sentiment information from contextual and nonfeatured sentiment words and effectively improve the accuracy of sentiment classification.


---

## Body

## 1. Introduction

As society develops, education should also keep pace with the time. Based on the fundamental task of establishing moral education, foreign languages curriculum standards have updated the content of the curriculum and emphasized the thematic contexts [1]. In foreign languages teaching, teaching design based on thematic contexts can guide students to integrate the development of language ability, cultural awareness, ideological quality and learning ability, and shape students’ core foreign languages subject literacy [2, 3].Context is the language environment, including the natural language environment and the classroom language environment. In the process of teaching foreign languages, due to the lack of a natural language environment, students mainly rely on the classroom language environment, in which they learn foreign languages by retelling, remembering, or imagining some scenes in their minds. The latest “2017 Curriculum” has established three major thematic contexts: “Man and Self, Man and Society, and Man and Nature,” and each of these three thematic contexts is divided into more subthematic groups, which are interconnected and inseparable from each other [4, 5]. The thematic context of “Man and Self” advocates a correct and healthy lifestyle, which is conducive to students’ better understanding, enriching and perfecting themselves and cultivating a correct human attitude; the thematic context of “Man and Society” is conducive to students’ forming good social interaction and establishing good interpersonal relationships [6]. The theme context of “People and Society” is conducive to the formation of good social interaction, the establishment of good interpersonal relationships, the formation of good literacy among students, the cultivation of the innovative spirit of developing information technology, and the better integration of students into social life; the theme context of “People and Nature” advocates understanding nature, knowing nature, caring nature, cultivating students’ curiosity to explore the natural world, and enhancing the ecological concept of people and nature [7, 8].Sentiment tendency analysis of ELT texts is one of the hot elements of current ELT data mining research. Mining the sentimental tendency of ELT texts can obtain information related to students’ liking for foreign languages [9], policy support [10], hot topic tendency [11], and position [12], which are important references for issues such as ELT improvement.Text sentimental tendency analysis belongs to the category of natural language research, and the diversity of natural language descriptive viewpoints is one of the main factors affecting the accuracy of text sentiment tendency analysis. Compared with media with a good content classification such as news, forums, and postings, ELT [13] has broad content and poor classification. Currently, there are two main methods of text sentiment analysis, based on sentiment dictionaries and based on machine learning, both of which perform text sentiment polarity calculation through some algorithm based on the subcategorization of texts. A large number of research results show that the accuracy of sentiment analysis by these two research methods is constrained by the relevance of the text content domain. Since the same word may show different sentiment polarity in different contexts, it is difficult to guarantee the accuracy of sentiment analysis of ELT texts without differentiating word contexts. The LDA extended model is one of the most important methods for text sentiment analysis, but the current research fails to consider the difference in sentiment polarity of the same word in different contexts and the influence of nonfeatured sentiment words on the sentiment polarity of ELT texts. Therefore, this paper proposes an ELT sentiment analysis method based on contextual classification and genetic algorithms.


## 2. The Role of Thematic Contexts in Reading Instruction

### 2.1. Thematic Contexts Can Enhance Students’ Interest in Reading

Compared with foreign languages teaching in college, foreign language teaching in college has more characteristics. For example, there are more diverse genres, more lengths, more complex sentences, and much more difficult in the discourse. For this reason, students need to enhance their comprehension of textual content and improve their language skills. Teachers also need to adopt active teaching strategies to meet the challenges. College students are often confronted with boring and tasteless topics in reading materials and feel that they do not match their actual level, which leads to students’ reluctance to read the materials or even their inability to read them and their low interest in reading. In college foreign language reading teaching, teachers combine the three categories of contextual themes with reading materials, which can increase the connection between reading materials and real life; let students experience different cultures in learning, feel real life, learn knowledge, and understand language in real contexts, which can largely motivate students to actively participate in learning, give full play to their own initiative, help students apply what they learn, and increase reading interest [14, 15].


### 2.2. Thematic Contexts Facilitate Students’ Better Understanding of Texts

When reading texts, students often focus their attention on heavy words or understanding long and difficult sentences, neglecting to grasp the overall meaning of the text and lacking knowledge of the logical relationships between small sentences in the paragraphs of the text, thus failing to correctly access information in the text, discover the thematic meaning of the text accurately, and read and understand reading materials on common topics. Teaching college foreign languages reading under the guidance of thematic contexts requires teachers to first study the text in depth and then guide students to read the text and analyze it, grasp the culture and meaning embodied in the text, and discover the thematic meaning, which facilitates students to use a variety of methods to obtain information creatively. Teachers are expected to use thematic reading text materials to provide appropriate instruction to students and promote students’ initiative to read and think actively and take the best out of them [16]. By creating authentic thematic contexts, teachers can guide students to relate to the context and combine thematic contexts to grasp the content of the text, understand the deeper meanings of key sentences, avoid reading misunderstandings caused by biased generalizations and words that do not make sense and ultimately improve students’ reading comprehension skills [17].


### 2.3. Thematic Contexts Can Improve Students’ Foreign Languages Application Skills

Themed foreign language reading teaching in college is a process of active discovery and learning with students as the main body, and it is also a learning process that follows students’ cognitive rules from the surface to the deeper level gradually. Due to the limitations of China’s traditional examination-based education system, schools currently focus too much on students’ test scores in college foreign language teaching, ignoring students’ ability to apply foreign languages in real-life situations, resulting in “dumb foreign languages” that students can learn but cannot use [18]. In order to change the current situation of college foreign languages reading teaching, teachers should change the traditional teaching concept, design the whole teaching based on the theme context, and create a context that is closely related to the meaning of the theme and students’ real life. In the process of in-depth study of the text, teachers should aim at solving problems, focus on learning foreign languages language knowledge and language skills, and closely connect the theme of the text with students’ lives [19, 20]. At the same time, teachers should cultivate students’ logical and critical thinking and diverse cultural perspectives by comparing Chinese and foreign cultures, adopt thematic contextual teaching, make a profound analysis of texts, reasonably design thematic contexts that help students improve their comprehension as well as their application skills, and adopt creative teaching methods and approaches to actively improve students’ practical foreign languages application skills.


## 2.1. Thematic Contexts Can Enhance Students’ Interest in Reading

Compared with foreign languages teaching in college, foreign language teaching in college has more characteristics. For example, there are more diverse genres, more lengths, more complex sentences, and much more difficult in the discourse. For this reason, students need to enhance their comprehension of textual content and improve their language skills. Teachers also need to adopt active teaching strategies to meet the challenges. College students are often confronted with boring and tasteless topics in reading materials and feel that they do not match their actual level, which leads to students’ reluctance to read the materials or even their inability to read them and their low interest in reading. In college foreign language reading teaching, teachers combine the three categories of contextual themes with reading materials, which can increase the connection between reading materials and real life; let students experience different cultures in learning, feel real life, learn knowledge, and understand language in real contexts, which can largely motivate students to actively participate in learning, give full play to their own initiative, help students apply what they learn, and increase reading interest [14, 15].


## 2.2. Thematic Contexts Facilitate Students’ Better Understanding of Texts

When reading texts, students often focus their attention on heavy words or understanding long and difficult sentences, neglecting to grasp the overall meaning of the text and lacking knowledge of the logical relationships between small sentences in the paragraphs of the text, thus failing to correctly access information in the text, discover the thematic meaning of the text accurately, and read and understand reading materials on common topics. Teaching college foreign languages reading under the guidance of thematic contexts requires teachers to first study the text in depth and then guide students to read the text and analyze it, grasp the culture and meaning embodied in the text, and discover the thematic meaning, which facilitates students to use a variety of methods to obtain information creatively. Teachers are expected to use thematic reading text materials to provide appropriate instruction to students and promote students’ initiative to read and think actively and take the best out of them [16]. By creating authentic thematic contexts, teachers can guide students to relate to the context and combine thematic contexts to grasp the content of the text, understand the deeper meanings of key sentences, avoid reading misunderstandings caused by biased generalizations and words that do not make sense and ultimately improve students’ reading comprehension skills [17].


## 2.3. Thematic Contexts Can Improve Students’ Foreign Languages Application Skills

Themed foreign language reading teaching in college is a process of active discovery and learning with students as the main body, and it is also a learning process that follows students’ cognitive rules from the surface to the deeper level gradually. Due to the limitations of China’s traditional examination-based education system, schools currently focus too much on students’ test scores in college foreign language teaching, ignoring students’ ability to apply foreign languages in real-life situations, resulting in “dumb foreign languages” that students can learn but cannot use [18]. In order to change the current situation of college foreign languages reading teaching, teachers should change the traditional teaching concept, design the whole teaching based on the theme context, and create a context that is closely related to the meaning of the theme and students’ real life. In the process of in-depth study of the text, teachers should aim at solving problems, focus on learning foreign languages language knowledge and language skills, and closely connect the theme of the text with students’ lives [19, 20]. At the same time, teachers should cultivate students’ logical and critical thinking and diverse cultural perspectives by comparing Chinese and foreign cultures, adopt thematic contextual teaching, make a profound analysis of texts, reasonably design thematic contexts that help students improve their comprehension as well as their application skills, and adopt creative teaching methods and approaches to actively improve students’ practical foreign languages application skills.


## 3. Related Work

Currently, there are two main methods of text sentiment analysis based on sentiment dictionary and based on machine learning. The method based on sentiment dictionary is to first extract the sentiment feature words of the text [21], then compare the sentiment feature words with the words in the sentiment dictionary, and use the sentiment polarity of the marked words in the sentiment dictionary to calculate the foreign languages teaching sentiment tendency. The classification accuracy of this method depends on the sentiment dictionary, and the goodness of the sentiment dictionary directly affects the results of sentiment tendency calculation. The machine learning-based method extracts text features first and then applies some algorithms to the features for classification [22] to get the text sentimental tendency. Machine learning-based methods are divided into three types of methods: strongly supervised, weakly supervised, and unsupervised. The main strongly supervised methods are support vector machines [23]. The accuracy of plain Bayesian and decision trees [24, 25] depend on the accuracy of the labeled data. Weakly supervised methods mainly include long- and short-term memory networks [26], convolutional neural networks [27], and so on. These methods require massive labeled data to train the model to ensure accuracy. Unsupervised methods mainly include LDA [28], K-nearest neighbor algorithm [14], random forest [5], and so on. Compared with supervised methods, unsupervised methods do not depend on labeled data and are less affected by the size of data.To address the above problems, in order to further improve the accuracy of text sentiment polarity analysis using the LDA model extension method, this paper proposes an ELT sentiment analysis method based on context classification and genetic algorithm. The method first classifies ELT into contextual topics using the LDA model and divides ELT words into different contextual topics to form ELT topic sets and ELT topic word sets; then for each topic of ELT and topic word sets, a genetic algorithm is used to calculate the sentiment values of all words (including sentiment feature words and nonsentiment feature words), and finally, the sentiment values of words are used to calculate ELT sentiment tendency.


## 4. ELT Theme Analysis Method

### 4.1. Overall Process

The overall process of ELT sentiment classification method based on contextual classification and genetic algorithm is as follows: (1) ELT data preprocessing, screening, and word separation of ELT data; (2) LDA ELT topic contextual word set construction, using LDA to classify ELT in topic context and construct ELT topic word set; and (3) genetic algorithm based on topic ELT sentiment tendency calculation. The overall process is shown in Figure1.Figure 1
Overall process.


## 4.1. Overall Process

The overall process of ELT sentiment classification method based on contextual classification and genetic algorithm is as follows: (1) ELT data preprocessing, screening, and word separation of ELT data; (2) LDA ELT topic contextual word set construction, using LDA to classify ELT in topic context and construct ELT topic word set; and (3) genetic algorithm based on topic ELT sentiment tendency calculation. The overall process is shown in Figure1.Figure 1
Overall process.


## 5. ELT Data Preprocessing

The ELT platform is aimed at the mass population, and some students post information with unclear purpose, and a considerable number of these sentences do not carry an opinion tendency. Therefore, nonopinion sentences are removed first, and only sentences with emotional tendency are kept before word separation. Main Chinese word separation tools are Jieba, SnowNLP, THULAC, NL⁃PIR, PKU-SEG, and so on [29]. Since the content of foreign languages teaching is relatively brief, PKU-SEG can maintain the original word formation relationship of sentences better.


### 5.1. LDA ELT Theme Context Word Set Construction

ELT is a relatively open and free media; compared with news, forums, and other media with good thematic classification performance, its content range is broader and more arbitrary, without a strict classification structure, so there are quite a lot of words in the ELT text set showing different sentiment tendencies in different contexts. LDA is a document topic generation probability model, which is able to obtain “document—topic,” “topic—word,” and “topic—word.” This paper applies the LDA model to categorize ELT document sets and their words by topic context and constructs ELT topic sets and ELT topic context word sets based on topic context division.


### 5.2. LDA ELT Topic Context Classification

The LDA ELT topic model is shown in Figure2. k topics are set manually in the LDA ELT topic model, and the preprocessed corpus D has m ELTs, which is denoted as D=d1,d2,…,dm, and the number of words that are deemphasized after splitting ELTs is c, and the word set is denoted as W=word1,word2,…,wordc. Topic conditional distribution of ELT i is denoted as pz⟶i|α⟶,i∈1,2,…,m, and the topic conditional distribution of all documents can be obtained by using the LDA ELT topic model, which is normalized as shown in the following equation:(1)pz⟶|α⟶=∏i=1mpz⟶i|α⟶=∏i=1mΔn⟶i+α⟶Δα⟶,where n⟶i denotes the number of words distributed under k topics in the i-th ELT, and α is a k-dimensional hypercalcemia variable.Figure 2
LDA ELT theme model.Similarly, the distribution of subjective conditions for wordwordt can be obtained as pword⟶|z⟶,β⟶, t∈1,2,…,c and normalized as shown in the following equation:(2)pword⟶|z⟶,β⟶=∏j=1kpword⟶t|z⟶,β⟶=∏j=1kΔn⟶j+β⟶Δβ⟶,where n⟶j denotes the number of words under the j-th topic and β is a c-dimensional hypernatremia variable.Combining equations (1) and (2), the joint distribution of topics and words can be obtained as shown in the following equation:(3)pword⟶|z⟶∝pword⟶,z⟶|α⟶,β⟶=pz⟶|α⟶pword⟶|z⟶,β⟶=∏i=1mΔn⟶i+α⟶Δα⟶∏j=1kΔn⟶j+β⟶Δβ⟶.The distribution of topics after removing thet-th word is represented by ¬t. The conditional probability of the topic for the t-th word is shown in the following equation using Gibbs’ sampling method:(4)pzi=j|word⟶,z⟶¬t∝pzi=j,word=t|word⟶¬t,z⟶¬t=nd,¬tj+αj∑s=1knd,¬ts+αs∑f=1tnj,¬tt+βf∑j,¬tf+βf.The probability distribution of all the words in ELTd was summed to obtain the probability distribution of tweet under k topics Ad=pd1,pd2,…,pdi, and the value with the highest probability was selected as the topic context of the d-th tweet pdMax=maxpd1,pd2,…,pdi.


### 5.3. ELT Theme Context Word Set Construction

According to the above maximum probability division method, the subject context classification of the ELT set is completed to form the ELT topic setT=T1,T2,…,Tk, where Tj=djl,dj2:…,djy,j∈1,2,⋯…k, y denote the number of ELTs of topic j. The word set Zj,Zj=vj1,vj2,…,vjn of topic j is obtained by dividing and deduplicating the tweets in Tj, and n denotes the number of deduplicated words of the j-th topic. The word set of all k topics constitutes the LDA ELT topic word set Z=Z1,Z2,…,Zk, and the pseudocode of the LDA ELT topic word set construction algorithm is shown in Algorithm 1.Algorithm 1: LDA ELT topic word set construction algorithm.
Input:D=d1,d2,…,dm,Ad=pd1,pd2,…pdk//ELT corpus and ELT topic probability distributionsOutput:Z=Z1,Z2,…,Zk//LDA ELT subject headings(1)
fori = 1 to m do//traverse ELT D(2)
//Get the topicT to which the i-th ELT topic probability maximum belongs(3)
Ta←GetPiMax(4)
//put thei article of ELT into the Tath topic(5)
Topic.append (Ta, i)(6)
end for(7)
forj = 1 to k do//traverse k topics(8)
//ELT splitting and deduplication in thej-th topic(9)
lexical ← set(seg(Topic[j]))(10)
Zj append(lexical)//constitute a set of subject words Zj.(11)
end for(12)
return (Z)//return to LDA ELT subject word set


### 5.4. Genetic Algorithm-Based Calculation of Affective Disposition for Teaching Foreign Languages as a Foreign Language

Considering the influence of nonfeatured sentiment words on the sentiment tendency of ELT texts, this paper calculates the sentiment values of all words in each topic context separately after calculating the LDA ELT topic word sets, which include nonfeatured sentiment words and feature sentiment words, and finally calculates the ELT sentiment tendency using the sentiment values of words. Sentiment values of words in each topic word set are obtained automatically by genetic algorithm calculation using ELT (labeled data) with manually labeled sentimental tendencies. The sentiment value calculation method first assigns a random initial sentiment value to the words within a predefined range; then the optimal sentiment value is obtained by designing the objective function and fitness function associated with the label data to self-optimize the sentiment value of the words; and finally, the optimal sentiment value of the topic words is used to calculate the optimal sentiment tendency value of ELT [30]. Topic context word set Zj is used as the individual in the genetic algorithm, and individual Chromx corresponds to the sentimental value of all words in Zj, which is Chromx=wx1,wx2,…,wx3. wxt is the sentimental value of the t-th word in individual x. The sentimental value of each word corresponds to the chromosome code of the individual. The population is composed of M individuals, denoted as P=Chrom1,Chrom2,…,Chromm, and the initial word sentimental value of an individual is a random value of [−10, 10], as shown in Figure 3. The population is iteratively optimized in the genetic algorithm, and the individual word sentimental value calculated when the number of iterations reaches a predefined value is the optimal sentimental value of all words in the topic context.Figure 3
Some of the initial word sentiment scores correspond to.


### 5.5. Genetic Algorithm Objective Optimization Function

In fact, some words do not have the same sentiment tendency in different contexts, so corresponding to this situation, this paper sets the same word to have different sentiment values in different individuals, and classifying words into different thematic contexts is to consider this variability. In order to make the sentiment tendency of ELT in individuals close to the sentiment tendency of labeled data, that is, in order to apply labeled data to automatically obtain the sentiment tendency of words, the objective function of genetic algorithm is designed in this paper to achieve word sentiment value optimization [13]. The sentimental value of the s-th ELT under topic j is calculated using the following equation:(5)SentiZj,Tj,Chromx,djs=∑word∈dkwjtChromxwordt,where wordt is the word in ELT djs, wjtChromxwordt indicates the sentiment value of word wordt in individualChromx. When SentiZj,Tj,Chromx,djs is greater than or equal to 0, it is positive, and vice versa, it is negative. classdjs indicates the affective tendency of ELT djs as shown in the following equation:(6)classdjs=positive,SentiZj,Tj,Chromx,djs≥0,negative,SentiZj,Tj,Chromx,djs<0.This paper setsAccChromx,Tj as the degree of difference between the affective tendency of ELT in individual Chromx and the affective tendency of the labeled data under topic j, as shown in the following equation; the smaller the value, the closer the affective tendency of ELT in individual Chromx is to the affective tendency of the labeled data.(7)AccChromx,Tj=1−num1≤s≤y,dk∈Tjclassdjsy,where Tj is the set of topics djs. The number of ELT affective tendencies that are consistent with the labeled ELT data affective tendencies is calculated in individual 33 by equation (6). The minimum difference degree individuals are determined by setting the objective optimization function according to equation (7) as shown in the following equation:(8)Accmin=min1≤i≤M,Chrom,∈PAccuracyChromx,Tj.


### 5.6. Genetic-Algorithm-Based Word Sentiment Value Calculation

In order to make the probability of individuals with the smaller variance being retained higher, the adaptation function is set in this paper as shown in the following equation:(9)gather edfitChromx,Tj=yAccChromx,Tj×−1+y−yAccChromx,Tj,where y/AccChromx,Tj is the number of ELTs in which the emotional disposition was judged incorrectly in individual Chromx and y−y/AccChromx,Tj indicates the number of ELTs in which the emotional disposition was judged correctly in individual Chromx. The roulette wheel method was used for individual selection, using equation (9) so that the greater the fitness (smaller the variance), the greater the probability of individuals being selected for retention. The selected individuals are then subjected to crossover and mutation operations to produce new individuals. Individual selection, crossover, and mutation operations are repeatedly performed in the genetic algorithm to optimize the population of individuals iteratively until a predetermined number of iterations is reached and the calculation is stopped, and finally, the individual with the smallest variance is selected as the word sentiment value using the objective optimization function. The pseudocode of word sentimental value calculation based on a genetic algorithm is shown in Algorithm 2, and the individual crossover and variation operations are shown in Figures 4 and 5.Figure 4
Multipoint crossover.Figure 5
Genetic variation.Algorithm 2: Genetic algorithm-based word sentiment value calculation.
Input:D=d1,d2,…,dm,T=T1,T2,…,Tk,Z=Z1,Z2,…,Zk//ELT corpus, ELT topic collection, ELT topic word collectionOutput:Chromx=wx1,wx2,…,wxn/minimum variance individual (optimal sentiment value of topic word set words)(1)
P=Chrom1,Chrom2,…,ChromM//Randomly generated populations P(2)
forj = 1 to MAX do//MAX is the maximum number of iterations(3)
for ch = 1 toM do//traverse the population(4)
fit ← fitness (ch)//calculate individual fitness(5)
fitness.append (fit)//save fitness(6)
end for(7)
new_p ← select(P, fitness)//select operation(8)
new_p ← cross(new_p)//cross operation(9)
new_p ← mutation (new_p)//mutation operation(10)
p ← new_p//new population P(11)
end for(12)
Chrommin←Accmin//Minimum variance individual(13)
returnChrommin//Return the minimum variance individual


### 5.7. Calculation of Emotional Disposition in ELT

The minimum variance individual 11 was obtained by the genetic algorithm, and the codes of chromosomes in the individual corresponded to the optimal sentiment values of words in the subject word set. In the minimum variance individual 22, the sentiment values of all words in ELT are first summed up by equation (5) to obtain the sentiment value of ELT and then judged by equation (6) [31], if the sentiment value is greater than or equal to 0, it means that the ELT has a positive sentiment tendency, and the opposite means that it has a negative sentiment tendency. The calculation example is shown in Figure 6.Figure 6
Example of emotional disposition calculation.


## 5.1. LDA ELT Theme Context Word Set Construction

ELT is a relatively open and free media; compared with news, forums, and other media with good thematic classification performance, its content range is broader and more arbitrary, without a strict classification structure, so there are quite a lot of words in the ELT text set showing different sentiment tendencies in different contexts. LDA is a document topic generation probability model, which is able to obtain “document—topic,” “topic—word,” and “topic—word.” This paper applies the LDA model to categorize ELT document sets and their words by topic context and constructs ELT topic sets and ELT topic context word sets based on topic context division.


## 5.2. LDA ELT Topic Context Classification

The LDA ELT topic model is shown in Figure2. k topics are set manually in the LDA ELT topic model, and the preprocessed corpus D has m ELTs, which is denoted as D=d1,d2,…,dm, and the number of words that are deemphasized after splitting ELTs is c, and the word set is denoted as W=word1,word2,…,wordc. Topic conditional distribution of ELT i is denoted as pz⟶i|α⟶,i∈1,2,…,m, and the topic conditional distribution of all documents can be obtained by using the LDA ELT topic model, which is normalized as shown in the following equation:(1)pz⟶|α⟶=∏i=1mpz⟶i|α⟶=∏i=1mΔn⟶i+α⟶Δα⟶,where n⟶i denotes the number of words distributed under k topics in the i-th ELT, and α is a k-dimensional hypercalcemia variable.Figure 2
LDA ELT theme model.Similarly, the distribution of subjective conditions for wordwordt can be obtained as pword⟶|z⟶,β⟶, t∈1,2,…,c and normalized as shown in the following equation:(2)pword⟶|z⟶,β⟶=∏j=1kpword⟶t|z⟶,β⟶=∏j=1kΔn⟶j+β⟶Δβ⟶,where n⟶j denotes the number of words under the j-th topic and β is a c-dimensional hypernatremia variable.Combining equations (1) and (2), the joint distribution of topics and words can be obtained as shown in the following equation:(3)pword⟶|z⟶∝pword⟶,z⟶|α⟶,β⟶=pz⟶|α⟶pword⟶|z⟶,β⟶=∏i=1mΔn⟶i+α⟶Δα⟶∏j=1kΔn⟶j+β⟶Δβ⟶.The distribution of topics after removing thet-th word is represented by ¬t. The conditional probability of the topic for the t-th word is shown in the following equation using Gibbs’ sampling method:(4)pzi=j|word⟶,z⟶¬t∝pzi=j,word=t|word⟶¬t,z⟶¬t=nd,¬tj+αj∑s=1knd,¬ts+αs∑f=1tnj,¬tt+βf∑j,¬tf+βf.The probability distribution of all the words in ELTd was summed to obtain the probability distribution of tweet under k topics Ad=pd1,pd2,…,pdi, and the value with the highest probability was selected as the topic context of the d-th tweet pdMax=maxpd1,pd2,…,pdi.


## 5.3. ELT Theme Context Word Set Construction

According to the above maximum probability division method, the subject context classification of the ELT set is completed to form the ELT topic setT=T1,T2,…,Tk, where Tj=djl,dj2:…,djy,j∈1,2,⋯…k, y denote the number of ELTs of topic j. The word set Zj,Zj=vj1,vj2,…,vjn of topic j is obtained by dividing and deduplicating the tweets in Tj, and n denotes the number of deduplicated words of the j-th topic. The word set of all k topics constitutes the LDA ELT topic word set Z=Z1,Z2,…,Zk, and the pseudocode of the LDA ELT topic word set construction algorithm is shown in Algorithm 1.Algorithm 1: LDA ELT topic word set construction algorithm.
Input:D=d1,d2,…,dm,Ad=pd1,pd2,…pdk//ELT corpus and ELT topic probability distributionsOutput:Z=Z1,Z2,…,Zk//LDA ELT subject headings(1)
fori = 1 to m do//traverse ELT D(2)
//Get the topicT to which the i-th ELT topic probability maximum belongs(3)
Ta←GetPiMax(4)
//put thei article of ELT into the Tath topic(5)
Topic.append (Ta, i)(6)
end for(7)
forj = 1 to k do//traverse k topics(8)
//ELT splitting and deduplication in thej-th topic(9)
lexical ← set(seg(Topic[j]))(10)
Zj append(lexical)//constitute a set of subject words Zj.(11)
end for(12)
return (Z)//return to LDA ELT subject word set


## 5.4. Genetic Algorithm-Based Calculation of Affective Disposition for Teaching Foreign Languages as a Foreign Language

Considering the influence of nonfeatured sentiment words on the sentiment tendency of ELT texts, this paper calculates the sentiment values of all words in each topic context separately after calculating the LDA ELT topic word sets, which include nonfeatured sentiment words and feature sentiment words, and finally calculates the ELT sentiment tendency using the sentiment values of words. Sentiment values of words in each topic word set are obtained automatically by genetic algorithm calculation using ELT (labeled data) with manually labeled sentimental tendencies. The sentiment value calculation method first assigns a random initial sentiment value to the words within a predefined range; then the optimal sentiment value is obtained by designing the objective function and fitness function associated with the label data to self-optimize the sentiment value of the words; and finally, the optimal sentiment value of the topic words is used to calculate the optimal sentiment tendency value of ELT [30]. Topic context word set Zj is used as the individual in the genetic algorithm, and individual Chromx corresponds to the sentimental value of all words in Zj, which is Chromx=wx1,wx2,…,wx3. wxt is the sentimental value of the t-th word in individual x. The sentimental value of each word corresponds to the chromosome code of the individual. The population is composed of M individuals, denoted as P=Chrom1,Chrom2,…,Chromm, and the initial word sentimental value of an individual is a random value of [−10, 10], as shown in Figure 3. The population is iteratively optimized in the genetic algorithm, and the individual word sentimental value calculated when the number of iterations reaches a predefined value is the optimal sentimental value of all words in the topic context.Figure 3
Some of the initial word sentiment scores correspond to.


## 5.5. Genetic Algorithm Objective Optimization Function

In fact, some words do not have the same sentiment tendency in different contexts, so corresponding to this situation, this paper sets the same word to have different sentiment values in different individuals, and classifying words into different thematic contexts is to consider this variability. In order to make the sentiment tendency of ELT in individuals close to the sentiment tendency of labeled data, that is, in order to apply labeled data to automatically obtain the sentiment tendency of words, the objective function of genetic algorithm is designed in this paper to achieve word sentiment value optimization [13]. The sentimental value of the s-th ELT under topic j is calculated using the following equation:(5)SentiZj,Tj,Chromx,djs=∑word∈dkwjtChromxwordt,where wordt is the word in ELT djs, wjtChromxwordt indicates the sentiment value of word wordt in individualChromx. When SentiZj,Tj,Chromx,djs is greater than or equal to 0, it is positive, and vice versa, it is negative. classdjs indicates the affective tendency of ELT djs as shown in the following equation:(6)classdjs=positive,SentiZj,Tj,Chromx,djs≥0,negative,SentiZj,Tj,Chromx,djs<0.This paper setsAccChromx,Tj as the degree of difference between the affective tendency of ELT in individual Chromx and the affective tendency of the labeled data under topic j, as shown in the following equation; the smaller the value, the closer the affective tendency of ELT in individual Chromx is to the affective tendency of the labeled data.(7)AccChromx,Tj=1−num1≤s≤y,dk∈Tjclassdjsy,where Tj is the set of topics djs. The number of ELT affective tendencies that are consistent with the labeled ELT data affective tendencies is calculated in individual 33 by equation (6). The minimum difference degree individuals are determined by setting the objective optimization function according to equation (7) as shown in the following equation:(8)Accmin=min1≤i≤M,Chrom,∈PAccuracyChromx,Tj.


## 5.6. Genetic-Algorithm-Based Word Sentiment Value Calculation

In order to make the probability of individuals with the smaller variance being retained higher, the adaptation function is set in this paper as shown in the following equation:(9)gather edfitChromx,Tj=yAccChromx,Tj×−1+y−yAccChromx,Tj,where y/AccChromx,Tj is the number of ELTs in which the emotional disposition was judged incorrectly in individual Chromx and y−y/AccChromx,Tj indicates the number of ELTs in which the emotional disposition was judged correctly in individual Chromx. The roulette wheel method was used for individual selection, using equation (9) so that the greater the fitness (smaller the variance), the greater the probability of individuals being selected for retention. The selected individuals are then subjected to crossover and mutation operations to produce new individuals. Individual selection, crossover, and mutation operations are repeatedly performed in the genetic algorithm to optimize the population of individuals iteratively until a predetermined number of iterations is reached and the calculation is stopped, and finally, the individual with the smallest variance is selected as the word sentiment value using the objective optimization function. The pseudocode of word sentimental value calculation based on a genetic algorithm is shown in Algorithm 2, and the individual crossover and variation operations are shown in Figures 4 and 5.Figure 4
Multipoint crossover.Figure 5
Genetic variation.Algorithm 2: Genetic algorithm-based word sentiment value calculation.
Input:D=d1,d2,…,dm,T=T1,T2,…,Tk,Z=Z1,Z2,…,Zk//ELT corpus, ELT topic collection, ELT topic word collectionOutput:Chromx=wx1,wx2,…,wxn/minimum variance individual (optimal sentiment value of topic word set words)(1)
P=Chrom1,Chrom2,…,ChromM//Randomly generated populations P(2)
forj = 1 to MAX do//MAX is the maximum number of iterations(3)
for ch = 1 toM do//traverse the population(4)
fit ← fitness (ch)//calculate individual fitness(5)
fitness.append (fit)//save fitness(6)
end for(7)
new_p ← select(P, fitness)//select operation(8)
new_p ← cross(new_p)//cross operation(9)
new_p ← mutation (new_p)//mutation operation(10)
p ← new_p//new population P(11)
end for(12)
Chrommin←Accmin//Minimum variance individual(13)
returnChrommin//Return the minimum variance individual


## 5.7. Calculation of Emotional Disposition in ELT

The minimum variance individual 11 was obtained by the genetic algorithm, and the codes of chromosomes in the individual corresponded to the optimal sentiment values of words in the subject word set. In the minimum variance individual 22, the sentiment values of all words in ELT are first summed up by equation (5) to obtain the sentiment value of ELT and then judged by equation (6) [31], if the sentiment value is greater than or equal to 0, it means that the ELT has a positive sentiment tendency, and the opposite means that it has a negative sentiment tendency. The calculation example is shown in Figure 6.Figure 6
Example of emotional disposition calculation.


## 6. Experimental Results and Analysis

### 6.1. Experimental Data Set

The datum was obtained from the 2012–2014 NLPCC public data set [22], with 17,253 ELTs. There were 7,188 ELTs after removing nonopinion sentences, and this data was used as a corpus for the calculation of affective tendencies for ELTs, of which 3,314 were positive and 3,874 were negative, and the tenfold cross-validation was used to train and test the method of this paper.The NLPCC data set has eight labels: none, happiness, like, sadness, disgust, anger, fear, and surprise. The eight labels are simplified into two types of labels: positive and negative, as shown in Table1.Table 1
Label classification.
PositiveNegativeNoneSadnessHappinessDisgustLikeFearSurpriseAfter the labels were categorized, the ELT content was stored in a uniform format, and the data format is shown in Table2, with the polarity 1 for ELT indicating positive and −1 for negative.Table 2
Sample ELT texts.
Serial numberMicroblog contentPolarity1I feel strange and uncomfortable.−12The film is really moving; especially with the development of the plot, it is melodious and beautiful.13Suddenly, I found that Liu Xin’s song names are so powerful14It’s too late.−15These days have been wonderful, all kinds of wonderful.16Superman is everywhere, and Kobe responds only to roars and mistakes.−17I don’t know if the performance of iPad3 is good. If it is good, I can consider buying one.18Our unit is a good unit. Although we get off work late, we go to work early!−19After reading a lot about the laptop dock of MTO ATRIX, I like it more and more.110Personality explosion1


### 6.2. Experimental Procedure and Results

In this paper, the effects of all words on the effective polarity of ELT were involved in the calculation, and all words in ELT were retained after the splitting of ELT. Sample results of PKU-SEG splitting are shown in Table3.Table 3
Sample ELT PKU-SEG word separation results.
Serial numberWord segmentation result1I feel strange and uncomfortable.2I’ve had a wonderful time these days.3Suddenly, I found that Liu Xin’s song names are so powerful.4Personality explosionAfter ELT word classification, the LDA ELT topic model is used to construct the topic word sets.K values of the number of topics in the LDA ELT topic model need to be set in advance, and the selection of suitable k values is beneficial to topic classification. In this paper, the k value is set to 5 (the collected data are divided into 5 topics), and the sample ELT topic context classification is shown in Table 4.Table 4
Sample ELT topic context classification.
Topic 1I don’t know whether the performance of iPad3 is good or not. If it is good, I can consider buying a laptop dock that has read a lot about MTO ATRIX. I like it more and more.Topic 2The past few days have been wonderful. I feel strange and uncomfortable in my heart. Our unit is a good unit. Although we get off work late, we go to work early.Topic 3The film is really moving, especially with the development of the plot; the melodious songs are really sensational.Topic 4Suddenly, I found that Liu Xin’s songs were so powerful. They were superman everywhere. Kobe responded only with roars and mistakes.Topic 5Burst out of character. It’s so sad.The results of the ELT theme context classification are: theme one is related to foreign languages and foreign languages commentary; theme two is related to personal emotional expressions; theme three is social status commentary and event descriptions; theme four is dynamic ELT commentary about socially prominent people; theme five is more colloquial popular Internet phrases, and the classification results are consistent with reality. After completing the ELT topic context classification, the ELT topic word set is constructed, as shown in Table5.Table 5
Selected subject headings.
ThemePartial word setSubject word set 1iPad3PerformanceScreenKeyboardProductSubject word set 2Make complaintsSpeechlessNightCompanyGood morning!Subject word set 3PainDevelopmentLabourReactionaryChallengeSubject word set 4FireSingNight shanghaiVocal concertBaiduSubject word set 5YesAhBurstVulnerableAlasAfter obtaining the topic word sets, the word sentiment values were calculated using a genetic algorithm-based method for calculating sentimental tendencies in ELT. The populationP is randomly generated in the algorithm, and the population size is set to 1,000, and the selection, crossover, and mutation operations are performed on the individuals. In this paper, the number of words after deweighting the current topic ELT words is used as the individual coding length, and the chromosome coding is coded with real integers in the [−10, 10] interval, and the initial word sentiment values are shown in Table 6. The initial word sentiment values are shown in Table 6. The genetic algorithm is run with the labeled data, objective function and fitness function for each word set in each topic, so that the sentiment values are optimized iteratively until the predetermined number of iterations is reached and the calculation stops (the iteration threshold is set to 2,000 in this paper), and the results of word sentiment value optimization are shown in Table 7.Table 6
Initial word sentiment values.
Individual numberMake complaintsSpeechlessHappinessAwesomeFond dreamLife1−85−38922−5252−4832−4213−5421−6−2−3−1Table 7
Optimization results of word sentiment values.
Individual numberMake complaintsSpeechlessHappinessAwesomeFond dreamLife1−9−397522−5−252−4−13−2−761204−5−8553−1


#### 6.2.1. Mediating Effect Test

The mediation effect was examined using the nonparametric percentile Bootstrap method with the PROCESS 2.16 plug-in installed in SPSS 24.0 software. The results showed that desire mediated the relationship between perceived behavioral control, sense of relatedness, and willingness to act; desire partially mediated the relationship between perceived behavioral control and willingness to act; and desire fully mediated the relationship between sense of relatedness and willingness to act (see Table3).In the genetic algorithm-based method for calculating affective tendencies in ELT, the objective function is used to select the individual with the least variance in the optimized population as the current topic word affective value, as shown in Table8.Table 8
Example of optimal word sentiment values.
Make complaintsSpeechlessHappinessAwesomeFond dreamLife−2−76120After the classification of ELT topic contexts, there may be the same words in different topics, and this classification method is consistent with the reality that there are differences in affective tendencies of the same word in different topic contexts, and the affective values of the same word in different topics are shown in Table9.Table 9
Examples of sentiment values for the same word in different themes.
TermsTopic 1Topic 2Topic 3Topic 4Topic 5Good85262Large41−13−7Yes2013−2Sad−9−8−2−5−9After the classification of topics, the emotional tendency of ELT is judged by calculating the sum of the emotional values of ELT subwords under the topic, and when the sum of the emotional values of ELT subwords is greater than or equal to 0, the emotional tendency of ELT is positive, and when it is less than 0, the emotional tendency of ELT is negative.


### 6.3. Comparison of Methods

The present method (LDA-GA) was compared with LDA, plain Bayesian classification (NB), random forest (RF), and decision tree (DT) for the calculation of affective disposition in ELT. Precision (P), recall (R) and F1 values were used as evaluation indicators, and the comparison results are shown in Table 10.Table 10
Comparison experimental results of emotional disposition calculation.
MethodAccuracy (%)Recall (%)F1 (%)LDA60.6378.0268.23DT52.4473.0661.07NB54.3185.0066.23RF58.6774.6365.69LDA-GA63.7587.3273.69The experimental results show that theF1 values of the LDA method are higher than those of the DT, NB, and RF algorithms. The reason is that the LDA method for ELT sentiment analysis is based on semantic “text-word” topic classification, while the DT, NB, and RF algorithms convert words into word vectors without considering the semantic information of words, which leads to the less-than-optimal results of microbial sentiment calculation. The accuracy of the LDA-GA method in this paper is not satisfactory. The accuracy, recall, and F1 value of the LDA-GA method in this paper are higher than those of the LDA method. The reason is that the LDA method only uses feature sentiment words to calculate ELT sentiment polarity, while the method in this paper uses a genetic algorithm to calculate all word sentiment values, unites feature sentiment words and nonfeature sentiment words to calculate ELT sentiment polarity, and calculates word sentiment values according to different topic contexts to distinguish the sentiment polarity of the same word in different topic contexts.


## 6.1. Experimental Data Set

The datum was obtained from the 2012–2014 NLPCC public data set [22], with 17,253 ELTs. There were 7,188 ELTs after removing nonopinion sentences, and this data was used as a corpus for the calculation of affective tendencies for ELTs, of which 3,314 were positive and 3,874 were negative, and the tenfold cross-validation was used to train and test the method of this paper.The NLPCC data set has eight labels: none, happiness, like, sadness, disgust, anger, fear, and surprise. The eight labels are simplified into two types of labels: positive and negative, as shown in Table1.Table 1
Label classification.
PositiveNegativeNoneSadnessHappinessDisgustLikeFearSurpriseAfter the labels were categorized, the ELT content was stored in a uniform format, and the data format is shown in Table2, with the polarity 1 for ELT indicating positive and −1 for negative.Table 2
Sample ELT texts.
Serial numberMicroblog contentPolarity1I feel strange and uncomfortable.−12The film is really moving; especially with the development of the plot, it is melodious and beautiful.13Suddenly, I found that Liu Xin’s song names are so powerful14It’s too late.−15These days have been wonderful, all kinds of wonderful.16Superman is everywhere, and Kobe responds only to roars and mistakes.−17I don’t know if the performance of iPad3 is good. If it is good, I can consider buying one.18Our unit is a good unit. Although we get off work late, we go to work early!−19After reading a lot about the laptop dock of MTO ATRIX, I like it more and more.110Personality explosion1


## 6.2. Experimental Procedure and Results

In this paper, the effects of all words on the effective polarity of ELT were involved in the calculation, and all words in ELT were retained after the splitting of ELT. Sample results of PKU-SEG splitting are shown in Table3.Table 3
Sample ELT PKU-SEG word separation results.
Serial numberWord segmentation result1I feel strange and uncomfortable.2I’ve had a wonderful time these days.3Suddenly, I found that Liu Xin’s song names are so powerful.4Personality explosionAfter ELT word classification, the LDA ELT topic model is used to construct the topic word sets.K values of the number of topics in the LDA ELT topic model need to be set in advance, and the selection of suitable k values is beneficial to topic classification. In this paper, the k value is set to 5 (the collected data are divided into 5 topics), and the sample ELT topic context classification is shown in Table 4.Table 4
Sample ELT topic context classification.
Topic 1I don’t know whether the performance of iPad3 is good or not. If it is good, I can consider buying a laptop dock that has read a lot about MTO ATRIX. I like it more and more.Topic 2The past few days have been wonderful. I feel strange and uncomfortable in my heart. Our unit is a good unit. Although we get off work late, we go to work early.Topic 3The film is really moving, especially with the development of the plot; the melodious songs are really sensational.Topic 4Suddenly, I found that Liu Xin’s songs were so powerful. They were superman everywhere. Kobe responded only with roars and mistakes.Topic 5Burst out of character. It’s so sad.The results of the ELT theme context classification are: theme one is related to foreign languages and foreign languages commentary; theme two is related to personal emotional expressions; theme three is social status commentary and event descriptions; theme four is dynamic ELT commentary about socially prominent people; theme five is more colloquial popular Internet phrases, and the classification results are consistent with reality. After completing the ELT topic context classification, the ELT topic word set is constructed, as shown in Table5.Table 5
Selected subject headings.
ThemePartial word setSubject word set 1iPad3PerformanceScreenKeyboardProductSubject word set 2Make complaintsSpeechlessNightCompanyGood morning!Subject word set 3PainDevelopmentLabourReactionaryChallengeSubject word set 4FireSingNight shanghaiVocal concertBaiduSubject word set 5YesAhBurstVulnerableAlasAfter obtaining the topic word sets, the word sentiment values were calculated using a genetic algorithm-based method for calculating sentimental tendencies in ELT. The populationP is randomly generated in the algorithm, and the population size is set to 1,000, and the selection, crossover, and mutation operations are performed on the individuals. In this paper, the number of words after deweighting the current topic ELT words is used as the individual coding length, and the chromosome coding is coded with real integers in the [−10, 10] interval, and the initial word sentiment values are shown in Table 6. The initial word sentiment values are shown in Table 6. The genetic algorithm is run with the labeled data, objective function and fitness function for each word set in each topic, so that the sentiment values are optimized iteratively until the predetermined number of iterations is reached and the calculation stops (the iteration threshold is set to 2,000 in this paper), and the results of word sentiment value optimization are shown in Table 7.Table 6
Initial word sentiment values.
Individual numberMake complaintsSpeechlessHappinessAwesomeFond dreamLife1−85−38922−5252−4832−4213−5421−6−2−3−1Table 7
Optimization results of word sentiment values.
Individual numberMake complaintsSpeechlessHappinessAwesomeFond dreamLife1−9−397522−5−252−4−13−2−761204−5−8553−1


### 6.2.1. Mediating Effect Test

The mediation effect was examined using the nonparametric percentile Bootstrap method with the PROCESS 2.16 plug-in installed in SPSS 24.0 software. The results showed that desire mediated the relationship between perceived behavioral control, sense of relatedness, and willingness to act; desire partially mediated the relationship between perceived behavioral control and willingness to act; and desire fully mediated the relationship between sense of relatedness and willingness to act (see Table3).In the genetic algorithm-based method for calculating affective tendencies in ELT, the objective function is used to select the individual with the least variance in the optimized population as the current topic word affective value, as shown in Table8.Table 8
Example of optimal word sentiment values.
Make complaintsSpeechlessHappinessAwesomeFond dreamLife−2−76120After the classification of ELT topic contexts, there may be the same words in different topics, and this classification method is consistent with the reality that there are differences in affective tendencies of the same word in different topic contexts, and the affective values of the same word in different topics are shown in Table9.Table 9
Examples of sentiment values for the same word in different themes.
TermsTopic 1Topic 2Topic 3Topic 4Topic 5Good85262Large41−13−7Yes2013−2Sad−9−8−2−5−9After the classification of topics, the emotional tendency of ELT is judged by calculating the sum of the emotional values of ELT subwords under the topic, and when the sum of the emotional values of ELT subwords is greater than or equal to 0, the emotional tendency of ELT is positive, and when it is less than 0, the emotional tendency of ELT is negative.


## 6.2.1. Mediating Effect Test

The mediation effect was examined using the nonparametric percentile Bootstrap method with the PROCESS 2.16 plug-in installed in SPSS 24.0 software. The results showed that desire mediated the relationship between perceived behavioral control, sense of relatedness, and willingness to act; desire partially mediated the relationship between perceived behavioral control and willingness to act; and desire fully mediated the relationship between sense of relatedness and willingness to act (see Table3).In the genetic algorithm-based method for calculating affective tendencies in ELT, the objective function is used to select the individual with the least variance in the optimized population as the current topic word affective value, as shown in Table8.Table 8
Example of optimal word sentiment values.
Make complaintsSpeechlessHappinessAwesomeFond dreamLife−2−76120After the classification of ELT topic contexts, there may be the same words in different topics, and this classification method is consistent with the reality that there are differences in affective tendencies of the same word in different topic contexts, and the affective values of the same word in different topics are shown in Table9.Table 9
Examples of sentiment values for the same word in different themes.
TermsTopic 1Topic 2Topic 3Topic 4Topic 5Good85262Large41−13−7Yes2013−2Sad−9−8−2−5−9After the classification of topics, the emotional tendency of ELT is judged by calculating the sum of the emotional values of ELT subwords under the topic, and when the sum of the emotional values of ELT subwords is greater than or equal to 0, the emotional tendency of ELT is positive, and when it is less than 0, the emotional tendency of ELT is negative.


## 6.3. Comparison of Methods

The present method (LDA-GA) was compared with LDA, plain Bayesian classification (NB), random forest (RF), and decision tree (DT) for the calculation of affective disposition in ELT. Precision (P), recall (R) and F1 values were used as evaluation indicators, and the comparison results are shown in Table 10.Table 10
Comparison experimental results of emotional disposition calculation.
MethodAccuracy (%)Recall (%)F1 (%)LDA60.6378.0268.23DT52.4473.0661.07NB54.3185.0066.23RF58.6774.6365.69LDA-GA63.7587.3273.69The experimental results show that theF1 values of the LDA method are higher than those of the DT, NB, and RF algorithms. The reason is that the LDA method for ELT sentiment analysis is based on semantic “text-word” topic classification, while the DT, NB, and RF algorithms convert words into word vectors without considering the semantic information of words, which leads to the less-than-optimal results of microbial sentiment calculation. The accuracy of the LDA-GA method in this paper is not satisfactory. The accuracy, recall, and F1 value of the LDA-GA method in this paper are higher than those of the LDA method. The reason is that the LDA method only uses feature sentiment words to calculate ELT sentiment polarity, while the method in this paper uses a genetic algorithm to calculate all word sentiment values, unites feature sentiment words and nonfeature sentiment words to calculate ELT sentiment polarity, and calculates word sentiment values according to different topic contexts to distinguish the sentiment polarity of the same word in different topic contexts.


## 7. Conclusions

In this paper, we propose an ELT topic analysis method based on contextual classification and genetic algorithms. The method first constructs ELT topic sets and ELT topic word sets using the LDA model, then applies a genetic algorithm to each ELT topic word set one by one to automatically iterate and calculate the sentiment value of words in the word sets, and finally calculates the sentiment polarity of ELT text by the sentiment value of words in the topic word sets. The experimental results show that the accuracy, recall, andF1 of this method are improved compared with those of LDA, plain Bayesian classification, random forest, and decision tree-based ELT sentiment analysis methods. The method in this paper requires repeated iterative computation in the genetic algorithm, which is time-consuming, and the next research work is to consider the problem of genetic algorithm acceleration.In the future, we will optimize the algorithm to make it more robust and stable; we will optimize its scalability so that it can be applied in educational scenarios in different fields.



---

*Source: 8664219-2021-10-23.xml*