11
Research Article Application of Thematic Context-Based Deep Learning in Foreign Language Teaching Qinhua Zhao 1,2 1 Department of Foreign Languages, Guangxi University for Nationalities, Nanning 530000, Guangxi, China 2 Euro-Languages College, Zhejiang Yuexiu University, Shaoxing 312400, Zhejiang, China Correspondence should be addressed to Qinhua Zhao; 20052036@zyufl.edu.cn Received 13 September 2021; Revised 9 October 2021; Accepted 12 October 2021; Published 23 October 2021 Academic Editor: Bai Yuan Ding Copyright © 2021 Qinhua Zhao. is 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. Foreign language teaching is not simply the transfer of knowledge, but rather the placement of students in contexts to explore and discover problems. e 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. e method first constructs ELTtopic 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. e 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. 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 stu- dents 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, remem- bering, or imagining some scenes in their minds. e 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]. e 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 cor- rect human attitude; the thematic context of “Man and Society” is conducive to students’ forming good social in- teraction and establishing good interpersonal relationships [6]. e theme context of “People and Society” is conducive to the formation of good social interaction, the establish- ment of good interpersonal relationships, the formation of good literacy among students, the cultivation of the inno- vative 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’ Hindawi Scientific Programming Volume 2021, Article ID 8664219, 11 pages https://doi.org/10.1155/2021/8664219

Application of Thematic Context-Based Deep Learning in

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Application of Thematic Context-Based Deep Learning in

Research ArticleApplication of Thematic Context-Based Deep Learning in ForeignLanguage Teaching

Qinhua Zhao 12

1Department of Foreign Languages Guangxi University for Nationalities Nanning 530000 Guangxi China2Euro-Languages College Zhejiang Yuexiu University Shaoxing 312400 Zhejiang China

Correspondence should be addressed to Qinhua Zhao 20052036zyufleducn

Received 13 September 2021 Revised 9 October 2021 Accepted 12 October 2021 Published 23 October 2021

Academic Editor Bai Yuan Ding

Copyright copy 2021 Qinhua Zhao -is is an open access article distributed under the Creative Commons Attribution Licensewhich permits unrestricted use distribution and reproduction in any medium provided the original work is properly cited

Foreign language teaching is not simply the transfer of knowledge but rather the placement of students in contexts to explore anddiscover problems -e thematic contexts do not exist in isolation Teachers should adopt certain teaching strategies based onthematic contexts rely on relevant discourse study the discourse text and use rich learning and activities as the driving force tohighlight studentsrsquo 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-emethod first constructs ELT topic sets andELT topic word sets using the LDA (latent Dirichlet allocation) model then applies genetic algorithms to each ELT topic word setone by one using ELT label data to automatically iterate the sentiment values of words in the word sets and finally calculates thesentiment polarity of ELT texts using the sentiment values of words in the word sets -e experimental results show that theaccuracy of this method improves 312 compared with LDA the recall rate reaches 8732 and F1 reaches 7379 which canobtain ELT sentiment information from contextual and nonfeatured sentiment words and effectively improve the accuracy ofsentiment classification

1 Introduction

As society develops education should also keep pace withthe time Based on the fundamental task of establishingmoral education foreign languages curriculum standardshave updated the content of the curriculum and emphasizedthe thematic contexts [1] In foreign languages teachingteaching design based on thematic contexts can guide stu-dents to integrate the development of language abilitycultural awareness ideological quality and learning abilityand shape studentsrsquo core foreign languages subject literacy[2 3]

Context is the language environment including thenatural language environment and the classroom languageenvironment In the process of teaching foreign languagesdue to the lack of a natural language environment studentsmainly rely on the classroom language environment inwhich they learn foreign languages by retelling remem-bering or imagining some scenes in their minds -e latest

ldquo2017 Curriculumrdquo has established three major thematiccontexts ldquoMan and Self Man and Society and Man andNaturerdquo and each of these three thematic contexts is dividedinto more subthematic groups which are interconnectedand inseparable from each other [4 5] -e thematic contextof ldquoMan and Selfrdquo advocates a correct and healthy lifestylewhich is conducive to studentsrsquo better understandingenriching and perfecting themselves and cultivating a cor-rect human attitude the thematic context of ldquoMan andSocietyrdquo is conducive to studentsrsquo forming good social in-teraction and establishing good interpersonal relationships[6] -e theme context of ldquoPeople and Societyrdquo is conduciveto the formation of good social interaction the establish-ment of good interpersonal relationships the formation ofgood literacy among students the cultivation of the inno-vative spirit of developing information technology and thebetter integration of students into social life the themecontext of ldquoPeople and Naturerdquo advocates understandingnature knowing nature caring nature cultivating studentsrsquo

HindawiScientific ProgrammingVolume 2021 Article ID 8664219 11 pageshttpsdoiorg10115520218664219

curiosity to explore the natural world and enhancing theecological concept of people and nature [7 8]

Sentiment tendency analysis of ELT texts is one of thehot elements of current ELT data mining research Miningthe sentimental tendency of ELT texts can obtain infor-mation related to studentsrsquo liking for foreign languages [9]policy support [10] hot topic tendency [11] and position[12] which are important references for issues such as ELTimprovement

Text sentimental tendency analysis belongs to thecategory of natural language research and the diversity ofnatural language descriptive viewpoints is one of the mainfactors affecting the accuracy of text sentiment tendencyanalysis Compared with media with a good contentclassification such as news forums and postings ELT [13]has broad content and poor classification Currently thereare two main methods of text sentiment analysis based onsentiment dictionaries and based on machine learningboth of which perform text sentiment polarity calculationthrough some algorithm based on the subcategorization oftexts A large number of research results show that theaccuracy of sentiment analysis by these two researchmethods is constrained by the relevance of the textcontent domain Since the same word may show differentsentiment polarity in different contexts it is difficult toguarantee the accuracy of sentiment analysis of ELT textswithout differentiating word contexts -e LDA extendedmodel is one of the most important methods for textsentiment analysis but the current research fails toconsider the difference in sentiment polarity of the sameword in different contexts and the influence of non-featured sentiment words on the sentiment polarity ofELT texts -erefore this paper proposes an ELT senti-ment analysis method based on contextual classificationand genetic algorithms

2 The Role of Thematic Contexts inReading Instruction

21 +ematic Contexts Can Enhance Studentsrsquo Interest inReading Compared with foreign languages teaching incollege foreign language teaching in college has morecharacteristics For example there are more diverse genresmore lengths more complex sentences and much moredifficult in the discourse For this reason students need toenhance their comprehension of textual content and im-prove their language skills Teachers also need to adopt activeteaching strategies to meet the challenges College studentsare often confronted with boring and tasteless topics inreadingmaterials and feel that they do not match their actuallevel which leads to studentsrsquo reluctance to read the ma-terials or even their inability to read them and their lowinterest in reading In college foreign language readingteaching teachers combine the three categories of contextualthemes with reading materials which can increase theconnection between reading materials and real life letstudents experience different cultures in learning feel reallife learn knowledge and understand language in realcontexts which can largely motivate students to actively

participate in learning give full play to their own initiativehelp students apply what they learn and increase readinginterest [14 15]

22 +ematic Contexts Facilitate Studentsrsquo Better Under-standing of Texts When reading texts students often focustheir attention on heavy words or understanding long anddifficult sentences neglecting to grasp the overall meaning ofthe text and lacking knowledge of the logical relationshipsbetween small sentences in the paragraphs of the text thusfailing to correctly access information in the text discoverthe thematic meaning of the text accurately and read andunderstand reading materials on common topics Teachingcollege foreign languages reading under the guidance ofthematic contexts requires teachers to first study the text indepth and then guide students to read the text and analyze itgrasp the culture and meaning embodied in the text anddiscover the thematic meaning which facilitates students touse a variety of methods to obtain information creativelyTeachers are expected to use thematic reading text materialsto provide appropriate instruction to students and promotestudentsrsquo initiative to read and think actively and take thebest out of them [16] By creating authentic thematic con-texts teachers can guide students to relate to the context andcombine thematic contexts to grasp the content of the textunderstand the deeper meanings of key sentences avoidreading misunderstandings caused by biased generalizationsand words that do not make sense and ultimately improvestudentsrsquo reading comprehension skills [17]

23 +ematic Contexts Can Improve Studentsrsquo Foreign Lan-guages Application Skills -emed foreign language readingteaching in college is a process of active discovery andlearning with students as the main body and it is also alearning process that follows studentsrsquo cognitive rules fromthe surface to the deeper level gradually Due to the limi-tations of Chinarsquos traditional examination-based educationsystem schools currently focus too much on studentsrsquo testscores in college foreign language teaching ignoring stu-dentsrsquo ability to apply foreign languages in real-life situa-tions resulting in ldquodumb foreign languagesrdquo that studentscan learn but cannot use [18] In order to change the currentsituation of college foreign languages reading teachingteachers should change the traditional teaching conceptdesign the whole teaching based on the theme context andcreate a context that is closely related to the meaning of thetheme and studentsrsquo real life In the process of in-depth studyof the text teachers should aim at solving problems focus onlearning foreign languages language knowledge and lan-guage skills and closely connect the theme of the text withstudentsrsquo lives [19 20] At the same time teachers shouldcultivate studentsrsquo logical and critical thinking and diversecultural perspectives by comparing Chinese and foreigncultures adopt thematic contextual teaching make a pro-found analysis of texts reasonably design thematic contextsthat help students improve their comprehension as well astheir application skills and adopt creative teaching methods

2 Scientific Programming

and approaches to actively improve studentsrsquo practicalforeign languages application skills

3 Related Work

Currently there are two main methods of text sentimentanalysis based on sentiment dictionary and based onmachine learning -e method based on sentiment dic-tionary is to first extract the sentiment feature words of thetext [21] then compare the sentiment feature words withthe words in the sentiment dictionary and use the sen-timent polarity of the marked words in the sentimentdictionary to calculate the foreign languages teachingsentiment tendency -e classification accuracy of thismethod depends on the sentiment dictionary and thegoodness of the sentiment dictionary directly affects theresults of sentiment tendency calculation -e machinelearning-based method extracts text features first and thenapplies some algorithms to the features for classification[22] to get the text sentimental tendency Machinelearning-based methods are divided into three types ofmethods strongly supervised weakly supervised andunsupervised -e main strongly supervised methods aresupport vector machines [23] -e accuracy of plainBayesian and decision trees [24 25] depend on the ac-curacy of the labeled data Weakly supervised methodsmainly include long- and short-term memory networks[26] convolutional neural networks [27] and so on -esemethods require massive labeled data to train the model toensure accuracy Unsupervised methods mainly includeLDA [28] K-nearest neighbor algorithm [14] randomforest [5] and so on Compared with supervised methodsunsupervised methods do not depend on labeled data andare less affected by the size of data

To address the above problems in order to furtherimprove the accuracy of text sentiment polarity analysisusing the LDAmodel extension method this paper proposesan ELT sentiment analysis method based on context clas-sification and genetic algorithm -e method first classifiesELT into contextual topics using the LDAmodel and dividesELTwords into different contextual topics to form ELT topicsets and ELT topic word sets then for each topic of ELTandtopic word sets a genetic algorithm is used to calculate thesentiment values of all words (including sentiment featurewords and nonsentiment feature words) and finally thesentiment values of words are used to calculate ELT senti-ment tendency

4 ELT Theme Analysis Method

41 Overall Process -e overall process of ELT sentimentclassification method based on contextual classification andgenetic algorithm is as follows (1) ELT data preprocessingscreening and word separation of ELT data (2) LDA ELTtopic contextual word set construction using LDA to classifyELT in topic context and construct ELT topic word set and(3) genetic algorithm based on topic ELT sentiment ten-dency calculation -e overall process is shown in Figure 1

5 ELT Data Preprocessing

-e ELTplatform is aimed at the mass population and somestudents post information with unclear purpose and aconsiderable number of these sentences do not carry anopinion tendency -erefore nonopinion sentences areremoved first and only sentences with emotional tendencyare kept before word separation Main Chinese word sep-aration tools are Jieba SnowNLP THULAC NLPIR PKU-SEG and so on [29] Since the content of foreign languagesteaching is relatively brief PKU-SEG can maintain theoriginal word formation relationship of sentences better

51 LDA ELT +eme Context Word Set ConstructionELTis a relatively open and freemedia compared with newsforums and other media with good thematic classificationperformance its content range is broader and more arbi-trary without a strict classification structure so there arequite a lot of words in the ELT text set showing differentsentiment tendencies in different contexts LDA is a doc-ument topic generation probability model which is able toobtain ldquodocumentmdashtopicrdquo ldquotopicmdashwordrdquo and ldquotopicmdashwordrdquo -is paper applies the LDA model to categorize ELTdocument sets and their words by topic context and con-structs ELT topic sets and ELT topic context word sets basedon topic context division

52 LDA ELT Topic Context Classification -e LDA ELTtopic model is shown in Figure 2 k topics are set manually inthe LDA ELT topic model and the preprocessed corpus Dhas m ELTs which is denoted as D d1 d2 dm1113864 1113865 andthe number of words that are deemphasized after splittingELTs is c and the word set is denoted asW word1word2 wordc1113864 1113865 Topic conditional distri-bution of ELT i is denoted as p( z

rarri| α

rarr) i isin (1 2 m) and

the topic conditional distribution of all documents can beobtained by using the LDA ELT topic model which isnormalized as shown in the following equation

p( zrarr

| αrarr) 1113945m

i1p z

rarri| α

rarr1113872 1113873 1113945

m

i1

Δ nrarr

i + αrarr( 1113857

Δ( αrarr) (1)

where nrarr

i denotes the number of words distributed under ktopics in the i-th ELT and α is a k-dimensional hypercal-cemia variable

Similarly the distribution of subjective conditions forword wordt can be obtained as p(word

rarr| zrarr

βrarr

)t isin (1 2 c) and normalized as shown in the followingequation

p(wordrarr

| zrarr

βrarr

) 1113945k

j1p word

rarrt| z

rarr βrarr

1113874 1113875 1113945k

j1

Δ nrarr

j + βrarr

1113874 1113875

Δ( βrarr

)

(2)

where nrarr

j denotes the number of words under the j-th topicand β is a c-dimensional hypernatremia variable

Scientific Programming 3

Combining equations (1) and (2) the joint distributionof topics and words can be obtained as shown in the fol-lowing equation

p(wordrarr

| zrarr

)propp(wordrarr

zrarr

| αrarr βrarr

) p( zrarr

| αrarr)p(wordrarr

| zrarr

βrarr

) 1113945m

i1

Δ nrarr

i + αrarr( 1113857

Δ( αrarr)1113945

k

j1

Δ nrarr

j + βrarr

1113874 1113875

Δ( βrarr

) (3)

-e distribution of topics after removing the t-th word isrepresented by (t) -e conditional probability of the topic

for the t-th word is shown in the following equation usingGibbsrsquo sampling method

p zi j|wordrarr

zrarr

(t)1113874 1113875propp zi jword t|wordrarr

(t) zrarr

(t)1113874 1113875 n

j

d(t) + αj

1113936ks1 n

s

d(t) + αs 1113936tf1 n

tj(t) + βf

1113944

f

j(t)

+βf (4)

-e probability distribution of all the words in ELTdwassummed to obtain the probability distribution of tweet

NPC

Cda

tase

t

Preprocessing (opinion sentence

selection word segmentation)

Corpus

Da topic modelGenetic

algorithm

Weibo topic probability distribution

Emotional value of

microblog subject word set

Microblog theme set and

microblog theme word set

Microblog affective tendency

calculation

Microblog data preprocessing

Construction of LDA subject

word set

Analysis of emotional tendency based on genetic algorithm

Figure 1 Overall process

wordsα

β

k

k

θd

ϕz

c D

Figure 2 LDA ELT theme model

4 Scientific Programming

under k topics Ad pd1 pd2

pdi1113966 1113967 and the value with

the highest probability was selected as the topic context ofthe d-th tweet pdMax max pd1

pd2 pdi

1113966 1113967

53 ELT +eme Context Word Set ConstructionAccording to the above maximum probability divisionmethod the subject context classification of the ELT set iscompleted to form the ELT topic set T T1 T2 Tk1113864 1113865where Tj djl dj2 djy1113966 1113967 j isin (1 2 middot middot middot k) y denotethe number of ELTs of topic j -e word setZj Zj (vj1 vj2 vjn) of topic j is obtained by dividingand deduplicating the tweets in Tj and n denotes thenumber of deduplicated words of the j-th topic-e word setof all k topics constitutes the LDA ELT topic word setZ Z1 Z2 Zk1113864 1113865 and the pseudocode of the LDA ELTtopic word set construction algorithm is shown inAlgorithm 1

54 Genetic Algorithm-Based Calculation of Affective Dispo-sition for Teaching Foreign Languages as a Foreign LanguageConsidering the influence of nonfeatured sentiment words onthe sentiment tendency of ELT texts this paper calculates thesentiment values of all words in each topic context separatelyafter calculating the LDA ELT topic word sets which includenonfeatured sentiment words and feature sentiment wordsand finally calculates the ELT sentiment tendency using thesentiment values of words Sentiment values of words in eachtopic word set are obtained automatically by genetic algorithmcalculation using ELT (labeled data) with manually labeledsentimental tendencies -e sentiment value calculationmethod first assigns a random initial sentiment value to thewords within a predefined range then the optimal sentimentvalue is obtained by designing the objective function and fitnessfunction associated with the label data to self-optimize thesentiment value of thewords and finally the optimal sentimentvalue of the topic words is used to calculate the optimalsentiment tendency value of ELT [30] Topic context word setZj is used as the individual in the genetic algorithm andindividual Chromx corresponds to the sentimental value of allwords in Zj which is Chromx wx1 wx2 wx31113864 1113865 wxt isthe sentimental value of the t-th word in individual x -esentimental value of each word corresponds to the chromo-some code of the individual -e population is composed ofMindividuals denoted as P Chrom1Chrom21113864 Chrommand the initial word sentimental value of an individual is arandom value of [minus10 10] as shown in Figure 3 -e pop-ulation is iteratively optimized in the genetic algorithm and theindividual word sentimental value calculated when the numberof iterations reaches a predefined value is the optimal senti-mental value of all words in the topic context

55 Genetic Algorithm Objective Optimization FunctionIn fact some words do not have the same sentiment ten-dency in different contexts so corresponding to this

situation this paper sets the same word to have differentsentiment values in different individuals and classifyingwords into different thematic contexts is to consider thisvariability In order to make the sentiment tendency of ELTin individuals close to the sentiment tendency of labeleddata that is in order to apply labeled data to automaticallyobtain the sentiment tendency of words the objectivefunction of genetic algorithm is designed in this paper toachieve word sentiment value optimization [13] -e sen-timental value of the s-th ELT under topic j is calculatedusing the following equation

Senti Zj TjChromx djs1113872 1113873 1113944wordisindk

wjt Chromx wordt( 1113857( 1113857

(5)

where wordt is the word in ELT djs wjt(Chromx(wordt))

indicates the sentiment value of word wordt in individu-alChromx When Senti(Zj TjChromx djs) is greater thanor equal to 0 it is positive and vice versa it is negativeclass(djs) indicates the affective tendency of ELT djs asshown in the following equation

class djs1113872 1113873 positive Senti Zj TjChromx djs1113872 1113873ge 0

negative Senti Zj TjChromx djs1113872 1113873lt 0

⎧⎪⎨

⎪⎩

(6)

-is paper sets Acc(Chromx Tj) as the degree of dif-ference between the affective tendency of ELT in individualChromx and the affective tendency of the labeled data undertopic j as shown in the following equation the smaller thevalue the closer the affective tendency of ELT in individualChromx is to the affective tendency of the labeled data

Acc Chromx Tj1113872 1113873 1 minusnum1lesleydkisinTj

class djs1113872 1113873

y (7)

where Tj is the set of topics djs -e number of ELT affectivetendencies that are consistent with the labeled ELT dataaffective tendencies is calculated in individual 33 by equation(6) -e minimum difference degree individuals are deter-mined by setting the objective optimization functionaccording to equation (7) as shown in the followingequation

Accmin min1leileMChromisinP

Accuracy Chromx Tj1113872 11138731113872 1113873 (8)

56 Genetic-Algorithm-Based Word Sentiment ValueCalculation In order to make the probability of individualswith the smaller variance being retained higher the adap-tation function is set in this paper as shown in the followingequation

Scientific Programming 5

gather edfit Chromx Tj1113872 1113873 y

Acc Chromx Tj1113872 1113873times(minus1) + y minus

y

Acc Chromx Tj1113872 1113873⎛⎝ ⎞⎠ (9)

where yAcc(Chromx Tj) is the number of ELTs in whichthe emotional disposition was judged incorrectly in indi-vidual Chromx and (y minus yAcc(Chromx Tj)) indicates thenumber of ELTs in which the emotional disposition wasjudged correctly in individual Chromx -e roulette wheelmethod was used for individual selection using equation (9)so that the greater the fitness (smaller the variance) thegreater the probability of individuals being selected forretention -e selected individuals are then subjected to

crossover and mutation operations to produce new indi-viduals Individual selection crossover and mutation op-erations are repeatedly performed in the genetic algorithm tooptimize the population of individuals iteratively until apredetermined number of iterations is reached and thecalculation is stopped and finally the individual with thesmallest variance is selected as the word sentiment valueusing the objective optimization function -e pseudocodeof word sentimental value calculation based on a genetic

Input D d1 d2 dm1113864 1113865 Ad pd1 pd2 pdk1113864 1113865

ELT corpus and ELT topic probability distributionsOutput Z Z1 Z2 Zk1113864 1113865LDA ELT subject headings

(1) for i 1 to m dotraverse ELT D(2) Get the topic T to which the i-th ELT topic probability maximum belongs(3) TalarrGet(PiMax)

(4) put the i article of ELT into the Tath topic(5) Topicappend (Ta i)(6) end for(7) for j 1 to k dotraverse k topics(8) ELT splitting and deduplication in the j-th topic(9) lexicallarr 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

ALGORITHM 1 LDA ELT topic word set construction algorithm

We Company Yes One Good

9 4 -3 -8 0

2 6 -2 3 -5

Word set

Chrom 1

Chrom m

Figure 3 Some of the initial word sentiment scores correspond to

5 -3 -8 9 2 -5 6 1 5 6 -2 9 -3 -5 0 1

3 6 -2 2 -3 9 0 -8 3 -3 -8 2 2 9 6 -8

Figure 4 Multipoint crossover

5 -3 -8 9 2 -5 6 1 5 -3 -2 9 2 -5 6 1

Figure 5 Genetic variation

6 Scientific Programming

algorithm is shown in Algorithm 2 and the individualcrossover and variation operations are shown in Figures 4and 5

57 Calculation of Emotional Disposition in ELT -e min-imum variance individual 11 was obtained by the genetic al-gorithm and the codes of chromosomes in the individualcorresponded to the optimal sentiment values of words in thesubject word set In the minimum variance individual 22 thesentiment values of all words in ELT are first summed up byequation (5) to obtain the sentiment value of ELT and thenjudged by equation (6) [31] if the sentiment value is greater thanor equal to 0 it means that the ELT has a positive sentimenttendency and the opposite means that it has a negative senti-ment tendency -e calculation example is shown in Figure 6

6 Experimental Results and Analysis

61 ExperimentalData Set -e datum was obtained from the2012ndash2014 NLPCC public data set [22] with 17253 ELTs-ere were 7188 ELTs after removing nonopinion sentencesand this data was used as a corpus for the calculation of affectivetendencies for ELTs of which 3314 were positive and 3874were negative and the tenfold cross-validation was used totrain and test the method of this paper

-e NLPCC data set has eight labels none happinesslike sadness disgust anger fear and surprise -e eightlabels are simplified into two types of labels positive andnegative as shown in Table 1

After the labels were categorized the ELT content wasstored in a uniform format and the data format is shown inTable 2 with the polarity 1 for ELT indicating positive andminus1 for negative

62 Experimental Procedure and Results In this paper theeffects of all words on the effective polarity of ELT wereinvolved in the calculation and all words in ELT were

retained after the splitting of ELT Sample results of PKU-SEG splitting are shown in Table 3

After ELTword classification the LDA ELT topic modelis used to construct the topic word sets K values of thenumber of topics in the LDA ELT topic model need to be setin advance and the selection of suitable k values is beneficialto topic classification In this paper the k value is set to 5 (thecollected data are divided into 5 topics) and the sample ELTtopic context classification is shown in Table 4

-e results of the ELT theme context classification aretheme one is related to foreign languages and foreign lan-guages commentary theme two is related to personalemotional expressions theme three is social status com-mentary and event descriptions theme four is dynamic ELTcommentary about socially prominent people theme five ismore colloquial popular Internet phrases and the classifi-cation results are consistent with reality After completingthe ELT topic context classification the ELT topic word set isconstructed as shown in Table 5

After obtaining the topic word sets the word sentimentvalues were calculated using a genetic algorithm-basedmethod for calculating sentimental tendencies in ELT -epopulation P is randomly generated in the algorithm andthe population size is set to 1000 and the selectioncrossover and mutation operations are performed on theindividuals In this paper the number of words afterdeweighting the current topic ELT words is used as theindividual coding length and the chromosome coding iscoded with real integers in the [minus10 10] interval and theinitial word sentiment values are shown in Table 6 -einitial word sentiment values are shown in Table 6 -egenetic algorithm is run with the labeled data objectivefunction and fitness function for each word set in each topicso that the sentiment values are optimized iteratively untilthe predetermined number of iterations is reached and thecalculation stops (the iteration threshold is set to 2000 inthis paper) and the results of word sentiment value opti-mization are shown in Table 7

Input D d1 d2 dm1113864 1113865 T T1 T2 Tk1113864 1113865 Z Z1 Z2 Zk1113864 1113865

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 [Chrom1Chrom2 ChromM]Randomly generated populations P(2) for j 1 to MAX doMAX is the maximum number of iterations(3) for ch 1 to M dotraverse the population(4) fitlarr fitness (ch)calculate individual fitness(5) fitnessappend (fit)save fitness(6) end for(7) new_plarr select(P fitness)select operation(8) new_plarr cross(new_p)cross operation(9) new_plarrmutation (new_p)mutation operation(10) plarr new_pnew population P(11) end for(12) ChromminlarrAccmin Minimum variance individual(13) return(Chrommin)Return the minimum variance individual

ALGORITHM 2 Genetic algorithm-based word sentiment value calculation

Scientific Programming 7

This is One Good Bad late Company go towork

Good morning

0 -1 8 -9 -2 1 -6 3

Emotional value table of

words

Testdata set

This is a goodunit

0-1+8+1=+

8

+8gtpositive electrode

Figure 6 Example of emotional disposition calculation

Table 1 Label classification

Positive NegativeNone SadnessHappiness DisgustLike Fear

Surprise

Table 2 Sample ELT texts

Serial number Microblog content Polarity1 I feel strange and uncomfortable minus12 -e film is really moving especially with the development of the plot it is melodious and beautiful 13 Suddenly I found that Liu Xinrsquos song names are so powerful 14 Itrsquos too late minus15 -ese days have been wonderful all kinds of wonderful 16 Superman is everywhere and Kobe responds only to roars and mistakes minus17 I donrsquot know if the performance of iPad3 is good If it is good I can consider buying one 18 Our unit is a good unit Although we get off work late we go to work early minus19 After reading a lot about the laptop dock of MTO ATRIX I like it more and more 110 Personality explosion 1

Table 3 Sample ELT PKU-SEG word separation results

Serial number Word segmentation result1 I feel strange and uncomfortable2 Irsquove had a wonderful time these days3 Suddenly I found that Liu Xinrsquos song names are so powerful4 Personality explosion

Table 4 Sample ELT topic context classification

Topic 1 I donrsquot 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 lotabout MTO ATRIX I like it more and more

Topic 2 -e past few days have been wonderful I feel strange and uncomfortable in my heart Our unit is a good unit Although we get offwork late we go to work early

Topic 3 -e film is really moving especially with the development of the plot the melodious songs are really sensational

Topic 4 Suddenly I found that Liu Xinrsquos songs were so powerful -ey were superman everywhere Kobe responded only with roars andmistakes

Topic 5 Burst out of character Itrsquos so sad

8 Scientific Programming

621 Mediating Effect Test -e mediation effect was ex-amined using the nonparametric percentile Bootstrapmethod with the PROCESS 216 plug-in installed in SPSS240 software -e results showed that desire mediated therelationship between perceived behavioral control sense ofrelatedness and willingness to act desire partially mediatedthe relationship between perceived behavioral control andwillingness to act and desire fully mediated the relationshipbetween sense of relatedness and willingness to act (seeTable 3)

In the genetic algorithm-based method for calculatingaffective tendencies in ELT the objective function is used toselect the individual with the least variance in the optimizedpopulation as the current topic word affective value asshown in Table 8

After the classification of ELT topic contexts there maybe the same words in different topics and this classificationmethod is consistent with the reality that there are differ-ences in affective tendencies of the same word in differenttopic contexts and the affective values of the same word indifferent topics are shown in Table 9

After the classification of topics the emotional tendencyof ELT is judged by calculating the sum of the emotionalvalues of ELT subwords under the topic and when the sumof the emotional values of ELT subwords is greater than orequal to 0 the emotional tendency of ELT is positive andwhen it is less than 0 the emotional tendency of ELT isnegative

63ComparisonofMethods -epresent 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 indicatorsand the comparison results are shown in Table 10

-e experimental results show that the F1 values of theLDA method are higher than those of the DT NB and RFalgorithms -e reason is that the LDA method for ELTsentiment analysis is based on semantic ldquotext-wordrdquo topicclassification while the DT NB and RF algorithms convertwords into word vectors without considering the semanticinformation of words which leads to the less-than-optimalresults of microbial sentiment calculation -e accuracy ofthe LDA-GA method in this paper is not satisfactory -eaccuracy recall and F1 value of the LDA-GA method in thispaper are higher than those of the LDA method -e reasonis that the LDAmethod only uses feature sentiment words tocalculate ELT sentiment polarity while the method in thispaper uses a genetic algorithm to calculate all word

Table 5 Selected subject headings

-eme Partial word setSubject word set 1 iPad3 Performance Screen Keyboard ProductSubject word set 2 Make complaints Speechless Night Company Good morningSubject word set 3 Pain Development Labour Reactionary ChallengeSubject word set 4 Fire Sing Night shanghai Vocal concert BaiduSubject word set 5 Yes Ah Burst Vulnerable Alas

Table 6 Initial word sentiment values

Individual number Make complaints Speechless Happiness Awesome Fond dream Life1 minus8 5 minus3 8 9 22 minus5 2 5 2 minus4 83 2 minus4 2 1 3 minus54 2 1 minus6 minus2 minus3 minus1

Table 7 Optimization results of word sentiment values

Individual number Make complaints Speechless Happiness Awesome Fond dream Life1 minus9 minus3 9 7 5 22 minus5 minus2 5 2 minus4 minus13 minus2 minus7 6 1 2 04 minus5 minus8 5 5 3 minus1

Table 8 Example of optimal word sentiment values

Makecomplaints Speechless Happiness Awesome Fond

dream Life

minus2 minus7 6 1 2 0

Table 9 Examples of sentiment values for the same word indifferent themes

Terms Topic 1 Topic 2 Topic 3 Topic 4 Topic 5Good 8 5 2 6 2Large 4 1 minus1 3 minus7Yes 2 0 1 3 minus2Sad minus9 minus8 minus2 minus5 minus9

Scientific Programming 9

sentiment values unites feature sentiment words andnonfeature sentiment words to calculate ELT sentimentpolarity and calculates word sentiment values according todifferent topic contexts to distinguish the sentiment polarityof the same word in different topic contexts

7 Conclusions

In this paper we propose an ELT topic analysis methodbased on contextual classification and genetic algorithms-e method first constructs ELT topic sets and ELT topicword sets using the LDA model then applies a genetic al-gorithm to each ELT topic word set one by one to auto-matically iterate and calculate the sentiment value of wordsin the word sets and finally calculates the sentiment polarityof ELT text by the sentiment value of words in the topic wordsets -e experimental results show that the accuracy recalland F1 of this method are improved compared with those ofLDA plain Bayesian classification random forest and de-cision tree-based ELT sentiment analysis methods -emethod in this paper requires repeated iterative computa-tion in the genetic algorithm which is time-consuming andthe next research work is to consider the problem of geneticalgorithm acceleration

In the future we will optimize the algorithm to make itmore robust and stable we will optimize its scalability so thatit can be applied in educational scenarios in different fields

Data Availability

-e data used in this paper are available from the corre-sponding author upon request

Conflicts of Interest

-e authors declare that they have no conflicts of interestregarding this work

References

[1] M H Santosa ldquoLearning approaches of Indonesian EFL gen Zstudents in a flipped learning contextrdquo Journal of English andForeign Languages vol 7 no 2 pp 183ndash208 2017

[2] Z Wang ldquoStudy on teaching of foreign languages readingunder thematic progression modelrdquo Open Journal of ModernLinguistics vol 05 no 1 pp 73ndash78 2015

[3] M Abrar A Mukminin A Habibi and A Fadhil ldquoIf ourforeign languages isnrsquot a language what is it Indonesian EFLStudent Teachersrsquo Challenges Speaking foreign languagesrdquoQualitative Report vol 23 no 1 pp 129ndash145 2018

[4] A Aunurrahman A Hikmayanti and Y Yuliana ldquoTeachingEnglish using a genre pedagogy to Islamic junior high schoolstudentsrdquo Journal of English and Foreign Languages vol 10no 1 pp 1ndash24 2020

[5] S Kahn and A R Lewis ldquoSurvey on teaching science to K-12students with disabilities teacher preparedness and attitudesrdquoJournal of Science Teacher Education vol 25 no 8pp 885ndash910 2014

[6] O Jonathan S Shirley C Andri C H Richardson andK Richardson ldquoLearning to argue a study of four schools andtheir attempt to develop the use of argumentation as acommon instructional practice and its impact on studentsrdquoJournal of Research in Science Teaching vol 50 no 3pp 315ndash347 2013

[7] T Xie C Zhang Z Zhang and Y Kai ldquoUtilizing active sensornodes in smart environments for optimal communicationcoveragerdquo IEEE Access vol 7 pp 11338ndash11348 2018

[8] S Ahn and H Han ldquoUS student teachersrsquo cross-culturalteaching abroad experience at a Korean high schoolrdquo Journalof Education amp Culture vol 24 no 5 pp 733ndash758 2018

[9] A Andriani V D Yuniar and F Abdullah ldquoTeaching Englishgrammar in an Indonesian junior high schoolrdquo AL-ISHLAHJurnal Pendidikan vol 13 no 2 pp 1046ndash1056 2021

[10] M Y Abdullah H M H A Ghafri and K S H A Yahyai ldquoAqualitative study on the best motivational teaching strategiesin the context of Oman perspectives of EFL teachersrdquo EnglishLanguage Teaching vol 12 no 3 pp 57ndash64 2019

[11] A Leis ldquoStudy abroad and willingness to communicate a casestudy at junior high schoolrdquo +e Language Teacher vol 39no 3 pp 3ndash9 2015

[12] M Ramos ldquoTeaching foreign languages for medical trans-lation a corpus- based approachrdquo Language Teaching Re-search Quarterly vol 8 no 2 pp 25ndash40 2020

[13] T D Holmlund K Lesseig and D Slavit ldquoMaking sense ofldquoSTEM educationrdquo in K-12 contextsrdquo International journal ofSTEM education vol 5 no 1 pp 1ndash18 2018

[14] C Zhang T Xie K Yang et al ldquoPositioning optimisationbased on particle quality prediction in wireless sensor net-worksrdquo IET Networks vol 8 no 2 pp 107ndash113 2019

[15] M M Rahman M K M Singh M K M Singh andA Pandian ldquoExploring ESL teacher beliefs and classroompractices of CLT a case studyrdquo International Journal of In-struction vol 11 no 1 pp 295ndash310 2018

[16] M Ram S Mahendra R Campus and N KathmanduldquoCollege teachersrsquo experiences in classroom ecology of lan-guage teaching a study from the phenomenological per-spectiverdquo Journal of foreign languages Education andTeaching vol 04 no 4 pp 2685ndash2743 2020

[17] R S Fernanda and J G C Claudinei ldquo-e use of activemethodology in nursing care and teaching in national pro-ductions an integrative reviewrdquo Revista da Escola de Enfer-magem da USP vol 46 no 1 pp 208ndash218 2012

[18] D M M Zin S Mohamed K A Bakar and N K IsmailldquoFurther study on implementing thematic teaching in pre-school a needs analysis researchrdquo Creative Education vol 10no 12 pp 2887ndash2898 2019

[19] LWang C Zhang Q Chen et al ldquoA communication strategyof proactive nodes based on loop theorem in wireless sensornetworksrdquo in Proceedings of the 2018 Ninth InternationalConference on Intelligent Control and Information Processing(ICICIP) pp 160ndash167 IEEE Wanzhou China November2018

[20] K Maree C Aldous and A Hattingh ldquoPredictors of learnerperformance in mathematics and science according to a large-

Table 10 Comparison experimental results of emotional dispo-sition calculation

Method Accuracy () Recall () F1 ()LDA 6063 7802 6823DT 5244 7306 6107NB 5431 8500 6623RF 5867 7463 6569LDA-GA 6375 8732 7369

10 Scientific Programming

scale study in Mpumalangardquo South African Journal of Edu-cation vol 26 no 2 pp 229ndash252 2006 httpswwwresearchgatenetprofileAndre-Swanepoel

[21] B Angela A Yves and B Barbara ldquoQuestions and positionson education for sustainable development at university inFrance example of short professional cyclesrdquo EnvironmentalEducation Research vol 19 no 3 pp 269ndash281 2013

[22] J M Newton D R Ferris C C M Goh G WilliamL S Fredricka and V Larry Teaching Foreign Languages toSecond Language Learners in Academic Contexts ReadingWriting Listening and Speaking Routledge 2018 httpswwwgooglecomsearchrlz=1C1GCEB_enIN975IN975ampq=Englandampstick=H4sIAAAAAAAAAONgVuLQz9U3MMqqMFzEyu6al56TmJcCALMnJfIWAAAAampsa=Xampsqi=2ampved=2ahUKEwinzKX26MbzAhXaqZUCHWQEDGgQmxMoBHoECDcQBghttpswwwgooglecomsearchrlz=1C1GCEB_enIN975IN975ampq=UKampstick=H4sIAAAAAAAAAONgVuLQz9U3MC8uTl7EyhTqDQBuxFlpEQAAAAampsa=Xampsqi=2ampved=2ahUKEwinzKX26MbzAhXaqZUCHWQEDGgQmxMoBXoECDcQBw

[23] J S Raj and J V Ananthi ldquoRecurrent neural networks andnonlinear prediction in support vector machinesrdquo Journal ofSoft Computing Paradigm (JSCP) vol 1 no 1 pp 33ndash40 2019

[24] J-J Tseng Y-S Cheng and H-N Yeh ldquoHow pre-serviceEnglish teachers enact TPACK in the context of web-con-ferencing teaching a design thinking approachrdquoComputers ampEducation vol 128 pp 171ndash182 2019

[25] D M Miller C E Scott and E M McTigue ldquoWriting in thesecondary-level disciplines a systematic review of contextcognition and contentrdquo Educational Psychology Reviewvol 30 no 1 pp 83ndash120 2018

[26] L Cam and T M T Tran ldquoAn evaluation of using games inteaching foreign languages grammar for first year foreignlanguages-majored students at Dong Nai Technology Uni-versityrdquo International journal of learning teaching and edu-cational Research vol 16 no 7 pp 55ndash71 2017

[27] D Wu C Zhang L Ji R Ran H Wu and Y Xu ldquoForest firerecognition based on feature extraction from multi-viewimagesrdquo Traitement du Signal vol 38 no 3 pp 775ndash7832021

[28] S E Kaymakamoglu ldquoTeachersrsquo beliefs perceived practiceand actual classroom practice in relation to traditional(Teacher-Centered) and constructivist (Learner-Centered)teaching (note 1)rdquo Journal of Education and Learning vol 7no 1 pp 29ndash37 2018

[29] M Arifin ldquoAnalysis of the Indonesian college curriculumfocusing upon the foreign languages programrdquo Ideas Journalon foreign languages Language Teaching and Learning Lin-guistics and Literature vol 5 no 2 pp 134ndash145 2017

[30] G-Z Liu J-Y Chen and G-J Hwang ldquoMobile-based col-laborative learning in the fitness center a case study on thedevelopment of English listening comprehension with acontext-aware applicationrdquo British Journal of EducationalTechnology vol 49 no 2 pp 305ndash320 2018

[31] J Pei K Zhong J Li J Xu and X Wang ldquoECNN evaluatinga cluster-neural network model for city innovation capabil-ityrdquo Neural Computing amp Applications 2021

Scientific Programming 11

Page 2: Application of Thematic Context-Based Deep Learning in

curiosity to explore the natural world and enhancing theecological concept of people and nature [7 8]

Sentiment tendency analysis of ELT texts is one of thehot elements of current ELT data mining research Miningthe sentimental tendency of ELT texts can obtain infor-mation related to studentsrsquo liking for foreign languages [9]policy support [10] hot topic tendency [11] and position[12] which are important references for issues such as ELTimprovement

Text sentimental tendency analysis belongs to thecategory of natural language research and the diversity ofnatural language descriptive viewpoints is one of the mainfactors affecting the accuracy of text sentiment tendencyanalysis Compared with media with a good contentclassification such as news forums and postings ELT [13]has broad content and poor classification Currently thereare two main methods of text sentiment analysis based onsentiment dictionaries and based on machine learningboth of which perform text sentiment polarity calculationthrough some algorithm based on the subcategorization oftexts A large number of research results show that theaccuracy of sentiment analysis by these two researchmethods is constrained by the relevance of the textcontent domain Since the same word may show differentsentiment polarity in different contexts it is difficult toguarantee the accuracy of sentiment analysis of ELT textswithout differentiating word contexts -e LDA extendedmodel is one of the most important methods for textsentiment analysis but the current research fails toconsider the difference in sentiment polarity of the sameword in different contexts and the influence of non-featured sentiment words on the sentiment polarity ofELT texts -erefore this paper proposes an ELT senti-ment analysis method based on contextual classificationand genetic algorithms

2 The Role of Thematic Contexts inReading Instruction

21 +ematic Contexts Can Enhance Studentsrsquo Interest inReading Compared with foreign languages teaching incollege foreign language teaching in college has morecharacteristics For example there are more diverse genresmore lengths more complex sentences and much moredifficult in the discourse For this reason students need toenhance their comprehension of textual content and im-prove their language skills Teachers also need to adopt activeteaching strategies to meet the challenges College studentsare often confronted with boring and tasteless topics inreadingmaterials and feel that they do not match their actuallevel which leads to studentsrsquo reluctance to read the ma-terials or even their inability to read them and their lowinterest in reading In college foreign language readingteaching teachers combine the three categories of contextualthemes with reading materials which can increase theconnection between reading materials and real life letstudents experience different cultures in learning feel reallife learn knowledge and understand language in realcontexts which can largely motivate students to actively

participate in learning give full play to their own initiativehelp students apply what they learn and increase readinginterest [14 15]

22 +ematic Contexts Facilitate Studentsrsquo Better Under-standing of Texts When reading texts students often focustheir attention on heavy words or understanding long anddifficult sentences neglecting to grasp the overall meaning ofthe text and lacking knowledge of the logical relationshipsbetween small sentences in the paragraphs of the text thusfailing to correctly access information in the text discoverthe thematic meaning of the text accurately and read andunderstand reading materials on common topics Teachingcollege foreign languages reading under the guidance ofthematic contexts requires teachers to first study the text indepth and then guide students to read the text and analyze itgrasp the culture and meaning embodied in the text anddiscover the thematic meaning which facilitates students touse a variety of methods to obtain information creativelyTeachers are expected to use thematic reading text materialsto provide appropriate instruction to students and promotestudentsrsquo initiative to read and think actively and take thebest out of them [16] By creating authentic thematic con-texts teachers can guide students to relate to the context andcombine thematic contexts to grasp the content of the textunderstand the deeper meanings of key sentences avoidreading misunderstandings caused by biased generalizationsand words that do not make sense and ultimately improvestudentsrsquo reading comprehension skills [17]

23 +ematic Contexts Can Improve Studentsrsquo Foreign Lan-guages Application Skills -emed foreign language readingteaching in college is a process of active discovery andlearning with students as the main body and it is also alearning process that follows studentsrsquo cognitive rules fromthe surface to the deeper level gradually Due to the limi-tations of Chinarsquos traditional examination-based educationsystem schools currently focus too much on studentsrsquo testscores in college foreign language teaching ignoring stu-dentsrsquo ability to apply foreign languages in real-life situa-tions resulting in ldquodumb foreign languagesrdquo that studentscan learn but cannot use [18] In order to change the currentsituation of college foreign languages reading teachingteachers should change the traditional teaching conceptdesign the whole teaching based on the theme context andcreate a context that is closely related to the meaning of thetheme and studentsrsquo real life In the process of in-depth studyof the text teachers should aim at solving problems focus onlearning foreign languages language knowledge and lan-guage skills and closely connect the theme of the text withstudentsrsquo lives [19 20] At the same time teachers shouldcultivate studentsrsquo logical and critical thinking and diversecultural perspectives by comparing Chinese and foreigncultures adopt thematic contextual teaching make a pro-found analysis of texts reasonably design thematic contextsthat help students improve their comprehension as well astheir application skills and adopt creative teaching methods

2 Scientific Programming

and approaches to actively improve studentsrsquo practicalforeign languages application skills

3 Related Work

Currently there are two main methods of text sentimentanalysis based on sentiment dictionary and based onmachine learning -e method based on sentiment dic-tionary is to first extract the sentiment feature words of thetext [21] then compare the sentiment feature words withthe words in the sentiment dictionary and use the sen-timent polarity of the marked words in the sentimentdictionary to calculate the foreign languages teachingsentiment tendency -e classification accuracy of thismethod depends on the sentiment dictionary and thegoodness of the sentiment dictionary directly affects theresults of sentiment tendency calculation -e machinelearning-based method extracts text features first and thenapplies some algorithms to the features for classification[22] to get the text sentimental tendency Machinelearning-based methods are divided into three types ofmethods strongly supervised weakly supervised andunsupervised -e main strongly supervised methods aresupport vector machines [23] -e accuracy of plainBayesian and decision trees [24 25] depend on the ac-curacy of the labeled data Weakly supervised methodsmainly include long- and short-term memory networks[26] convolutional neural networks [27] and so on -esemethods require massive labeled data to train the model toensure accuracy Unsupervised methods mainly includeLDA [28] K-nearest neighbor algorithm [14] randomforest [5] and so on Compared with supervised methodsunsupervised methods do not depend on labeled data andare less affected by the size of data

To address the above problems in order to furtherimprove the accuracy of text sentiment polarity analysisusing the LDAmodel extension method this paper proposesan ELT sentiment analysis method based on context clas-sification and genetic algorithm -e method first classifiesELT into contextual topics using the LDAmodel and dividesELTwords into different contextual topics to form ELT topicsets and ELT topic word sets then for each topic of ELTandtopic word sets a genetic algorithm is used to calculate thesentiment values of all words (including sentiment featurewords and nonsentiment feature words) and finally thesentiment values of words are used to calculate ELT senti-ment tendency

4 ELT Theme Analysis Method

41 Overall Process -e overall process of ELT sentimentclassification method based on contextual classification andgenetic algorithm is as follows (1) ELT data preprocessingscreening and word separation of ELT data (2) LDA ELTtopic contextual word set construction using LDA to classifyELT in topic context and construct ELT topic word set and(3) genetic algorithm based on topic ELT sentiment ten-dency calculation -e overall process is shown in Figure 1

5 ELT Data Preprocessing

-e ELTplatform is aimed at the mass population and somestudents post information with unclear purpose and aconsiderable number of these sentences do not carry anopinion tendency -erefore nonopinion sentences areremoved first and only sentences with emotional tendencyare kept before word separation Main Chinese word sep-aration tools are Jieba SnowNLP THULAC NLPIR PKU-SEG and so on [29] Since the content of foreign languagesteaching is relatively brief PKU-SEG can maintain theoriginal word formation relationship of sentences better

51 LDA ELT +eme Context Word Set ConstructionELTis a relatively open and freemedia compared with newsforums and other media with good thematic classificationperformance its content range is broader and more arbi-trary without a strict classification structure so there arequite a lot of words in the ELT text set showing differentsentiment tendencies in different contexts LDA is a doc-ument topic generation probability model which is able toobtain ldquodocumentmdashtopicrdquo ldquotopicmdashwordrdquo and ldquotopicmdashwordrdquo -is paper applies the LDA model to categorize ELTdocument sets and their words by topic context and con-structs ELT topic sets and ELT topic context word sets basedon topic context division

52 LDA ELT Topic Context Classification -e LDA ELTtopic model is shown in Figure 2 k topics are set manually inthe LDA ELT topic model and the preprocessed corpus Dhas m ELTs which is denoted as D d1 d2 dm1113864 1113865 andthe number of words that are deemphasized after splittingELTs is c and the word set is denoted asW word1word2 wordc1113864 1113865 Topic conditional distri-bution of ELT i is denoted as p( z

rarri| α

rarr) i isin (1 2 m) and

the topic conditional distribution of all documents can beobtained by using the LDA ELT topic model which isnormalized as shown in the following equation

p( zrarr

| αrarr) 1113945m

i1p z

rarri| α

rarr1113872 1113873 1113945

m

i1

Δ nrarr

i + αrarr( 1113857

Δ( αrarr) (1)

where nrarr

i denotes the number of words distributed under ktopics in the i-th ELT and α is a k-dimensional hypercal-cemia variable

Similarly the distribution of subjective conditions forword wordt can be obtained as p(word

rarr| zrarr

βrarr

)t isin (1 2 c) and normalized as shown in the followingequation

p(wordrarr

| zrarr

βrarr

) 1113945k

j1p word

rarrt| z

rarr βrarr

1113874 1113875 1113945k

j1

Δ nrarr

j + βrarr

1113874 1113875

Δ( βrarr

)

(2)

where nrarr

j denotes the number of words under the j-th topicand β is a c-dimensional hypernatremia variable

Scientific Programming 3

Combining equations (1) and (2) the joint distributionof topics and words can be obtained as shown in the fol-lowing equation

p(wordrarr

| zrarr

)propp(wordrarr

zrarr

| αrarr βrarr

) p( zrarr

| αrarr)p(wordrarr

| zrarr

βrarr

) 1113945m

i1

Δ nrarr

i + αrarr( 1113857

Δ( αrarr)1113945

k

j1

Δ nrarr

j + βrarr

1113874 1113875

Δ( βrarr

) (3)

-e distribution of topics after removing the t-th word isrepresented by (t) -e conditional probability of the topic

for the t-th word is shown in the following equation usingGibbsrsquo sampling method

p zi j|wordrarr

zrarr

(t)1113874 1113875propp zi jword t|wordrarr

(t) zrarr

(t)1113874 1113875 n

j

d(t) + αj

1113936ks1 n

s

d(t) + αs 1113936tf1 n

tj(t) + βf

1113944

f

j(t)

+βf (4)

-e probability distribution of all the words in ELTdwassummed to obtain the probability distribution of tweet

NPC

Cda

tase

t

Preprocessing (opinion sentence

selection word segmentation)

Corpus

Da topic modelGenetic

algorithm

Weibo topic probability distribution

Emotional value of

microblog subject word set

Microblog theme set and

microblog theme word set

Microblog affective tendency

calculation

Microblog data preprocessing

Construction of LDA subject

word set

Analysis of emotional tendency based on genetic algorithm

Figure 1 Overall process

wordsα

β

k

k

θd

ϕz

c D

Figure 2 LDA ELT theme model

4 Scientific Programming

under k topics Ad pd1 pd2

pdi1113966 1113967 and the value with

the highest probability was selected as the topic context ofthe d-th tweet pdMax max pd1

pd2 pdi

1113966 1113967

53 ELT +eme Context Word Set ConstructionAccording to the above maximum probability divisionmethod the subject context classification of the ELT set iscompleted to form the ELT topic set T T1 T2 Tk1113864 1113865where Tj djl dj2 djy1113966 1113967 j isin (1 2 middot middot middot k) y denotethe number of ELTs of topic j -e word setZj Zj (vj1 vj2 vjn) of topic j is obtained by dividingand deduplicating the tweets in Tj and n denotes thenumber of deduplicated words of the j-th topic-e word setof all k topics constitutes the LDA ELT topic word setZ Z1 Z2 Zk1113864 1113865 and the pseudocode of the LDA ELTtopic word set construction algorithm is shown inAlgorithm 1

54 Genetic Algorithm-Based Calculation of Affective Dispo-sition for Teaching Foreign Languages as a Foreign LanguageConsidering the influence of nonfeatured sentiment words onthe sentiment tendency of ELT texts this paper calculates thesentiment values of all words in each topic context separatelyafter calculating the LDA ELT topic word sets which includenonfeatured sentiment words and feature sentiment wordsand finally calculates the ELT sentiment tendency using thesentiment values of words Sentiment values of words in eachtopic word set are obtained automatically by genetic algorithmcalculation using ELT (labeled data) with manually labeledsentimental tendencies -e sentiment value calculationmethod first assigns a random initial sentiment value to thewords within a predefined range then the optimal sentimentvalue is obtained by designing the objective function and fitnessfunction associated with the label data to self-optimize thesentiment value of thewords and finally the optimal sentimentvalue of the topic words is used to calculate the optimalsentiment tendency value of ELT [30] Topic context word setZj is used as the individual in the genetic algorithm andindividual Chromx corresponds to the sentimental value of allwords in Zj which is Chromx wx1 wx2 wx31113864 1113865 wxt isthe sentimental value of the t-th word in individual x -esentimental value of each word corresponds to the chromo-some code of the individual -e population is composed ofMindividuals denoted as P Chrom1Chrom21113864 Chrommand the initial word sentimental value of an individual is arandom value of [minus10 10] as shown in Figure 3 -e pop-ulation is iteratively optimized in the genetic algorithm and theindividual word sentimental value calculated when the numberof iterations reaches a predefined value is the optimal senti-mental value of all words in the topic context

55 Genetic Algorithm Objective Optimization FunctionIn fact some words do not have the same sentiment ten-dency in different contexts so corresponding to this

situation this paper sets the same word to have differentsentiment values in different individuals and classifyingwords into different thematic contexts is to consider thisvariability In order to make the sentiment tendency of ELTin individuals close to the sentiment tendency of labeleddata that is in order to apply labeled data to automaticallyobtain the sentiment tendency of words the objectivefunction of genetic algorithm is designed in this paper toachieve word sentiment value optimization [13] -e sen-timental value of the s-th ELT under topic j is calculatedusing the following equation

Senti Zj TjChromx djs1113872 1113873 1113944wordisindk

wjt Chromx wordt( 1113857( 1113857

(5)

where wordt is the word in ELT djs wjt(Chromx(wordt))

indicates the sentiment value of word wordt in individu-alChromx When Senti(Zj TjChromx djs) is greater thanor equal to 0 it is positive and vice versa it is negativeclass(djs) indicates the affective tendency of ELT djs asshown in the following equation

class djs1113872 1113873 positive Senti Zj TjChromx djs1113872 1113873ge 0

negative Senti Zj TjChromx djs1113872 1113873lt 0

⎧⎪⎨

⎪⎩

(6)

-is paper sets Acc(Chromx Tj) as the degree of dif-ference between the affective tendency of ELT in individualChromx and the affective tendency of the labeled data undertopic j as shown in the following equation the smaller thevalue the closer the affective tendency of ELT in individualChromx is to the affective tendency of the labeled data

Acc Chromx Tj1113872 1113873 1 minusnum1lesleydkisinTj

class djs1113872 1113873

y (7)

where Tj is the set of topics djs -e number of ELT affectivetendencies that are consistent with the labeled ELT dataaffective tendencies is calculated in individual 33 by equation(6) -e minimum difference degree individuals are deter-mined by setting the objective optimization functionaccording to equation (7) as shown in the followingequation

Accmin min1leileMChromisinP

Accuracy Chromx Tj1113872 11138731113872 1113873 (8)

56 Genetic-Algorithm-Based Word Sentiment ValueCalculation In order to make the probability of individualswith the smaller variance being retained higher the adap-tation function is set in this paper as shown in the followingequation

Scientific Programming 5

gather edfit Chromx Tj1113872 1113873 y

Acc Chromx Tj1113872 1113873times(minus1) + y minus

y

Acc Chromx Tj1113872 1113873⎛⎝ ⎞⎠ (9)

where yAcc(Chromx Tj) is the number of ELTs in whichthe emotional disposition was judged incorrectly in indi-vidual Chromx and (y minus yAcc(Chromx Tj)) indicates thenumber of ELTs in which the emotional disposition wasjudged correctly in individual Chromx -e roulette wheelmethod was used for individual selection using equation (9)so that the greater the fitness (smaller the variance) thegreater the probability of individuals being selected forretention -e selected individuals are then subjected to

crossover and mutation operations to produce new indi-viduals Individual selection crossover and mutation op-erations are repeatedly performed in the genetic algorithm tooptimize the population of individuals iteratively until apredetermined number of iterations is reached and thecalculation is stopped and finally the individual with thesmallest variance is selected as the word sentiment valueusing the objective optimization function -e pseudocodeof word sentimental value calculation based on a genetic

Input D d1 d2 dm1113864 1113865 Ad pd1 pd2 pdk1113864 1113865

ELT corpus and ELT topic probability distributionsOutput Z Z1 Z2 Zk1113864 1113865LDA ELT subject headings

(1) for i 1 to m dotraverse ELT D(2) Get the topic T to which the i-th ELT topic probability maximum belongs(3) TalarrGet(PiMax)

(4) put the i article of ELT into the Tath topic(5) Topicappend (Ta i)(6) end for(7) for j 1 to k dotraverse k topics(8) ELT splitting and deduplication in the j-th topic(9) lexicallarr 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

ALGORITHM 1 LDA ELT topic word set construction algorithm

We Company Yes One Good

9 4 -3 -8 0

2 6 -2 3 -5

Word set

Chrom 1

Chrom m

Figure 3 Some of the initial word sentiment scores correspond to

5 -3 -8 9 2 -5 6 1 5 6 -2 9 -3 -5 0 1

3 6 -2 2 -3 9 0 -8 3 -3 -8 2 2 9 6 -8

Figure 4 Multipoint crossover

5 -3 -8 9 2 -5 6 1 5 -3 -2 9 2 -5 6 1

Figure 5 Genetic variation

6 Scientific Programming

algorithm is shown in Algorithm 2 and the individualcrossover and variation operations are shown in Figures 4and 5

57 Calculation of Emotional Disposition in ELT -e min-imum variance individual 11 was obtained by the genetic al-gorithm and the codes of chromosomes in the individualcorresponded to the optimal sentiment values of words in thesubject word set In the minimum variance individual 22 thesentiment values of all words in ELT are first summed up byequation (5) to obtain the sentiment value of ELT and thenjudged by equation (6) [31] if the sentiment value is greater thanor equal to 0 it means that the ELT has a positive sentimenttendency and the opposite means that it has a negative senti-ment tendency -e calculation example is shown in Figure 6

6 Experimental Results and Analysis

61 ExperimentalData Set -e datum was obtained from the2012ndash2014 NLPCC public data set [22] with 17253 ELTs-ere were 7188 ELTs after removing nonopinion sentencesand this data was used as a corpus for the calculation of affectivetendencies for ELTs of which 3314 were positive and 3874were negative and the tenfold cross-validation was used totrain and test the method of this paper

-e NLPCC data set has eight labels none happinesslike sadness disgust anger fear and surprise -e eightlabels are simplified into two types of labels positive andnegative as shown in Table 1

After the labels were categorized the ELT content wasstored in a uniform format and the data format is shown inTable 2 with the polarity 1 for ELT indicating positive andminus1 for negative

62 Experimental Procedure and Results In this paper theeffects of all words on the effective polarity of ELT wereinvolved in the calculation and all words in ELT were

retained after the splitting of ELT Sample results of PKU-SEG splitting are shown in Table 3

After ELTword classification the LDA ELT topic modelis used to construct the topic word sets K values of thenumber of topics in the LDA ELT topic model need to be setin advance and the selection of suitable k values is beneficialto topic classification In this paper the k value is set to 5 (thecollected data are divided into 5 topics) and the sample ELTtopic context classification is shown in Table 4

-e results of the ELT theme context classification aretheme one is related to foreign languages and foreign lan-guages commentary theme two is related to personalemotional expressions theme three is social status com-mentary and event descriptions theme four is dynamic ELTcommentary about socially prominent people theme five ismore colloquial popular Internet phrases and the classifi-cation results are consistent with reality After completingthe ELT topic context classification the ELT topic word set isconstructed as shown in Table 5

After obtaining the topic word sets the word sentimentvalues were calculated using a genetic algorithm-basedmethod for calculating sentimental tendencies in ELT -epopulation P is randomly generated in the algorithm andthe population size is set to 1000 and the selectioncrossover and mutation operations are performed on theindividuals In this paper the number of words afterdeweighting the current topic ELT words is used as theindividual coding length and the chromosome coding iscoded with real integers in the [minus10 10] interval and theinitial word sentiment values are shown in Table 6 -einitial word sentiment values are shown in Table 6 -egenetic algorithm is run with the labeled data objectivefunction and fitness function for each word set in each topicso that the sentiment values are optimized iteratively untilthe predetermined number of iterations is reached and thecalculation stops (the iteration threshold is set to 2000 inthis paper) and the results of word sentiment value opti-mization are shown in Table 7

Input D d1 d2 dm1113864 1113865 T T1 T2 Tk1113864 1113865 Z Z1 Z2 Zk1113864 1113865

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 [Chrom1Chrom2 ChromM]Randomly generated populations P(2) for j 1 to MAX doMAX is the maximum number of iterations(3) for ch 1 to M dotraverse the population(4) fitlarr fitness (ch)calculate individual fitness(5) fitnessappend (fit)save fitness(6) end for(7) new_plarr select(P fitness)select operation(8) new_plarr cross(new_p)cross operation(9) new_plarrmutation (new_p)mutation operation(10) plarr new_pnew population P(11) end for(12) ChromminlarrAccmin Minimum variance individual(13) return(Chrommin)Return the minimum variance individual

ALGORITHM 2 Genetic algorithm-based word sentiment value calculation

Scientific Programming 7

This is One Good Bad late Company go towork

Good morning

0 -1 8 -9 -2 1 -6 3

Emotional value table of

words

Testdata set

This is a goodunit

0-1+8+1=+

8

+8gtpositive electrode

Figure 6 Example of emotional disposition calculation

Table 1 Label classification

Positive NegativeNone SadnessHappiness DisgustLike Fear

Surprise

Table 2 Sample ELT texts

Serial number Microblog content Polarity1 I feel strange and uncomfortable minus12 -e film is really moving especially with the development of the plot it is melodious and beautiful 13 Suddenly I found that Liu Xinrsquos song names are so powerful 14 Itrsquos too late minus15 -ese days have been wonderful all kinds of wonderful 16 Superman is everywhere and Kobe responds only to roars and mistakes minus17 I donrsquot know if the performance of iPad3 is good If it is good I can consider buying one 18 Our unit is a good unit Although we get off work late we go to work early minus19 After reading a lot about the laptop dock of MTO ATRIX I like it more and more 110 Personality explosion 1

Table 3 Sample ELT PKU-SEG word separation results

Serial number Word segmentation result1 I feel strange and uncomfortable2 Irsquove had a wonderful time these days3 Suddenly I found that Liu Xinrsquos song names are so powerful4 Personality explosion

Table 4 Sample ELT topic context classification

Topic 1 I donrsquot 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 lotabout MTO ATRIX I like it more and more

Topic 2 -e past few days have been wonderful I feel strange and uncomfortable in my heart Our unit is a good unit Although we get offwork late we go to work early

Topic 3 -e film is really moving especially with the development of the plot the melodious songs are really sensational

Topic 4 Suddenly I found that Liu Xinrsquos songs were so powerful -ey were superman everywhere Kobe responded only with roars andmistakes

Topic 5 Burst out of character Itrsquos so sad

8 Scientific Programming

621 Mediating Effect Test -e mediation effect was ex-amined using the nonparametric percentile Bootstrapmethod with the PROCESS 216 plug-in installed in SPSS240 software -e results showed that desire mediated therelationship between perceived behavioral control sense ofrelatedness and willingness to act desire partially mediatedthe relationship between perceived behavioral control andwillingness to act and desire fully mediated the relationshipbetween sense of relatedness and willingness to act (seeTable 3)

In the genetic algorithm-based method for calculatingaffective tendencies in ELT the objective function is used toselect the individual with the least variance in the optimizedpopulation as the current topic word affective value asshown in Table 8

After the classification of ELT topic contexts there maybe the same words in different topics and this classificationmethod is consistent with the reality that there are differ-ences in affective tendencies of the same word in differenttopic contexts and the affective values of the same word indifferent topics are shown in Table 9

After the classification of topics the emotional tendencyof ELT is judged by calculating the sum of the emotionalvalues of ELT subwords under the topic and when the sumof the emotional values of ELT subwords is greater than orequal to 0 the emotional tendency of ELT is positive andwhen it is less than 0 the emotional tendency of ELT isnegative

63ComparisonofMethods -epresent 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 indicatorsand the comparison results are shown in Table 10

-e experimental results show that the F1 values of theLDA method are higher than those of the DT NB and RFalgorithms -e reason is that the LDA method for ELTsentiment analysis is based on semantic ldquotext-wordrdquo topicclassification while the DT NB and RF algorithms convertwords into word vectors without considering the semanticinformation of words which leads to the less-than-optimalresults of microbial sentiment calculation -e accuracy ofthe LDA-GA method in this paper is not satisfactory -eaccuracy recall and F1 value of the LDA-GA method in thispaper are higher than those of the LDA method -e reasonis that the LDAmethod only uses feature sentiment words tocalculate ELT sentiment polarity while the method in thispaper uses a genetic algorithm to calculate all word

Table 5 Selected subject headings

-eme Partial word setSubject word set 1 iPad3 Performance Screen Keyboard ProductSubject word set 2 Make complaints Speechless Night Company Good morningSubject word set 3 Pain Development Labour Reactionary ChallengeSubject word set 4 Fire Sing Night shanghai Vocal concert BaiduSubject word set 5 Yes Ah Burst Vulnerable Alas

Table 6 Initial word sentiment values

Individual number Make complaints Speechless Happiness Awesome Fond dream Life1 minus8 5 minus3 8 9 22 minus5 2 5 2 minus4 83 2 minus4 2 1 3 minus54 2 1 minus6 minus2 minus3 minus1

Table 7 Optimization results of word sentiment values

Individual number Make complaints Speechless Happiness Awesome Fond dream Life1 minus9 minus3 9 7 5 22 minus5 minus2 5 2 minus4 minus13 minus2 minus7 6 1 2 04 minus5 minus8 5 5 3 minus1

Table 8 Example of optimal word sentiment values

Makecomplaints Speechless Happiness Awesome Fond

dream Life

minus2 minus7 6 1 2 0

Table 9 Examples of sentiment values for the same word indifferent themes

Terms Topic 1 Topic 2 Topic 3 Topic 4 Topic 5Good 8 5 2 6 2Large 4 1 minus1 3 minus7Yes 2 0 1 3 minus2Sad minus9 minus8 minus2 minus5 minus9

Scientific Programming 9

sentiment values unites feature sentiment words andnonfeature sentiment words to calculate ELT sentimentpolarity and calculates word sentiment values according todifferent topic contexts to distinguish the sentiment polarityof the same word in different topic contexts

7 Conclusions

In this paper we propose an ELT topic analysis methodbased on contextual classification and genetic algorithms-e method first constructs ELT topic sets and ELT topicword sets using the LDA model then applies a genetic al-gorithm to each ELT topic word set one by one to auto-matically iterate and calculate the sentiment value of wordsin the word sets and finally calculates the sentiment polarityof ELT text by the sentiment value of words in the topic wordsets -e experimental results show that the accuracy recalland F1 of this method are improved compared with those ofLDA plain Bayesian classification random forest and de-cision tree-based ELT sentiment analysis methods -emethod in this paper requires repeated iterative computa-tion in the genetic algorithm which is time-consuming andthe next research work is to consider the problem of geneticalgorithm acceleration

In the future we will optimize the algorithm to make itmore robust and stable we will optimize its scalability so thatit can be applied in educational scenarios in different fields

Data Availability

-e data used in this paper are available from the corre-sponding author upon request

Conflicts of Interest

-e authors declare that they have no conflicts of interestregarding this work

References

[1] M H Santosa ldquoLearning approaches of Indonesian EFL gen Zstudents in a flipped learning contextrdquo Journal of English andForeign Languages vol 7 no 2 pp 183ndash208 2017

[2] Z Wang ldquoStudy on teaching of foreign languages readingunder thematic progression modelrdquo Open Journal of ModernLinguistics vol 05 no 1 pp 73ndash78 2015

[3] M Abrar A Mukminin A Habibi and A Fadhil ldquoIf ourforeign languages isnrsquot a language what is it Indonesian EFLStudent Teachersrsquo Challenges Speaking foreign languagesrdquoQualitative Report vol 23 no 1 pp 129ndash145 2018

[4] A Aunurrahman A Hikmayanti and Y Yuliana ldquoTeachingEnglish using a genre pedagogy to Islamic junior high schoolstudentsrdquo Journal of English and Foreign Languages vol 10no 1 pp 1ndash24 2020

[5] S Kahn and A R Lewis ldquoSurvey on teaching science to K-12students with disabilities teacher preparedness and attitudesrdquoJournal of Science Teacher Education vol 25 no 8pp 885ndash910 2014

[6] O Jonathan S Shirley C Andri C H Richardson andK Richardson ldquoLearning to argue a study of four schools andtheir attempt to develop the use of argumentation as acommon instructional practice and its impact on studentsrdquoJournal of Research in Science Teaching vol 50 no 3pp 315ndash347 2013

[7] T Xie C Zhang Z Zhang and Y Kai ldquoUtilizing active sensornodes in smart environments for optimal communicationcoveragerdquo IEEE Access vol 7 pp 11338ndash11348 2018

[8] S Ahn and H Han ldquoUS student teachersrsquo cross-culturalteaching abroad experience at a Korean high schoolrdquo Journalof Education amp Culture vol 24 no 5 pp 733ndash758 2018

[9] A Andriani V D Yuniar and F Abdullah ldquoTeaching Englishgrammar in an Indonesian junior high schoolrdquo AL-ISHLAHJurnal Pendidikan vol 13 no 2 pp 1046ndash1056 2021

[10] M Y Abdullah H M H A Ghafri and K S H A Yahyai ldquoAqualitative study on the best motivational teaching strategiesin the context of Oman perspectives of EFL teachersrdquo EnglishLanguage Teaching vol 12 no 3 pp 57ndash64 2019

[11] A Leis ldquoStudy abroad and willingness to communicate a casestudy at junior high schoolrdquo +e Language Teacher vol 39no 3 pp 3ndash9 2015

[12] M Ramos ldquoTeaching foreign languages for medical trans-lation a corpus- based approachrdquo Language Teaching Re-search Quarterly vol 8 no 2 pp 25ndash40 2020

[13] T D Holmlund K Lesseig and D Slavit ldquoMaking sense ofldquoSTEM educationrdquo in K-12 contextsrdquo International journal ofSTEM education vol 5 no 1 pp 1ndash18 2018

[14] C Zhang T Xie K Yang et al ldquoPositioning optimisationbased on particle quality prediction in wireless sensor net-worksrdquo IET Networks vol 8 no 2 pp 107ndash113 2019

[15] M M Rahman M K M Singh M K M Singh andA Pandian ldquoExploring ESL teacher beliefs and classroompractices of CLT a case studyrdquo International Journal of In-struction vol 11 no 1 pp 295ndash310 2018

[16] M Ram S Mahendra R Campus and N KathmanduldquoCollege teachersrsquo experiences in classroom ecology of lan-guage teaching a study from the phenomenological per-spectiverdquo Journal of foreign languages Education andTeaching vol 04 no 4 pp 2685ndash2743 2020

[17] R S Fernanda and J G C Claudinei ldquo-e use of activemethodology in nursing care and teaching in national pro-ductions an integrative reviewrdquo Revista da Escola de Enfer-magem da USP vol 46 no 1 pp 208ndash218 2012

[18] D M M Zin S Mohamed K A Bakar and N K IsmailldquoFurther study on implementing thematic teaching in pre-school a needs analysis researchrdquo Creative Education vol 10no 12 pp 2887ndash2898 2019

[19] LWang C Zhang Q Chen et al ldquoA communication strategyof proactive nodes based on loop theorem in wireless sensornetworksrdquo in Proceedings of the 2018 Ninth InternationalConference on Intelligent Control and Information Processing(ICICIP) pp 160ndash167 IEEE Wanzhou China November2018

[20] K Maree C Aldous and A Hattingh ldquoPredictors of learnerperformance in mathematics and science according to a large-

Table 10 Comparison experimental results of emotional dispo-sition calculation

Method Accuracy () Recall () F1 ()LDA 6063 7802 6823DT 5244 7306 6107NB 5431 8500 6623RF 5867 7463 6569LDA-GA 6375 8732 7369

10 Scientific Programming

scale study in Mpumalangardquo South African Journal of Edu-cation vol 26 no 2 pp 229ndash252 2006 httpswwwresearchgatenetprofileAndre-Swanepoel

[21] B Angela A Yves and B Barbara ldquoQuestions and positionson education for sustainable development at university inFrance example of short professional cyclesrdquo EnvironmentalEducation Research vol 19 no 3 pp 269ndash281 2013

[22] J M Newton D R Ferris C C M Goh G WilliamL S Fredricka and V Larry Teaching Foreign Languages toSecond Language Learners in Academic Contexts ReadingWriting Listening and Speaking Routledge 2018 httpswwwgooglecomsearchrlz=1C1GCEB_enIN975IN975ampq=Englandampstick=H4sIAAAAAAAAAONgVuLQz9U3MMqqMFzEyu6al56TmJcCALMnJfIWAAAAampsa=Xampsqi=2ampved=2ahUKEwinzKX26MbzAhXaqZUCHWQEDGgQmxMoBHoECDcQBghttpswwwgooglecomsearchrlz=1C1GCEB_enIN975IN975ampq=UKampstick=H4sIAAAAAAAAAONgVuLQz9U3MC8uTl7EyhTqDQBuxFlpEQAAAAampsa=Xampsqi=2ampved=2ahUKEwinzKX26MbzAhXaqZUCHWQEDGgQmxMoBXoECDcQBw

[23] J S Raj and J V Ananthi ldquoRecurrent neural networks andnonlinear prediction in support vector machinesrdquo Journal ofSoft Computing Paradigm (JSCP) vol 1 no 1 pp 33ndash40 2019

[24] J-J Tseng Y-S Cheng and H-N Yeh ldquoHow pre-serviceEnglish teachers enact TPACK in the context of web-con-ferencing teaching a design thinking approachrdquoComputers ampEducation vol 128 pp 171ndash182 2019

[25] D M Miller C E Scott and E M McTigue ldquoWriting in thesecondary-level disciplines a systematic review of contextcognition and contentrdquo Educational Psychology Reviewvol 30 no 1 pp 83ndash120 2018

[26] L Cam and T M T Tran ldquoAn evaluation of using games inteaching foreign languages grammar for first year foreignlanguages-majored students at Dong Nai Technology Uni-versityrdquo International journal of learning teaching and edu-cational Research vol 16 no 7 pp 55ndash71 2017

[27] D Wu C Zhang L Ji R Ran H Wu and Y Xu ldquoForest firerecognition based on feature extraction from multi-viewimagesrdquo Traitement du Signal vol 38 no 3 pp 775ndash7832021

[28] S E Kaymakamoglu ldquoTeachersrsquo beliefs perceived practiceand actual classroom practice in relation to traditional(Teacher-Centered) and constructivist (Learner-Centered)teaching (note 1)rdquo Journal of Education and Learning vol 7no 1 pp 29ndash37 2018

[29] M Arifin ldquoAnalysis of the Indonesian college curriculumfocusing upon the foreign languages programrdquo Ideas Journalon foreign languages Language Teaching and Learning Lin-guistics and Literature vol 5 no 2 pp 134ndash145 2017

[30] G-Z Liu J-Y Chen and G-J Hwang ldquoMobile-based col-laborative learning in the fitness center a case study on thedevelopment of English listening comprehension with acontext-aware applicationrdquo British Journal of EducationalTechnology vol 49 no 2 pp 305ndash320 2018

[31] J Pei K Zhong J Li J Xu and X Wang ldquoECNN evaluatinga cluster-neural network model for city innovation capabil-ityrdquo Neural Computing amp Applications 2021

Scientific Programming 11

Page 3: Application of Thematic Context-Based Deep Learning in

and approaches to actively improve studentsrsquo practicalforeign languages application skills

3 Related Work

Currently there are two main methods of text sentimentanalysis based on sentiment dictionary and based onmachine learning -e method based on sentiment dic-tionary is to first extract the sentiment feature words of thetext [21] then compare the sentiment feature words withthe words in the sentiment dictionary and use the sen-timent polarity of the marked words in the sentimentdictionary to calculate the foreign languages teachingsentiment tendency -e classification accuracy of thismethod depends on the sentiment dictionary and thegoodness of the sentiment dictionary directly affects theresults of sentiment tendency calculation -e machinelearning-based method extracts text features first and thenapplies some algorithms to the features for classification[22] to get the text sentimental tendency Machinelearning-based methods are divided into three types ofmethods strongly supervised weakly supervised andunsupervised -e main strongly supervised methods aresupport vector machines [23] -e accuracy of plainBayesian and decision trees [24 25] depend on the ac-curacy of the labeled data Weakly supervised methodsmainly include long- and short-term memory networks[26] convolutional neural networks [27] and so on -esemethods require massive labeled data to train the model toensure accuracy Unsupervised methods mainly includeLDA [28] K-nearest neighbor algorithm [14] randomforest [5] and so on Compared with supervised methodsunsupervised methods do not depend on labeled data andare less affected by the size of data

To address the above problems in order to furtherimprove the accuracy of text sentiment polarity analysisusing the LDAmodel extension method this paper proposesan ELT sentiment analysis method based on context clas-sification and genetic algorithm -e method first classifiesELT into contextual topics using the LDAmodel and dividesELTwords into different contextual topics to form ELT topicsets and ELT topic word sets then for each topic of ELTandtopic word sets a genetic algorithm is used to calculate thesentiment values of all words (including sentiment featurewords and nonsentiment feature words) and finally thesentiment values of words are used to calculate ELT senti-ment tendency

4 ELT Theme Analysis Method

41 Overall Process -e overall process of ELT sentimentclassification method based on contextual classification andgenetic algorithm is as follows (1) ELT data preprocessingscreening and word separation of ELT data (2) LDA ELTtopic contextual word set construction using LDA to classifyELT in topic context and construct ELT topic word set and(3) genetic algorithm based on topic ELT sentiment ten-dency calculation -e overall process is shown in Figure 1

5 ELT Data Preprocessing

-e ELTplatform is aimed at the mass population and somestudents post information with unclear purpose and aconsiderable number of these sentences do not carry anopinion tendency -erefore nonopinion sentences areremoved first and only sentences with emotional tendencyare kept before word separation Main Chinese word sep-aration tools are Jieba SnowNLP THULAC NLPIR PKU-SEG and so on [29] Since the content of foreign languagesteaching is relatively brief PKU-SEG can maintain theoriginal word formation relationship of sentences better

51 LDA ELT +eme Context Word Set ConstructionELTis a relatively open and freemedia compared with newsforums and other media with good thematic classificationperformance its content range is broader and more arbi-trary without a strict classification structure so there arequite a lot of words in the ELT text set showing differentsentiment tendencies in different contexts LDA is a doc-ument topic generation probability model which is able toobtain ldquodocumentmdashtopicrdquo ldquotopicmdashwordrdquo and ldquotopicmdashwordrdquo -is paper applies the LDA model to categorize ELTdocument sets and their words by topic context and con-structs ELT topic sets and ELT topic context word sets basedon topic context division

52 LDA ELT Topic Context Classification -e LDA ELTtopic model is shown in Figure 2 k topics are set manually inthe LDA ELT topic model and the preprocessed corpus Dhas m ELTs which is denoted as D d1 d2 dm1113864 1113865 andthe number of words that are deemphasized after splittingELTs is c and the word set is denoted asW word1word2 wordc1113864 1113865 Topic conditional distri-bution of ELT i is denoted as p( z

rarri| α

rarr) i isin (1 2 m) and

the topic conditional distribution of all documents can beobtained by using the LDA ELT topic model which isnormalized as shown in the following equation

p( zrarr

| αrarr) 1113945m

i1p z

rarri| α

rarr1113872 1113873 1113945

m

i1

Δ nrarr

i + αrarr( 1113857

Δ( αrarr) (1)

where nrarr

i denotes the number of words distributed under ktopics in the i-th ELT and α is a k-dimensional hypercal-cemia variable

Similarly the distribution of subjective conditions forword wordt can be obtained as p(word

rarr| zrarr

βrarr

)t isin (1 2 c) and normalized as shown in the followingequation

p(wordrarr

| zrarr

βrarr

) 1113945k

j1p word

rarrt| z

rarr βrarr

1113874 1113875 1113945k

j1

Δ nrarr

j + βrarr

1113874 1113875

Δ( βrarr

)

(2)

where nrarr

j denotes the number of words under the j-th topicand β is a c-dimensional hypernatremia variable

Scientific Programming 3

Combining equations (1) and (2) the joint distributionof topics and words can be obtained as shown in the fol-lowing equation

p(wordrarr

| zrarr

)propp(wordrarr

zrarr

| αrarr βrarr

) p( zrarr

| αrarr)p(wordrarr

| zrarr

βrarr

) 1113945m

i1

Δ nrarr

i + αrarr( 1113857

Δ( αrarr)1113945

k

j1

Δ nrarr

j + βrarr

1113874 1113875

Δ( βrarr

) (3)

-e distribution of topics after removing the t-th word isrepresented by (t) -e conditional probability of the topic

for the t-th word is shown in the following equation usingGibbsrsquo sampling method

p zi j|wordrarr

zrarr

(t)1113874 1113875propp zi jword t|wordrarr

(t) zrarr

(t)1113874 1113875 n

j

d(t) + αj

1113936ks1 n

s

d(t) + αs 1113936tf1 n

tj(t) + βf

1113944

f

j(t)

+βf (4)

-e probability distribution of all the words in ELTdwassummed to obtain the probability distribution of tweet

NPC

Cda

tase

t

Preprocessing (opinion sentence

selection word segmentation)

Corpus

Da topic modelGenetic

algorithm

Weibo topic probability distribution

Emotional value of

microblog subject word set

Microblog theme set and

microblog theme word set

Microblog affective tendency

calculation

Microblog data preprocessing

Construction of LDA subject

word set

Analysis of emotional tendency based on genetic algorithm

Figure 1 Overall process

wordsα

β

k

k

θd

ϕz

c D

Figure 2 LDA ELT theme model

4 Scientific Programming

under k topics Ad pd1 pd2

pdi1113966 1113967 and the value with

the highest probability was selected as the topic context ofthe d-th tweet pdMax max pd1

pd2 pdi

1113966 1113967

53 ELT +eme Context Word Set ConstructionAccording to the above maximum probability divisionmethod the subject context classification of the ELT set iscompleted to form the ELT topic set T T1 T2 Tk1113864 1113865where Tj djl dj2 djy1113966 1113967 j isin (1 2 middot middot middot k) y denotethe number of ELTs of topic j -e word setZj Zj (vj1 vj2 vjn) of topic j is obtained by dividingand deduplicating the tweets in Tj and n denotes thenumber of deduplicated words of the j-th topic-e word setof all k topics constitutes the LDA ELT topic word setZ Z1 Z2 Zk1113864 1113865 and the pseudocode of the LDA ELTtopic word set construction algorithm is shown inAlgorithm 1

54 Genetic Algorithm-Based Calculation of Affective Dispo-sition for Teaching Foreign Languages as a Foreign LanguageConsidering the influence of nonfeatured sentiment words onthe sentiment tendency of ELT texts this paper calculates thesentiment values of all words in each topic context separatelyafter calculating the LDA ELT topic word sets which includenonfeatured sentiment words and feature sentiment wordsand finally calculates the ELT sentiment tendency using thesentiment values of words Sentiment values of words in eachtopic word set are obtained automatically by genetic algorithmcalculation using ELT (labeled data) with manually labeledsentimental tendencies -e sentiment value calculationmethod first assigns a random initial sentiment value to thewords within a predefined range then the optimal sentimentvalue is obtained by designing the objective function and fitnessfunction associated with the label data to self-optimize thesentiment value of thewords and finally the optimal sentimentvalue of the topic words is used to calculate the optimalsentiment tendency value of ELT [30] Topic context word setZj is used as the individual in the genetic algorithm andindividual Chromx corresponds to the sentimental value of allwords in Zj which is Chromx wx1 wx2 wx31113864 1113865 wxt isthe sentimental value of the t-th word in individual x -esentimental value of each word corresponds to the chromo-some code of the individual -e population is composed ofMindividuals denoted as P Chrom1Chrom21113864 Chrommand the initial word sentimental value of an individual is arandom value of [minus10 10] as shown in Figure 3 -e pop-ulation is iteratively optimized in the genetic algorithm and theindividual word sentimental value calculated when the numberof iterations reaches a predefined value is the optimal senti-mental value of all words in the topic context

55 Genetic Algorithm Objective Optimization FunctionIn fact some words do not have the same sentiment ten-dency in different contexts so corresponding to this

situation this paper sets the same word to have differentsentiment values in different individuals and classifyingwords into different thematic contexts is to consider thisvariability In order to make the sentiment tendency of ELTin individuals close to the sentiment tendency of labeleddata that is in order to apply labeled data to automaticallyobtain the sentiment tendency of words the objectivefunction of genetic algorithm is designed in this paper toachieve word sentiment value optimization [13] -e sen-timental value of the s-th ELT under topic j is calculatedusing the following equation

Senti Zj TjChromx djs1113872 1113873 1113944wordisindk

wjt Chromx wordt( 1113857( 1113857

(5)

where wordt is the word in ELT djs wjt(Chromx(wordt))

indicates the sentiment value of word wordt in individu-alChromx When Senti(Zj TjChromx djs) is greater thanor equal to 0 it is positive and vice versa it is negativeclass(djs) indicates the affective tendency of ELT djs asshown in the following equation

class djs1113872 1113873 positive Senti Zj TjChromx djs1113872 1113873ge 0

negative Senti Zj TjChromx djs1113872 1113873lt 0

⎧⎪⎨

⎪⎩

(6)

-is paper sets Acc(Chromx Tj) as the degree of dif-ference between the affective tendency of ELT in individualChromx and the affective tendency of the labeled data undertopic j as shown in the following equation the smaller thevalue the closer the affective tendency of ELT in individualChromx is to the affective tendency of the labeled data

Acc Chromx Tj1113872 1113873 1 minusnum1lesleydkisinTj

class djs1113872 1113873

y (7)

where Tj is the set of topics djs -e number of ELT affectivetendencies that are consistent with the labeled ELT dataaffective tendencies is calculated in individual 33 by equation(6) -e minimum difference degree individuals are deter-mined by setting the objective optimization functionaccording to equation (7) as shown in the followingequation

Accmin min1leileMChromisinP

Accuracy Chromx Tj1113872 11138731113872 1113873 (8)

56 Genetic-Algorithm-Based Word Sentiment ValueCalculation In order to make the probability of individualswith the smaller variance being retained higher the adap-tation function is set in this paper as shown in the followingequation

Scientific Programming 5

gather edfit Chromx Tj1113872 1113873 y

Acc Chromx Tj1113872 1113873times(minus1) + y minus

y

Acc Chromx Tj1113872 1113873⎛⎝ ⎞⎠ (9)

where yAcc(Chromx Tj) is the number of ELTs in whichthe emotional disposition was judged incorrectly in indi-vidual Chromx and (y minus yAcc(Chromx Tj)) indicates thenumber of ELTs in which the emotional disposition wasjudged correctly in individual Chromx -e roulette wheelmethod was used for individual selection using equation (9)so that the greater the fitness (smaller the variance) thegreater the probability of individuals being selected forretention -e selected individuals are then subjected to

crossover and mutation operations to produce new indi-viduals Individual selection crossover and mutation op-erations are repeatedly performed in the genetic algorithm tooptimize the population of individuals iteratively until apredetermined number of iterations is reached and thecalculation is stopped and finally the individual with thesmallest variance is selected as the word sentiment valueusing the objective optimization function -e pseudocodeof word sentimental value calculation based on a genetic

Input D d1 d2 dm1113864 1113865 Ad pd1 pd2 pdk1113864 1113865

ELT corpus and ELT topic probability distributionsOutput Z Z1 Z2 Zk1113864 1113865LDA ELT subject headings

(1) for i 1 to m dotraverse ELT D(2) Get the topic T to which the i-th ELT topic probability maximum belongs(3) TalarrGet(PiMax)

(4) put the i article of ELT into the Tath topic(5) Topicappend (Ta i)(6) end for(7) for j 1 to k dotraverse k topics(8) ELT splitting and deduplication in the j-th topic(9) lexicallarr 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

ALGORITHM 1 LDA ELT topic word set construction algorithm

We Company Yes One Good

9 4 -3 -8 0

2 6 -2 3 -5

Word set

Chrom 1

Chrom m

Figure 3 Some of the initial word sentiment scores correspond to

5 -3 -8 9 2 -5 6 1 5 6 -2 9 -3 -5 0 1

3 6 -2 2 -3 9 0 -8 3 -3 -8 2 2 9 6 -8

Figure 4 Multipoint crossover

5 -3 -8 9 2 -5 6 1 5 -3 -2 9 2 -5 6 1

Figure 5 Genetic variation

6 Scientific Programming

algorithm is shown in Algorithm 2 and the individualcrossover and variation operations are shown in Figures 4and 5

57 Calculation of Emotional Disposition in ELT -e min-imum variance individual 11 was obtained by the genetic al-gorithm and the codes of chromosomes in the individualcorresponded to the optimal sentiment values of words in thesubject word set In the minimum variance individual 22 thesentiment values of all words in ELT are first summed up byequation (5) to obtain the sentiment value of ELT and thenjudged by equation (6) [31] if the sentiment value is greater thanor equal to 0 it means that the ELT has a positive sentimenttendency and the opposite means that it has a negative senti-ment tendency -e calculation example is shown in Figure 6

6 Experimental Results and Analysis

61 ExperimentalData Set -e datum was obtained from the2012ndash2014 NLPCC public data set [22] with 17253 ELTs-ere were 7188 ELTs after removing nonopinion sentencesand this data was used as a corpus for the calculation of affectivetendencies for ELTs of which 3314 were positive and 3874were negative and the tenfold cross-validation was used totrain and test the method of this paper

-e NLPCC data set has eight labels none happinesslike sadness disgust anger fear and surprise -e eightlabels are simplified into two types of labels positive andnegative as shown in Table 1

After the labels were categorized the ELT content wasstored in a uniform format and the data format is shown inTable 2 with the polarity 1 for ELT indicating positive andminus1 for negative

62 Experimental Procedure and Results In this paper theeffects of all words on the effective polarity of ELT wereinvolved in the calculation and all words in ELT were

retained after the splitting of ELT Sample results of PKU-SEG splitting are shown in Table 3

After ELTword classification the LDA ELT topic modelis used to construct the topic word sets K values of thenumber of topics in the LDA ELT topic model need to be setin advance and the selection of suitable k values is beneficialto topic classification In this paper the k value is set to 5 (thecollected data are divided into 5 topics) and the sample ELTtopic context classification is shown in Table 4

-e results of the ELT theme context classification aretheme one is related to foreign languages and foreign lan-guages commentary theme two is related to personalemotional expressions theme three is social status com-mentary and event descriptions theme four is dynamic ELTcommentary about socially prominent people theme five ismore colloquial popular Internet phrases and the classifi-cation results are consistent with reality After completingthe ELT topic context classification the ELT topic word set isconstructed as shown in Table 5

After obtaining the topic word sets the word sentimentvalues were calculated using a genetic algorithm-basedmethod for calculating sentimental tendencies in ELT -epopulation P is randomly generated in the algorithm andthe population size is set to 1000 and the selectioncrossover and mutation operations are performed on theindividuals In this paper the number of words afterdeweighting the current topic ELT words is used as theindividual coding length and the chromosome coding iscoded with real integers in the [minus10 10] interval and theinitial word sentiment values are shown in Table 6 -einitial word sentiment values are shown in Table 6 -egenetic algorithm is run with the labeled data objectivefunction and fitness function for each word set in each topicso that the sentiment values are optimized iteratively untilthe predetermined number of iterations is reached and thecalculation stops (the iteration threshold is set to 2000 inthis paper) and the results of word sentiment value opti-mization are shown in Table 7

Input D d1 d2 dm1113864 1113865 T T1 T2 Tk1113864 1113865 Z Z1 Z2 Zk1113864 1113865

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 [Chrom1Chrom2 ChromM]Randomly generated populations P(2) for j 1 to MAX doMAX is the maximum number of iterations(3) for ch 1 to M dotraverse the population(4) fitlarr fitness (ch)calculate individual fitness(5) fitnessappend (fit)save fitness(6) end for(7) new_plarr select(P fitness)select operation(8) new_plarr cross(new_p)cross operation(9) new_plarrmutation (new_p)mutation operation(10) plarr new_pnew population P(11) end for(12) ChromminlarrAccmin Minimum variance individual(13) return(Chrommin)Return the minimum variance individual

ALGORITHM 2 Genetic algorithm-based word sentiment value calculation

Scientific Programming 7

This is One Good Bad late Company go towork

Good morning

0 -1 8 -9 -2 1 -6 3

Emotional value table of

words

Testdata set

This is a goodunit

0-1+8+1=+

8

+8gtpositive electrode

Figure 6 Example of emotional disposition calculation

Table 1 Label classification

Positive NegativeNone SadnessHappiness DisgustLike Fear

Surprise

Table 2 Sample ELT texts

Serial number Microblog content Polarity1 I feel strange and uncomfortable minus12 -e film is really moving especially with the development of the plot it is melodious and beautiful 13 Suddenly I found that Liu Xinrsquos song names are so powerful 14 Itrsquos too late minus15 -ese days have been wonderful all kinds of wonderful 16 Superman is everywhere and Kobe responds only to roars and mistakes minus17 I donrsquot know if the performance of iPad3 is good If it is good I can consider buying one 18 Our unit is a good unit Although we get off work late we go to work early minus19 After reading a lot about the laptop dock of MTO ATRIX I like it more and more 110 Personality explosion 1

Table 3 Sample ELT PKU-SEG word separation results

Serial number Word segmentation result1 I feel strange and uncomfortable2 Irsquove had a wonderful time these days3 Suddenly I found that Liu Xinrsquos song names are so powerful4 Personality explosion

Table 4 Sample ELT topic context classification

Topic 1 I donrsquot 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 lotabout MTO ATRIX I like it more and more

Topic 2 -e past few days have been wonderful I feel strange and uncomfortable in my heart Our unit is a good unit Although we get offwork late we go to work early

Topic 3 -e film is really moving especially with the development of the plot the melodious songs are really sensational

Topic 4 Suddenly I found that Liu Xinrsquos songs were so powerful -ey were superman everywhere Kobe responded only with roars andmistakes

Topic 5 Burst out of character Itrsquos so sad

8 Scientific Programming

621 Mediating Effect Test -e mediation effect was ex-amined using the nonparametric percentile Bootstrapmethod with the PROCESS 216 plug-in installed in SPSS240 software -e results showed that desire mediated therelationship between perceived behavioral control sense ofrelatedness and willingness to act desire partially mediatedthe relationship between perceived behavioral control andwillingness to act and desire fully mediated the relationshipbetween sense of relatedness and willingness to act (seeTable 3)

In the genetic algorithm-based method for calculatingaffective tendencies in ELT the objective function is used toselect the individual with the least variance in the optimizedpopulation as the current topic word affective value asshown in Table 8

After the classification of ELT topic contexts there maybe the same words in different topics and this classificationmethod is consistent with the reality that there are differ-ences in affective tendencies of the same word in differenttopic contexts and the affective values of the same word indifferent topics are shown in Table 9

After the classification of topics the emotional tendencyof ELT is judged by calculating the sum of the emotionalvalues of ELT subwords under the topic and when the sumof the emotional values of ELT subwords is greater than orequal to 0 the emotional tendency of ELT is positive andwhen it is less than 0 the emotional tendency of ELT isnegative

63ComparisonofMethods -epresent 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 indicatorsand the comparison results are shown in Table 10

-e experimental results show that the F1 values of theLDA method are higher than those of the DT NB and RFalgorithms -e reason is that the LDA method for ELTsentiment analysis is based on semantic ldquotext-wordrdquo topicclassification while the DT NB and RF algorithms convertwords into word vectors without considering the semanticinformation of words which leads to the less-than-optimalresults of microbial sentiment calculation -e accuracy ofthe LDA-GA method in this paper is not satisfactory -eaccuracy recall and F1 value of the LDA-GA method in thispaper are higher than those of the LDA method -e reasonis that the LDAmethod only uses feature sentiment words tocalculate ELT sentiment polarity while the method in thispaper uses a genetic algorithm to calculate all word

Table 5 Selected subject headings

-eme Partial word setSubject word set 1 iPad3 Performance Screen Keyboard ProductSubject word set 2 Make complaints Speechless Night Company Good morningSubject word set 3 Pain Development Labour Reactionary ChallengeSubject word set 4 Fire Sing Night shanghai Vocal concert BaiduSubject word set 5 Yes Ah Burst Vulnerable Alas

Table 6 Initial word sentiment values

Individual number Make complaints Speechless Happiness Awesome Fond dream Life1 minus8 5 minus3 8 9 22 minus5 2 5 2 minus4 83 2 minus4 2 1 3 minus54 2 1 minus6 minus2 minus3 minus1

Table 7 Optimization results of word sentiment values

Individual number Make complaints Speechless Happiness Awesome Fond dream Life1 minus9 minus3 9 7 5 22 minus5 minus2 5 2 minus4 minus13 minus2 minus7 6 1 2 04 minus5 minus8 5 5 3 minus1

Table 8 Example of optimal word sentiment values

Makecomplaints Speechless Happiness Awesome Fond

dream Life

minus2 minus7 6 1 2 0

Table 9 Examples of sentiment values for the same word indifferent themes

Terms Topic 1 Topic 2 Topic 3 Topic 4 Topic 5Good 8 5 2 6 2Large 4 1 minus1 3 minus7Yes 2 0 1 3 minus2Sad minus9 minus8 minus2 minus5 minus9

Scientific Programming 9

sentiment values unites feature sentiment words andnonfeature sentiment words to calculate ELT sentimentpolarity and calculates word sentiment values according todifferent topic contexts to distinguish the sentiment polarityof the same word in different topic contexts

7 Conclusions

In this paper we propose an ELT topic analysis methodbased on contextual classification and genetic algorithms-e method first constructs ELT topic sets and ELT topicword sets using the LDA model then applies a genetic al-gorithm to each ELT topic word set one by one to auto-matically iterate and calculate the sentiment value of wordsin the word sets and finally calculates the sentiment polarityof ELT text by the sentiment value of words in the topic wordsets -e experimental results show that the accuracy recalland F1 of this method are improved compared with those ofLDA plain Bayesian classification random forest and de-cision tree-based ELT sentiment analysis methods -emethod in this paper requires repeated iterative computa-tion in the genetic algorithm which is time-consuming andthe next research work is to consider the problem of geneticalgorithm acceleration

In the future we will optimize the algorithm to make itmore robust and stable we will optimize its scalability so thatit can be applied in educational scenarios in different fields

Data Availability

-e data used in this paper are available from the corre-sponding author upon request

Conflicts of Interest

-e authors declare that they have no conflicts of interestregarding this work

References

[1] M H Santosa ldquoLearning approaches of Indonesian EFL gen Zstudents in a flipped learning contextrdquo Journal of English andForeign Languages vol 7 no 2 pp 183ndash208 2017

[2] Z Wang ldquoStudy on teaching of foreign languages readingunder thematic progression modelrdquo Open Journal of ModernLinguistics vol 05 no 1 pp 73ndash78 2015

[3] M Abrar A Mukminin A Habibi and A Fadhil ldquoIf ourforeign languages isnrsquot a language what is it Indonesian EFLStudent Teachersrsquo Challenges Speaking foreign languagesrdquoQualitative Report vol 23 no 1 pp 129ndash145 2018

[4] A Aunurrahman A Hikmayanti and Y Yuliana ldquoTeachingEnglish using a genre pedagogy to Islamic junior high schoolstudentsrdquo Journal of English and Foreign Languages vol 10no 1 pp 1ndash24 2020

[5] S Kahn and A R Lewis ldquoSurvey on teaching science to K-12students with disabilities teacher preparedness and attitudesrdquoJournal of Science Teacher Education vol 25 no 8pp 885ndash910 2014

[6] O Jonathan S Shirley C Andri C H Richardson andK Richardson ldquoLearning to argue a study of four schools andtheir attempt to develop the use of argumentation as acommon instructional practice and its impact on studentsrdquoJournal of Research in Science Teaching vol 50 no 3pp 315ndash347 2013

[7] T Xie C Zhang Z Zhang and Y Kai ldquoUtilizing active sensornodes in smart environments for optimal communicationcoveragerdquo IEEE Access vol 7 pp 11338ndash11348 2018

[8] S Ahn and H Han ldquoUS student teachersrsquo cross-culturalteaching abroad experience at a Korean high schoolrdquo Journalof Education amp Culture vol 24 no 5 pp 733ndash758 2018

[9] A Andriani V D Yuniar and F Abdullah ldquoTeaching Englishgrammar in an Indonesian junior high schoolrdquo AL-ISHLAHJurnal Pendidikan vol 13 no 2 pp 1046ndash1056 2021

[10] M Y Abdullah H M H A Ghafri and K S H A Yahyai ldquoAqualitative study on the best motivational teaching strategiesin the context of Oman perspectives of EFL teachersrdquo EnglishLanguage Teaching vol 12 no 3 pp 57ndash64 2019

[11] A Leis ldquoStudy abroad and willingness to communicate a casestudy at junior high schoolrdquo +e Language Teacher vol 39no 3 pp 3ndash9 2015

[12] M Ramos ldquoTeaching foreign languages for medical trans-lation a corpus- based approachrdquo Language Teaching Re-search Quarterly vol 8 no 2 pp 25ndash40 2020

[13] T D Holmlund K Lesseig and D Slavit ldquoMaking sense ofldquoSTEM educationrdquo in K-12 contextsrdquo International journal ofSTEM education vol 5 no 1 pp 1ndash18 2018

[14] C Zhang T Xie K Yang et al ldquoPositioning optimisationbased on particle quality prediction in wireless sensor net-worksrdquo IET Networks vol 8 no 2 pp 107ndash113 2019

[15] M M Rahman M K M Singh M K M Singh andA Pandian ldquoExploring ESL teacher beliefs and classroompractices of CLT a case studyrdquo International Journal of In-struction vol 11 no 1 pp 295ndash310 2018

[16] M Ram S Mahendra R Campus and N KathmanduldquoCollege teachersrsquo experiences in classroom ecology of lan-guage teaching a study from the phenomenological per-spectiverdquo Journal of foreign languages Education andTeaching vol 04 no 4 pp 2685ndash2743 2020

[17] R S Fernanda and J G C Claudinei ldquo-e use of activemethodology in nursing care and teaching in national pro-ductions an integrative reviewrdquo Revista da Escola de Enfer-magem da USP vol 46 no 1 pp 208ndash218 2012

[18] D M M Zin S Mohamed K A Bakar and N K IsmailldquoFurther study on implementing thematic teaching in pre-school a needs analysis researchrdquo Creative Education vol 10no 12 pp 2887ndash2898 2019

[19] LWang C Zhang Q Chen et al ldquoA communication strategyof proactive nodes based on loop theorem in wireless sensornetworksrdquo in Proceedings of the 2018 Ninth InternationalConference on Intelligent Control and Information Processing(ICICIP) pp 160ndash167 IEEE Wanzhou China November2018

[20] K Maree C Aldous and A Hattingh ldquoPredictors of learnerperformance in mathematics and science according to a large-

Table 10 Comparison experimental results of emotional dispo-sition calculation

Method Accuracy () Recall () F1 ()LDA 6063 7802 6823DT 5244 7306 6107NB 5431 8500 6623RF 5867 7463 6569LDA-GA 6375 8732 7369

10 Scientific Programming

scale study in Mpumalangardquo South African Journal of Edu-cation vol 26 no 2 pp 229ndash252 2006 httpswwwresearchgatenetprofileAndre-Swanepoel

[21] B Angela A Yves and B Barbara ldquoQuestions and positionson education for sustainable development at university inFrance example of short professional cyclesrdquo EnvironmentalEducation Research vol 19 no 3 pp 269ndash281 2013

[22] J M Newton D R Ferris C C M Goh G WilliamL S Fredricka and V Larry Teaching Foreign Languages toSecond Language Learners in Academic Contexts ReadingWriting Listening and Speaking Routledge 2018 httpswwwgooglecomsearchrlz=1C1GCEB_enIN975IN975ampq=Englandampstick=H4sIAAAAAAAAAONgVuLQz9U3MMqqMFzEyu6al56TmJcCALMnJfIWAAAAampsa=Xampsqi=2ampved=2ahUKEwinzKX26MbzAhXaqZUCHWQEDGgQmxMoBHoECDcQBghttpswwwgooglecomsearchrlz=1C1GCEB_enIN975IN975ampq=UKampstick=H4sIAAAAAAAAAONgVuLQz9U3MC8uTl7EyhTqDQBuxFlpEQAAAAampsa=Xampsqi=2ampved=2ahUKEwinzKX26MbzAhXaqZUCHWQEDGgQmxMoBXoECDcQBw

[23] J S Raj and J V Ananthi ldquoRecurrent neural networks andnonlinear prediction in support vector machinesrdquo Journal ofSoft Computing Paradigm (JSCP) vol 1 no 1 pp 33ndash40 2019

[24] J-J Tseng Y-S Cheng and H-N Yeh ldquoHow pre-serviceEnglish teachers enact TPACK in the context of web-con-ferencing teaching a design thinking approachrdquoComputers ampEducation vol 128 pp 171ndash182 2019

[25] D M Miller C E Scott and E M McTigue ldquoWriting in thesecondary-level disciplines a systematic review of contextcognition and contentrdquo Educational Psychology Reviewvol 30 no 1 pp 83ndash120 2018

[26] L Cam and T M T Tran ldquoAn evaluation of using games inteaching foreign languages grammar for first year foreignlanguages-majored students at Dong Nai Technology Uni-versityrdquo International journal of learning teaching and edu-cational Research vol 16 no 7 pp 55ndash71 2017

[27] D Wu C Zhang L Ji R Ran H Wu and Y Xu ldquoForest firerecognition based on feature extraction from multi-viewimagesrdquo Traitement du Signal vol 38 no 3 pp 775ndash7832021

[28] S E Kaymakamoglu ldquoTeachersrsquo beliefs perceived practiceand actual classroom practice in relation to traditional(Teacher-Centered) and constructivist (Learner-Centered)teaching (note 1)rdquo Journal of Education and Learning vol 7no 1 pp 29ndash37 2018

[29] M Arifin ldquoAnalysis of the Indonesian college curriculumfocusing upon the foreign languages programrdquo Ideas Journalon foreign languages Language Teaching and Learning Lin-guistics and Literature vol 5 no 2 pp 134ndash145 2017

[30] G-Z Liu J-Y Chen and G-J Hwang ldquoMobile-based col-laborative learning in the fitness center a case study on thedevelopment of English listening comprehension with acontext-aware applicationrdquo British Journal of EducationalTechnology vol 49 no 2 pp 305ndash320 2018

[31] J Pei K Zhong J Li J Xu and X Wang ldquoECNN evaluatinga cluster-neural network model for city innovation capabil-ityrdquo Neural Computing amp Applications 2021

Scientific Programming 11

Page 4: Application of Thematic Context-Based Deep Learning in

Combining equations (1) and (2) the joint distributionof topics and words can be obtained as shown in the fol-lowing equation

p(wordrarr

| zrarr

)propp(wordrarr

zrarr

| αrarr βrarr

) p( zrarr

| αrarr)p(wordrarr

| zrarr

βrarr

) 1113945m

i1

Δ nrarr

i + αrarr( 1113857

Δ( αrarr)1113945

k

j1

Δ nrarr

j + βrarr

1113874 1113875

Δ( βrarr

) (3)

-e distribution of topics after removing the t-th word isrepresented by (t) -e conditional probability of the topic

for the t-th word is shown in the following equation usingGibbsrsquo sampling method

p zi j|wordrarr

zrarr

(t)1113874 1113875propp zi jword t|wordrarr

(t) zrarr

(t)1113874 1113875 n

j

d(t) + αj

1113936ks1 n

s

d(t) + αs 1113936tf1 n

tj(t) + βf

1113944

f

j(t)

+βf (4)

-e probability distribution of all the words in ELTdwassummed to obtain the probability distribution of tweet

NPC

Cda

tase

t

Preprocessing (opinion sentence

selection word segmentation)

Corpus

Da topic modelGenetic

algorithm

Weibo topic probability distribution

Emotional value of

microblog subject word set

Microblog theme set and

microblog theme word set

Microblog affective tendency

calculation

Microblog data preprocessing

Construction of LDA subject

word set

Analysis of emotional tendency based on genetic algorithm

Figure 1 Overall process

wordsα

β

k

k

θd

ϕz

c D

Figure 2 LDA ELT theme model

4 Scientific Programming

under k topics Ad pd1 pd2

pdi1113966 1113967 and the value with

the highest probability was selected as the topic context ofthe d-th tweet pdMax max pd1

pd2 pdi

1113966 1113967

53 ELT +eme Context Word Set ConstructionAccording to the above maximum probability divisionmethod the subject context classification of the ELT set iscompleted to form the ELT topic set T T1 T2 Tk1113864 1113865where Tj djl dj2 djy1113966 1113967 j isin (1 2 middot middot middot k) y denotethe number of ELTs of topic j -e word setZj Zj (vj1 vj2 vjn) of topic j is obtained by dividingand deduplicating the tweets in Tj and n denotes thenumber of deduplicated words of the j-th topic-e word setof all k topics constitutes the LDA ELT topic word setZ Z1 Z2 Zk1113864 1113865 and the pseudocode of the LDA ELTtopic word set construction algorithm is shown inAlgorithm 1

54 Genetic Algorithm-Based Calculation of Affective Dispo-sition for Teaching Foreign Languages as a Foreign LanguageConsidering the influence of nonfeatured sentiment words onthe sentiment tendency of ELT texts this paper calculates thesentiment values of all words in each topic context separatelyafter calculating the LDA ELT topic word sets which includenonfeatured sentiment words and feature sentiment wordsand finally calculates the ELT sentiment tendency using thesentiment values of words Sentiment values of words in eachtopic word set are obtained automatically by genetic algorithmcalculation using ELT (labeled data) with manually labeledsentimental tendencies -e sentiment value calculationmethod first assigns a random initial sentiment value to thewords within a predefined range then the optimal sentimentvalue is obtained by designing the objective function and fitnessfunction associated with the label data to self-optimize thesentiment value of thewords and finally the optimal sentimentvalue of the topic words is used to calculate the optimalsentiment tendency value of ELT [30] Topic context word setZj is used as the individual in the genetic algorithm andindividual Chromx corresponds to the sentimental value of allwords in Zj which is Chromx wx1 wx2 wx31113864 1113865 wxt isthe sentimental value of the t-th word in individual x -esentimental value of each word corresponds to the chromo-some code of the individual -e population is composed ofMindividuals denoted as P Chrom1Chrom21113864 Chrommand the initial word sentimental value of an individual is arandom value of [minus10 10] as shown in Figure 3 -e pop-ulation is iteratively optimized in the genetic algorithm and theindividual word sentimental value calculated when the numberof iterations reaches a predefined value is the optimal senti-mental value of all words in the topic context

55 Genetic Algorithm Objective Optimization FunctionIn fact some words do not have the same sentiment ten-dency in different contexts so corresponding to this

situation this paper sets the same word to have differentsentiment values in different individuals and classifyingwords into different thematic contexts is to consider thisvariability In order to make the sentiment tendency of ELTin individuals close to the sentiment tendency of labeleddata that is in order to apply labeled data to automaticallyobtain the sentiment tendency of words the objectivefunction of genetic algorithm is designed in this paper toachieve word sentiment value optimization [13] -e sen-timental value of the s-th ELT under topic j is calculatedusing the following equation

Senti Zj TjChromx djs1113872 1113873 1113944wordisindk

wjt Chromx wordt( 1113857( 1113857

(5)

where wordt is the word in ELT djs wjt(Chromx(wordt))

indicates the sentiment value of word wordt in individu-alChromx When Senti(Zj TjChromx djs) is greater thanor equal to 0 it is positive and vice versa it is negativeclass(djs) indicates the affective tendency of ELT djs asshown in the following equation

class djs1113872 1113873 positive Senti Zj TjChromx djs1113872 1113873ge 0

negative Senti Zj TjChromx djs1113872 1113873lt 0

⎧⎪⎨

⎪⎩

(6)

-is paper sets Acc(Chromx Tj) as the degree of dif-ference between the affective tendency of ELT in individualChromx and the affective tendency of the labeled data undertopic j as shown in the following equation the smaller thevalue the closer the affective tendency of ELT in individualChromx is to the affective tendency of the labeled data

Acc Chromx Tj1113872 1113873 1 minusnum1lesleydkisinTj

class djs1113872 1113873

y (7)

where Tj is the set of topics djs -e number of ELT affectivetendencies that are consistent with the labeled ELT dataaffective tendencies is calculated in individual 33 by equation(6) -e minimum difference degree individuals are deter-mined by setting the objective optimization functionaccording to equation (7) as shown in the followingequation

Accmin min1leileMChromisinP

Accuracy Chromx Tj1113872 11138731113872 1113873 (8)

56 Genetic-Algorithm-Based Word Sentiment ValueCalculation In order to make the probability of individualswith the smaller variance being retained higher the adap-tation function is set in this paper as shown in the followingequation

Scientific Programming 5

gather edfit Chromx Tj1113872 1113873 y

Acc Chromx Tj1113872 1113873times(minus1) + y minus

y

Acc Chromx Tj1113872 1113873⎛⎝ ⎞⎠ (9)

where yAcc(Chromx Tj) is the number of ELTs in whichthe emotional disposition was judged incorrectly in indi-vidual Chromx and (y minus yAcc(Chromx Tj)) indicates thenumber of ELTs in which the emotional disposition wasjudged correctly in individual Chromx -e roulette wheelmethod was used for individual selection using equation (9)so that the greater the fitness (smaller the variance) thegreater the probability of individuals being selected forretention -e selected individuals are then subjected to

crossover and mutation operations to produce new indi-viduals Individual selection crossover and mutation op-erations are repeatedly performed in the genetic algorithm tooptimize the population of individuals iteratively until apredetermined number of iterations is reached and thecalculation is stopped and finally the individual with thesmallest variance is selected as the word sentiment valueusing the objective optimization function -e pseudocodeof word sentimental value calculation based on a genetic

Input D d1 d2 dm1113864 1113865 Ad pd1 pd2 pdk1113864 1113865

ELT corpus and ELT topic probability distributionsOutput Z Z1 Z2 Zk1113864 1113865LDA ELT subject headings

(1) for i 1 to m dotraverse ELT D(2) Get the topic T to which the i-th ELT topic probability maximum belongs(3) TalarrGet(PiMax)

(4) put the i article of ELT into the Tath topic(5) Topicappend (Ta i)(6) end for(7) for j 1 to k dotraverse k topics(8) ELT splitting and deduplication in the j-th topic(9) lexicallarr 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

ALGORITHM 1 LDA ELT topic word set construction algorithm

We Company Yes One Good

9 4 -3 -8 0

2 6 -2 3 -5

Word set

Chrom 1

Chrom m

Figure 3 Some of the initial word sentiment scores correspond to

5 -3 -8 9 2 -5 6 1 5 6 -2 9 -3 -5 0 1

3 6 -2 2 -3 9 0 -8 3 -3 -8 2 2 9 6 -8

Figure 4 Multipoint crossover

5 -3 -8 9 2 -5 6 1 5 -3 -2 9 2 -5 6 1

Figure 5 Genetic variation

6 Scientific Programming

algorithm is shown in Algorithm 2 and the individualcrossover and variation operations are shown in Figures 4and 5

57 Calculation of Emotional Disposition in ELT -e min-imum variance individual 11 was obtained by the genetic al-gorithm and the codes of chromosomes in the individualcorresponded to the optimal sentiment values of words in thesubject word set In the minimum variance individual 22 thesentiment values of all words in ELT are first summed up byequation (5) to obtain the sentiment value of ELT and thenjudged by equation (6) [31] if the sentiment value is greater thanor equal to 0 it means that the ELT has a positive sentimenttendency and the opposite means that it has a negative senti-ment tendency -e calculation example is shown in Figure 6

6 Experimental Results and Analysis

61 ExperimentalData Set -e datum was obtained from the2012ndash2014 NLPCC public data set [22] with 17253 ELTs-ere were 7188 ELTs after removing nonopinion sentencesand this data was used as a corpus for the calculation of affectivetendencies for ELTs of which 3314 were positive and 3874were negative and the tenfold cross-validation was used totrain and test the method of this paper

-e NLPCC data set has eight labels none happinesslike sadness disgust anger fear and surprise -e eightlabels are simplified into two types of labels positive andnegative as shown in Table 1

After the labels were categorized the ELT content wasstored in a uniform format and the data format is shown inTable 2 with the polarity 1 for ELT indicating positive andminus1 for negative

62 Experimental Procedure and Results In this paper theeffects of all words on the effective polarity of ELT wereinvolved in the calculation and all words in ELT were

retained after the splitting of ELT Sample results of PKU-SEG splitting are shown in Table 3

After ELTword classification the LDA ELT topic modelis used to construct the topic word sets K values of thenumber of topics in the LDA ELT topic model need to be setin advance and the selection of suitable k values is beneficialto topic classification In this paper the k value is set to 5 (thecollected data are divided into 5 topics) and the sample ELTtopic context classification is shown in Table 4

-e results of the ELT theme context classification aretheme one is related to foreign languages and foreign lan-guages commentary theme two is related to personalemotional expressions theme three is social status com-mentary and event descriptions theme four is dynamic ELTcommentary about socially prominent people theme five ismore colloquial popular Internet phrases and the classifi-cation results are consistent with reality After completingthe ELT topic context classification the ELT topic word set isconstructed as shown in Table 5

After obtaining the topic word sets the word sentimentvalues were calculated using a genetic algorithm-basedmethod for calculating sentimental tendencies in ELT -epopulation P is randomly generated in the algorithm andthe population size is set to 1000 and the selectioncrossover and mutation operations are performed on theindividuals In this paper the number of words afterdeweighting the current topic ELT words is used as theindividual coding length and the chromosome coding iscoded with real integers in the [minus10 10] interval and theinitial word sentiment values are shown in Table 6 -einitial word sentiment values are shown in Table 6 -egenetic algorithm is run with the labeled data objectivefunction and fitness function for each word set in each topicso that the sentiment values are optimized iteratively untilthe predetermined number of iterations is reached and thecalculation stops (the iteration threshold is set to 2000 inthis paper) and the results of word sentiment value opti-mization are shown in Table 7

Input D d1 d2 dm1113864 1113865 T T1 T2 Tk1113864 1113865 Z Z1 Z2 Zk1113864 1113865

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 [Chrom1Chrom2 ChromM]Randomly generated populations P(2) for j 1 to MAX doMAX is the maximum number of iterations(3) for ch 1 to M dotraverse the population(4) fitlarr fitness (ch)calculate individual fitness(5) fitnessappend (fit)save fitness(6) end for(7) new_plarr select(P fitness)select operation(8) new_plarr cross(new_p)cross operation(9) new_plarrmutation (new_p)mutation operation(10) plarr new_pnew population P(11) end for(12) ChromminlarrAccmin Minimum variance individual(13) return(Chrommin)Return the minimum variance individual

ALGORITHM 2 Genetic algorithm-based word sentiment value calculation

Scientific Programming 7

This is One Good Bad late Company go towork

Good morning

0 -1 8 -9 -2 1 -6 3

Emotional value table of

words

Testdata set

This is a goodunit

0-1+8+1=+

8

+8gtpositive electrode

Figure 6 Example of emotional disposition calculation

Table 1 Label classification

Positive NegativeNone SadnessHappiness DisgustLike Fear

Surprise

Table 2 Sample ELT texts

Serial number Microblog content Polarity1 I feel strange and uncomfortable minus12 -e film is really moving especially with the development of the plot it is melodious and beautiful 13 Suddenly I found that Liu Xinrsquos song names are so powerful 14 Itrsquos too late minus15 -ese days have been wonderful all kinds of wonderful 16 Superman is everywhere and Kobe responds only to roars and mistakes minus17 I donrsquot know if the performance of iPad3 is good If it is good I can consider buying one 18 Our unit is a good unit Although we get off work late we go to work early minus19 After reading a lot about the laptop dock of MTO ATRIX I like it more and more 110 Personality explosion 1

Table 3 Sample ELT PKU-SEG word separation results

Serial number Word segmentation result1 I feel strange and uncomfortable2 Irsquove had a wonderful time these days3 Suddenly I found that Liu Xinrsquos song names are so powerful4 Personality explosion

Table 4 Sample ELT topic context classification

Topic 1 I donrsquot 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 lotabout MTO ATRIX I like it more and more

Topic 2 -e past few days have been wonderful I feel strange and uncomfortable in my heart Our unit is a good unit Although we get offwork late we go to work early

Topic 3 -e film is really moving especially with the development of the plot the melodious songs are really sensational

Topic 4 Suddenly I found that Liu Xinrsquos songs were so powerful -ey were superman everywhere Kobe responded only with roars andmistakes

Topic 5 Burst out of character Itrsquos so sad

8 Scientific Programming

621 Mediating Effect Test -e mediation effect was ex-amined using the nonparametric percentile Bootstrapmethod with the PROCESS 216 plug-in installed in SPSS240 software -e results showed that desire mediated therelationship between perceived behavioral control sense ofrelatedness and willingness to act desire partially mediatedthe relationship between perceived behavioral control andwillingness to act and desire fully mediated the relationshipbetween sense of relatedness and willingness to act (seeTable 3)

In the genetic algorithm-based method for calculatingaffective tendencies in ELT the objective function is used toselect the individual with the least variance in the optimizedpopulation as the current topic word affective value asshown in Table 8

After the classification of ELT topic contexts there maybe the same words in different topics and this classificationmethod is consistent with the reality that there are differ-ences in affective tendencies of the same word in differenttopic contexts and the affective values of the same word indifferent topics are shown in Table 9

After the classification of topics the emotional tendencyof ELT is judged by calculating the sum of the emotionalvalues of ELT subwords under the topic and when the sumof the emotional values of ELT subwords is greater than orequal to 0 the emotional tendency of ELT is positive andwhen it is less than 0 the emotional tendency of ELT isnegative

63ComparisonofMethods -epresent 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 indicatorsand the comparison results are shown in Table 10

-e experimental results show that the F1 values of theLDA method are higher than those of the DT NB and RFalgorithms -e reason is that the LDA method for ELTsentiment analysis is based on semantic ldquotext-wordrdquo topicclassification while the DT NB and RF algorithms convertwords into word vectors without considering the semanticinformation of words which leads to the less-than-optimalresults of microbial sentiment calculation -e accuracy ofthe LDA-GA method in this paper is not satisfactory -eaccuracy recall and F1 value of the LDA-GA method in thispaper are higher than those of the LDA method -e reasonis that the LDAmethod only uses feature sentiment words tocalculate ELT sentiment polarity while the method in thispaper uses a genetic algorithm to calculate all word

Table 5 Selected subject headings

-eme Partial word setSubject word set 1 iPad3 Performance Screen Keyboard ProductSubject word set 2 Make complaints Speechless Night Company Good morningSubject word set 3 Pain Development Labour Reactionary ChallengeSubject word set 4 Fire Sing Night shanghai Vocal concert BaiduSubject word set 5 Yes Ah Burst Vulnerable Alas

Table 6 Initial word sentiment values

Individual number Make complaints Speechless Happiness Awesome Fond dream Life1 minus8 5 minus3 8 9 22 minus5 2 5 2 minus4 83 2 minus4 2 1 3 minus54 2 1 minus6 minus2 minus3 minus1

Table 7 Optimization results of word sentiment values

Individual number Make complaints Speechless Happiness Awesome Fond dream Life1 minus9 minus3 9 7 5 22 minus5 minus2 5 2 minus4 minus13 minus2 minus7 6 1 2 04 minus5 minus8 5 5 3 minus1

Table 8 Example of optimal word sentiment values

Makecomplaints Speechless Happiness Awesome Fond

dream Life

minus2 minus7 6 1 2 0

Table 9 Examples of sentiment values for the same word indifferent themes

Terms Topic 1 Topic 2 Topic 3 Topic 4 Topic 5Good 8 5 2 6 2Large 4 1 minus1 3 minus7Yes 2 0 1 3 minus2Sad minus9 minus8 minus2 minus5 minus9

Scientific Programming 9

sentiment values unites feature sentiment words andnonfeature sentiment words to calculate ELT sentimentpolarity and calculates word sentiment values according todifferent topic contexts to distinguish the sentiment polarityof the same word in different topic contexts

7 Conclusions

In this paper we propose an ELT topic analysis methodbased on contextual classification and genetic algorithms-e method first constructs ELT topic sets and ELT topicword sets using the LDA model then applies a genetic al-gorithm to each ELT topic word set one by one to auto-matically iterate and calculate the sentiment value of wordsin the word sets and finally calculates the sentiment polarityof ELT text by the sentiment value of words in the topic wordsets -e experimental results show that the accuracy recalland F1 of this method are improved compared with those ofLDA plain Bayesian classification random forest and de-cision tree-based ELT sentiment analysis methods -emethod in this paper requires repeated iterative computa-tion in the genetic algorithm which is time-consuming andthe next research work is to consider the problem of geneticalgorithm acceleration

In the future we will optimize the algorithm to make itmore robust and stable we will optimize its scalability so thatit can be applied in educational scenarios in different fields

Data Availability

-e data used in this paper are available from the corre-sponding author upon request

Conflicts of Interest

-e authors declare that they have no conflicts of interestregarding this work

References

[1] M H Santosa ldquoLearning approaches of Indonesian EFL gen Zstudents in a flipped learning contextrdquo Journal of English andForeign Languages vol 7 no 2 pp 183ndash208 2017

[2] Z Wang ldquoStudy on teaching of foreign languages readingunder thematic progression modelrdquo Open Journal of ModernLinguistics vol 05 no 1 pp 73ndash78 2015

[3] M Abrar A Mukminin A Habibi and A Fadhil ldquoIf ourforeign languages isnrsquot a language what is it Indonesian EFLStudent Teachersrsquo Challenges Speaking foreign languagesrdquoQualitative Report vol 23 no 1 pp 129ndash145 2018

[4] A Aunurrahman A Hikmayanti and Y Yuliana ldquoTeachingEnglish using a genre pedagogy to Islamic junior high schoolstudentsrdquo Journal of English and Foreign Languages vol 10no 1 pp 1ndash24 2020

[5] S Kahn and A R Lewis ldquoSurvey on teaching science to K-12students with disabilities teacher preparedness and attitudesrdquoJournal of Science Teacher Education vol 25 no 8pp 885ndash910 2014

[6] O Jonathan S Shirley C Andri C H Richardson andK Richardson ldquoLearning to argue a study of four schools andtheir attempt to develop the use of argumentation as acommon instructional practice and its impact on studentsrdquoJournal of Research in Science Teaching vol 50 no 3pp 315ndash347 2013

[7] T Xie C Zhang Z Zhang and Y Kai ldquoUtilizing active sensornodes in smart environments for optimal communicationcoveragerdquo IEEE Access vol 7 pp 11338ndash11348 2018

[8] S Ahn and H Han ldquoUS student teachersrsquo cross-culturalteaching abroad experience at a Korean high schoolrdquo Journalof Education amp Culture vol 24 no 5 pp 733ndash758 2018

[9] A Andriani V D Yuniar and F Abdullah ldquoTeaching Englishgrammar in an Indonesian junior high schoolrdquo AL-ISHLAHJurnal Pendidikan vol 13 no 2 pp 1046ndash1056 2021

[10] M Y Abdullah H M H A Ghafri and K S H A Yahyai ldquoAqualitative study on the best motivational teaching strategiesin the context of Oman perspectives of EFL teachersrdquo EnglishLanguage Teaching vol 12 no 3 pp 57ndash64 2019

[11] A Leis ldquoStudy abroad and willingness to communicate a casestudy at junior high schoolrdquo +e Language Teacher vol 39no 3 pp 3ndash9 2015

[12] M Ramos ldquoTeaching foreign languages for medical trans-lation a corpus- based approachrdquo Language Teaching Re-search Quarterly vol 8 no 2 pp 25ndash40 2020

[13] T D Holmlund K Lesseig and D Slavit ldquoMaking sense ofldquoSTEM educationrdquo in K-12 contextsrdquo International journal ofSTEM education vol 5 no 1 pp 1ndash18 2018

[14] C Zhang T Xie K Yang et al ldquoPositioning optimisationbased on particle quality prediction in wireless sensor net-worksrdquo IET Networks vol 8 no 2 pp 107ndash113 2019

[15] M M Rahman M K M Singh M K M Singh andA Pandian ldquoExploring ESL teacher beliefs and classroompractices of CLT a case studyrdquo International Journal of In-struction vol 11 no 1 pp 295ndash310 2018

[16] M Ram S Mahendra R Campus and N KathmanduldquoCollege teachersrsquo experiences in classroom ecology of lan-guage teaching a study from the phenomenological per-spectiverdquo Journal of foreign languages Education andTeaching vol 04 no 4 pp 2685ndash2743 2020

[17] R S Fernanda and J G C Claudinei ldquo-e use of activemethodology in nursing care and teaching in national pro-ductions an integrative reviewrdquo Revista da Escola de Enfer-magem da USP vol 46 no 1 pp 208ndash218 2012

[18] D M M Zin S Mohamed K A Bakar and N K IsmailldquoFurther study on implementing thematic teaching in pre-school a needs analysis researchrdquo Creative Education vol 10no 12 pp 2887ndash2898 2019

[19] LWang C Zhang Q Chen et al ldquoA communication strategyof proactive nodes based on loop theorem in wireless sensornetworksrdquo in Proceedings of the 2018 Ninth InternationalConference on Intelligent Control and Information Processing(ICICIP) pp 160ndash167 IEEE Wanzhou China November2018

[20] K Maree C Aldous and A Hattingh ldquoPredictors of learnerperformance in mathematics and science according to a large-

Table 10 Comparison experimental results of emotional dispo-sition calculation

Method Accuracy () Recall () F1 ()LDA 6063 7802 6823DT 5244 7306 6107NB 5431 8500 6623RF 5867 7463 6569LDA-GA 6375 8732 7369

10 Scientific Programming

scale study in Mpumalangardquo South African Journal of Edu-cation vol 26 no 2 pp 229ndash252 2006 httpswwwresearchgatenetprofileAndre-Swanepoel

[21] B Angela A Yves and B Barbara ldquoQuestions and positionson education for sustainable development at university inFrance example of short professional cyclesrdquo EnvironmentalEducation Research vol 19 no 3 pp 269ndash281 2013

[22] J M Newton D R Ferris C C M Goh G WilliamL S Fredricka and V Larry Teaching Foreign Languages toSecond Language Learners in Academic Contexts ReadingWriting Listening and Speaking Routledge 2018 httpswwwgooglecomsearchrlz=1C1GCEB_enIN975IN975ampq=Englandampstick=H4sIAAAAAAAAAONgVuLQz9U3MMqqMFzEyu6al56TmJcCALMnJfIWAAAAampsa=Xampsqi=2ampved=2ahUKEwinzKX26MbzAhXaqZUCHWQEDGgQmxMoBHoECDcQBghttpswwwgooglecomsearchrlz=1C1GCEB_enIN975IN975ampq=UKampstick=H4sIAAAAAAAAAONgVuLQz9U3MC8uTl7EyhTqDQBuxFlpEQAAAAampsa=Xampsqi=2ampved=2ahUKEwinzKX26MbzAhXaqZUCHWQEDGgQmxMoBXoECDcQBw

[23] J S Raj and J V Ananthi ldquoRecurrent neural networks andnonlinear prediction in support vector machinesrdquo Journal ofSoft Computing Paradigm (JSCP) vol 1 no 1 pp 33ndash40 2019

[24] J-J Tseng Y-S Cheng and H-N Yeh ldquoHow pre-serviceEnglish teachers enact TPACK in the context of web-con-ferencing teaching a design thinking approachrdquoComputers ampEducation vol 128 pp 171ndash182 2019

[25] D M Miller C E Scott and E M McTigue ldquoWriting in thesecondary-level disciplines a systematic review of contextcognition and contentrdquo Educational Psychology Reviewvol 30 no 1 pp 83ndash120 2018

[26] L Cam and T M T Tran ldquoAn evaluation of using games inteaching foreign languages grammar for first year foreignlanguages-majored students at Dong Nai Technology Uni-versityrdquo International journal of learning teaching and edu-cational Research vol 16 no 7 pp 55ndash71 2017

[27] D Wu C Zhang L Ji R Ran H Wu and Y Xu ldquoForest firerecognition based on feature extraction from multi-viewimagesrdquo Traitement du Signal vol 38 no 3 pp 775ndash7832021

[28] S E Kaymakamoglu ldquoTeachersrsquo beliefs perceived practiceand actual classroom practice in relation to traditional(Teacher-Centered) and constructivist (Learner-Centered)teaching (note 1)rdquo Journal of Education and Learning vol 7no 1 pp 29ndash37 2018

[29] M Arifin ldquoAnalysis of the Indonesian college curriculumfocusing upon the foreign languages programrdquo Ideas Journalon foreign languages Language Teaching and Learning Lin-guistics and Literature vol 5 no 2 pp 134ndash145 2017

[30] G-Z Liu J-Y Chen and G-J Hwang ldquoMobile-based col-laborative learning in the fitness center a case study on thedevelopment of English listening comprehension with acontext-aware applicationrdquo British Journal of EducationalTechnology vol 49 no 2 pp 305ndash320 2018

[31] J Pei K Zhong J Li J Xu and X Wang ldquoECNN evaluatinga cluster-neural network model for city innovation capabil-ityrdquo Neural Computing amp Applications 2021

Scientific Programming 11

Page 5: Application of Thematic Context-Based Deep Learning in

under k topics Ad pd1 pd2

pdi1113966 1113967 and the value with

the highest probability was selected as the topic context ofthe d-th tweet pdMax max pd1

pd2 pdi

1113966 1113967

53 ELT +eme Context Word Set ConstructionAccording to the above maximum probability divisionmethod the subject context classification of the ELT set iscompleted to form the ELT topic set T T1 T2 Tk1113864 1113865where Tj djl dj2 djy1113966 1113967 j isin (1 2 middot middot middot k) y denotethe number of ELTs of topic j -e word setZj Zj (vj1 vj2 vjn) of topic j is obtained by dividingand deduplicating the tweets in Tj and n denotes thenumber of deduplicated words of the j-th topic-e word setof all k topics constitutes the LDA ELT topic word setZ Z1 Z2 Zk1113864 1113865 and the pseudocode of the LDA ELTtopic word set construction algorithm is shown inAlgorithm 1

54 Genetic Algorithm-Based Calculation of Affective Dispo-sition for Teaching Foreign Languages as a Foreign LanguageConsidering the influence of nonfeatured sentiment words onthe sentiment tendency of ELT texts this paper calculates thesentiment values of all words in each topic context separatelyafter calculating the LDA ELT topic word sets which includenonfeatured sentiment words and feature sentiment wordsand finally calculates the ELT sentiment tendency using thesentiment values of words Sentiment values of words in eachtopic word set are obtained automatically by genetic algorithmcalculation using ELT (labeled data) with manually labeledsentimental tendencies -e sentiment value calculationmethod first assigns a random initial sentiment value to thewords within a predefined range then the optimal sentimentvalue is obtained by designing the objective function and fitnessfunction associated with the label data to self-optimize thesentiment value of thewords and finally the optimal sentimentvalue of the topic words is used to calculate the optimalsentiment tendency value of ELT [30] Topic context word setZj is used as the individual in the genetic algorithm andindividual Chromx corresponds to the sentimental value of allwords in Zj which is Chromx wx1 wx2 wx31113864 1113865 wxt isthe sentimental value of the t-th word in individual x -esentimental value of each word corresponds to the chromo-some code of the individual -e population is composed ofMindividuals denoted as P Chrom1Chrom21113864 Chrommand the initial word sentimental value of an individual is arandom value of [minus10 10] as shown in Figure 3 -e pop-ulation is iteratively optimized in the genetic algorithm and theindividual word sentimental value calculated when the numberof iterations reaches a predefined value is the optimal senti-mental value of all words in the topic context

55 Genetic Algorithm Objective Optimization FunctionIn fact some words do not have the same sentiment ten-dency in different contexts so corresponding to this

situation this paper sets the same word to have differentsentiment values in different individuals and classifyingwords into different thematic contexts is to consider thisvariability In order to make the sentiment tendency of ELTin individuals close to the sentiment tendency of labeleddata that is in order to apply labeled data to automaticallyobtain the sentiment tendency of words the objectivefunction of genetic algorithm is designed in this paper toachieve word sentiment value optimization [13] -e sen-timental value of the s-th ELT under topic j is calculatedusing the following equation

Senti Zj TjChromx djs1113872 1113873 1113944wordisindk

wjt Chromx wordt( 1113857( 1113857

(5)

where wordt is the word in ELT djs wjt(Chromx(wordt))

indicates the sentiment value of word wordt in individu-alChromx When Senti(Zj TjChromx djs) is greater thanor equal to 0 it is positive and vice versa it is negativeclass(djs) indicates the affective tendency of ELT djs asshown in the following equation

class djs1113872 1113873 positive Senti Zj TjChromx djs1113872 1113873ge 0

negative Senti Zj TjChromx djs1113872 1113873lt 0

⎧⎪⎨

⎪⎩

(6)

-is paper sets Acc(Chromx Tj) as the degree of dif-ference between the affective tendency of ELT in individualChromx and the affective tendency of the labeled data undertopic j as shown in the following equation the smaller thevalue the closer the affective tendency of ELT in individualChromx is to the affective tendency of the labeled data

Acc Chromx Tj1113872 1113873 1 minusnum1lesleydkisinTj

class djs1113872 1113873

y (7)

where Tj is the set of topics djs -e number of ELT affectivetendencies that are consistent with the labeled ELT dataaffective tendencies is calculated in individual 33 by equation(6) -e minimum difference degree individuals are deter-mined by setting the objective optimization functionaccording to equation (7) as shown in the followingequation

Accmin min1leileMChromisinP

Accuracy Chromx Tj1113872 11138731113872 1113873 (8)

56 Genetic-Algorithm-Based Word Sentiment ValueCalculation In order to make the probability of individualswith the smaller variance being retained higher the adap-tation function is set in this paper as shown in the followingequation

Scientific Programming 5

gather edfit Chromx Tj1113872 1113873 y

Acc Chromx Tj1113872 1113873times(minus1) + y minus

y

Acc Chromx Tj1113872 1113873⎛⎝ ⎞⎠ (9)

where yAcc(Chromx Tj) is the number of ELTs in whichthe emotional disposition was judged incorrectly in indi-vidual Chromx and (y minus yAcc(Chromx Tj)) indicates thenumber of ELTs in which the emotional disposition wasjudged correctly in individual Chromx -e roulette wheelmethod was used for individual selection using equation (9)so that the greater the fitness (smaller the variance) thegreater the probability of individuals being selected forretention -e selected individuals are then subjected to

crossover and mutation operations to produce new indi-viduals Individual selection crossover and mutation op-erations are repeatedly performed in the genetic algorithm tooptimize the population of individuals iteratively until apredetermined number of iterations is reached and thecalculation is stopped and finally the individual with thesmallest variance is selected as the word sentiment valueusing the objective optimization function -e pseudocodeof word sentimental value calculation based on a genetic

Input D d1 d2 dm1113864 1113865 Ad pd1 pd2 pdk1113864 1113865

ELT corpus and ELT topic probability distributionsOutput Z Z1 Z2 Zk1113864 1113865LDA ELT subject headings

(1) for i 1 to m dotraverse ELT D(2) Get the topic T to which the i-th ELT topic probability maximum belongs(3) TalarrGet(PiMax)

(4) put the i article of ELT into the Tath topic(5) Topicappend (Ta i)(6) end for(7) for j 1 to k dotraverse k topics(8) ELT splitting and deduplication in the j-th topic(9) lexicallarr 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

ALGORITHM 1 LDA ELT topic word set construction algorithm

We Company Yes One Good

9 4 -3 -8 0

2 6 -2 3 -5

Word set

Chrom 1

Chrom m

Figure 3 Some of the initial word sentiment scores correspond to

5 -3 -8 9 2 -5 6 1 5 6 -2 9 -3 -5 0 1

3 6 -2 2 -3 9 0 -8 3 -3 -8 2 2 9 6 -8

Figure 4 Multipoint crossover

5 -3 -8 9 2 -5 6 1 5 -3 -2 9 2 -5 6 1

Figure 5 Genetic variation

6 Scientific Programming

algorithm is shown in Algorithm 2 and the individualcrossover and variation operations are shown in Figures 4and 5

57 Calculation of Emotional Disposition in ELT -e min-imum variance individual 11 was obtained by the genetic al-gorithm and the codes of chromosomes in the individualcorresponded to the optimal sentiment values of words in thesubject word set In the minimum variance individual 22 thesentiment values of all words in ELT are first summed up byequation (5) to obtain the sentiment value of ELT and thenjudged by equation (6) [31] if the sentiment value is greater thanor equal to 0 it means that the ELT has a positive sentimenttendency and the opposite means that it has a negative senti-ment tendency -e calculation example is shown in Figure 6

6 Experimental Results and Analysis

61 ExperimentalData Set -e datum was obtained from the2012ndash2014 NLPCC public data set [22] with 17253 ELTs-ere were 7188 ELTs after removing nonopinion sentencesand this data was used as a corpus for the calculation of affectivetendencies for ELTs of which 3314 were positive and 3874were negative and the tenfold cross-validation was used totrain and test the method of this paper

-e NLPCC data set has eight labels none happinesslike sadness disgust anger fear and surprise -e eightlabels are simplified into two types of labels positive andnegative as shown in Table 1

After the labels were categorized the ELT content wasstored in a uniform format and the data format is shown inTable 2 with the polarity 1 for ELT indicating positive andminus1 for negative

62 Experimental Procedure and Results In this paper theeffects of all words on the effective polarity of ELT wereinvolved in the calculation and all words in ELT were

retained after the splitting of ELT Sample results of PKU-SEG splitting are shown in Table 3

After ELTword classification the LDA ELT topic modelis used to construct the topic word sets K values of thenumber of topics in the LDA ELT topic model need to be setin advance and the selection of suitable k values is beneficialto topic classification In this paper the k value is set to 5 (thecollected data are divided into 5 topics) and the sample ELTtopic context classification is shown in Table 4

-e results of the ELT theme context classification aretheme one is related to foreign languages and foreign lan-guages commentary theme two is related to personalemotional expressions theme three is social status com-mentary and event descriptions theme four is dynamic ELTcommentary about socially prominent people theme five ismore colloquial popular Internet phrases and the classifi-cation results are consistent with reality After completingthe ELT topic context classification the ELT topic word set isconstructed as shown in Table 5

After obtaining the topic word sets the word sentimentvalues were calculated using a genetic algorithm-basedmethod for calculating sentimental tendencies in ELT -epopulation P is randomly generated in the algorithm andthe population size is set to 1000 and the selectioncrossover and mutation operations are performed on theindividuals In this paper the number of words afterdeweighting the current topic ELT words is used as theindividual coding length and the chromosome coding iscoded with real integers in the [minus10 10] interval and theinitial word sentiment values are shown in Table 6 -einitial word sentiment values are shown in Table 6 -egenetic algorithm is run with the labeled data objectivefunction and fitness function for each word set in each topicso that the sentiment values are optimized iteratively untilthe predetermined number of iterations is reached and thecalculation stops (the iteration threshold is set to 2000 inthis paper) and the results of word sentiment value opti-mization are shown in Table 7

Input D d1 d2 dm1113864 1113865 T T1 T2 Tk1113864 1113865 Z Z1 Z2 Zk1113864 1113865

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 [Chrom1Chrom2 ChromM]Randomly generated populations P(2) for j 1 to MAX doMAX is the maximum number of iterations(3) for ch 1 to M dotraverse the population(4) fitlarr fitness (ch)calculate individual fitness(5) fitnessappend (fit)save fitness(6) end for(7) new_plarr select(P fitness)select operation(8) new_plarr cross(new_p)cross operation(9) new_plarrmutation (new_p)mutation operation(10) plarr new_pnew population P(11) end for(12) ChromminlarrAccmin Minimum variance individual(13) return(Chrommin)Return the minimum variance individual

ALGORITHM 2 Genetic algorithm-based word sentiment value calculation

Scientific Programming 7

This is One Good Bad late Company go towork

Good morning

0 -1 8 -9 -2 1 -6 3

Emotional value table of

words

Testdata set

This is a goodunit

0-1+8+1=+

8

+8gtpositive electrode

Figure 6 Example of emotional disposition calculation

Table 1 Label classification

Positive NegativeNone SadnessHappiness DisgustLike Fear

Surprise

Table 2 Sample ELT texts

Serial number Microblog content Polarity1 I feel strange and uncomfortable minus12 -e film is really moving especially with the development of the plot it is melodious and beautiful 13 Suddenly I found that Liu Xinrsquos song names are so powerful 14 Itrsquos too late minus15 -ese days have been wonderful all kinds of wonderful 16 Superman is everywhere and Kobe responds only to roars and mistakes minus17 I donrsquot know if the performance of iPad3 is good If it is good I can consider buying one 18 Our unit is a good unit Although we get off work late we go to work early minus19 After reading a lot about the laptop dock of MTO ATRIX I like it more and more 110 Personality explosion 1

Table 3 Sample ELT PKU-SEG word separation results

Serial number Word segmentation result1 I feel strange and uncomfortable2 Irsquove had a wonderful time these days3 Suddenly I found that Liu Xinrsquos song names are so powerful4 Personality explosion

Table 4 Sample ELT topic context classification

Topic 1 I donrsquot 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 lotabout MTO ATRIX I like it more and more

Topic 2 -e past few days have been wonderful I feel strange and uncomfortable in my heart Our unit is a good unit Although we get offwork late we go to work early

Topic 3 -e film is really moving especially with the development of the plot the melodious songs are really sensational

Topic 4 Suddenly I found that Liu Xinrsquos songs were so powerful -ey were superman everywhere Kobe responded only with roars andmistakes

Topic 5 Burst out of character Itrsquos so sad

8 Scientific Programming

621 Mediating Effect Test -e mediation effect was ex-amined using the nonparametric percentile Bootstrapmethod with the PROCESS 216 plug-in installed in SPSS240 software -e results showed that desire mediated therelationship between perceived behavioral control sense ofrelatedness and willingness to act desire partially mediatedthe relationship between perceived behavioral control andwillingness to act and desire fully mediated the relationshipbetween sense of relatedness and willingness to act (seeTable 3)

In the genetic algorithm-based method for calculatingaffective tendencies in ELT the objective function is used toselect the individual with the least variance in the optimizedpopulation as the current topic word affective value asshown in Table 8

After the classification of ELT topic contexts there maybe the same words in different topics and this classificationmethod is consistent with the reality that there are differ-ences in affective tendencies of the same word in differenttopic contexts and the affective values of the same word indifferent topics are shown in Table 9

After the classification of topics the emotional tendencyof ELT is judged by calculating the sum of the emotionalvalues of ELT subwords under the topic and when the sumof the emotional values of ELT subwords is greater than orequal to 0 the emotional tendency of ELT is positive andwhen it is less than 0 the emotional tendency of ELT isnegative

63ComparisonofMethods -epresent 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 indicatorsand the comparison results are shown in Table 10

-e experimental results show that the F1 values of theLDA method are higher than those of the DT NB and RFalgorithms -e reason is that the LDA method for ELTsentiment analysis is based on semantic ldquotext-wordrdquo topicclassification while the DT NB and RF algorithms convertwords into word vectors without considering the semanticinformation of words which leads to the less-than-optimalresults of microbial sentiment calculation -e accuracy ofthe LDA-GA method in this paper is not satisfactory -eaccuracy recall and F1 value of the LDA-GA method in thispaper are higher than those of the LDA method -e reasonis that the LDAmethod only uses feature sentiment words tocalculate ELT sentiment polarity while the method in thispaper uses a genetic algorithm to calculate all word

Table 5 Selected subject headings

-eme Partial word setSubject word set 1 iPad3 Performance Screen Keyboard ProductSubject word set 2 Make complaints Speechless Night Company Good morningSubject word set 3 Pain Development Labour Reactionary ChallengeSubject word set 4 Fire Sing Night shanghai Vocal concert BaiduSubject word set 5 Yes Ah Burst Vulnerable Alas

Table 6 Initial word sentiment values

Individual number Make complaints Speechless Happiness Awesome Fond dream Life1 minus8 5 minus3 8 9 22 minus5 2 5 2 minus4 83 2 minus4 2 1 3 minus54 2 1 minus6 minus2 minus3 minus1

Table 7 Optimization results of word sentiment values

Individual number Make complaints Speechless Happiness Awesome Fond dream Life1 minus9 minus3 9 7 5 22 minus5 minus2 5 2 minus4 minus13 minus2 minus7 6 1 2 04 minus5 minus8 5 5 3 minus1

Table 8 Example of optimal word sentiment values

Makecomplaints Speechless Happiness Awesome Fond

dream Life

minus2 minus7 6 1 2 0

Table 9 Examples of sentiment values for the same word indifferent themes

Terms Topic 1 Topic 2 Topic 3 Topic 4 Topic 5Good 8 5 2 6 2Large 4 1 minus1 3 minus7Yes 2 0 1 3 minus2Sad minus9 minus8 minus2 minus5 minus9

Scientific Programming 9

sentiment values unites feature sentiment words andnonfeature sentiment words to calculate ELT sentimentpolarity and calculates word sentiment values according todifferent topic contexts to distinguish the sentiment polarityof the same word in different topic contexts

7 Conclusions

In this paper we propose an ELT topic analysis methodbased on contextual classification and genetic algorithms-e method first constructs ELT topic sets and ELT topicword sets using the LDA model then applies a genetic al-gorithm to each ELT topic word set one by one to auto-matically iterate and calculate the sentiment value of wordsin the word sets and finally calculates the sentiment polarityof ELT text by the sentiment value of words in the topic wordsets -e experimental results show that the accuracy recalland F1 of this method are improved compared with those ofLDA plain Bayesian classification random forest and de-cision tree-based ELT sentiment analysis methods -emethod in this paper requires repeated iterative computa-tion in the genetic algorithm which is time-consuming andthe next research work is to consider the problem of geneticalgorithm acceleration

In the future we will optimize the algorithm to make itmore robust and stable we will optimize its scalability so thatit can be applied in educational scenarios in different fields

Data Availability

-e data used in this paper are available from the corre-sponding author upon request

Conflicts of Interest

-e authors declare that they have no conflicts of interestregarding this work

References

[1] M H Santosa ldquoLearning approaches of Indonesian EFL gen Zstudents in a flipped learning contextrdquo Journal of English andForeign Languages vol 7 no 2 pp 183ndash208 2017

[2] Z Wang ldquoStudy on teaching of foreign languages readingunder thematic progression modelrdquo Open Journal of ModernLinguistics vol 05 no 1 pp 73ndash78 2015

[3] M Abrar A Mukminin A Habibi and A Fadhil ldquoIf ourforeign languages isnrsquot a language what is it Indonesian EFLStudent Teachersrsquo Challenges Speaking foreign languagesrdquoQualitative Report vol 23 no 1 pp 129ndash145 2018

[4] A Aunurrahman A Hikmayanti and Y Yuliana ldquoTeachingEnglish using a genre pedagogy to Islamic junior high schoolstudentsrdquo Journal of English and Foreign Languages vol 10no 1 pp 1ndash24 2020

[5] S Kahn and A R Lewis ldquoSurvey on teaching science to K-12students with disabilities teacher preparedness and attitudesrdquoJournal of Science Teacher Education vol 25 no 8pp 885ndash910 2014

[6] O Jonathan S Shirley C Andri C H Richardson andK Richardson ldquoLearning to argue a study of four schools andtheir attempt to develop the use of argumentation as acommon instructional practice and its impact on studentsrdquoJournal of Research in Science Teaching vol 50 no 3pp 315ndash347 2013

[7] T Xie C Zhang Z Zhang and Y Kai ldquoUtilizing active sensornodes in smart environments for optimal communicationcoveragerdquo IEEE Access vol 7 pp 11338ndash11348 2018

[8] S Ahn and H Han ldquoUS student teachersrsquo cross-culturalteaching abroad experience at a Korean high schoolrdquo Journalof Education amp Culture vol 24 no 5 pp 733ndash758 2018

[9] A Andriani V D Yuniar and F Abdullah ldquoTeaching Englishgrammar in an Indonesian junior high schoolrdquo AL-ISHLAHJurnal Pendidikan vol 13 no 2 pp 1046ndash1056 2021

[10] M Y Abdullah H M H A Ghafri and K S H A Yahyai ldquoAqualitative study on the best motivational teaching strategiesin the context of Oman perspectives of EFL teachersrdquo EnglishLanguage Teaching vol 12 no 3 pp 57ndash64 2019

[11] A Leis ldquoStudy abroad and willingness to communicate a casestudy at junior high schoolrdquo +e Language Teacher vol 39no 3 pp 3ndash9 2015

[12] M Ramos ldquoTeaching foreign languages for medical trans-lation a corpus- based approachrdquo Language Teaching Re-search Quarterly vol 8 no 2 pp 25ndash40 2020

[13] T D Holmlund K Lesseig and D Slavit ldquoMaking sense ofldquoSTEM educationrdquo in K-12 contextsrdquo International journal ofSTEM education vol 5 no 1 pp 1ndash18 2018

[14] C Zhang T Xie K Yang et al ldquoPositioning optimisationbased on particle quality prediction in wireless sensor net-worksrdquo IET Networks vol 8 no 2 pp 107ndash113 2019

[15] M M Rahman M K M Singh M K M Singh andA Pandian ldquoExploring ESL teacher beliefs and classroompractices of CLT a case studyrdquo International Journal of In-struction vol 11 no 1 pp 295ndash310 2018

[16] M Ram S Mahendra R Campus and N KathmanduldquoCollege teachersrsquo experiences in classroom ecology of lan-guage teaching a study from the phenomenological per-spectiverdquo Journal of foreign languages Education andTeaching vol 04 no 4 pp 2685ndash2743 2020

[17] R S Fernanda and J G C Claudinei ldquo-e use of activemethodology in nursing care and teaching in national pro-ductions an integrative reviewrdquo Revista da Escola de Enfer-magem da USP vol 46 no 1 pp 208ndash218 2012

[18] D M M Zin S Mohamed K A Bakar and N K IsmailldquoFurther study on implementing thematic teaching in pre-school a needs analysis researchrdquo Creative Education vol 10no 12 pp 2887ndash2898 2019

[19] LWang C Zhang Q Chen et al ldquoA communication strategyof proactive nodes based on loop theorem in wireless sensornetworksrdquo in Proceedings of the 2018 Ninth InternationalConference on Intelligent Control and Information Processing(ICICIP) pp 160ndash167 IEEE Wanzhou China November2018

[20] K Maree C Aldous and A Hattingh ldquoPredictors of learnerperformance in mathematics and science according to a large-

Table 10 Comparison experimental results of emotional dispo-sition calculation

Method Accuracy () Recall () F1 ()LDA 6063 7802 6823DT 5244 7306 6107NB 5431 8500 6623RF 5867 7463 6569LDA-GA 6375 8732 7369

10 Scientific Programming

scale study in Mpumalangardquo South African Journal of Edu-cation vol 26 no 2 pp 229ndash252 2006 httpswwwresearchgatenetprofileAndre-Swanepoel

[21] B Angela A Yves and B Barbara ldquoQuestions and positionson education for sustainable development at university inFrance example of short professional cyclesrdquo EnvironmentalEducation Research vol 19 no 3 pp 269ndash281 2013

[22] J M Newton D R Ferris C C M Goh G WilliamL S Fredricka and V Larry Teaching Foreign Languages toSecond Language Learners in Academic Contexts ReadingWriting Listening and Speaking Routledge 2018 httpswwwgooglecomsearchrlz=1C1GCEB_enIN975IN975ampq=Englandampstick=H4sIAAAAAAAAAONgVuLQz9U3MMqqMFzEyu6al56TmJcCALMnJfIWAAAAampsa=Xampsqi=2ampved=2ahUKEwinzKX26MbzAhXaqZUCHWQEDGgQmxMoBHoECDcQBghttpswwwgooglecomsearchrlz=1C1GCEB_enIN975IN975ampq=UKampstick=H4sIAAAAAAAAAONgVuLQz9U3MC8uTl7EyhTqDQBuxFlpEQAAAAampsa=Xampsqi=2ampved=2ahUKEwinzKX26MbzAhXaqZUCHWQEDGgQmxMoBXoECDcQBw

[23] J S Raj and J V Ananthi ldquoRecurrent neural networks andnonlinear prediction in support vector machinesrdquo Journal ofSoft Computing Paradigm (JSCP) vol 1 no 1 pp 33ndash40 2019

[24] J-J Tseng Y-S Cheng and H-N Yeh ldquoHow pre-serviceEnglish teachers enact TPACK in the context of web-con-ferencing teaching a design thinking approachrdquoComputers ampEducation vol 128 pp 171ndash182 2019

[25] D M Miller C E Scott and E M McTigue ldquoWriting in thesecondary-level disciplines a systematic review of contextcognition and contentrdquo Educational Psychology Reviewvol 30 no 1 pp 83ndash120 2018

[26] L Cam and T M T Tran ldquoAn evaluation of using games inteaching foreign languages grammar for first year foreignlanguages-majored students at Dong Nai Technology Uni-versityrdquo International journal of learning teaching and edu-cational Research vol 16 no 7 pp 55ndash71 2017

[27] D Wu C Zhang L Ji R Ran H Wu and Y Xu ldquoForest firerecognition based on feature extraction from multi-viewimagesrdquo Traitement du Signal vol 38 no 3 pp 775ndash7832021

[28] S E Kaymakamoglu ldquoTeachersrsquo beliefs perceived practiceand actual classroom practice in relation to traditional(Teacher-Centered) and constructivist (Learner-Centered)teaching (note 1)rdquo Journal of Education and Learning vol 7no 1 pp 29ndash37 2018

[29] M Arifin ldquoAnalysis of the Indonesian college curriculumfocusing upon the foreign languages programrdquo Ideas Journalon foreign languages Language Teaching and Learning Lin-guistics and Literature vol 5 no 2 pp 134ndash145 2017

[30] G-Z Liu J-Y Chen and G-J Hwang ldquoMobile-based col-laborative learning in the fitness center a case study on thedevelopment of English listening comprehension with acontext-aware applicationrdquo British Journal of EducationalTechnology vol 49 no 2 pp 305ndash320 2018

[31] J Pei K Zhong J Li J Xu and X Wang ldquoECNN evaluatinga cluster-neural network model for city innovation capabil-ityrdquo Neural Computing amp Applications 2021

Scientific Programming 11

Page 6: Application of Thematic Context-Based Deep Learning in

gather edfit Chromx Tj1113872 1113873 y

Acc Chromx Tj1113872 1113873times(minus1) + y minus

y

Acc Chromx Tj1113872 1113873⎛⎝ ⎞⎠ (9)

where yAcc(Chromx Tj) is the number of ELTs in whichthe emotional disposition was judged incorrectly in indi-vidual Chromx and (y minus yAcc(Chromx Tj)) indicates thenumber of ELTs in which the emotional disposition wasjudged correctly in individual Chromx -e roulette wheelmethod was used for individual selection using equation (9)so that the greater the fitness (smaller the variance) thegreater the probability of individuals being selected forretention -e selected individuals are then subjected to

crossover and mutation operations to produce new indi-viduals Individual selection crossover and mutation op-erations are repeatedly performed in the genetic algorithm tooptimize the population of individuals iteratively until apredetermined number of iterations is reached and thecalculation is stopped and finally the individual with thesmallest variance is selected as the word sentiment valueusing the objective optimization function -e pseudocodeof word sentimental value calculation based on a genetic

Input D d1 d2 dm1113864 1113865 Ad pd1 pd2 pdk1113864 1113865

ELT corpus and ELT topic probability distributionsOutput Z Z1 Z2 Zk1113864 1113865LDA ELT subject headings

(1) for i 1 to m dotraverse ELT D(2) Get the topic T to which the i-th ELT topic probability maximum belongs(3) TalarrGet(PiMax)

(4) put the i article of ELT into the Tath topic(5) Topicappend (Ta i)(6) end for(7) for j 1 to k dotraverse k topics(8) ELT splitting and deduplication in the j-th topic(9) lexicallarr 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

ALGORITHM 1 LDA ELT topic word set construction algorithm

We Company Yes One Good

9 4 -3 -8 0

2 6 -2 3 -5

Word set

Chrom 1

Chrom m

Figure 3 Some of the initial word sentiment scores correspond to

5 -3 -8 9 2 -5 6 1 5 6 -2 9 -3 -5 0 1

3 6 -2 2 -3 9 0 -8 3 -3 -8 2 2 9 6 -8

Figure 4 Multipoint crossover

5 -3 -8 9 2 -5 6 1 5 -3 -2 9 2 -5 6 1

Figure 5 Genetic variation

6 Scientific Programming

algorithm is shown in Algorithm 2 and the individualcrossover and variation operations are shown in Figures 4and 5

57 Calculation of Emotional Disposition in ELT -e min-imum variance individual 11 was obtained by the genetic al-gorithm and the codes of chromosomes in the individualcorresponded to the optimal sentiment values of words in thesubject word set In the minimum variance individual 22 thesentiment values of all words in ELT are first summed up byequation (5) to obtain the sentiment value of ELT and thenjudged by equation (6) [31] if the sentiment value is greater thanor equal to 0 it means that the ELT has a positive sentimenttendency and the opposite means that it has a negative senti-ment tendency -e calculation example is shown in Figure 6

6 Experimental Results and Analysis

61 ExperimentalData Set -e datum was obtained from the2012ndash2014 NLPCC public data set [22] with 17253 ELTs-ere were 7188 ELTs after removing nonopinion sentencesand this data was used as a corpus for the calculation of affectivetendencies for ELTs of which 3314 were positive and 3874were negative and the tenfold cross-validation was used totrain and test the method of this paper

-e NLPCC data set has eight labels none happinesslike sadness disgust anger fear and surprise -e eightlabels are simplified into two types of labels positive andnegative as shown in Table 1

After the labels were categorized the ELT content wasstored in a uniform format and the data format is shown inTable 2 with the polarity 1 for ELT indicating positive andminus1 for negative

62 Experimental Procedure and Results In this paper theeffects of all words on the effective polarity of ELT wereinvolved in the calculation and all words in ELT were

retained after the splitting of ELT Sample results of PKU-SEG splitting are shown in Table 3

After ELTword classification the LDA ELT topic modelis used to construct the topic word sets K values of thenumber of topics in the LDA ELT topic model need to be setin advance and the selection of suitable k values is beneficialto topic classification In this paper the k value is set to 5 (thecollected data are divided into 5 topics) and the sample ELTtopic context classification is shown in Table 4

-e results of the ELT theme context classification aretheme one is related to foreign languages and foreign lan-guages commentary theme two is related to personalemotional expressions theme three is social status com-mentary and event descriptions theme four is dynamic ELTcommentary about socially prominent people theme five ismore colloquial popular Internet phrases and the classifi-cation results are consistent with reality After completingthe ELT topic context classification the ELT topic word set isconstructed as shown in Table 5

After obtaining the topic word sets the word sentimentvalues were calculated using a genetic algorithm-basedmethod for calculating sentimental tendencies in ELT -epopulation P is randomly generated in the algorithm andthe population size is set to 1000 and the selectioncrossover and mutation operations are performed on theindividuals In this paper the number of words afterdeweighting the current topic ELT words is used as theindividual coding length and the chromosome coding iscoded with real integers in the [minus10 10] interval and theinitial word sentiment values are shown in Table 6 -einitial word sentiment values are shown in Table 6 -egenetic algorithm is run with the labeled data objectivefunction and fitness function for each word set in each topicso that the sentiment values are optimized iteratively untilthe predetermined number of iterations is reached and thecalculation stops (the iteration threshold is set to 2000 inthis paper) and the results of word sentiment value opti-mization are shown in Table 7

Input D d1 d2 dm1113864 1113865 T T1 T2 Tk1113864 1113865 Z Z1 Z2 Zk1113864 1113865

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 [Chrom1Chrom2 ChromM]Randomly generated populations P(2) for j 1 to MAX doMAX is the maximum number of iterations(3) for ch 1 to M dotraverse the population(4) fitlarr fitness (ch)calculate individual fitness(5) fitnessappend (fit)save fitness(6) end for(7) new_plarr select(P fitness)select operation(8) new_plarr cross(new_p)cross operation(9) new_plarrmutation (new_p)mutation operation(10) plarr new_pnew population P(11) end for(12) ChromminlarrAccmin Minimum variance individual(13) return(Chrommin)Return the minimum variance individual

ALGORITHM 2 Genetic algorithm-based word sentiment value calculation

Scientific Programming 7

This is One Good Bad late Company go towork

Good morning

0 -1 8 -9 -2 1 -6 3

Emotional value table of

words

Testdata set

This is a goodunit

0-1+8+1=+

8

+8gtpositive electrode

Figure 6 Example of emotional disposition calculation

Table 1 Label classification

Positive NegativeNone SadnessHappiness DisgustLike Fear

Surprise

Table 2 Sample ELT texts

Serial number Microblog content Polarity1 I feel strange and uncomfortable minus12 -e film is really moving especially with the development of the plot it is melodious and beautiful 13 Suddenly I found that Liu Xinrsquos song names are so powerful 14 Itrsquos too late minus15 -ese days have been wonderful all kinds of wonderful 16 Superman is everywhere and Kobe responds only to roars and mistakes minus17 I donrsquot know if the performance of iPad3 is good If it is good I can consider buying one 18 Our unit is a good unit Although we get off work late we go to work early minus19 After reading a lot about the laptop dock of MTO ATRIX I like it more and more 110 Personality explosion 1

Table 3 Sample ELT PKU-SEG word separation results

Serial number Word segmentation result1 I feel strange and uncomfortable2 Irsquove had a wonderful time these days3 Suddenly I found that Liu Xinrsquos song names are so powerful4 Personality explosion

Table 4 Sample ELT topic context classification

Topic 1 I donrsquot 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 lotabout MTO ATRIX I like it more and more

Topic 2 -e past few days have been wonderful I feel strange and uncomfortable in my heart Our unit is a good unit Although we get offwork late we go to work early

Topic 3 -e film is really moving especially with the development of the plot the melodious songs are really sensational

Topic 4 Suddenly I found that Liu Xinrsquos songs were so powerful -ey were superman everywhere Kobe responded only with roars andmistakes

Topic 5 Burst out of character Itrsquos so sad

8 Scientific Programming

621 Mediating Effect Test -e mediation effect was ex-amined using the nonparametric percentile Bootstrapmethod with the PROCESS 216 plug-in installed in SPSS240 software -e results showed that desire mediated therelationship between perceived behavioral control sense ofrelatedness and willingness to act desire partially mediatedthe relationship between perceived behavioral control andwillingness to act and desire fully mediated the relationshipbetween sense of relatedness and willingness to act (seeTable 3)

In the genetic algorithm-based method for calculatingaffective tendencies in ELT the objective function is used toselect the individual with the least variance in the optimizedpopulation as the current topic word affective value asshown in Table 8

After the classification of ELT topic contexts there maybe the same words in different topics and this classificationmethod is consistent with the reality that there are differ-ences in affective tendencies of the same word in differenttopic contexts and the affective values of the same word indifferent topics are shown in Table 9

After the classification of topics the emotional tendencyof ELT is judged by calculating the sum of the emotionalvalues of ELT subwords under the topic and when the sumof the emotional values of ELT subwords is greater than orequal to 0 the emotional tendency of ELT is positive andwhen it is less than 0 the emotional tendency of ELT isnegative

63ComparisonofMethods -epresent 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 indicatorsand the comparison results are shown in Table 10

-e experimental results show that the F1 values of theLDA method are higher than those of the DT NB and RFalgorithms -e reason is that the LDA method for ELTsentiment analysis is based on semantic ldquotext-wordrdquo topicclassification while the DT NB and RF algorithms convertwords into word vectors without considering the semanticinformation of words which leads to the less-than-optimalresults of microbial sentiment calculation -e accuracy ofthe LDA-GA method in this paper is not satisfactory -eaccuracy recall and F1 value of the LDA-GA method in thispaper are higher than those of the LDA method -e reasonis that the LDAmethod only uses feature sentiment words tocalculate ELT sentiment polarity while the method in thispaper uses a genetic algorithm to calculate all word

Table 5 Selected subject headings

-eme Partial word setSubject word set 1 iPad3 Performance Screen Keyboard ProductSubject word set 2 Make complaints Speechless Night Company Good morningSubject word set 3 Pain Development Labour Reactionary ChallengeSubject word set 4 Fire Sing Night shanghai Vocal concert BaiduSubject word set 5 Yes Ah Burst Vulnerable Alas

Table 6 Initial word sentiment values

Individual number Make complaints Speechless Happiness Awesome Fond dream Life1 minus8 5 minus3 8 9 22 minus5 2 5 2 minus4 83 2 minus4 2 1 3 minus54 2 1 minus6 minus2 minus3 minus1

Table 7 Optimization results of word sentiment values

Individual number Make complaints Speechless Happiness Awesome Fond dream Life1 minus9 minus3 9 7 5 22 minus5 minus2 5 2 minus4 minus13 minus2 minus7 6 1 2 04 minus5 minus8 5 5 3 minus1

Table 8 Example of optimal word sentiment values

Makecomplaints Speechless Happiness Awesome Fond

dream Life

minus2 minus7 6 1 2 0

Table 9 Examples of sentiment values for the same word indifferent themes

Terms Topic 1 Topic 2 Topic 3 Topic 4 Topic 5Good 8 5 2 6 2Large 4 1 minus1 3 minus7Yes 2 0 1 3 minus2Sad minus9 minus8 minus2 minus5 minus9

Scientific Programming 9

sentiment values unites feature sentiment words andnonfeature sentiment words to calculate ELT sentimentpolarity and calculates word sentiment values according todifferent topic contexts to distinguish the sentiment polarityof the same word in different topic contexts

7 Conclusions

In this paper we propose an ELT topic analysis methodbased on contextual classification and genetic algorithms-e method first constructs ELT topic sets and ELT topicword sets using the LDA model then applies a genetic al-gorithm to each ELT topic word set one by one to auto-matically iterate and calculate the sentiment value of wordsin the word sets and finally calculates the sentiment polarityof ELT text by the sentiment value of words in the topic wordsets -e experimental results show that the accuracy recalland F1 of this method are improved compared with those ofLDA plain Bayesian classification random forest and de-cision tree-based ELT sentiment analysis methods -emethod in this paper requires repeated iterative computa-tion in the genetic algorithm which is time-consuming andthe next research work is to consider the problem of geneticalgorithm acceleration

In the future we will optimize the algorithm to make itmore robust and stable we will optimize its scalability so thatit can be applied in educational scenarios in different fields

Data Availability

-e data used in this paper are available from the corre-sponding author upon request

Conflicts of Interest

-e authors declare that they have no conflicts of interestregarding this work

References

[1] M H Santosa ldquoLearning approaches of Indonesian EFL gen Zstudents in a flipped learning contextrdquo Journal of English andForeign Languages vol 7 no 2 pp 183ndash208 2017

[2] Z Wang ldquoStudy on teaching of foreign languages readingunder thematic progression modelrdquo Open Journal of ModernLinguistics vol 05 no 1 pp 73ndash78 2015

[3] M Abrar A Mukminin A Habibi and A Fadhil ldquoIf ourforeign languages isnrsquot a language what is it Indonesian EFLStudent Teachersrsquo Challenges Speaking foreign languagesrdquoQualitative Report vol 23 no 1 pp 129ndash145 2018

[4] A Aunurrahman A Hikmayanti and Y Yuliana ldquoTeachingEnglish using a genre pedagogy to Islamic junior high schoolstudentsrdquo Journal of English and Foreign Languages vol 10no 1 pp 1ndash24 2020

[5] S Kahn and A R Lewis ldquoSurvey on teaching science to K-12students with disabilities teacher preparedness and attitudesrdquoJournal of Science Teacher Education vol 25 no 8pp 885ndash910 2014

[6] O Jonathan S Shirley C Andri C H Richardson andK Richardson ldquoLearning to argue a study of four schools andtheir attempt to develop the use of argumentation as acommon instructional practice and its impact on studentsrdquoJournal of Research in Science Teaching vol 50 no 3pp 315ndash347 2013

[7] T Xie C Zhang Z Zhang and Y Kai ldquoUtilizing active sensornodes in smart environments for optimal communicationcoveragerdquo IEEE Access vol 7 pp 11338ndash11348 2018

[8] S Ahn and H Han ldquoUS student teachersrsquo cross-culturalteaching abroad experience at a Korean high schoolrdquo Journalof Education amp Culture vol 24 no 5 pp 733ndash758 2018

[9] A Andriani V D Yuniar and F Abdullah ldquoTeaching Englishgrammar in an Indonesian junior high schoolrdquo AL-ISHLAHJurnal Pendidikan vol 13 no 2 pp 1046ndash1056 2021

[10] M Y Abdullah H M H A Ghafri and K S H A Yahyai ldquoAqualitative study on the best motivational teaching strategiesin the context of Oman perspectives of EFL teachersrdquo EnglishLanguage Teaching vol 12 no 3 pp 57ndash64 2019

[11] A Leis ldquoStudy abroad and willingness to communicate a casestudy at junior high schoolrdquo +e Language Teacher vol 39no 3 pp 3ndash9 2015

[12] M Ramos ldquoTeaching foreign languages for medical trans-lation a corpus- based approachrdquo Language Teaching Re-search Quarterly vol 8 no 2 pp 25ndash40 2020

[13] T D Holmlund K Lesseig and D Slavit ldquoMaking sense ofldquoSTEM educationrdquo in K-12 contextsrdquo International journal ofSTEM education vol 5 no 1 pp 1ndash18 2018

[14] C Zhang T Xie K Yang et al ldquoPositioning optimisationbased on particle quality prediction in wireless sensor net-worksrdquo IET Networks vol 8 no 2 pp 107ndash113 2019

[15] M M Rahman M K M Singh M K M Singh andA Pandian ldquoExploring ESL teacher beliefs and classroompractices of CLT a case studyrdquo International Journal of In-struction vol 11 no 1 pp 295ndash310 2018

[16] M Ram S Mahendra R Campus and N KathmanduldquoCollege teachersrsquo experiences in classroom ecology of lan-guage teaching a study from the phenomenological per-spectiverdquo Journal of foreign languages Education andTeaching vol 04 no 4 pp 2685ndash2743 2020

[17] R S Fernanda and J G C Claudinei ldquo-e use of activemethodology in nursing care and teaching in national pro-ductions an integrative reviewrdquo Revista da Escola de Enfer-magem da USP vol 46 no 1 pp 208ndash218 2012

[18] D M M Zin S Mohamed K A Bakar and N K IsmailldquoFurther study on implementing thematic teaching in pre-school a needs analysis researchrdquo Creative Education vol 10no 12 pp 2887ndash2898 2019

[19] LWang C Zhang Q Chen et al ldquoA communication strategyof proactive nodes based on loop theorem in wireless sensornetworksrdquo in Proceedings of the 2018 Ninth InternationalConference on Intelligent Control and Information Processing(ICICIP) pp 160ndash167 IEEE Wanzhou China November2018

[20] K Maree C Aldous and A Hattingh ldquoPredictors of learnerperformance in mathematics and science according to a large-

Table 10 Comparison experimental results of emotional dispo-sition calculation

Method Accuracy () Recall () F1 ()LDA 6063 7802 6823DT 5244 7306 6107NB 5431 8500 6623RF 5867 7463 6569LDA-GA 6375 8732 7369

10 Scientific Programming

scale study in Mpumalangardquo South African Journal of Edu-cation vol 26 no 2 pp 229ndash252 2006 httpswwwresearchgatenetprofileAndre-Swanepoel

[21] B Angela A Yves and B Barbara ldquoQuestions and positionson education for sustainable development at university inFrance example of short professional cyclesrdquo EnvironmentalEducation Research vol 19 no 3 pp 269ndash281 2013

[22] J M Newton D R Ferris C C M Goh G WilliamL S Fredricka and V Larry Teaching Foreign Languages toSecond Language Learners in Academic Contexts ReadingWriting Listening and Speaking Routledge 2018 httpswwwgooglecomsearchrlz=1C1GCEB_enIN975IN975ampq=Englandampstick=H4sIAAAAAAAAAONgVuLQz9U3MMqqMFzEyu6al56TmJcCALMnJfIWAAAAampsa=Xampsqi=2ampved=2ahUKEwinzKX26MbzAhXaqZUCHWQEDGgQmxMoBHoECDcQBghttpswwwgooglecomsearchrlz=1C1GCEB_enIN975IN975ampq=UKampstick=H4sIAAAAAAAAAONgVuLQz9U3MC8uTl7EyhTqDQBuxFlpEQAAAAampsa=Xampsqi=2ampved=2ahUKEwinzKX26MbzAhXaqZUCHWQEDGgQmxMoBXoECDcQBw

[23] J S Raj and J V Ananthi ldquoRecurrent neural networks andnonlinear prediction in support vector machinesrdquo Journal ofSoft Computing Paradigm (JSCP) vol 1 no 1 pp 33ndash40 2019

[24] J-J Tseng Y-S Cheng and H-N Yeh ldquoHow pre-serviceEnglish teachers enact TPACK in the context of web-con-ferencing teaching a design thinking approachrdquoComputers ampEducation vol 128 pp 171ndash182 2019

[25] D M Miller C E Scott and E M McTigue ldquoWriting in thesecondary-level disciplines a systematic review of contextcognition and contentrdquo Educational Psychology Reviewvol 30 no 1 pp 83ndash120 2018

[26] L Cam and T M T Tran ldquoAn evaluation of using games inteaching foreign languages grammar for first year foreignlanguages-majored students at Dong Nai Technology Uni-versityrdquo International journal of learning teaching and edu-cational Research vol 16 no 7 pp 55ndash71 2017

[27] D Wu C Zhang L Ji R Ran H Wu and Y Xu ldquoForest firerecognition based on feature extraction from multi-viewimagesrdquo Traitement du Signal vol 38 no 3 pp 775ndash7832021

[28] S E Kaymakamoglu ldquoTeachersrsquo beliefs perceived practiceand actual classroom practice in relation to traditional(Teacher-Centered) and constructivist (Learner-Centered)teaching (note 1)rdquo Journal of Education and Learning vol 7no 1 pp 29ndash37 2018

[29] M Arifin ldquoAnalysis of the Indonesian college curriculumfocusing upon the foreign languages programrdquo Ideas Journalon foreign languages Language Teaching and Learning Lin-guistics and Literature vol 5 no 2 pp 134ndash145 2017

[30] G-Z Liu J-Y Chen and G-J Hwang ldquoMobile-based col-laborative learning in the fitness center a case study on thedevelopment of English listening comprehension with acontext-aware applicationrdquo British Journal of EducationalTechnology vol 49 no 2 pp 305ndash320 2018

[31] J Pei K Zhong J Li J Xu and X Wang ldquoECNN evaluatinga cluster-neural network model for city innovation capabil-ityrdquo Neural Computing amp Applications 2021

Scientific Programming 11

Page 7: Application of Thematic Context-Based Deep Learning in

algorithm is shown in Algorithm 2 and the individualcrossover and variation operations are shown in Figures 4and 5

57 Calculation of Emotional Disposition in ELT -e min-imum variance individual 11 was obtained by the genetic al-gorithm and the codes of chromosomes in the individualcorresponded to the optimal sentiment values of words in thesubject word set In the minimum variance individual 22 thesentiment values of all words in ELT are first summed up byequation (5) to obtain the sentiment value of ELT and thenjudged by equation (6) [31] if the sentiment value is greater thanor equal to 0 it means that the ELT has a positive sentimenttendency and the opposite means that it has a negative senti-ment tendency -e calculation example is shown in Figure 6

6 Experimental Results and Analysis

61 ExperimentalData Set -e datum was obtained from the2012ndash2014 NLPCC public data set [22] with 17253 ELTs-ere were 7188 ELTs after removing nonopinion sentencesand this data was used as a corpus for the calculation of affectivetendencies for ELTs of which 3314 were positive and 3874were negative and the tenfold cross-validation was used totrain and test the method of this paper

-e NLPCC data set has eight labels none happinesslike sadness disgust anger fear and surprise -e eightlabels are simplified into two types of labels positive andnegative as shown in Table 1

After the labels were categorized the ELT content wasstored in a uniform format and the data format is shown inTable 2 with the polarity 1 for ELT indicating positive andminus1 for negative

62 Experimental Procedure and Results In this paper theeffects of all words on the effective polarity of ELT wereinvolved in the calculation and all words in ELT were

retained after the splitting of ELT Sample results of PKU-SEG splitting are shown in Table 3

After ELTword classification the LDA ELT topic modelis used to construct the topic word sets K values of thenumber of topics in the LDA ELT topic model need to be setin advance and the selection of suitable k values is beneficialto topic classification In this paper the k value is set to 5 (thecollected data are divided into 5 topics) and the sample ELTtopic context classification is shown in Table 4

-e results of the ELT theme context classification aretheme one is related to foreign languages and foreign lan-guages commentary theme two is related to personalemotional expressions theme three is social status com-mentary and event descriptions theme four is dynamic ELTcommentary about socially prominent people theme five ismore colloquial popular Internet phrases and the classifi-cation results are consistent with reality After completingthe ELT topic context classification the ELT topic word set isconstructed as shown in Table 5

After obtaining the topic word sets the word sentimentvalues were calculated using a genetic algorithm-basedmethod for calculating sentimental tendencies in ELT -epopulation P is randomly generated in the algorithm andthe population size is set to 1000 and the selectioncrossover and mutation operations are performed on theindividuals In this paper the number of words afterdeweighting the current topic ELT words is used as theindividual coding length and the chromosome coding iscoded with real integers in the [minus10 10] interval and theinitial word sentiment values are shown in Table 6 -einitial word sentiment values are shown in Table 6 -egenetic algorithm is run with the labeled data objectivefunction and fitness function for each word set in each topicso that the sentiment values are optimized iteratively untilthe predetermined number of iterations is reached and thecalculation stops (the iteration threshold is set to 2000 inthis paper) and the results of word sentiment value opti-mization are shown in Table 7

Input D d1 d2 dm1113864 1113865 T T1 T2 Tk1113864 1113865 Z Z1 Z2 Zk1113864 1113865

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 [Chrom1Chrom2 ChromM]Randomly generated populations P(2) for j 1 to MAX doMAX is the maximum number of iterations(3) for ch 1 to M dotraverse the population(4) fitlarr fitness (ch)calculate individual fitness(5) fitnessappend (fit)save fitness(6) end for(7) new_plarr select(P fitness)select operation(8) new_plarr cross(new_p)cross operation(9) new_plarrmutation (new_p)mutation operation(10) plarr new_pnew population P(11) end for(12) ChromminlarrAccmin Minimum variance individual(13) return(Chrommin)Return the minimum variance individual

ALGORITHM 2 Genetic algorithm-based word sentiment value calculation

Scientific Programming 7

This is One Good Bad late Company go towork

Good morning

0 -1 8 -9 -2 1 -6 3

Emotional value table of

words

Testdata set

This is a goodunit

0-1+8+1=+

8

+8gtpositive electrode

Figure 6 Example of emotional disposition calculation

Table 1 Label classification

Positive NegativeNone SadnessHappiness DisgustLike Fear

Surprise

Table 2 Sample ELT texts

Serial number Microblog content Polarity1 I feel strange and uncomfortable minus12 -e film is really moving especially with the development of the plot it is melodious and beautiful 13 Suddenly I found that Liu Xinrsquos song names are so powerful 14 Itrsquos too late minus15 -ese days have been wonderful all kinds of wonderful 16 Superman is everywhere and Kobe responds only to roars and mistakes minus17 I donrsquot know if the performance of iPad3 is good If it is good I can consider buying one 18 Our unit is a good unit Although we get off work late we go to work early minus19 After reading a lot about the laptop dock of MTO ATRIX I like it more and more 110 Personality explosion 1

Table 3 Sample ELT PKU-SEG word separation results

Serial number Word segmentation result1 I feel strange and uncomfortable2 Irsquove had a wonderful time these days3 Suddenly I found that Liu Xinrsquos song names are so powerful4 Personality explosion

Table 4 Sample ELT topic context classification

Topic 1 I donrsquot 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 lotabout MTO ATRIX I like it more and more

Topic 2 -e past few days have been wonderful I feel strange and uncomfortable in my heart Our unit is a good unit Although we get offwork late we go to work early

Topic 3 -e film is really moving especially with the development of the plot the melodious songs are really sensational

Topic 4 Suddenly I found that Liu Xinrsquos songs were so powerful -ey were superman everywhere Kobe responded only with roars andmistakes

Topic 5 Burst out of character Itrsquos so sad

8 Scientific Programming

621 Mediating Effect Test -e mediation effect was ex-amined using the nonparametric percentile Bootstrapmethod with the PROCESS 216 plug-in installed in SPSS240 software -e results showed that desire mediated therelationship between perceived behavioral control sense ofrelatedness and willingness to act desire partially mediatedthe relationship between perceived behavioral control andwillingness to act and desire fully mediated the relationshipbetween sense of relatedness and willingness to act (seeTable 3)

In the genetic algorithm-based method for calculatingaffective tendencies in ELT the objective function is used toselect the individual with the least variance in the optimizedpopulation as the current topic word affective value asshown in Table 8

After the classification of ELT topic contexts there maybe the same words in different topics and this classificationmethod is consistent with the reality that there are differ-ences in affective tendencies of the same word in differenttopic contexts and the affective values of the same word indifferent topics are shown in Table 9

After the classification of topics the emotional tendencyof ELT is judged by calculating the sum of the emotionalvalues of ELT subwords under the topic and when the sumof the emotional values of ELT subwords is greater than orequal to 0 the emotional tendency of ELT is positive andwhen it is less than 0 the emotional tendency of ELT isnegative

63ComparisonofMethods -epresent 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 indicatorsand the comparison results are shown in Table 10

-e experimental results show that the F1 values of theLDA method are higher than those of the DT NB and RFalgorithms -e reason is that the LDA method for ELTsentiment analysis is based on semantic ldquotext-wordrdquo topicclassification while the DT NB and RF algorithms convertwords into word vectors without considering the semanticinformation of words which leads to the less-than-optimalresults of microbial sentiment calculation -e accuracy ofthe LDA-GA method in this paper is not satisfactory -eaccuracy recall and F1 value of the LDA-GA method in thispaper are higher than those of the LDA method -e reasonis that the LDAmethod only uses feature sentiment words tocalculate ELT sentiment polarity while the method in thispaper uses a genetic algorithm to calculate all word

Table 5 Selected subject headings

-eme Partial word setSubject word set 1 iPad3 Performance Screen Keyboard ProductSubject word set 2 Make complaints Speechless Night Company Good morningSubject word set 3 Pain Development Labour Reactionary ChallengeSubject word set 4 Fire Sing Night shanghai Vocal concert BaiduSubject word set 5 Yes Ah Burst Vulnerable Alas

Table 6 Initial word sentiment values

Individual number Make complaints Speechless Happiness Awesome Fond dream Life1 minus8 5 minus3 8 9 22 minus5 2 5 2 minus4 83 2 minus4 2 1 3 minus54 2 1 minus6 minus2 minus3 minus1

Table 7 Optimization results of word sentiment values

Individual number Make complaints Speechless Happiness Awesome Fond dream Life1 minus9 minus3 9 7 5 22 minus5 minus2 5 2 minus4 minus13 minus2 minus7 6 1 2 04 minus5 minus8 5 5 3 minus1

Table 8 Example of optimal word sentiment values

Makecomplaints Speechless Happiness Awesome Fond

dream Life

minus2 minus7 6 1 2 0

Table 9 Examples of sentiment values for the same word indifferent themes

Terms Topic 1 Topic 2 Topic 3 Topic 4 Topic 5Good 8 5 2 6 2Large 4 1 minus1 3 minus7Yes 2 0 1 3 minus2Sad minus9 minus8 minus2 minus5 minus9

Scientific Programming 9

sentiment values unites feature sentiment words andnonfeature sentiment words to calculate ELT sentimentpolarity and calculates word sentiment values according todifferent topic contexts to distinguish the sentiment polarityof the same word in different topic contexts

7 Conclusions

In this paper we propose an ELT topic analysis methodbased on contextual classification and genetic algorithms-e method first constructs ELT topic sets and ELT topicword sets using the LDA model then applies a genetic al-gorithm to each ELT topic word set one by one to auto-matically iterate and calculate the sentiment value of wordsin the word sets and finally calculates the sentiment polarityof ELT text by the sentiment value of words in the topic wordsets -e experimental results show that the accuracy recalland F1 of this method are improved compared with those ofLDA plain Bayesian classification random forest and de-cision tree-based ELT sentiment analysis methods -emethod in this paper requires repeated iterative computa-tion in the genetic algorithm which is time-consuming andthe next research work is to consider the problem of geneticalgorithm acceleration

In the future we will optimize the algorithm to make itmore robust and stable we will optimize its scalability so thatit can be applied in educational scenarios in different fields

Data Availability

-e data used in this paper are available from the corre-sponding author upon request

Conflicts of Interest

-e authors declare that they have no conflicts of interestregarding this work

References

[1] M H Santosa ldquoLearning approaches of Indonesian EFL gen Zstudents in a flipped learning contextrdquo Journal of English andForeign Languages vol 7 no 2 pp 183ndash208 2017

[2] Z Wang ldquoStudy on teaching of foreign languages readingunder thematic progression modelrdquo Open Journal of ModernLinguistics vol 05 no 1 pp 73ndash78 2015

[3] M Abrar A Mukminin A Habibi and A Fadhil ldquoIf ourforeign languages isnrsquot a language what is it Indonesian EFLStudent Teachersrsquo Challenges Speaking foreign languagesrdquoQualitative Report vol 23 no 1 pp 129ndash145 2018

[4] A Aunurrahman A Hikmayanti and Y Yuliana ldquoTeachingEnglish using a genre pedagogy to Islamic junior high schoolstudentsrdquo Journal of English and Foreign Languages vol 10no 1 pp 1ndash24 2020

[5] S Kahn and A R Lewis ldquoSurvey on teaching science to K-12students with disabilities teacher preparedness and attitudesrdquoJournal of Science Teacher Education vol 25 no 8pp 885ndash910 2014

[6] O Jonathan S Shirley C Andri C H Richardson andK Richardson ldquoLearning to argue a study of four schools andtheir attempt to develop the use of argumentation as acommon instructional practice and its impact on studentsrdquoJournal of Research in Science Teaching vol 50 no 3pp 315ndash347 2013

[7] T Xie C Zhang Z Zhang and Y Kai ldquoUtilizing active sensornodes in smart environments for optimal communicationcoveragerdquo IEEE Access vol 7 pp 11338ndash11348 2018

[8] S Ahn and H Han ldquoUS student teachersrsquo cross-culturalteaching abroad experience at a Korean high schoolrdquo Journalof Education amp Culture vol 24 no 5 pp 733ndash758 2018

[9] A Andriani V D Yuniar and F Abdullah ldquoTeaching Englishgrammar in an Indonesian junior high schoolrdquo AL-ISHLAHJurnal Pendidikan vol 13 no 2 pp 1046ndash1056 2021

[10] M Y Abdullah H M H A Ghafri and K S H A Yahyai ldquoAqualitative study on the best motivational teaching strategiesin the context of Oman perspectives of EFL teachersrdquo EnglishLanguage Teaching vol 12 no 3 pp 57ndash64 2019

[11] A Leis ldquoStudy abroad and willingness to communicate a casestudy at junior high schoolrdquo +e Language Teacher vol 39no 3 pp 3ndash9 2015

[12] M Ramos ldquoTeaching foreign languages for medical trans-lation a corpus- based approachrdquo Language Teaching Re-search Quarterly vol 8 no 2 pp 25ndash40 2020

[13] T D Holmlund K Lesseig and D Slavit ldquoMaking sense ofldquoSTEM educationrdquo in K-12 contextsrdquo International journal ofSTEM education vol 5 no 1 pp 1ndash18 2018

[14] C Zhang T Xie K Yang et al ldquoPositioning optimisationbased on particle quality prediction in wireless sensor net-worksrdquo IET Networks vol 8 no 2 pp 107ndash113 2019

[15] M M Rahman M K M Singh M K M Singh andA Pandian ldquoExploring ESL teacher beliefs and classroompractices of CLT a case studyrdquo International Journal of In-struction vol 11 no 1 pp 295ndash310 2018

[16] M Ram S Mahendra R Campus and N KathmanduldquoCollege teachersrsquo experiences in classroom ecology of lan-guage teaching a study from the phenomenological per-spectiverdquo Journal of foreign languages Education andTeaching vol 04 no 4 pp 2685ndash2743 2020

[17] R S Fernanda and J G C Claudinei ldquo-e use of activemethodology in nursing care and teaching in national pro-ductions an integrative reviewrdquo Revista da Escola de Enfer-magem da USP vol 46 no 1 pp 208ndash218 2012

[18] D M M Zin S Mohamed K A Bakar and N K IsmailldquoFurther study on implementing thematic teaching in pre-school a needs analysis researchrdquo Creative Education vol 10no 12 pp 2887ndash2898 2019

[19] LWang C Zhang Q Chen et al ldquoA communication strategyof proactive nodes based on loop theorem in wireless sensornetworksrdquo in Proceedings of the 2018 Ninth InternationalConference on Intelligent Control and Information Processing(ICICIP) pp 160ndash167 IEEE Wanzhou China November2018

[20] K Maree C Aldous and A Hattingh ldquoPredictors of learnerperformance in mathematics and science according to a large-

Table 10 Comparison experimental results of emotional dispo-sition calculation

Method Accuracy () Recall () F1 ()LDA 6063 7802 6823DT 5244 7306 6107NB 5431 8500 6623RF 5867 7463 6569LDA-GA 6375 8732 7369

10 Scientific Programming

scale study in Mpumalangardquo South African Journal of Edu-cation vol 26 no 2 pp 229ndash252 2006 httpswwwresearchgatenetprofileAndre-Swanepoel

[21] B Angela A Yves and B Barbara ldquoQuestions and positionson education for sustainable development at university inFrance example of short professional cyclesrdquo EnvironmentalEducation Research vol 19 no 3 pp 269ndash281 2013

[22] J M Newton D R Ferris C C M Goh G WilliamL S Fredricka and V Larry Teaching Foreign Languages toSecond Language Learners in Academic Contexts ReadingWriting Listening and Speaking Routledge 2018 httpswwwgooglecomsearchrlz=1C1GCEB_enIN975IN975ampq=Englandampstick=H4sIAAAAAAAAAONgVuLQz9U3MMqqMFzEyu6al56TmJcCALMnJfIWAAAAampsa=Xampsqi=2ampved=2ahUKEwinzKX26MbzAhXaqZUCHWQEDGgQmxMoBHoECDcQBghttpswwwgooglecomsearchrlz=1C1GCEB_enIN975IN975ampq=UKampstick=H4sIAAAAAAAAAONgVuLQz9U3MC8uTl7EyhTqDQBuxFlpEQAAAAampsa=Xampsqi=2ampved=2ahUKEwinzKX26MbzAhXaqZUCHWQEDGgQmxMoBXoECDcQBw

[23] J S Raj and J V Ananthi ldquoRecurrent neural networks andnonlinear prediction in support vector machinesrdquo Journal ofSoft Computing Paradigm (JSCP) vol 1 no 1 pp 33ndash40 2019

[24] J-J Tseng Y-S Cheng and H-N Yeh ldquoHow pre-serviceEnglish teachers enact TPACK in the context of web-con-ferencing teaching a design thinking approachrdquoComputers ampEducation vol 128 pp 171ndash182 2019

[25] D M Miller C E Scott and E M McTigue ldquoWriting in thesecondary-level disciplines a systematic review of contextcognition and contentrdquo Educational Psychology Reviewvol 30 no 1 pp 83ndash120 2018

[26] L Cam and T M T Tran ldquoAn evaluation of using games inteaching foreign languages grammar for first year foreignlanguages-majored students at Dong Nai Technology Uni-versityrdquo International journal of learning teaching and edu-cational Research vol 16 no 7 pp 55ndash71 2017

[27] D Wu C Zhang L Ji R Ran H Wu and Y Xu ldquoForest firerecognition based on feature extraction from multi-viewimagesrdquo Traitement du Signal vol 38 no 3 pp 775ndash7832021

[28] S E Kaymakamoglu ldquoTeachersrsquo beliefs perceived practiceand actual classroom practice in relation to traditional(Teacher-Centered) and constructivist (Learner-Centered)teaching (note 1)rdquo Journal of Education and Learning vol 7no 1 pp 29ndash37 2018

[29] M Arifin ldquoAnalysis of the Indonesian college curriculumfocusing upon the foreign languages programrdquo Ideas Journalon foreign languages Language Teaching and Learning Lin-guistics and Literature vol 5 no 2 pp 134ndash145 2017

[30] G-Z Liu J-Y Chen and G-J Hwang ldquoMobile-based col-laborative learning in the fitness center a case study on thedevelopment of English listening comprehension with acontext-aware applicationrdquo British Journal of EducationalTechnology vol 49 no 2 pp 305ndash320 2018

[31] J Pei K Zhong J Li J Xu and X Wang ldquoECNN evaluatinga cluster-neural network model for city innovation capabil-ityrdquo Neural Computing amp Applications 2021

Scientific Programming 11

Page 8: Application of Thematic Context-Based Deep Learning in

This is One Good Bad late Company go towork

Good morning

0 -1 8 -9 -2 1 -6 3

Emotional value table of

words

Testdata set

This is a goodunit

0-1+8+1=+

8

+8gtpositive electrode

Figure 6 Example of emotional disposition calculation

Table 1 Label classification

Positive NegativeNone SadnessHappiness DisgustLike Fear

Surprise

Table 2 Sample ELT texts

Serial number Microblog content Polarity1 I feel strange and uncomfortable minus12 -e film is really moving especially with the development of the plot it is melodious and beautiful 13 Suddenly I found that Liu Xinrsquos song names are so powerful 14 Itrsquos too late minus15 -ese days have been wonderful all kinds of wonderful 16 Superman is everywhere and Kobe responds only to roars and mistakes minus17 I donrsquot know if the performance of iPad3 is good If it is good I can consider buying one 18 Our unit is a good unit Although we get off work late we go to work early minus19 After reading a lot about the laptop dock of MTO ATRIX I like it more and more 110 Personality explosion 1

Table 3 Sample ELT PKU-SEG word separation results

Serial number Word segmentation result1 I feel strange and uncomfortable2 Irsquove had a wonderful time these days3 Suddenly I found that Liu Xinrsquos song names are so powerful4 Personality explosion

Table 4 Sample ELT topic context classification

Topic 1 I donrsquot 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 lotabout MTO ATRIX I like it more and more

Topic 2 -e past few days have been wonderful I feel strange and uncomfortable in my heart Our unit is a good unit Although we get offwork late we go to work early

Topic 3 -e film is really moving especially with the development of the plot the melodious songs are really sensational

Topic 4 Suddenly I found that Liu Xinrsquos songs were so powerful -ey were superman everywhere Kobe responded only with roars andmistakes

Topic 5 Burst out of character Itrsquos so sad

8 Scientific Programming

621 Mediating Effect Test -e mediation effect was ex-amined using the nonparametric percentile Bootstrapmethod with the PROCESS 216 plug-in installed in SPSS240 software -e results showed that desire mediated therelationship between perceived behavioral control sense ofrelatedness and willingness to act desire partially mediatedthe relationship between perceived behavioral control andwillingness to act and desire fully mediated the relationshipbetween sense of relatedness and willingness to act (seeTable 3)

In the genetic algorithm-based method for calculatingaffective tendencies in ELT the objective function is used toselect the individual with the least variance in the optimizedpopulation as the current topic word affective value asshown in Table 8

After the classification of ELT topic contexts there maybe the same words in different topics and this classificationmethod is consistent with the reality that there are differ-ences in affective tendencies of the same word in differenttopic contexts and the affective values of the same word indifferent topics are shown in Table 9

After the classification of topics the emotional tendencyof ELT is judged by calculating the sum of the emotionalvalues of ELT subwords under the topic and when the sumof the emotional values of ELT subwords is greater than orequal to 0 the emotional tendency of ELT is positive andwhen it is less than 0 the emotional tendency of ELT isnegative

63ComparisonofMethods -epresent 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 indicatorsand the comparison results are shown in Table 10

-e experimental results show that the F1 values of theLDA method are higher than those of the DT NB and RFalgorithms -e reason is that the LDA method for ELTsentiment analysis is based on semantic ldquotext-wordrdquo topicclassification while the DT NB and RF algorithms convertwords into word vectors without considering the semanticinformation of words which leads to the less-than-optimalresults of microbial sentiment calculation -e accuracy ofthe LDA-GA method in this paper is not satisfactory -eaccuracy recall and F1 value of the LDA-GA method in thispaper are higher than those of the LDA method -e reasonis that the LDAmethod only uses feature sentiment words tocalculate ELT sentiment polarity while the method in thispaper uses a genetic algorithm to calculate all word

Table 5 Selected subject headings

-eme Partial word setSubject word set 1 iPad3 Performance Screen Keyboard ProductSubject word set 2 Make complaints Speechless Night Company Good morningSubject word set 3 Pain Development Labour Reactionary ChallengeSubject word set 4 Fire Sing Night shanghai Vocal concert BaiduSubject word set 5 Yes Ah Burst Vulnerable Alas

Table 6 Initial word sentiment values

Individual number Make complaints Speechless Happiness Awesome Fond dream Life1 minus8 5 minus3 8 9 22 minus5 2 5 2 minus4 83 2 minus4 2 1 3 minus54 2 1 minus6 minus2 minus3 minus1

Table 7 Optimization results of word sentiment values

Individual number Make complaints Speechless Happiness Awesome Fond dream Life1 minus9 minus3 9 7 5 22 minus5 minus2 5 2 minus4 minus13 minus2 minus7 6 1 2 04 minus5 minus8 5 5 3 minus1

Table 8 Example of optimal word sentiment values

Makecomplaints Speechless Happiness Awesome Fond

dream Life

minus2 minus7 6 1 2 0

Table 9 Examples of sentiment values for the same word indifferent themes

Terms Topic 1 Topic 2 Topic 3 Topic 4 Topic 5Good 8 5 2 6 2Large 4 1 minus1 3 minus7Yes 2 0 1 3 minus2Sad minus9 minus8 minus2 minus5 minus9

Scientific Programming 9

sentiment values unites feature sentiment words andnonfeature sentiment words to calculate ELT sentimentpolarity and calculates word sentiment values according todifferent topic contexts to distinguish the sentiment polarityof the same word in different topic contexts

7 Conclusions

In this paper we propose an ELT topic analysis methodbased on contextual classification and genetic algorithms-e method first constructs ELT topic sets and ELT topicword sets using the LDA model then applies a genetic al-gorithm to each ELT topic word set one by one to auto-matically iterate and calculate the sentiment value of wordsin the word sets and finally calculates the sentiment polarityof ELT text by the sentiment value of words in the topic wordsets -e experimental results show that the accuracy recalland F1 of this method are improved compared with those ofLDA plain Bayesian classification random forest and de-cision tree-based ELT sentiment analysis methods -emethod in this paper requires repeated iterative computa-tion in the genetic algorithm which is time-consuming andthe next research work is to consider the problem of geneticalgorithm acceleration

In the future we will optimize the algorithm to make itmore robust and stable we will optimize its scalability so thatit can be applied in educational scenarios in different fields

Data Availability

-e data used in this paper are available from the corre-sponding author upon request

Conflicts of Interest

-e authors declare that they have no conflicts of interestregarding this work

References

[1] M H Santosa ldquoLearning approaches of Indonesian EFL gen Zstudents in a flipped learning contextrdquo Journal of English andForeign Languages vol 7 no 2 pp 183ndash208 2017

[2] Z Wang ldquoStudy on teaching of foreign languages readingunder thematic progression modelrdquo Open Journal of ModernLinguistics vol 05 no 1 pp 73ndash78 2015

[3] M Abrar A Mukminin A Habibi and A Fadhil ldquoIf ourforeign languages isnrsquot a language what is it Indonesian EFLStudent Teachersrsquo Challenges Speaking foreign languagesrdquoQualitative Report vol 23 no 1 pp 129ndash145 2018

[4] A Aunurrahman A Hikmayanti and Y Yuliana ldquoTeachingEnglish using a genre pedagogy to Islamic junior high schoolstudentsrdquo Journal of English and Foreign Languages vol 10no 1 pp 1ndash24 2020

[5] S Kahn and A R Lewis ldquoSurvey on teaching science to K-12students with disabilities teacher preparedness and attitudesrdquoJournal of Science Teacher Education vol 25 no 8pp 885ndash910 2014

[6] O Jonathan S Shirley C Andri C H Richardson andK Richardson ldquoLearning to argue a study of four schools andtheir attempt to develop the use of argumentation as acommon instructional practice and its impact on studentsrdquoJournal of Research in Science Teaching vol 50 no 3pp 315ndash347 2013

[7] T Xie C Zhang Z Zhang and Y Kai ldquoUtilizing active sensornodes in smart environments for optimal communicationcoveragerdquo IEEE Access vol 7 pp 11338ndash11348 2018

[8] S Ahn and H Han ldquoUS student teachersrsquo cross-culturalteaching abroad experience at a Korean high schoolrdquo Journalof Education amp Culture vol 24 no 5 pp 733ndash758 2018

[9] A Andriani V D Yuniar and F Abdullah ldquoTeaching Englishgrammar in an Indonesian junior high schoolrdquo AL-ISHLAHJurnal Pendidikan vol 13 no 2 pp 1046ndash1056 2021

[10] M Y Abdullah H M H A Ghafri and K S H A Yahyai ldquoAqualitative study on the best motivational teaching strategiesin the context of Oman perspectives of EFL teachersrdquo EnglishLanguage Teaching vol 12 no 3 pp 57ndash64 2019

[11] A Leis ldquoStudy abroad and willingness to communicate a casestudy at junior high schoolrdquo +e Language Teacher vol 39no 3 pp 3ndash9 2015

[12] M Ramos ldquoTeaching foreign languages for medical trans-lation a corpus- based approachrdquo Language Teaching Re-search Quarterly vol 8 no 2 pp 25ndash40 2020

[13] T D Holmlund K Lesseig and D Slavit ldquoMaking sense ofldquoSTEM educationrdquo in K-12 contextsrdquo International journal ofSTEM education vol 5 no 1 pp 1ndash18 2018

[14] C Zhang T Xie K Yang et al ldquoPositioning optimisationbased on particle quality prediction in wireless sensor net-worksrdquo IET Networks vol 8 no 2 pp 107ndash113 2019

[15] M M Rahman M K M Singh M K M Singh andA Pandian ldquoExploring ESL teacher beliefs and classroompractices of CLT a case studyrdquo International Journal of In-struction vol 11 no 1 pp 295ndash310 2018

[16] M Ram S Mahendra R Campus and N KathmanduldquoCollege teachersrsquo experiences in classroom ecology of lan-guage teaching a study from the phenomenological per-spectiverdquo Journal of foreign languages Education andTeaching vol 04 no 4 pp 2685ndash2743 2020

[17] R S Fernanda and J G C Claudinei ldquo-e use of activemethodology in nursing care and teaching in national pro-ductions an integrative reviewrdquo Revista da Escola de Enfer-magem da USP vol 46 no 1 pp 208ndash218 2012

[18] D M M Zin S Mohamed K A Bakar and N K IsmailldquoFurther study on implementing thematic teaching in pre-school a needs analysis researchrdquo Creative Education vol 10no 12 pp 2887ndash2898 2019

[19] LWang C Zhang Q Chen et al ldquoA communication strategyof proactive nodes based on loop theorem in wireless sensornetworksrdquo in Proceedings of the 2018 Ninth InternationalConference on Intelligent Control and Information Processing(ICICIP) pp 160ndash167 IEEE Wanzhou China November2018

[20] K Maree C Aldous and A Hattingh ldquoPredictors of learnerperformance in mathematics and science according to a large-

Table 10 Comparison experimental results of emotional dispo-sition calculation

Method Accuracy () Recall () F1 ()LDA 6063 7802 6823DT 5244 7306 6107NB 5431 8500 6623RF 5867 7463 6569LDA-GA 6375 8732 7369

10 Scientific Programming

scale study in Mpumalangardquo South African Journal of Edu-cation vol 26 no 2 pp 229ndash252 2006 httpswwwresearchgatenetprofileAndre-Swanepoel

[21] B Angela A Yves and B Barbara ldquoQuestions and positionson education for sustainable development at university inFrance example of short professional cyclesrdquo EnvironmentalEducation Research vol 19 no 3 pp 269ndash281 2013

[22] J M Newton D R Ferris C C M Goh G WilliamL S Fredricka and V Larry Teaching Foreign Languages toSecond Language Learners in Academic Contexts ReadingWriting Listening and Speaking Routledge 2018 httpswwwgooglecomsearchrlz=1C1GCEB_enIN975IN975ampq=Englandampstick=H4sIAAAAAAAAAONgVuLQz9U3MMqqMFzEyu6al56TmJcCALMnJfIWAAAAampsa=Xampsqi=2ampved=2ahUKEwinzKX26MbzAhXaqZUCHWQEDGgQmxMoBHoECDcQBghttpswwwgooglecomsearchrlz=1C1GCEB_enIN975IN975ampq=UKampstick=H4sIAAAAAAAAAONgVuLQz9U3MC8uTl7EyhTqDQBuxFlpEQAAAAampsa=Xampsqi=2ampved=2ahUKEwinzKX26MbzAhXaqZUCHWQEDGgQmxMoBXoECDcQBw

[23] J S Raj and J V Ananthi ldquoRecurrent neural networks andnonlinear prediction in support vector machinesrdquo Journal ofSoft Computing Paradigm (JSCP) vol 1 no 1 pp 33ndash40 2019

[24] J-J Tseng Y-S Cheng and H-N Yeh ldquoHow pre-serviceEnglish teachers enact TPACK in the context of web-con-ferencing teaching a design thinking approachrdquoComputers ampEducation vol 128 pp 171ndash182 2019

[25] D M Miller C E Scott and E M McTigue ldquoWriting in thesecondary-level disciplines a systematic review of contextcognition and contentrdquo Educational Psychology Reviewvol 30 no 1 pp 83ndash120 2018

[26] L Cam and T M T Tran ldquoAn evaluation of using games inteaching foreign languages grammar for first year foreignlanguages-majored students at Dong Nai Technology Uni-versityrdquo International journal of learning teaching and edu-cational Research vol 16 no 7 pp 55ndash71 2017

[27] D Wu C Zhang L Ji R Ran H Wu and Y Xu ldquoForest firerecognition based on feature extraction from multi-viewimagesrdquo Traitement du Signal vol 38 no 3 pp 775ndash7832021

[28] S E Kaymakamoglu ldquoTeachersrsquo beliefs perceived practiceand actual classroom practice in relation to traditional(Teacher-Centered) and constructivist (Learner-Centered)teaching (note 1)rdquo Journal of Education and Learning vol 7no 1 pp 29ndash37 2018

[29] M Arifin ldquoAnalysis of the Indonesian college curriculumfocusing upon the foreign languages programrdquo Ideas Journalon foreign languages Language Teaching and Learning Lin-guistics and Literature vol 5 no 2 pp 134ndash145 2017

[30] G-Z Liu J-Y Chen and G-J Hwang ldquoMobile-based col-laborative learning in the fitness center a case study on thedevelopment of English listening comprehension with acontext-aware applicationrdquo British Journal of EducationalTechnology vol 49 no 2 pp 305ndash320 2018

[31] J Pei K Zhong J Li J Xu and X Wang ldquoECNN evaluatinga cluster-neural network model for city innovation capabil-ityrdquo Neural Computing amp Applications 2021

Scientific Programming 11

Page 9: Application of Thematic Context-Based Deep Learning in

621 Mediating Effect Test -e mediation effect was ex-amined using the nonparametric percentile Bootstrapmethod with the PROCESS 216 plug-in installed in SPSS240 software -e results showed that desire mediated therelationship between perceived behavioral control sense ofrelatedness and willingness to act desire partially mediatedthe relationship between perceived behavioral control andwillingness to act and desire fully mediated the relationshipbetween sense of relatedness and willingness to act (seeTable 3)

In the genetic algorithm-based method for calculatingaffective tendencies in ELT the objective function is used toselect the individual with the least variance in the optimizedpopulation as the current topic word affective value asshown in Table 8

After the classification of ELT topic contexts there maybe the same words in different topics and this classificationmethod is consistent with the reality that there are differ-ences in affective tendencies of the same word in differenttopic contexts and the affective values of the same word indifferent topics are shown in Table 9

After the classification of topics the emotional tendencyof ELT is judged by calculating the sum of the emotionalvalues of ELT subwords under the topic and when the sumof the emotional values of ELT subwords is greater than orequal to 0 the emotional tendency of ELT is positive andwhen it is less than 0 the emotional tendency of ELT isnegative

63ComparisonofMethods -epresent 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 indicatorsand the comparison results are shown in Table 10

-e experimental results show that the F1 values of theLDA method are higher than those of the DT NB and RFalgorithms -e reason is that the LDA method for ELTsentiment analysis is based on semantic ldquotext-wordrdquo topicclassification while the DT NB and RF algorithms convertwords into word vectors without considering the semanticinformation of words which leads to the less-than-optimalresults of microbial sentiment calculation -e accuracy ofthe LDA-GA method in this paper is not satisfactory -eaccuracy recall and F1 value of the LDA-GA method in thispaper are higher than those of the LDA method -e reasonis that the LDAmethod only uses feature sentiment words tocalculate ELT sentiment polarity while the method in thispaper uses a genetic algorithm to calculate all word

Table 5 Selected subject headings

-eme Partial word setSubject word set 1 iPad3 Performance Screen Keyboard ProductSubject word set 2 Make complaints Speechless Night Company Good morningSubject word set 3 Pain Development Labour Reactionary ChallengeSubject word set 4 Fire Sing Night shanghai Vocal concert BaiduSubject word set 5 Yes Ah Burst Vulnerable Alas

Table 6 Initial word sentiment values

Individual number Make complaints Speechless Happiness Awesome Fond dream Life1 minus8 5 minus3 8 9 22 minus5 2 5 2 minus4 83 2 minus4 2 1 3 minus54 2 1 minus6 minus2 minus3 minus1

Table 7 Optimization results of word sentiment values

Individual number Make complaints Speechless Happiness Awesome Fond dream Life1 minus9 minus3 9 7 5 22 minus5 minus2 5 2 minus4 minus13 minus2 minus7 6 1 2 04 minus5 minus8 5 5 3 minus1

Table 8 Example of optimal word sentiment values

Makecomplaints Speechless Happiness Awesome Fond

dream Life

minus2 minus7 6 1 2 0

Table 9 Examples of sentiment values for the same word indifferent themes

Terms Topic 1 Topic 2 Topic 3 Topic 4 Topic 5Good 8 5 2 6 2Large 4 1 minus1 3 minus7Yes 2 0 1 3 minus2Sad minus9 minus8 minus2 minus5 minus9

Scientific Programming 9

sentiment values unites feature sentiment words andnonfeature sentiment words to calculate ELT sentimentpolarity and calculates word sentiment values according todifferent topic contexts to distinguish the sentiment polarityof the same word in different topic contexts

7 Conclusions

In this paper we propose an ELT topic analysis methodbased on contextual classification and genetic algorithms-e method first constructs ELT topic sets and ELT topicword sets using the LDA model then applies a genetic al-gorithm to each ELT topic word set one by one to auto-matically iterate and calculate the sentiment value of wordsin the word sets and finally calculates the sentiment polarityof ELT text by the sentiment value of words in the topic wordsets -e experimental results show that the accuracy recalland F1 of this method are improved compared with those ofLDA plain Bayesian classification random forest and de-cision tree-based ELT sentiment analysis methods -emethod in this paper requires repeated iterative computa-tion in the genetic algorithm which is time-consuming andthe next research work is to consider the problem of geneticalgorithm acceleration

In the future we will optimize the algorithm to make itmore robust and stable we will optimize its scalability so thatit can be applied in educational scenarios in different fields

Data Availability

-e data used in this paper are available from the corre-sponding author upon request

Conflicts of Interest

-e authors declare that they have no conflicts of interestregarding this work

References

[1] M H Santosa ldquoLearning approaches of Indonesian EFL gen Zstudents in a flipped learning contextrdquo Journal of English andForeign Languages vol 7 no 2 pp 183ndash208 2017

[2] Z Wang ldquoStudy on teaching of foreign languages readingunder thematic progression modelrdquo Open Journal of ModernLinguistics vol 05 no 1 pp 73ndash78 2015

[3] M Abrar A Mukminin A Habibi and A Fadhil ldquoIf ourforeign languages isnrsquot a language what is it Indonesian EFLStudent Teachersrsquo Challenges Speaking foreign languagesrdquoQualitative Report vol 23 no 1 pp 129ndash145 2018

[4] A Aunurrahman A Hikmayanti and Y Yuliana ldquoTeachingEnglish using a genre pedagogy to Islamic junior high schoolstudentsrdquo Journal of English and Foreign Languages vol 10no 1 pp 1ndash24 2020

[5] S Kahn and A R Lewis ldquoSurvey on teaching science to K-12students with disabilities teacher preparedness and attitudesrdquoJournal of Science Teacher Education vol 25 no 8pp 885ndash910 2014

[6] O Jonathan S Shirley C Andri C H Richardson andK Richardson ldquoLearning to argue a study of four schools andtheir attempt to develop the use of argumentation as acommon instructional practice and its impact on studentsrdquoJournal of Research in Science Teaching vol 50 no 3pp 315ndash347 2013

[7] T Xie C Zhang Z Zhang and Y Kai ldquoUtilizing active sensornodes in smart environments for optimal communicationcoveragerdquo IEEE Access vol 7 pp 11338ndash11348 2018

[8] S Ahn and H Han ldquoUS student teachersrsquo cross-culturalteaching abroad experience at a Korean high schoolrdquo Journalof Education amp Culture vol 24 no 5 pp 733ndash758 2018

[9] A Andriani V D Yuniar and F Abdullah ldquoTeaching Englishgrammar in an Indonesian junior high schoolrdquo AL-ISHLAHJurnal Pendidikan vol 13 no 2 pp 1046ndash1056 2021

[10] M Y Abdullah H M H A Ghafri and K S H A Yahyai ldquoAqualitative study on the best motivational teaching strategiesin the context of Oman perspectives of EFL teachersrdquo EnglishLanguage Teaching vol 12 no 3 pp 57ndash64 2019

[11] A Leis ldquoStudy abroad and willingness to communicate a casestudy at junior high schoolrdquo +e Language Teacher vol 39no 3 pp 3ndash9 2015

[12] M Ramos ldquoTeaching foreign languages for medical trans-lation a corpus- based approachrdquo Language Teaching Re-search Quarterly vol 8 no 2 pp 25ndash40 2020

[13] T D Holmlund K Lesseig and D Slavit ldquoMaking sense ofldquoSTEM educationrdquo in K-12 contextsrdquo International journal ofSTEM education vol 5 no 1 pp 1ndash18 2018

[14] C Zhang T Xie K Yang et al ldquoPositioning optimisationbased on particle quality prediction in wireless sensor net-worksrdquo IET Networks vol 8 no 2 pp 107ndash113 2019

[15] M M Rahman M K M Singh M K M Singh andA Pandian ldquoExploring ESL teacher beliefs and classroompractices of CLT a case studyrdquo International Journal of In-struction vol 11 no 1 pp 295ndash310 2018

[16] M Ram S Mahendra R Campus and N KathmanduldquoCollege teachersrsquo experiences in classroom ecology of lan-guage teaching a study from the phenomenological per-spectiverdquo Journal of foreign languages Education andTeaching vol 04 no 4 pp 2685ndash2743 2020

[17] R S Fernanda and J G C Claudinei ldquo-e use of activemethodology in nursing care and teaching in national pro-ductions an integrative reviewrdquo Revista da Escola de Enfer-magem da USP vol 46 no 1 pp 208ndash218 2012

[18] D M M Zin S Mohamed K A Bakar and N K IsmailldquoFurther study on implementing thematic teaching in pre-school a needs analysis researchrdquo Creative Education vol 10no 12 pp 2887ndash2898 2019

[19] LWang C Zhang Q Chen et al ldquoA communication strategyof proactive nodes based on loop theorem in wireless sensornetworksrdquo in Proceedings of the 2018 Ninth InternationalConference on Intelligent Control and Information Processing(ICICIP) pp 160ndash167 IEEE Wanzhou China November2018

[20] K Maree C Aldous and A Hattingh ldquoPredictors of learnerperformance in mathematics and science according to a large-

Table 10 Comparison experimental results of emotional dispo-sition calculation

Method Accuracy () Recall () F1 ()LDA 6063 7802 6823DT 5244 7306 6107NB 5431 8500 6623RF 5867 7463 6569LDA-GA 6375 8732 7369

10 Scientific Programming

scale study in Mpumalangardquo South African Journal of Edu-cation vol 26 no 2 pp 229ndash252 2006 httpswwwresearchgatenetprofileAndre-Swanepoel

[21] B Angela A Yves and B Barbara ldquoQuestions and positionson education for sustainable development at university inFrance example of short professional cyclesrdquo EnvironmentalEducation Research vol 19 no 3 pp 269ndash281 2013

[22] J M Newton D R Ferris C C M Goh G WilliamL S Fredricka and V Larry Teaching Foreign Languages toSecond Language Learners in Academic Contexts ReadingWriting Listening and Speaking Routledge 2018 httpswwwgooglecomsearchrlz=1C1GCEB_enIN975IN975ampq=Englandampstick=H4sIAAAAAAAAAONgVuLQz9U3MMqqMFzEyu6al56TmJcCALMnJfIWAAAAampsa=Xampsqi=2ampved=2ahUKEwinzKX26MbzAhXaqZUCHWQEDGgQmxMoBHoECDcQBghttpswwwgooglecomsearchrlz=1C1GCEB_enIN975IN975ampq=UKampstick=H4sIAAAAAAAAAONgVuLQz9U3MC8uTl7EyhTqDQBuxFlpEQAAAAampsa=Xampsqi=2ampved=2ahUKEwinzKX26MbzAhXaqZUCHWQEDGgQmxMoBXoECDcQBw

[23] J S Raj and J V Ananthi ldquoRecurrent neural networks andnonlinear prediction in support vector machinesrdquo Journal ofSoft Computing Paradigm (JSCP) vol 1 no 1 pp 33ndash40 2019

[24] J-J Tseng Y-S Cheng and H-N Yeh ldquoHow pre-serviceEnglish teachers enact TPACK in the context of web-con-ferencing teaching a design thinking approachrdquoComputers ampEducation vol 128 pp 171ndash182 2019

[25] D M Miller C E Scott and E M McTigue ldquoWriting in thesecondary-level disciplines a systematic review of contextcognition and contentrdquo Educational Psychology Reviewvol 30 no 1 pp 83ndash120 2018

[26] L Cam and T M T Tran ldquoAn evaluation of using games inteaching foreign languages grammar for first year foreignlanguages-majored students at Dong Nai Technology Uni-versityrdquo International journal of learning teaching and edu-cational Research vol 16 no 7 pp 55ndash71 2017

[27] D Wu C Zhang L Ji R Ran H Wu and Y Xu ldquoForest firerecognition based on feature extraction from multi-viewimagesrdquo Traitement du Signal vol 38 no 3 pp 775ndash7832021

[28] S E Kaymakamoglu ldquoTeachersrsquo beliefs perceived practiceand actual classroom practice in relation to traditional(Teacher-Centered) and constructivist (Learner-Centered)teaching (note 1)rdquo Journal of Education and Learning vol 7no 1 pp 29ndash37 2018

[29] M Arifin ldquoAnalysis of the Indonesian college curriculumfocusing upon the foreign languages programrdquo Ideas Journalon foreign languages Language Teaching and Learning Lin-guistics and Literature vol 5 no 2 pp 134ndash145 2017

[30] G-Z Liu J-Y Chen and G-J Hwang ldquoMobile-based col-laborative learning in the fitness center a case study on thedevelopment of English listening comprehension with acontext-aware applicationrdquo British Journal of EducationalTechnology vol 49 no 2 pp 305ndash320 2018

[31] J Pei K Zhong J Li J Xu and X Wang ldquoECNN evaluatinga cluster-neural network model for city innovation capabil-ityrdquo Neural Computing amp Applications 2021

Scientific Programming 11

Page 10: Application of Thematic Context-Based Deep Learning in

sentiment values unites feature sentiment words andnonfeature sentiment words to calculate ELT sentimentpolarity and calculates word sentiment values according todifferent topic contexts to distinguish the sentiment polarityof the same word in different topic contexts

7 Conclusions

In this paper we propose an ELT topic analysis methodbased on contextual classification and genetic algorithms-e method first constructs ELT topic sets and ELT topicword sets using the LDA model then applies a genetic al-gorithm to each ELT topic word set one by one to auto-matically iterate and calculate the sentiment value of wordsin the word sets and finally calculates the sentiment polarityof ELT text by the sentiment value of words in the topic wordsets -e experimental results show that the accuracy recalland F1 of this method are improved compared with those ofLDA plain Bayesian classification random forest and de-cision tree-based ELT sentiment analysis methods -emethod in this paper requires repeated iterative computa-tion in the genetic algorithm which is time-consuming andthe next research work is to consider the problem of geneticalgorithm acceleration

In the future we will optimize the algorithm to make itmore robust and stable we will optimize its scalability so thatit can be applied in educational scenarios in different fields

Data Availability

-e data used in this paper are available from the corre-sponding author upon request

Conflicts of Interest

-e authors declare that they have no conflicts of interestregarding this work

References

[1] M H Santosa ldquoLearning approaches of Indonesian EFL gen Zstudents in a flipped learning contextrdquo Journal of English andForeign Languages vol 7 no 2 pp 183ndash208 2017

[2] Z Wang ldquoStudy on teaching of foreign languages readingunder thematic progression modelrdquo Open Journal of ModernLinguistics vol 05 no 1 pp 73ndash78 2015

[3] M Abrar A Mukminin A Habibi and A Fadhil ldquoIf ourforeign languages isnrsquot a language what is it Indonesian EFLStudent Teachersrsquo Challenges Speaking foreign languagesrdquoQualitative Report vol 23 no 1 pp 129ndash145 2018

[4] A Aunurrahman A Hikmayanti and Y Yuliana ldquoTeachingEnglish using a genre pedagogy to Islamic junior high schoolstudentsrdquo Journal of English and Foreign Languages vol 10no 1 pp 1ndash24 2020

[5] S Kahn and A R Lewis ldquoSurvey on teaching science to K-12students with disabilities teacher preparedness and attitudesrdquoJournal of Science Teacher Education vol 25 no 8pp 885ndash910 2014

[6] O Jonathan S Shirley C Andri C H Richardson andK Richardson ldquoLearning to argue a study of four schools andtheir attempt to develop the use of argumentation as acommon instructional practice and its impact on studentsrdquoJournal of Research in Science Teaching vol 50 no 3pp 315ndash347 2013

[7] T Xie C Zhang Z Zhang and Y Kai ldquoUtilizing active sensornodes in smart environments for optimal communicationcoveragerdquo IEEE Access vol 7 pp 11338ndash11348 2018

[8] S Ahn and H Han ldquoUS student teachersrsquo cross-culturalteaching abroad experience at a Korean high schoolrdquo Journalof Education amp Culture vol 24 no 5 pp 733ndash758 2018

[9] A Andriani V D Yuniar and F Abdullah ldquoTeaching Englishgrammar in an Indonesian junior high schoolrdquo AL-ISHLAHJurnal Pendidikan vol 13 no 2 pp 1046ndash1056 2021

[10] M Y Abdullah H M H A Ghafri and K S H A Yahyai ldquoAqualitative study on the best motivational teaching strategiesin the context of Oman perspectives of EFL teachersrdquo EnglishLanguage Teaching vol 12 no 3 pp 57ndash64 2019

[11] A Leis ldquoStudy abroad and willingness to communicate a casestudy at junior high schoolrdquo +e Language Teacher vol 39no 3 pp 3ndash9 2015

[12] M Ramos ldquoTeaching foreign languages for medical trans-lation a corpus- based approachrdquo Language Teaching Re-search Quarterly vol 8 no 2 pp 25ndash40 2020

[13] T D Holmlund K Lesseig and D Slavit ldquoMaking sense ofldquoSTEM educationrdquo in K-12 contextsrdquo International journal ofSTEM education vol 5 no 1 pp 1ndash18 2018

[14] C Zhang T Xie K Yang et al ldquoPositioning optimisationbased on particle quality prediction in wireless sensor net-worksrdquo IET Networks vol 8 no 2 pp 107ndash113 2019

[15] M M Rahman M K M Singh M K M Singh andA Pandian ldquoExploring ESL teacher beliefs and classroompractices of CLT a case studyrdquo International Journal of In-struction vol 11 no 1 pp 295ndash310 2018

[16] M Ram S Mahendra R Campus and N KathmanduldquoCollege teachersrsquo experiences in classroom ecology of lan-guage teaching a study from the phenomenological per-spectiverdquo Journal of foreign languages Education andTeaching vol 04 no 4 pp 2685ndash2743 2020

[17] R S Fernanda and J G C Claudinei ldquo-e use of activemethodology in nursing care and teaching in national pro-ductions an integrative reviewrdquo Revista da Escola de Enfer-magem da USP vol 46 no 1 pp 208ndash218 2012

[18] D M M Zin S Mohamed K A Bakar and N K IsmailldquoFurther study on implementing thematic teaching in pre-school a needs analysis researchrdquo Creative Education vol 10no 12 pp 2887ndash2898 2019

[19] LWang C Zhang Q Chen et al ldquoA communication strategyof proactive nodes based on loop theorem in wireless sensornetworksrdquo in Proceedings of the 2018 Ninth InternationalConference on Intelligent Control and Information Processing(ICICIP) pp 160ndash167 IEEE Wanzhou China November2018

[20] K Maree C Aldous and A Hattingh ldquoPredictors of learnerperformance in mathematics and science according to a large-

Table 10 Comparison experimental results of emotional dispo-sition calculation

Method Accuracy () Recall () F1 ()LDA 6063 7802 6823DT 5244 7306 6107NB 5431 8500 6623RF 5867 7463 6569LDA-GA 6375 8732 7369

10 Scientific Programming

scale study in Mpumalangardquo South African Journal of Edu-cation vol 26 no 2 pp 229ndash252 2006 httpswwwresearchgatenetprofileAndre-Swanepoel

[21] B Angela A Yves and B Barbara ldquoQuestions and positionson education for sustainable development at university inFrance example of short professional cyclesrdquo EnvironmentalEducation Research vol 19 no 3 pp 269ndash281 2013

[22] J M Newton D R Ferris C C M Goh G WilliamL S Fredricka and V Larry Teaching Foreign Languages toSecond Language Learners in Academic Contexts ReadingWriting Listening and Speaking Routledge 2018 httpswwwgooglecomsearchrlz=1C1GCEB_enIN975IN975ampq=Englandampstick=H4sIAAAAAAAAAONgVuLQz9U3MMqqMFzEyu6al56TmJcCALMnJfIWAAAAampsa=Xampsqi=2ampved=2ahUKEwinzKX26MbzAhXaqZUCHWQEDGgQmxMoBHoECDcQBghttpswwwgooglecomsearchrlz=1C1GCEB_enIN975IN975ampq=UKampstick=H4sIAAAAAAAAAONgVuLQz9U3MC8uTl7EyhTqDQBuxFlpEQAAAAampsa=Xampsqi=2ampved=2ahUKEwinzKX26MbzAhXaqZUCHWQEDGgQmxMoBXoECDcQBw

[23] J S Raj and J V Ananthi ldquoRecurrent neural networks andnonlinear prediction in support vector machinesrdquo Journal ofSoft Computing Paradigm (JSCP) vol 1 no 1 pp 33ndash40 2019

[24] J-J Tseng Y-S Cheng and H-N Yeh ldquoHow pre-serviceEnglish teachers enact TPACK in the context of web-con-ferencing teaching a design thinking approachrdquoComputers ampEducation vol 128 pp 171ndash182 2019

[25] D M Miller C E Scott and E M McTigue ldquoWriting in thesecondary-level disciplines a systematic review of contextcognition and contentrdquo Educational Psychology Reviewvol 30 no 1 pp 83ndash120 2018

[26] L Cam and T M T Tran ldquoAn evaluation of using games inteaching foreign languages grammar for first year foreignlanguages-majored students at Dong Nai Technology Uni-versityrdquo International journal of learning teaching and edu-cational Research vol 16 no 7 pp 55ndash71 2017

[27] D Wu C Zhang L Ji R Ran H Wu and Y Xu ldquoForest firerecognition based on feature extraction from multi-viewimagesrdquo Traitement du Signal vol 38 no 3 pp 775ndash7832021

[28] S E Kaymakamoglu ldquoTeachersrsquo beliefs perceived practiceand actual classroom practice in relation to traditional(Teacher-Centered) and constructivist (Learner-Centered)teaching (note 1)rdquo Journal of Education and Learning vol 7no 1 pp 29ndash37 2018

[29] M Arifin ldquoAnalysis of the Indonesian college curriculumfocusing upon the foreign languages programrdquo Ideas Journalon foreign languages Language Teaching and Learning Lin-guistics and Literature vol 5 no 2 pp 134ndash145 2017

[30] G-Z Liu J-Y Chen and G-J Hwang ldquoMobile-based col-laborative learning in the fitness center a case study on thedevelopment of English listening comprehension with acontext-aware applicationrdquo British Journal of EducationalTechnology vol 49 no 2 pp 305ndash320 2018

[31] J Pei K Zhong J Li J Xu and X Wang ldquoECNN evaluatinga cluster-neural network model for city innovation capabil-ityrdquo Neural Computing amp Applications 2021

Scientific Programming 11

Page 11: Application of Thematic Context-Based Deep Learning in

scale study in Mpumalangardquo South African Journal of Edu-cation vol 26 no 2 pp 229ndash252 2006 httpswwwresearchgatenetprofileAndre-Swanepoel

[21] B Angela A Yves and B Barbara ldquoQuestions and positionson education for sustainable development at university inFrance example of short professional cyclesrdquo EnvironmentalEducation Research vol 19 no 3 pp 269ndash281 2013

[22] J M Newton D R Ferris C C M Goh G WilliamL S Fredricka and V Larry Teaching Foreign Languages toSecond Language Learners in Academic Contexts ReadingWriting Listening and Speaking Routledge 2018 httpswwwgooglecomsearchrlz=1C1GCEB_enIN975IN975ampq=Englandampstick=H4sIAAAAAAAAAONgVuLQz9U3MMqqMFzEyu6al56TmJcCALMnJfIWAAAAampsa=Xampsqi=2ampved=2ahUKEwinzKX26MbzAhXaqZUCHWQEDGgQmxMoBHoECDcQBghttpswwwgooglecomsearchrlz=1C1GCEB_enIN975IN975ampq=UKampstick=H4sIAAAAAAAAAONgVuLQz9U3MC8uTl7EyhTqDQBuxFlpEQAAAAampsa=Xampsqi=2ampved=2ahUKEwinzKX26MbzAhXaqZUCHWQEDGgQmxMoBXoECDcQBw

[23] J S Raj and J V Ananthi ldquoRecurrent neural networks andnonlinear prediction in support vector machinesrdquo Journal ofSoft Computing Paradigm (JSCP) vol 1 no 1 pp 33ndash40 2019

[24] J-J Tseng Y-S Cheng and H-N Yeh ldquoHow pre-serviceEnglish teachers enact TPACK in the context of web-con-ferencing teaching a design thinking approachrdquoComputers ampEducation vol 128 pp 171ndash182 2019

[25] D M Miller C E Scott and E M McTigue ldquoWriting in thesecondary-level disciplines a systematic review of contextcognition and contentrdquo Educational Psychology Reviewvol 30 no 1 pp 83ndash120 2018

[26] L Cam and T M T Tran ldquoAn evaluation of using games inteaching foreign languages grammar for first year foreignlanguages-majored students at Dong Nai Technology Uni-versityrdquo International journal of learning teaching and edu-cational Research vol 16 no 7 pp 55ndash71 2017

[27] D Wu C Zhang L Ji R Ran H Wu and Y Xu ldquoForest firerecognition based on feature extraction from multi-viewimagesrdquo Traitement du Signal vol 38 no 3 pp 775ndash7832021

[28] S E Kaymakamoglu ldquoTeachersrsquo beliefs perceived practiceand actual classroom practice in relation to traditional(Teacher-Centered) and constructivist (Learner-Centered)teaching (note 1)rdquo Journal of Education and Learning vol 7no 1 pp 29ndash37 2018

[29] M Arifin ldquoAnalysis of the Indonesian college curriculumfocusing upon the foreign languages programrdquo Ideas Journalon foreign languages Language Teaching and Learning Lin-guistics and Literature vol 5 no 2 pp 134ndash145 2017

[30] G-Z Liu J-Y Chen and G-J Hwang ldquoMobile-based col-laborative learning in the fitness center a case study on thedevelopment of English listening comprehension with acontext-aware applicationrdquo British Journal of EducationalTechnology vol 49 no 2 pp 305ndash320 2018

[31] J Pei K Zhong J Li J Xu and X Wang ldquoECNN evaluatinga cluster-neural network model for city innovation capabil-ityrdquo Neural Computing amp Applications 2021

Scientific Programming 11